Skip to content
Snippets Groups Projects
  1. Aug 28, 2020
  2. Aug 21, 2020
    • Max Filippov's avatar
      softfloat: add xtensa specialization for pickNaNMulAdd · fbcc38e4
      Max Filippov authored
      
      pickNaNMulAdd logic on Xtensa is to apply pickNaN to the inputs of the
      expression (a * b) + c. However if default NaN is produces as a result
      of (a * b) calculation it is not considered when c is NaN.
      So with two pickNaN variants there must be two pickNaNMulAdd variants.
      In addition the invalid flag is always set when (a * b) produces NaN.
      
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: "Alex Bennée" <alex.bennee@linaro.org>
      Cc: Richard Henderson <richard.henderson@linaro.org>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      fbcc38e4
    • Max Filippov's avatar
      softfloat: pass float_status pointer to pickNaN · 913602e3
      Max Filippov authored
      
      Pass float_status structure pointer to the pickNaN so that
      machine-specific settings are available to NaN selection code.
      Add use_first_nan property to float_status and use it in Xtensa-specific
      pickNaN.
      
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: "Alex Bennée" <alex.bennee@linaro.org>
      Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      913602e3
    • Max Filippov's avatar
      softfloat: make NO_SIGNALING_NANS runtime property · cc43c692
      Max Filippov authored
      
      target/xtensa, the only user of NO_SIGNALING_NANS macro has FPU
      implementations with and without the corresponding property. With
      NO_SIGNALING_NANS being a macro they cannot be a part of the same QEMU
      executable.
      Replace macro with new property in float_status to allow cores with
      different FPU implementations coexist.
      
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: "Alex Bennée" <alex.bennee@linaro.org>
      Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      cc43c692
    • Paolo Bonzini's avatar
      meson: rename included C source files to .c.inc · 139c1837
      Paolo Bonzini authored
      
      With Makefiles that have automatically generated dependencies, you
      generated includes are set as dependencies of the Makefile, so that they
      are built before everything else and they are available when first
      building the .c files.
      
      Alternatively you can use a fine-grained dependency, e.g.
      
              target/arm/translate.o: target/arm/decode-neon-shared.inc.c
      
      With Meson you have only one choice and it is a third option, namely
      "build at the beginning of the corresponding target"; the way you
      express it is to list the includes in the sources of that target.
      
      The problem is that Meson decides if something is a source vs. a
      generated include by looking at the extension: '.c', '.cc', '.m', '.C'
      are sources, while everything else is considered an include---including
      '.inc.c'.
      
      Use '.c.inc' to avoid this, as it is consistent with our other convention
      of using '.rst.inc' for included reStructuredText files.  The editorconfig
      file is adjusted.
      
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      139c1837
  3. Jul 15, 2020
  4. Jun 26, 2020
  5. Jun 18, 2020
  6. May 19, 2020
  7. May 15, 2020
  8. Apr 07, 2020
  9. Oct 30, 2019
  10. Aug 19, 2019
  11. Mar 25, 2019
    • Kito Cheng's avatar
      hardfloat: fix float32/64 fused multiply-add · 896f51fb
      Kito Cheng authored
      
      Before falling back to softfloat FMA, we do not restore the original
      values of inputs A and C. Fix it.
      
      This bug was caught by running gcc's testsuite on RISC-V qemu.
      
      Note that this change gives a small perf increase for fp-bench:
      
        Host: Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
        Command: perf stat -r 3 taskset -c 0 ./fp-bench -o mulAdd -p $prec
      
      - $prec = single:
        - before:
          101.71 MFlops
          102.18 MFlops
          100.96 MFlops
        - after:
          103.63 MFlops
          103.05 MFlops
          102.96 MFlops
      
      - $prec = double:
        - before:
          173.10 MFlops
          173.93 MFlops
          172.11 MFlops
        - after:
          178.49 MFlops
          178.88 MFlops
          178.66 MFlops
      
      Signed-off-by: default avatarKito Cheng <kito.cheng@gmail.com>
      Signed-off-by: default avatarEmilio G. Cota <cota@braap.org>
      Message-Id: <20190322204320.17777-1-cota@braap.org>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Signed-off-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      896f51fb
    • Mateja Marjanovic's avatar
      target/mips: Fix minor bug in FPU · 7ca96e1a
      Mateja Marjanovic authored
      
      Wrong type of NaN was generated for IEEE 754-2008 by MADDF.<D|S> and
      MSUBF.<D|S> instructions when the arguments were (Inf, Zero, NaN) or
      (Zero, Inf, NaN).
      
      The if-else statement establishes if the system conforms to IEEE
      754-1985 or IEEE 754-2008, and defines different behaviors depending
      on that. In case of IEEE 754-2008, in mentioned cases of inputs,
      <MADDF|MSUBF>.<D|S> returns the input value 'c' [2] (page 53) and
      raises floating point exception 'Invalid Operation' [1] (pages 349,
      350).
      
      These scenarios were tested and the results in QEMU emulation match
      the results obtained on the machine that has a MIPS64R6 CPU.
      
      [1] MIPS Architecture for Programmers Volume II-a: The MIPS64
          Instruction Set Reference Manual, Revision 6.06
      [2] MIPS Architecture for Programmers Volume IV-j: The MIPS64
          SIMD Architecture Module, Revision 1.12
      
      Signed-off-by: default avatarMateja Marjanovic <mateja.marjanovic@rt-rk.com>
      Message-Id: <1553008916-15274-2-git-send-email-mateja.marjanovic@rt-rk.com>
      Reviewed-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      [AJB: fixed up commit message]
      Signed-off-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      7ca96e1a
  12. Feb 26, 2019
Loading