]> Git Repo - qemu.git/commitdiff
tcg/ppc: Fix failure in tcg_out_mem_long
authorRichard Henderson <[email protected]>
Fri, 27 Jun 2014 04:26:00 +0000 (21:26 -0700)
committerPeter Maydell <[email protected]>
Fri, 27 Jun 2014 12:23:41 +0000 (13:23 +0100)
With rt != r0 on loads, we use rt for scratch.  If we need an index
register different from base, we can't use rt, but r0 is usable.

Signed-off-by: Richard Henderson <[email protected]>
Message-id: 1403843160[email protected]
Tested-by: Cédric Le Goater <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
tcg/ppc/tcg-target.c

index c83fd9fdc01c5589e23026048b5325dc1aee9f19..dd84e761276b6486bb943da9f0aff1133202506b 100644 (file)
@@ -805,7 +805,10 @@ static void tcg_out_mem_long(TCGContext *s, int opi, int opx, TCGReg rt,
 
     /* For unaligned, or very large offsets, use the indexed form.  */
     if (offset & align || offset != (int32_t)offset) {
-        tcg_debug_assert(rs != base && (!is_store || rs != rt));
+        if (rs == base) {
+            rs = TCG_REG_R0;
+        }
+        tcg_debug_assert(!is_store || rs != rt);
         tcg_out_movi(s, TCG_TYPE_PTR, rs, orig);
         tcg_out32(s, opx | TAB(rt, base, rs));
         return;
This page took 0.026363 seconds and 4 git commands to generate.