Skip to content
Snippets Groups Projects
  1. Sep 03, 2020
    • Stephen Long's avatar
      tcg: Fix tcg gen for vectorized absolute value · e7e8f33f
      Stephen Long authored
      
      The fallback inline expansion for vectorized absolute value,
      when the host doesn't support such an insn was flawed.
      
      E.g. when a vector of bytes has all elements negative, mask
      will be 0xffff_ffff_ffff_ffff.  Subtracting mask only adds 1
      to the low element instead of all elements becase -mask is 1
      and not 0x0101_0101_0101_0101.
      
      Signed-off-by: default avatarStephen Long <steplong@quicinc.com>
      Message-Id: <20200813161818.190-1-steplong@quicinc.com>
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      e7e8f33f
    • Richard Henderson's avatar
      cputlb: Make store_helper less fragile to compiler optimizations · 6b8b622e
      Richard Henderson authored
      
      This has no functional change.
      
      The current function structure is:
      
          inline QEMU_ALWAYSINLINE
          store_memop() {
              switch () {
                  ...
              default:
                  qemu_build_not_reached();
              }
          }
          inline QEMU_ALWAYSINLINE
          store_helper() {
              ...
              if (span_two_pages_or_io) {
                  ...
                  helper_ret_stb_mmu();
              }
              store_memop();
          }
          helper_ret_stb_mmu() {
              store_helper();
          }
      
      Whereas GCC will generate an error at compile-time when an always_inline
      function is not inlined, Clang does not.  Nor does Clang prioritize the
      inlining of always_inline functions.  Both of these are arguably bugs.
      
      Both `store_memop` and `store_helper` need to be inlined and allow
      constant propogations to eliminate the `qemu_build_not_reached` call.
      
      However, if the compiler instead chooses to inline helper_ret_stb_mmu
      into store_helper, then store_helper is now self-recursive and the
      compiler is no longer able to propagate the constant in the same way.
      
      This does not produce at current QEMU head, but was reproducible
      at v4.2.0 with `clang-10 -O2 -fexperimental-new-pass-manager`.
      
      The inline recursion problem can be fixed solely by marking
      helper_ret_stb_mmu as noinline, so the compiler does not make an
      incorrect decision about which functions to inline.
      
      In addition, extract store_helper_unaligned as a noinline subroutine
      that can be shared by all of the helpers.  This saves about 6k code
      size in an optimized x86_64 build.
      
      Reported-by: default avatarShu-Chun Weng <scw@google.com>
      Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      6b8b622e
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/legoater/tags/pull-aspeed-20200901' into staging · 3dd23a4f
      Peter Maydell authored
      
      Various fixes of Aspeed machines :
      
      * New Supermicro X11 BMC machine (Erik)
      * Fixed valid access size on AST2400 SCU
      * Improved robustness of the ftgmac100 model.
      * New flash models in m25p80 (Igor)
      * Fixed reset sequence of SDHCI/eMMC controllers
      * Improved support of the AST2600 SDMC  (Joel)
      * Couple of SMC cleanups
      
      # gpg: Signature made Tue 01 Sep 2020 13:39:20 BST
      # gpg:                using RSA key A0F66548F04895EBFE6B0B6051A343C7CFFBECA1
      # gpg: Good signature from "Cédric Le Goater <clg@kaod.org>" [undefined]
      # gpg: WARNING: This key is not certified with a trusted signature!
      # gpg:          There is no indication that the signature belongs to the owner.
      # Primary key fingerprint: A0F6 6548 F048 95EB FE6B  0B60 51A3 43C7 CFFB ECA1
      
      * remotes/legoater/tags/pull-aspeed-20200901:
        hw: add a number of SPI-flash's of m25p80 family
        arm: aspeed: add strap define `25HZ` of AST2500
        aspeed/smc: Open AHB window of the second chip of the AST2600 FMC controller
        aspeed/sdmc: Simplify calculation of RAM bits
        aspeed/sdmc: Allow writes to unprotected registers
        aspeed/sdmc: Perform memory training
        ftgmac100: Improve software reset
        ftgmac100: Fix integer overflow in ftgmac100_do_tx()
        ftgmac100: Check for invalid len and address before doing a DMA transfer
        ftgmac100: Change interrupt status when a DMA error occurs
        ftgmac100: Fix interrupt status "Packet moved to RX FIFO"
        ftgmac100: Fix interrupt status "Packet transmitted on ethernet"
        ftgmac100: Fix registers that can be read
        aspeed/sdhci: Fix reset sequence
        aspeed/smc: Fix max_slaves of the legacy SMC device
        aspeed/smc: Fix MemoryRegionOps definition
        hw/arm/aspeed: Add board model for Supermicro X11 BMC
        aspeed/scu: Fix valid access size on AST2400
        m25p80: Add support for n25q512ax3
        m25p80: Return the JEDEC ID twice for mx25l25635e
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      3dd23a4f
  2. Sep 02, 2020
Loading