target-ppc: modsw - return 64-bit sign extended
PATCH 1/2 target-ppc: modsw - return 64-bit sign extended
Reported-by Anton Blanchard <[email protected]>
Signed-off-by Nikunj A Dadhania <[email protected]>
---
Can be squashed with the original commit
target-ppc/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
target-ppc/translate.c +1 -1
@@ -1243,7 +1243,7 @@ static inline void gen_op_arith_modw(DisasContext *ctx, TCGv ret, TCGv arg1,tcg_gen_movi_i32 (t3,0 );tcg_gen_movcond_i32 (TCG_COND_NE , t1, t2, t3, t2, t1);tcg_gen_rem_i32 (t3, t0, t1); -tcg_gen_extu_i32_tl (ret, t3); +tcg_gen_ext_i32_tl (ret, t3);tcg_temp_free_i32 (t2);tcg_temp_free_i32 (t3); }else {
Signature · 1 line
2.7.4
PATCH 2/2 target-ppc: cmprb - truncate RA to 8bits
Missed the following bit in the instruction coding.
src1 ← EXTZ(RA(56:63))
Reported-by Anton Blanchard <[email protected]>
Signed-off-by Nikunj A Dadhania <[email protected]>
---
Can be squashed with the original commit
target-ppc/translate.c | 1 + 1 file changed, 1 insertion(+)
target-ppc/translate.c +1 -0
@@ -867,6 +867,7 @@ static void gen_cmprb(DisasContext *ctx)tcg_gen_trunc_tl_i32 (src1, cpu_gpr[rA (ctx->opcode)]);tcg_gen_trunc_tl_i32 (src2, cpu_gpr[rB (ctx->opcode)]); +tcg_gen_andi_i32 (src1, src1,0xFF );tcg_gen_ext8u_i32 (src2lo, src2);tcg_gen_shri_i32 (src2, src2,8 );tcg_gen_ext8u_i32 (src2hi, src2);
Signature · 1 line
2.7.4
Quoted 5 lines · Nikunj A Dadhania
Reported-by Anton Blanchard <[email protected]>Signed-off-by Nikunj A Dadhania <[email protected]>---
Can be squashed with the original commit
Done.
Quoted 17 lines
target-ppc/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)target-ppc/translate.c +1
-1@@ -1243,7 +1243,7 @@ static inline void gen_op_arith_modw(DisasContext *ctx, TCGv ret, TCGv arg1,tcg_gen_movi_i32 (t3,0 );tcg_gen_movcond_i32 (TCG_COND_NE , t1, t2, t3, t2, t1);tcg_gen_rem_i32 (t3, t0, t1); -tcg_gen_extu_i32_tl (ret, t3); +tcg_gen_ext_i32_tl (ret, t3);tcg_temp_free_i32 (t2);tcg_temp_free_i32 (t3); }else {
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Re: [Qemu-devel] [PATCH v1 2/2] target-ppc: cmprb - truncate RA to 8bits
In reply to Nikunj A DadhaniaQuoted 9 lines · Nikunj A Dadhania
Missed the following bit in the instruction coding.
src1 ← EXTZ(RA(56:63))
Reported-by Anton Blanchard <[email protected]>Signed-off-by Nikunj A Dadhania <[email protected]>---
Can be squashed with the original commit
Done.
Quoted 16 lines
target-ppc/translate.c | 1 + 1 file changed, 1 insertion(+)target-ppc/translate.c +1
-0@@ -867,6 +867,7 @@ static void gen_cmprb(DisasContext *ctx)tcg_gen_trunc_tl_i32 (src1, cpu_gpr[rA (ctx->opcode)]);tcg_gen_trunc_tl_i32 (src2, cpu_gpr[rB (ctx->opcode)]); +tcg_gen_andi_i32 (src1, src1,0xFF );tcg_gen_ext8u_i32 (src2lo, src2);tcg_gen_shri_i32 (src2, src2,8 );tcg_gen_ext8u_i32 (src2hi, src2);
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson