]> xenbits.xensource.com Git - qemu-xen-4.1-testing.git/commitdiff
tcg/arm: fix qemu_st64 for big endian targets
authorAurelien Jarno <aurelien@aurel32.net>
Thu, 6 Jan 2011 21:43:13 +0000 (22:43 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Sat, 8 Jan 2011 15:41:33 +0000 (16:41 +0100)
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: Andrzej Zaborowski <balrogg@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
tcg/arm/tcg-target.c

index 9def2e58fbc27295da6b34d7d3158df056abc21e..08c44c1123b7dea2c6bb234149adfacbda81a550 100644 (file)
@@ -1248,7 +1248,7 @@ static inline void tcg_out_qemu_st(TCGContext *s, const TCGArg *args, int opc)
             tcg_out_bswap32(s, COND_EQ, TCG_REG_R0, data_reg2);
             tcg_out_st32_rwb(s, COND_EQ, TCG_REG_R0, TCG_REG_R1, addr_reg);
             tcg_out_bswap32(s, COND_EQ, TCG_REG_R0, data_reg);
-            tcg_out_st32_12(s, COND_EQ, data_reg, TCG_REG_R1, 4);
+            tcg_out_st32_12(s, COND_EQ, TCG_REG_R0, TCG_REG_R1, 4);
         } else {
             tcg_out_st32_rwb(s, COND_EQ, data_reg, TCG_REG_R1, addr_reg);
             tcg_out_st32_12(s, COND_EQ, data_reg2, TCG_REG_R1, 4);