aboutsummaryrefslogtreecommitdiff
path: root/target-sparc
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-02 16:33:23 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-02 16:33:23 +0000
commitb991c385198e545c39a7e1a69a476542c92f16f0 (patch)
treec9a06e17e23bb02dcdf6690abe0b4efa65f7aa15 /target-sparc
parente55fd9340e66b7b8361b64f01ce20b3d575a2194 (diff)
Fix sign extension problems with smul and umul (Vince Weaver)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5138 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-sparc')
-rw-r--r--target-sparc/translate.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/target-sparc/translate.c b/target-sparc/translate.c
index cbfdb9d559..3bc5d92a8d 100644
--- a/target-sparc/translate.c
+++ b/target-sparc/translate.c
@@ -769,8 +769,8 @@ static inline void gen_op_umul(TCGv dst, TCGv src1, TCGv src2)
r_temp = tcg_temp_new(TCG_TYPE_I64);
r_temp2 = tcg_temp_new(TCG_TYPE_I64);
- tcg_gen_extu_tl_i64(r_temp, src2);
- tcg_gen_extu_tl_i64(r_temp2, src1);
+ tcg_gen_extu_i32_i64(r_temp, src2);
+ tcg_gen_extu_i32_i64(r_temp2, src1);
tcg_gen_mul_i64(r_temp2, r_temp, r_temp2);
tcg_gen_shri_i64(r_temp, r_temp2, 32);
@@ -793,8 +793,8 @@ static inline void gen_op_smul(TCGv dst, TCGv src1, TCGv src2)
r_temp = tcg_temp_new(TCG_TYPE_I64);
r_temp2 = tcg_temp_new(TCG_TYPE_I64);
- tcg_gen_ext_tl_i64(r_temp, src2);
- tcg_gen_ext_tl_i64(r_temp2, src1);
+ tcg_gen_ext_i32_i64(r_temp, src2);
+ tcg_gen_ext_i32_i64(r_temp2, src1);
tcg_gen_mul_i64(r_temp2, r_temp, r_temp2);
tcg_gen_shri_i64(r_temp, r_temp2, 32);