Skip to contentSkip to conversation

Fix operands of RECIP2.S and RECIP2.PS

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

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix operands of RECIP2.S and RECIP2.PS

Read the second input operand of RECIP2.S and RECIP2.PS from FT rather than FD. RECIP2.D is already correct.

---
 target-mips/translate.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
target-mips/translate.c +2 -2
index 7104d30..d812986 100644
@@ -6805,7 +6805,7 @@ static void gen_farith (DisasContext *ctx, enum fopcode op1,
             TCGv_i32 fp1 = tcg_temp_new_i32();
 
             gen_load_fpr32(fp0, fs);
-            gen_load_fpr32(fp1, fd);
+            gen_load_fpr32(fp1, ft);
             gen_helper_float_recip2_s(fp0, fp0, fp1);
             tcg_temp_free_i32(fp1);
             gen_store_fpr32(fp0, fd);
@@ -7543,7 +7543,7 @@ static void gen_farith (DisasContext *ctx, enum fopcode op1,
             TCGv_i64 fp1 = tcg_temp_new_i64();
 
             gen_load_fpr64(ctx, fp0, fs);
-            gen_load_fpr64(ctx, fp1, fd);
+            gen_load_fpr64(ctx, fp1, ft);
             gen_helper_float_recip2_ps(fp0, fp0, fp1);
             tcg_temp_free_i64(fp1);
             gen_store_fpr64(ctx, fp0, fd);
Signature · 1 line
1.7.7.6
#1 lore raw
Quoted 31 lines · Richard Sandiford

Read the second input operand of RECIP2.S and RECIP2.PS from FT rather than FD. RECIP2.D is already correct.

---
 target-mips/translate.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
target-mips/translate.c +2 -3
index 7104d30..d812986 100644
@@ -6805,7 +6805,7 @@ static void gen_farith (DisasContext *ctx, enum fopcode op1,
             TCGv_i32 fp1 = tcg_temp_new_i32();
 
             gen_load_fpr32(fp0, fs);
-            gen_load_fpr32(fp1, fd);
+            gen_load_fpr32(fp1, ft);
             gen_helper_float_recip2_s(fp0, fp0, fp1);
             tcg_temp_free_i32(fp1);
             gen_store_fpr32(fp0, fd);
@@ -7543,7 +7543,7 @@ static void gen_farith (DisasContext *ctx, enum fopcode op1,
             TCGv_i64 fp1 = tcg_temp_new_i64();
 
             gen_load_fpr64(ctx, fp0, fs);
-            gen_load_fpr64(ctx, fp1, fd);
+            gen_load_fpr64(ctx, fp1, ft);
             gen_helper_float_recip2_ps(fp0, fp0, fp1);
             tcg_temp_free_i64(fp1);
             gen_store_fpr64(ctx, fp0, 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 22 lines · Richard Sandiford

Read the second input operand of RECIP2.S and RECIP2.PS from FT rather than FD. RECIP2.D is already correct.

---
 target-mips/translate.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
target-mips/translate.c +1 -1
index 7104d30..d812986 100644
@@ -6805,7 +6805,7 @@ static void gen_farith (DisasContext *ctx, enum fopcode op1,
             TCGv_i32 fp1 = tcg_temp_new_i32();
 
             gen_load_fpr32(fp0, fs);
-            gen_load_fpr32(fp1, fd);
+            gen_load_fpr32(fp1, ft);
             gen_helper_float_recip2_s(fp0, fp0, fp1);
             tcg_temp_free_i32(fp1);
             gen_store_fpr32(fp0, fd);

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

Quoted 8 lines
target-mips/translate.c +1 -1
@@ -7543,7 +7543,7 @@ static void gen_farith (DisasContext *ctx, enum fopcode op1,
             TCGv_i64 fp1 = tcg_temp_new_i64();
 
             gen_load_fpr64(ctx, fp0, fs);
-            gen_load_fpr64(ctx, fp1, fd);
+            gen_load_fpr64(ctx, fp1, ft);
             gen_helper_float_recip2_ps(fp0, fp0, fp1);
             tcg_temp_free_i64(fp1);
             gen_store_fpr64(ctx, fp0, fd);

Thanks, applied.

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