Skip to contentSkip to conversation

target/ppc: Fix inequality check in do_lstxv_X

PATCH In review Harsh Prateek Bora 2 participants 3 messages Sep 13, 2024 – Sep 17, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target/ppc: Fix inequality check in do_lstxv_X

This fix was earlier introduced for do_lstxv_D form with 2cc0e449d173 however got missed for _X form. This patch fixes the same.

Fixes 70426b5bb738 ("target/ppc: moved stxvx and lxvx from legacy to decodtree")
---
 target/ppc/translate/vsx-impl.c.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target/ppc/translate/vsx-impl.c.inc +1 -1
index 40a87ddc4a..a869f30e86 100644
@@ -2244,7 +2244,7 @@ static bool do_lstxv_PLS_D(DisasContext *ctx, arg_PLS_D *a,
 
 static bool do_lstxv_X(DisasContext *ctx, arg_X *a, bool store, bool paired)
 {
-    if (paired || a->rt >= 32) {
+    if (paired || a->rt < 32) {
         REQUIRE_VSX(ctx);
     } else {
         REQUIRE_VECTOR(ctx);
Signature · 1 line
2.45.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 16 lines · Harsh Prateek Bora

This fix was earlier introduced for do_lstxv_D form with 2cc0e449d173 however got missed for _X form. This patch fixes the same.

Fixes 70426b5bb738 ("target/ppc: moved stxvx and lxvx from legacy to decodtree")
---
 target/ppc/translate/vsx-impl.c.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target/ppc/translate/vsx-impl.c.inc +0 -0
index 40a87ddc4a..a869f30e86 100644

target/ppc/translate/vsx-impl.c.inc static bool do_lstxv_PLS_D(DisasContext *ctx, arg_PLS_D *a, · line 2250

Quoted 8 lines
target/ppc/translate/vsx-impl.c.inc +1 -1
@@ -2244,7 +2244,7 @@ static bool do_lstxv_PLS_D(DisasContext *ctx, arg_PLS_D *a,
 
 static bool do_lstxv_X(DisasContext *ctx, arg_X *a, bool store, bool paired)
 {
-    if (paired || a->rt >= 32) {
+    if (paired || a->rt < 32) {
         REQUIRE_VSX(ctx);
     } else {
         REQUIRE_VECTOR(ctx);

Hi Harsh,

Seems I was quicker than you =)

https://lore.kernel.org/r/[email protected]

I'll give my RB and leave up to the maintainers which patch to take:

#2 lore raw

Hi Fabiano,

Quoted 29 lines · Fabiano Rosas
Quoted 16 lines · Harsh Prateek Bora

This fix was earlier introduced for do_lstxv_D form with 2cc0e449d173 however got missed for _X form. This patch fixes the same.

Fixes 70426b5bb738 ("target/ppc: moved stxvx and lxvx from legacy to decodtree")
---
  target/ppc/translate/vsx-impl.c.inc | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
target/ppc/translate/vsx-impl.c.inc +0 -0
index 40a87ddc4a..a869f30e86 100644

target/ppc/translate/vsx-impl.c.inc static bool do_lstxv_PLS_D(DisasContext *ctx, arg_PLS_D *a, · line 2250

Quoted 8 lines
target/ppc/translate/vsx-impl.c.inc +1 -1
@@ -2244,7 +2244,7 @@ static bool do_lstxv_PLS_D(DisasContext *ctx, arg_PLS_D *a,
 
  static bool do_lstxv_X(DisasContext *ctx, arg_X *a, bool store, bool paired)
  {
-    if (paired || a->rt >= 32) {
+    if (paired || a->rt < 32) {
          REQUIRE_VSX(ctx);
      } else {
          REQUIRE_VECTOR(ctx);

Hi Harsh,

Quoted 7 lines

Seems I was quicker than you =)

https://lore.kernel.org/r/[email protected]

I'll give my RB and leave up to the maintainers which patch to take:

Thanks, I missed looking at your patch earlier.
I would vote for your patch though.

regards,
Harsh