qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for-8.2] target/m68k: Use tcg_gen_deposit_i32 in gen_partset_reg
@ 2023-08-13 15:54 Richard Henderson
  2023-08-16  9:45 ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Henderson @ 2023-08-13 15:54 UTC (permalink / raw)
  To: qemu-devel; +Cc: laurent

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/m68k/translate.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/target/m68k/translate.c b/target/m68k/translate.c
index 37954d11a6..15b3701b8f 100644
--- a/target/m68k/translate.c
+++ b/target/m68k/translate.c
@@ -697,19 +697,12 @@ static inline int ext_opsize(int ext, int pos)
  */
 static void gen_partset_reg(int opsize, TCGv reg, TCGv val)
 {
-    TCGv tmp;
     switch (opsize) {
     case OS_BYTE:
-        tcg_gen_andi_i32(reg, reg, 0xffffff00);
-        tmp = tcg_temp_new();
-        tcg_gen_ext8u_i32(tmp, val);
-        tcg_gen_or_i32(reg, reg, tmp);
+        tcg_gen_deposit_i32(reg, reg, val, 0, 8);
         break;
     case OS_WORD:
-        tcg_gen_andi_i32(reg, reg, 0xffff0000);
-        tmp = tcg_temp_new();
-        tcg_gen_ext16u_i32(tmp, val);
-        tcg_gen_or_i32(reg, reg, tmp);
+        tcg_gen_deposit_i32(reg, reg, val, 0, 16);
         break;
     case OS_LONG:
     case OS_SINGLE:
-- 
2.34.1



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

* Re: [PATCH for-8.2] target/m68k: Use tcg_gen_deposit_i32 in gen_partset_reg
  2023-08-13 15:54 [PATCH for-8.2] target/m68k: Use tcg_gen_deposit_i32 in gen_partset_reg Richard Henderson
@ 2023-08-16  9:45 ` Philippe Mathieu-Daudé
  2023-08-22 18:15   ` Richard Henderson
  0 siblings, 1 reply; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-08-16  9:45 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: laurent

On 13/8/23 17:54, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/m68k/translate.c | 11 ++---------
>   1 file changed, 2 insertions(+), 9 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>




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

* Re: [PATCH for-8.2] target/m68k: Use tcg_gen_deposit_i32 in gen_partset_reg
  2023-08-16  9:45 ` Philippe Mathieu-Daudé
@ 2023-08-22 18:15   ` Richard Henderson
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2023-08-22 18:15 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel; +Cc: laurent

On 8/16/23 02:45, Philippe Mathieu-Daudé wrote:
> On 13/8/23 17:54, Richard Henderson wrote:
>> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
>> ---
>>   target/m68k/translate.c | 11 ++---------
>>   1 file changed, 2 insertions(+), 9 deletions(-)
> 
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> 
> 

Queued to tcg-next.


r~


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

end of thread, other threads:[~2023-08-22 18:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-13 15:54 [PATCH for-8.2] target/m68k: Use tcg_gen_deposit_i32 in gen_partset_reg Richard Henderson
2023-08-16  9:45 ` Philippe Mathieu-Daudé
2023-08-22 18:15   ` Richard Henderson

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