Commit 9d0efc88e422d6c477e958254c3cc63ea8ca309e
1 parent
baf8cc52
Use 64 bit loads for tlb addend only if addend size is 64 bits
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5203 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
8 additions
and
2 deletions
tcg/sparc/tcg-target.c
... | ... | @@ -496,6 +496,12 @@ static const void * const qemu_st_helpers[4] = { |
496 | 496 | #define TARGET_LD_OP LDX |
497 | 497 | #endif |
498 | 498 | |
499 | +#if TARGET_PHYS_ADDR_BITS == 32 | |
500 | +#define TARGET_ADDEND_LD_OP LDUW | |
501 | +#else | |
502 | +#define TARGET_ADDEND_LD_OP LDX | |
503 | +#endif | |
504 | + | |
499 | 505 | #ifdef __arch64__ |
500 | 506 | #define HOST_LD_OP LDX |
501 | 507 | #define HOST_ST_OP STX |
... | ... | @@ -623,7 +629,7 @@ static void tcg_out_qemu_ld(TCGContext *s, const TCGArg *args, |
623 | 629 | |
624 | 630 | /* ld [arg1 + x], arg1 */ |
625 | 631 | tcg_out_ldst(s, arg1, arg1, offsetof(CPUTLBEntry, addend) - |
626 | - offsetof(CPUTLBEntry, addr_read), HOST_LD_OP); | |
632 | + offsetof(CPUTLBEntry, addr_read), TARGET_ADDEND_LD_OP); | |
627 | 633 | |
628 | 634 | #if TARGET_LONG_BITS == 32 |
629 | 635 | /* and addr_reg, x, arg0 */ |
... | ... | @@ -792,7 +798,7 @@ static void tcg_out_qemu_st(TCGContext *s, const TCGArg *args, |
792 | 798 | |
793 | 799 | /* ld [arg1 + x], arg1 */ |
794 | 800 | tcg_out_ldst(s, arg1, arg1, offsetof(CPUTLBEntry, addend) - |
795 | - offsetof(CPUTLBEntry, addr_write), HOST_LD_OP); | |
801 | + offsetof(CPUTLBEntry, addr_write), TARGET_ADDEND_LD_OP); | |
796 | 802 | |
797 | 803 | #if TARGET_LONG_BITS == 32 |
798 | 804 | /* and addr_reg, x, arg0 */ | ... | ... |