diff mbox

[v1,1/2] target-ppc: modsw - return 64-bit sign extended

Message ID 1470124380-5751-1-git-send-email-nikunj@linux.vnet.ibm.com
State New
Headers show

Commit Message

Nikunj A Dadhania Aug. 2, 2016, 7:52 a.m. UTC
Reported-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
---

Can be squashed with the original commit

 target-ppc/translate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Gibson Aug. 3, 2016, 1:17 a.m. UTC | #1
On Tue, Aug 02, 2016 at 01:22:59PM +0530, Nikunj A Dadhania wrote:
> Reported-by: Anton Blanchard <anton@samba.org>
> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
> ---
> 
> Can be squashed with the original commit

Done.

> 
>  target-ppc/translate.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target-ppc/translate.c b/target-ppc/translate.c
> index fc3d371..dc89e6a 100644
> --- a/target-ppc/translate.c
> +++ b/target-ppc/translate.c
> @@ -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 {
diff mbox

Patch

diff --git a/target-ppc/translate.c b/target-ppc/translate.c
index fc3d371..dc89e6a 100644
--- a/target-ppc/translate.c
+++ b/target-ppc/translate.c
@@ -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 {