qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v1 1/2] target-ppc: modsw - return 64-bit sign extended
@ 2016-08-02  7:52 Nikunj A Dadhania
  2016-08-02  7:53 ` [Qemu-devel] [PATCH v1 2/2] target-ppc: cmprb - truncate RA to 8bits Nikunj A Dadhania
  2016-08-03  1:17 ` [Qemu-devel] [PATCH v1 1/2] target-ppc: modsw - return 64-bit sign extended David Gibson
  0 siblings, 2 replies; 4+ messages in thread
From: Nikunj A Dadhania @ 2016-08-02  7:52 UTC (permalink / raw)
  To: qemu-ppc, david, rth; +Cc: qemu-devel, nikunj, anton

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(-)

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 {
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Qemu-devel] [PATCH v1 2/2] target-ppc: cmprb - truncate RA to 8bits
  2016-08-02  7:52 [Qemu-devel] [PATCH v1 1/2] target-ppc: modsw - return 64-bit sign extended Nikunj A Dadhania
@ 2016-08-02  7:53 ` Nikunj A Dadhania
  2016-08-03  1:17   ` David Gibson
  2016-08-03  1:17 ` [Qemu-devel] [PATCH v1 1/2] target-ppc: modsw - return 64-bit sign extended David Gibson
  1 sibling, 1 reply; 4+ messages in thread
From: Nikunj A Dadhania @ 2016-08-02  7:53 UTC (permalink / raw)
  To: qemu-ppc, david, rth; +Cc: qemu-devel, nikunj, anton

Missed the following bit in the instruction coding.

src1 ← EXTZ(RA(56:63))

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 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target-ppc/translate.c b/target-ppc/translate.c
index dc89e6a..14f4b68 100644
--- a/target-ppc/translate.c
+++ b/target-ppc/translate.c
@@ -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);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH v1 1/2] target-ppc: modsw - return 64-bit sign extended
  2016-08-02  7:52 [Qemu-devel] [PATCH v1 1/2] target-ppc: modsw - return 64-bit sign extended Nikunj A Dadhania
  2016-08-02  7:53 ` [Qemu-devel] [PATCH v1 2/2] target-ppc: cmprb - truncate RA to 8bits Nikunj A Dadhania
@ 2016-08-03  1:17 ` David Gibson
  1 sibling, 0 replies; 4+ messages in thread
From: David Gibson @ 2016-08-03  1:17 UTC (permalink / raw)
  To: Nikunj A Dadhania; +Cc: qemu-ppc, rth, qemu-devel, anton

[-- Attachment #1: Type: text/plain, Size: 1113 bytes --]

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 {

-- 
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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH v1 2/2] target-ppc: cmprb - truncate RA to 8bits
  2016-08-02  7:53 ` [Qemu-devel] [PATCH v1 2/2] target-ppc: cmprb - truncate RA to 8bits Nikunj A Dadhania
@ 2016-08-03  1:17   ` David Gibson
  0 siblings, 0 replies; 4+ messages in thread
From: David Gibson @ 2016-08-03  1:17 UTC (permalink / raw)
  To: Nikunj A Dadhania; +Cc: qemu-ppc, rth, qemu-devel, anton

[-- Attachment #1: Type: text/plain, Size: 1132 bytes --]

On Tue, Aug 02, 2016 at 01:23:00PM +0530, Nikunj A Dadhania wrote:
> Missed the following bit in the instruction coding.
> 
> src1 ← EXTZ(RA(56:63))
> 
> 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 | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/target-ppc/translate.c b/target-ppc/translate.c
> index dc89e6a..14f4b68 100644
> --- a/target-ppc/translate.c
> +++ b/target-ppc/translate.c
> @@ -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);

-- 
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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-08-03  2:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-02  7:52 [Qemu-devel] [PATCH v1 1/2] target-ppc: modsw - return 64-bit sign extended Nikunj A Dadhania
2016-08-02  7:53 ` [Qemu-devel] [PATCH v1 2/2] target-ppc: cmprb - truncate RA to 8bits Nikunj A Dadhania
2016-08-03  1:17   ` David Gibson
2016-08-03  1:17 ` [Qemu-devel] [PATCH v1 1/2] target-ppc: modsw - return 64-bit sign extended David Gibson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).