Skip to contentSkip to conversation

Fix order of CVT.PS.S operands

PATCH Applied Richard Sandiford 3 participants 3 messages Aug 27, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix order of CVT.PS.S operands

The FS input to CVT.PS.S is the high half and FT is the low half. tcg_gen_concat_i32_i64 takes the low half first, so the operands were in the wrong order.

---
 target-mips/translate.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
target-mips/translate.c +1 -1
index 06f0ac6..defc021 100644
@@ -6907,7 +6907,7 @@ static void gen_farith (DisasContext *ctx, enum fopcode op1,
 
             gen_load_fpr32(fp32_0, fs);
             gen_load_fpr32(fp32_1, ft);
-            tcg_gen_concat_i32_i64(fp64, fp32_0, fp32_1);
+            tcg_gen_concat_i32_i64(fp64, fp32_1, fp32_0);
             tcg_temp_free_i32(fp32_1);
             tcg_temp_free_i32(fp32_0);
             gen_store_fpr64(ctx, fp64, fd);
Signature · 1 line
1.7.7.6
#1 lore raw
Quoted 23 lines · Richard Sandiford

The FS input to CVT.PS.S is the high half and FT is the low half. tcg_gen_concat_i32_i64 takes the low half first, so the operands were in the wrong order.

---
 target-mips/translate.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
target-mips/translate.c +1 -2
index 06f0ac6..defc021 100644
@@ -6907,7 +6907,7 @@ static void gen_farith (DisasContext *ctx, enum fopcode op1,
 
             gen_load_fpr32(fp32_0, fs);
             gen_load_fpr32(fp32_1, ft);
-            tcg_gen_concat_i32_i64(fp64, fp32_0, fp32_1);
+            tcg_gen_concat_i32_i64(fp64, fp32_1, fp32_0);
             tcg_temp_free_i32(fp32_1);
             tcg_temp_free_i32(fp32_0);
             gen_store_fpr64(ctx, fp64, fd);
--
Quoted 1 line

1.7.7.6

CCing Aurelian for MIPS. You can look at ./MAINTAINERS to see who should be CCed.

Stefan

#2 lore raw
In reply to Richard Sandiford
Quoted 14 lines · Richard Sandiford

The FS input to CVT.PS.S is the high half and FT is the low half. tcg_gen_concat_i32_i64 takes the low half first, so the operands were in the wrong order.

---
 target-mips/translate.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
target-mips/translate.c +0 -0
index 06f0ac6..defc021 100644

target-mips/translate.c static void gen_farith (DisasContext *ctx, enum fopcode op1, · line 6913

Quoted 8 lines
target-mips/translate.c +1 -1
@@ -6907,7 +6907,7 @@ static void gen_farith (DisasContext *ctx, enum fopcode op1,
 
             gen_load_fpr32(fp32_0, fs);
             gen_load_fpr32(fp32_1, ft);
-            tcg_gen_concat_i32_i64(fp64, fp32_0, fp32_1);
+            tcg_gen_concat_i32_i64(fp64, fp32_1, fp32_0);
             tcg_temp_free_i32(fp32_1);
             tcg_temp_free_i32(fp32_0);
             gen_store_fpr64(ctx, fp64, fd);

Thanks, applied.

Signature · 2 lines
Aurelien Jarno                          GPG: 1024D/F1BCDB73
[email protected]                 http://www.aurel32.net