summaryrefslogtreecommitdiff
path: root/tcg/sparc
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-13 20:07:53 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-13 20:07:53 +0000
commitcd9298d1c7e57591fa4b722e3b2c571b82cf505a (patch)
treeebfae4674f38b3f5d3aa43922a443d915ca483fb /tcg/sparc
parentf24dac57e4831a531107d1f0b4483f22c54d5b24 (diff)
downloadqemu-cd9298d1c7e57591fa4b722e3b2c571b82cf505a.tar.gz
qemu-cd9298d1c7e57591fa4b722e3b2c571b82cf505a.tar.bz2
qemu-cd9298d1c7e57591fa4b722e3b2c571b82cf505a.zip
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
Diffstat (limited to 'tcg/sparc')
-rw-r--r--tcg/sparc/tcg-target.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/tcg/sparc/tcg-target.c b/tcg/sparc/tcg-target.c
index 861ed8e3d3..f36796d3d8 100644
--- a/tcg/sparc/tcg-target.c
+++ b/tcg/sparc/tcg-target.c
@@ -496,6 +496,12 @@ static const void * const qemu_st_helpers[4] = {
#define TARGET_LD_OP LDX
#endif
+#if TARGET_PHYS_ADDR_BITS == 32
+#define TARGET_ADDEND_LD_OP LDUW
+#else
+#define TARGET_ADDEND_LD_OP LDX
+#endif
+
#ifdef __arch64__
#define HOST_LD_OP LDX
#define HOST_ST_OP STX
@@ -623,7 +629,7 @@ static void tcg_out_qemu_ld(TCGContext *s, const TCGArg *args,
/* ld [arg1 + x], arg1 */
tcg_out_ldst(s, arg1, arg1, offsetof(CPUTLBEntry, addend) -
- offsetof(CPUTLBEntry, addr_read), HOST_LD_OP);
+ offsetof(CPUTLBEntry, addr_read), TARGET_ADDEND_LD_OP);
#if TARGET_LONG_BITS == 32
/* and addr_reg, x, arg0 */
@@ -792,7 +798,7 @@ static void tcg_out_qemu_st(TCGContext *s, const TCGArg *args,
/* ld [arg1 + x], arg1 */
tcg_out_ldst(s, arg1, arg1, offsetof(CPUTLBEntry, addend) -
- offsetof(CPUTLBEntry, addr_write), HOST_LD_OP);
+ offsetof(CPUTLBEntry, addr_write), TARGET_ADDEND_LD_OP);
#if TARGET_LONG_BITS == 32
/* and addr_reg, x, arg0 */