All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/1] target/microblaze: Fix FPU2 instruction check
@ 2020-05-11 17:49 Joe Komlodi
  2020-05-11 17:49 ` [PATCH v1 1/1] " Joe Komlodi
  2020-05-13 11:46 ` [PATCH v1 0/1] " Edgar E. Iglesias
  0 siblings, 2 replies; 3+ messages in thread
From: Joe Komlodi @ 2020-05-11 17:49 UTC (permalink / raw)
  To: qemu-devel; +Cc: edgar.iglesias

Hi all,

This fixes a backwards if statement that caused Microblaze FPU2 instructions
to not be executed, even if use-fpu=2 in the DTS.

Thanks!
Joe

Joe Komlodi (1):
  target/microblaze: Fix FPU2 instruction check

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

-- 
2.7.4



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

* [PATCH v1 1/1] target/microblaze: Fix FPU2 instruction check
  2020-05-11 17:49 [PATCH v1 0/1] target/microblaze: Fix FPU2 instruction check Joe Komlodi
@ 2020-05-11 17:49 ` Joe Komlodi
  2020-05-13 11:46 ` [PATCH v1 0/1] " Edgar E. Iglesias
  1 sibling, 0 replies; 3+ messages in thread
From: Joe Komlodi @ 2020-05-11 17:49 UTC (permalink / raw)
  To: qemu-devel; +Cc: edgar.iglesias

The check to see if we can use FPU2 instructions would return 0 if
cfg.use_fpu == 2, rather than returning the PVR2_USE_FPU2_MASK.

This would cause all FPU2 instructions (fsqrt, flt, fint) to not be used.

Signed-off-by: Joe Komlodi <komlodi@xilinx.com>
---
 target/microblaze/translate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c
index 4e7f903a..329743b 100644
--- a/target/microblaze/translate.c
+++ b/target/microblaze/translate.c
@@ -1391,7 +1391,7 @@ static int dec_check_fpuv2(DisasContext *dc)
         tcg_gen_movi_i64(cpu_SR[SR_ESR], ESR_EC_FPU);
         t_gen_raise_exception(dc, EXCP_HW_EXCP);
     }
-    return (dc->cpu->cfg.use_fpu == 2) ? 0 : PVR2_USE_FPU2_MASK;
+    return (dc->cpu->cfg.use_fpu == 2) ? PVR2_USE_FPU2_MASK : 0;
 }
 
 static void dec_fpu(DisasContext *dc)
-- 
2.7.4



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

* Re: [PATCH v1 0/1] target/microblaze: Fix FPU2 instruction check
  2020-05-11 17:49 [PATCH v1 0/1] target/microblaze: Fix FPU2 instruction check Joe Komlodi
  2020-05-11 17:49 ` [PATCH v1 1/1] " Joe Komlodi
@ 2020-05-13 11:46 ` Edgar E. Iglesias
  1 sibling, 0 replies; 3+ messages in thread
From: Edgar E. Iglesias @ 2020-05-13 11:46 UTC (permalink / raw)
  To: Joe Komlodi; +Cc: qemu-devel

On Mon, May 11, 2020 at 10:49:05AM -0700, Joe Komlodi wrote:
> Hi all,
> 
> This fixes a backwards if statement that caused Microblaze FPU2 instructions
> to not be executed, even if use-fpu=2 in the DTS.
> 
> Thanks!
> Joe


Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>




> 
> Joe Komlodi (1):
>   target/microblaze: Fix FPU2 instruction check
> 
>  target/microblaze/translate.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> -- 
> 2.7.4
> 


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

end of thread, other threads:[~2020-05-13 11:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-11 17:49 [PATCH v1 0/1] target/microblaze: Fix FPU2 instruction check Joe Komlodi
2020-05-11 17:49 ` [PATCH v1 1/1] " Joe Komlodi
2020-05-13 11:46 ` [PATCH v1 0/1] " Edgar E. Iglesias

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.