Skip to contentSkip to conversation

target-sparc: Revert setting cpu_dst to gen_dest_gpr

PATCH Applied Richard Henderson 3 participants 3 messages Oct 29, 2012 – Oct 30, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target-sparc: Revert setting cpu_dst to gen_dest_gpr

There is some read-after-write error within the OP=2 insns which prevents setting cpu_dst to the real output register. Until this is found and fixed, always write to a temporary first.

Cc Blue Swirl <[email protected]>
Cc Aurelien Jarno <[email protected]>
---
 target-sparc/translate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target-sparc/translate.c +1 -1
index 4321393..9e46f14 100644
@@ -2633,7 +2633,7 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn)
     case 2:                     /* FPU & Logical Operations */
         {
             unsigned int xop = GET_FIELD(insn, 7, 12);
-            TCGv cpu_dst = gen_dest_gpr(dc, rd);
+            TCGv cpu_dst = get_temp_tl(dc);
             TCGv cpu_tmp0;
 
             if (xop == 0x3a) {  /* generate trap */
Signature · 1 line
1.7.11.7
Tested-by on v1 1/1
#1 lore raw
Quoted 16 lines · Richard Henderson

There is some read-after-write error within the OP=2 insns which prevents setting cpu_dst to the real output register. Until this is found and fixed, always write to a temporary first.

Cc Blue Swirl <[email protected]>
Cc Aurelien Jarno <[email protected]>
---
 target-sparc/translate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target-sparc/translate.c +0 -0
index 4321393..9e46f14 100644

target-sparc/translate.c static void disas_sparc_insn(DisasContext * dc, unsigned int insn) · line 2639

Quoted 8 lines
target-sparc/translate.c +1 -1
@@ -2633,7 +2633,7 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn)
     case 2:                     /* FPU & Logical Operations */
         {
             unsigned int xop = GET_FIELD(insn, 7, 12);
-            TCGv cpu_dst = gen_dest_gpr(dc, rd);
+            TCGv cpu_dst = get_temp_tl(dc);
             TCGv cpu_tmp0;
 
             if (xop == 0x3a) {  /* generate trap */
Signature · 2 lines
Aurelien Jarno                          GPG: 1024D/F1BCDB73
[email protected]                 http://www.aurel32.net
Applied
#2 lore raw
In reply to Richard Henderson

Thanks, applied.

Quoted 27 lines · Richard Henderson

There is some read-after-write error within the OP=2 insns which prevents setting cpu_dst to the real output register. Until this is found and fixed, always write to a temporary first.

Cc Blue Swirl <[email protected]>
Cc Aurelien Jarno <[email protected]>
---
 target-sparc/translate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target-sparc/translate.c +1 -2
index 4321393..9e46f14 100644
@@ -2633,7 +2633,7 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn)
     case 2:                     /* FPU & Logical Operations */
         {
             unsigned int xop = GET_FIELD(insn, 7, 12);
-            TCGv cpu_dst = gen_dest_gpr(dc, rd);
+            TCGv cpu_dst = get_temp_tl(dc);
             TCGv cpu_tmp0;
 
             if (xop == 0x3a) {  /* generate trap */
--

1.7.11.7