Skip to contentSkip to conversation

tricore: fixes for CADD and CADDN instructions

PATCH In review David Brenken 2 participants 4 messages Feb 7, 2019

lore
Share & tools
lore
#0 lore raw

cover tricore: fixes for CADD and CADDN instructions

From: David Brenken <[email protected]>

Hello,

this patch series contains a fix for the RCR CADD and RCR CADDN instruction of the TriCore. The r4 and r3 registers were swapped.

Best regards

David Brenken

David Brenken (2):
tricore: fixed RCR_CADD instruction
tricore: fixed RCR_CADDN instruction

 target/tricore/translate.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/2 tricore: fixed RCR_CADD instruction

From: David Brenken <[email protected]>

---
 target/tricore/translate.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
target/tricore/translate.c +2 -2
index b5ab40d..0511756 100644
@@ -5867,8 +5867,8 @@ static void decode_rcr_cond_select(CPUTriCoreState *env, DisasContext *ctx)
 
     switch (op2) {
     case OPC2_32_RCR_CADD:
-        gen_condi_add(TCG_COND_NE, cpu_gpr_d[r1], const9, cpu_gpr_d[r3],
-                      cpu_gpr_d[r4]);
+        gen_condi_add(TCG_COND_NE, cpu_gpr_d[r1], const9, cpu_gpr_d[r4],
+                      cpu_gpr_d[r3]);
         break;
     case OPC2_32_RCR_CADDN:
         gen_condi_add(TCG_COND_EQ, cpu_gpr_d[r1], const9, cpu_gpr_d[r3],
Signature · 1 line
2.7.4
#2 lore raw

PATCH 2/2 tricore: fixed RCR_CADDN instruction

In reply to David Brenken

From: David Brenken <[email protected]>

---
 target/tricore/translate.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
target/tricore/translate.c +2 -2
index 0511756..fce0595 100644
@@ -5871,8 +5871,8 @@ static void decode_rcr_cond_select(CPUTriCoreState *env, DisasContext *ctx)
                       cpu_gpr_d[r3]);
         break;
     case OPC2_32_RCR_CADDN:
-        gen_condi_add(TCG_COND_EQ, cpu_gpr_d[r1], const9, cpu_gpr_d[r3],
-                      cpu_gpr_d[r4]);
+        gen_condi_add(TCG_COND_EQ, cpu_gpr_d[r1], const9, cpu_gpr_d[r4],
+                      cpu_gpr_d[r3]);
         break;
     case OPC2_32_RCR_SEL:
         temp = tcg_const_i32(0);
Signature · 1 line
2.7.4
Reviewed-by on the v1 series
#3 lore raw
In reply to David Brenken

Hi David,

Quoted 9 lines · David Brenken

From: David Brenken <[email protected]>

Hello,

this patch series contains a fix for the RCR CADD and RCR CADDN instruction of the TriCore. The r4 and r3 registers were swapped.

Best regards

Quoted 9 lines

David Brenken

David Brenken (2):
tricore: fixed RCR_CADD instruction
tricore: fixed RCR_CADDN instruction

  target/tricore/translate.c | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)

I queued it for the next PR.

Cheers,

Bastian