qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] target/mips: Remove duplicated check_cp1_enabled() calls in Loongson EXT
@ 2021-08-16  0:10 Philippe Mathieu-Daudé
  2021-08-16  1:47 ` Huacai Chen
  2021-08-25 10:51 ` Philippe Mathieu-Daudé
  0 siblings, 2 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-08-16  0:10 UTC (permalink / raw)
  To: qemu-devel
  Cc: Aleksandar Rikalo, Huacai Chen, Philippe Mathieu-Daudé,
	Aurelien Jarno

We already call check_cp1_enabled() earlier in the "pre-conditions"
checks for GSLWXC1 and GSLDXC1 in gen_loongson_lsdc2() prologue.
Remove the duplicated calls.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 target/mips/tcg/translate.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c
index 5b03545f099..268460d63ee 100644
--- a/target/mips/tcg/translate.c
+++ b/target/mips/tcg/translate.c
@@ -4777,7 +4777,6 @@ static void gen_loongson_lsdc2(DisasContext *ctx, int rt,
         break;
 #endif
     case OPC_GSLWXC1:
-        check_cp1_enabled(ctx);
         gen_base_offset_addr(ctx, t0, rs, offset);
         if (rd) {
             gen_op_addr_add(ctx, t0, cpu_gpr[rd], t0);
@@ -4790,7 +4789,6 @@ static void gen_loongson_lsdc2(DisasContext *ctx, int rt,
         break;
 #if defined(TARGET_MIPS64)
     case OPC_GSLDXC1:
-        check_cp1_enabled(ctx);
         gen_base_offset_addr(ctx, t0, rs, offset);
         if (rd) {
             gen_op_addr_add(ctx, t0, cpu_gpr[rd], t0);
-- 
2.31.1



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

* Re: [PATCH] target/mips: Remove duplicated check_cp1_enabled() calls in Loongson EXT
  2021-08-16  0:10 [PATCH] target/mips: Remove duplicated check_cp1_enabled() calls in Loongson EXT Philippe Mathieu-Daudé
@ 2021-08-16  1:47 ` Huacai Chen
  2021-08-25 10:51 ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 3+ messages in thread
From: Huacai Chen @ 2021-08-16  1:47 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Aleksandar Rikalo, QEMU Developers, Aurelien Jarno

Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>

On Mon, Aug 16, 2021 at 8:10 AM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> We already call check_cp1_enabled() earlier in the "pre-conditions"
> checks for GSLWXC1 and GSLDXC1 in gen_loongson_lsdc2() prologue.
> Remove the duplicated calls.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  target/mips/tcg/translate.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c
> index 5b03545f099..268460d63ee 100644
> --- a/target/mips/tcg/translate.c
> +++ b/target/mips/tcg/translate.c
> @@ -4777,7 +4777,6 @@ static void gen_loongson_lsdc2(DisasContext *ctx, int rt,
>          break;
>  #endif
>      case OPC_GSLWXC1:
> -        check_cp1_enabled(ctx);
>          gen_base_offset_addr(ctx, t0, rs, offset);
>          if (rd) {
>              gen_op_addr_add(ctx, t0, cpu_gpr[rd], t0);
> @@ -4790,7 +4789,6 @@ static void gen_loongson_lsdc2(DisasContext *ctx, int rt,
>          break;
>  #if defined(TARGET_MIPS64)
>      case OPC_GSLDXC1:
> -        check_cp1_enabled(ctx);
>          gen_base_offset_addr(ctx, t0, rs, offset);
>          if (rd) {
>              gen_op_addr_add(ctx, t0, cpu_gpr[rd], t0);
> --
> 2.31.1
>


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

* Re: [PATCH] target/mips: Remove duplicated check_cp1_enabled() calls in Loongson EXT
  2021-08-16  0:10 [PATCH] target/mips: Remove duplicated check_cp1_enabled() calls in Loongson EXT Philippe Mathieu-Daudé
  2021-08-16  1:47 ` Huacai Chen
@ 2021-08-25 10:51 ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-08-25 10:51 UTC (permalink / raw)
  To: qemu-devel; +Cc: Aleksandar Rikalo, Huacai Chen, Aurelien Jarno

On 8/16/21 2:10 AM, Philippe Mathieu-Daudé wrote:
> We already call check_cp1_enabled() earlier in the "pre-conditions"
> checks for GSLWXC1 and GSLDXC1 in gen_loongson_lsdc2() prologue.
> Remove the duplicated calls.
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  target/mips/tcg/translate.c | 2 --
>  1 file changed, 2 deletions(-)

Thanks, applied to mips-next.


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

end of thread, other threads:[~2021-08-25 10:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-16  0:10 [PATCH] target/mips: Remove duplicated check_cp1_enabled() calls in Loongson EXT Philippe Mathieu-Daudé
2021-08-16  1:47 ` Huacai Chen
2021-08-25 10:51 ` Philippe Mathieu-Daudé

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