1. 27 4月, 2013 13 次提交
  2. 24 2月, 2013 1 次提交
  3. 19 1月, 2013 1 次提交
    • P
      tcg/target-arm: Add missing parens to assertions · 5256a720
      Peter Maydell 提交于
      Silence a (legitimate) complaint about missing parentheses:
      
      tcg/arm/tcg-target.c: In function ‘tcg_out_qemu_ld’:
      tcg/arm/tcg-target.c:1148:5: error: suggest parentheses around
      comparison in operand of ‘&’ [-Werror=parentheses]
      tcg/arm/tcg-target.c: In function ‘tcg_out_qemu_st’:
      tcg/arm/tcg-target.c:1357:5: error: suggest parentheses around
      comparison in operand of ‘&’ [-Werror=parentheses]
      
      which meant that we would mistakenly always assert if running
      a QEMU built with debug enabled on ARM.
      Signed-off-by: NPeter Maydell <peter.maydelL@linaro.org>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      5256a720
  4. 19 12月, 2012 1 次提交
  5. 24 11月, 2012 2 次提交
    • A
      tcg/arm: fix cross-endian qemu_st16 · 7aab08aa
      Aurelien Jarno 提交于
      The bswap16 TCG opcode assumes that the high bytes of the temp equal
      to 0 before calling it. The ARM backend implementation takes this
      assumption to slightly optimize the generated code.
      
      The same implementation is called for implementing the cross-endian
      qemu_st16 opcode, where this assumption is not true anymore. One way to
      fix that would be to zero the high bytes before calling it. Given the
      store instruction just ignore them, it is possible to provide a slightly
      more optimized version. With ARMv6+ the rev16 instruction does the work
      correctly. For lower ARM versions the patch provides a version which
      behaves correctly with non-zero high bytes, but fill them with junk.
      
      Cc: Andrzej Zaborowski <balrogg@gmail.com>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: qemu-stable@nongnu.org
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      7aab08aa
    • A
      tcg/arm: fix TLB access in qemu-ld/st ops · d17bd1d8
      Aurelien Jarno 提交于
      The TCG arm backend considers likely that the offset to the TLB
      entries does not exceed 12 bits for mem_index = 0. In practice this is
      not true for at least the MIPS target.
      
      The current patch fixes that by loading the bits 23-12 with a separate
      instruction, and using loads with address writeback, independently of
      the value of mem_idx. In total this allow a 24-bit offset, which is a
      lot more than needed.
      
      Cc: Andrzej Zaborowski <balrogg@gmail.com>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      d17bd1d8
  6. 17 10月, 2012 2 次提交
  7. 07 10月, 2012 2 次提交
  8. 05 10月, 2012 1 次提交
  9. 22 9月, 2012 1 次提交
  10. 16 9月, 2012 1 次提交
  11. 27 8月, 2012 1 次提交
    • P
      tcg/arm: Fix broken CONFIG_TCG_PASS_AREG0 code · 9716ef3b
      Peter Maydell 提交于
      The CONFIG_TCG_PASS_AREG0 code for calling ld/st helpers was
      broken in that it did not respect the ABI requirement that 64
      bit values were passed in even-odd register pairs. The simplest
      way to fix this is to implement some new utility functions
      for marshalling function arguments into the correct registers
      and stack, so that the code which sets up the address and
      data arguments does not need to care whether there has been
      a preceding env argument.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      9716ef3b
  12. 18 3月, 2012 1 次提交
  13. 15 3月, 2012 1 次提交
  14. 13 1月, 2012 1 次提交
  15. 15 12月, 2011 1 次提交
  16. 15 11月, 2011 1 次提交
  17. 01 10月, 2011 1 次提交
  18. 27 6月, 2011 2 次提交
  19. 24 3月, 2011 1 次提交
  20. 12 1月, 2011 1 次提交
  21. 10 1月, 2011 1 次提交
    • A
      tcg/arm: improve constant loading · 0f11f25a
      Aurelien Jarno 提交于
      Improve constant loading in two ways:
      - On all ARM versions, it's possible to load 0xffffff00 = -0x100 using
        the mvn rd, #0. Fix the conditions.
      - On <= ARMv6 versions, where movw and movt are not available, load the
        constants using mov and orr with rotations depending on the constant
        to load. This is very useful for example to load constants where the
        low byte is 0. This reduce the generated code size by about 7%.
      
      Also fix the coding style at the same time.
      
      Cc: Andrzej Zaborowski <balrog@zabor.org>
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      0f11f25a
  22. 08 1月, 2011 2 次提交
    • A
      tcg/arm: fix qemu_st64 for big endian targets · 9a3abc21
      Aurelien Jarno 提交于
      Due to a typo, qemu_st64 doesn't properly byteswap the 32-bit low word of
      a 64 bit word before saving it. This patch fixes that.
      Acked-by: NAndrzej Zaborowski <balrogg@gmail.com>
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      9a3abc21
    • A
      tcg/arm: fix branch target change during code retranslation · c69806ab
      Aurelien Jarno 提交于
      QEMU uses code retranslation to restore the CPU state when an exception
      happens. For it to work the retranslation must not modify the generated
      code. This is what is currently implemented in ARM TCG.
      
      However on CPU that don't have icache/dcache/memory synchronised like
      ARM, this requirement is stronger and code retranslation must not modify
      the generated code "atomically", as the cache line might be flushed
      at any moment (interrupt, exception, task switching), even if not
      triggered by QEMU. The probability for this to happen is very low, and
      depends on cache size and associativiy, machine load, interrupts, so the
      symptoms are might happen randomly.
      
      This requirement is currently not followed in tcg/arm, for the
      load/store code, which basically has the following structure:
        1) tlb access code is written
        2) conditional fast path code is written
        3) branch is written with a temporary target
        4) slow path code is written
        5) branch target is updated
      The cache lines corresponding to the retranslated code is not flushed
      after code retranslation as the generated code is supposed to be the
      same. However if the cache line corresponding to the branch instruction
      is flushed between step 3 and 5, and is not flushed again before the
      code is executed again, the branch target is wrong. In the guest, the
      symptoms are MMU page fault at a random addresses, which leads to
      kernel page fault or segmentation faults.
      
      The patch fixes this issue by avoiding writing the branch target until
      it is known, that is by writing only the branch instruction first, and
      later only the offset.
      
      This fixes booting linux guests on ARM hosts (tested: arm, i386, mips,
      mipsel, sh4, sparc).
      Acked-by: NEdgar E. Iglesias <edgar.iglesias@gmail.com>
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      c69806ab
  23. 09 6月, 2010 1 次提交