Skip to contentSkip to conversation

target/ppc: Remove xscmpnedp instruction

RFC PATCH In review Víctor Colombo 5 participants 8 messages Jan 6, 2022 – Jan 10, 2022

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 target/ppc: Remove xscmpnedp instruction

xscmpnedp was added in ISA v3.0 but removed in v3.0B. This patch removes this instruction as it was not in the final version of v3.0.

RFC to know if you think this is the correct approach.

---
 target/ppc/fpu_helper.c             | 1 -
 target/ppc/helper.h                 | 1 -
 target/ppc/translate/vsx-impl.c.inc | 1 -
 target/ppc/translate/vsx-ops.c.inc  | 1 -
 4 files changed, 4 deletions(-)
target/ppc/fpu_helper.c +0 -1
index e5c29b53b8..f030858cf9 100644
@@ -2270,7 +2270,6 @@ void helper_##op(CPUPPCState *env, ppc_vsr_t *xt,                             \
 VSX_SCALAR_CMP_DP(xscmpeqdp, eq, 1, 0)
 VSX_SCALAR_CMP_DP(xscmpgedp, le, 1, 1)
 VSX_SCALAR_CMP_DP(xscmpgtdp, lt, 1, 1)
-VSX_SCALAR_CMP_DP(xscmpnedp, eq, 0, 0)
 
 void helper_xscmpexpdp(CPUPPCState *env, uint32_t opcode,
                        ppc_vsr_t *xa, ppc_vsr_t *xb)
target/ppc/helper.h +0 -1
index f9c72dcd50..8f02cabaf5 100644
@@ -400,7 +400,6 @@ DEF_HELPER_5(xsnmsubdp, void, env, vsr, vsr, vsr, vsr)
 DEF_HELPER_4(xscmpeqdp, void, env, vsr, vsr, vsr)
 DEF_HELPER_4(xscmpgtdp, void, env, vsr, vsr, vsr)
 DEF_HELPER_4(xscmpgedp, void, env, vsr, vsr, vsr)
-DEF_HELPER_4(xscmpnedp, void, env, vsr, vsr, vsr)
 DEF_HELPER_4(xscmpexpdp, void, env, i32, vsr, vsr)
 DEF_HELPER_4(xscmpexpqp, void, env, i32, vsr, vsr)
 DEF_HELPER_4(xscmpodp, void, env, i32, vsr, vsr)
target/ppc/translate/vsx-impl.c.inc +0 -1
index c08185e857..fbef496257 100644
@@ -1092,7 +1092,6 @@ GEN_VSX_HELPER_X1(xstsqrtdp, 0x14, 0x06, 0, PPC2_VSX)
 GEN_VSX_HELPER_X3(xscmpeqdp, 0x0C, 0x00, 0, PPC2_ISA300)
 GEN_VSX_HELPER_X3(xscmpgtdp, 0x0C, 0x01, 0, PPC2_ISA300)
 GEN_VSX_HELPER_X3(xscmpgedp, 0x0C, 0x02, 0, PPC2_ISA300)
-GEN_VSX_HELPER_X3(xscmpnedp, 0x0C, 0x03, 0, PPC2_ISA300)
 GEN_VSX_HELPER_X2_AB(xscmpexpdp, 0x0C, 0x07, 0, PPC2_ISA300)
 GEN_VSX_HELPER_R2_AB(xscmpexpqp, 0x04, 0x05, 0, PPC2_ISA300)
 GEN_VSX_HELPER_X2_AB(xscmpodp, 0x0C, 0x05, 0, PPC2_VSX)
target/ppc/translate/vsx-ops.c.inc +0 -1
index c974324c4c..67fa7b2e41 100644
@@ -197,7 +197,6 @@ GEN_XX3FORM_NAME(xsnmsubdp, "xsnmsubmdp", 0x04, 0x17, PPC2_VSX),
 GEN_XX3FORM(xscmpeqdp, 0x0C, 0x00, PPC2_ISA300),
 GEN_XX3FORM(xscmpgtdp, 0x0C, 0x01, PPC2_ISA300),
 GEN_XX3FORM(xscmpgedp, 0x0C, 0x02, PPC2_ISA300),
-GEN_XX3FORM(xscmpnedp, 0x0C, 0x03, PPC2_ISA300),
 GEN_XX3FORM(xscmpexpdp, 0x0C, 0x07, PPC2_ISA300),
 GEN_VSX_XFORM_300(xscmpexpqp, 0x04, 0x05, 0x00600001),
 GEN_XX2IFORM(xscmpodp,  0x0C, 0x05, PPC2_VSX),
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Víctor Colombo

xscmpnedp was added in ISA v3.0 but removed in v3.0B. This patch removes this instruction as it was not in the final version of v3.0.

RFC to know if you think this is the correct approach.

Usually we deprecate a feature for a minimum of two releases before removing it. It might be overkill for this case since the P9 processor implementation is based on v3.0B.

I would simply remove the instruction since it never existed on any supported HW. I will wait for some more feedback.

Thanks,

C.

Quoted 57 lines
---
  target/ppc/fpu_helper.c             | 1 -
  target/ppc/helper.h                 | 1 -
  target/ppc/translate/vsx-impl.c.inc | 1 -
  target/ppc/translate/vsx-ops.c.inc  | 1 -
  4 files changed, 4 deletions(-)
target/ppc/fpu_helper.c +0 -1
index e5c29b53b8..f030858cf9 100644
@@ -2270,7 +2270,6 @@ void helper_##op(CPUPPCState *env, ppc_vsr_t *xt,                             \
  VSX_SCALAR_CMP_DP(xscmpeqdp, eq, 1, 0)
  VSX_SCALAR_CMP_DP(xscmpgedp, le, 1, 1)
  VSX_SCALAR_CMP_DP(xscmpgtdp, lt, 1, 1)
-VSX_SCALAR_CMP_DP(xscmpnedp, eq, 0, 0)
 
  void helper_xscmpexpdp(CPUPPCState *env, uint32_t opcode,
                         ppc_vsr_t *xa, ppc_vsr_t *xb)
target/ppc/helper.h +0 -1
index f9c72dcd50..8f02cabaf5 100644
@@ -400,7 +400,6 @@ DEF_HELPER_5(xsnmsubdp, void, env, vsr, vsr, vsr, vsr)
  DEF_HELPER_4(xscmpeqdp, void, env, vsr, vsr, vsr)
  DEF_HELPER_4(xscmpgtdp, void, env, vsr, vsr, vsr)
  DEF_HELPER_4(xscmpgedp, void, env, vsr, vsr, vsr)
-DEF_HELPER_4(xscmpnedp, void, env, vsr, vsr, vsr)
  DEF_HELPER_4(xscmpexpdp, void, env, i32, vsr, vsr)
  DEF_HELPER_4(xscmpexpqp, void, env, i32, vsr, vsr)
  DEF_HELPER_4(xscmpodp, void, env, i32, vsr, vsr)
target/ppc/translate/vsx-impl.c.inc +0 -1
index c08185e857..fbef496257 100644
@@ -1092,7 +1092,6 @@ GEN_VSX_HELPER_X1(xstsqrtdp, 0x14, 0x06, 0, PPC2_VSX)
  GEN_VSX_HELPER_X3(xscmpeqdp, 0x0C, 0x00, 0, PPC2_ISA300)
  GEN_VSX_HELPER_X3(xscmpgtdp, 0x0C, 0x01, 0, PPC2_ISA300)
  GEN_VSX_HELPER_X3(xscmpgedp, 0x0C, 0x02, 0, PPC2_ISA300)
-GEN_VSX_HELPER_X3(xscmpnedp, 0x0C, 0x03, 0, PPC2_ISA300)
  GEN_VSX_HELPER_X2_AB(xscmpexpdp, 0x0C, 0x07, 0, PPC2_ISA300)
  GEN_VSX_HELPER_R2_AB(xscmpexpqp, 0x04, 0x05, 0, PPC2_ISA300)
  GEN_VSX_HELPER_X2_AB(xscmpodp, 0x0C, 0x05, 0, PPC2_VSX)
target/ppc/translate/vsx-ops.c.inc +0 -1
index c974324c4c..67fa7b2e41 100644
@@ -197,7 +197,6 @@ GEN_XX3FORM_NAME(xsnmsubdp, "xsnmsubmdp", 0x04, 0x17, PPC2_VSX),
  GEN_XX3FORM(xscmpeqdp, 0x0C, 0x00, PPC2_ISA300),
  GEN_XX3FORM(xscmpgtdp, 0x0C, 0x01, PPC2_ISA300),
  GEN_XX3FORM(xscmpgedp, 0x0C, 0x02, PPC2_ISA300),
-GEN_XX3FORM(xscmpnedp, 0x0C, 0x03, PPC2_ISA300),
  GEN_XX3FORM(xscmpexpdp, 0x0C, 0x07, PPC2_ISA300),
  GEN_VSX_XFORM_300(xscmpexpqp, 0x04, 0x05, 0x00600001),
  GEN_XX2IFORM(xscmpodp,  0x0C, 0x05, PPC2_VSX),
Acked-by
#2 lore raw
Quoted 4 lines · On Thu, 6 Jan 2022 13:21:46 +0100 Cédric Le Goater <[email protected]> wrote:
Quoted 3 lines · Víctor Colombo

xscmpnedp was added in ISA v3.0 but removed in v3.0B. This patch removes this instruction as it was not in the final version of v3.0.

Quoted 9 lines
Quoted 1 line

RFC to know if you think this is the correct approach.

Usually we deprecate a feature for a minimum of two releases before removing it. It might be overkill for this case since the P9 processor implementation is based on v3.0B.

I would simply remove the instruction since it never existed on any supported HW. I will wait for some more feedback.

I don't think it makes sense to keep this instruction if it only existed in pre-GA HW.

Quoted 65 lines

Thanks,

C.

Quoted 57 lines
---
  target/ppc/fpu_helper.c             | 1 -
  target/ppc/helper.h                 | 1 -
  target/ppc/translate/vsx-impl.c.inc | 1 -
  target/ppc/translate/vsx-ops.c.inc  | 1 -
  4 files changed, 4 deletions(-)
target/ppc/fpu_helper.c +0 -1
index e5c29b53b8..f030858cf9 100644
@@ -2270,7 +2270,6 @@ void helper_##op(CPUPPCState *env, ppc_vsr_t *xt,                             \
  VSX_SCALAR_CMP_DP(xscmpeqdp, eq, 1, 0)
  VSX_SCALAR_CMP_DP(xscmpgedp, le, 1, 1)
  VSX_SCALAR_CMP_DP(xscmpgtdp, lt, 1, 1)
-VSX_SCALAR_CMP_DP(xscmpnedp, eq, 0, 0)
 
  void helper_xscmpexpdp(CPUPPCState *env, uint32_t opcode,
                         ppc_vsr_t *xa, ppc_vsr_t *xb)
target/ppc/helper.h +0 -1
index f9c72dcd50..8f02cabaf5 100644
@@ -400,7 +400,6 @@ DEF_HELPER_5(xsnmsubdp, void, env, vsr, vsr, vsr, vsr)
  DEF_HELPER_4(xscmpeqdp, void, env, vsr, vsr, vsr)
  DEF_HELPER_4(xscmpgtdp, void, env, vsr, vsr, vsr)
  DEF_HELPER_4(xscmpgedp, void, env, vsr, vsr, vsr)
-DEF_HELPER_4(xscmpnedp, void, env, vsr, vsr, vsr)
  DEF_HELPER_4(xscmpexpdp, void, env, i32, vsr, vsr)
  DEF_HELPER_4(xscmpexpqp, void, env, i32, vsr, vsr)
  DEF_HELPER_4(xscmpodp, void, env, i32, vsr, vsr)
target/ppc/translate/vsx-impl.c.inc +0 -1
index c08185e857..fbef496257 100644
@@ -1092,7 +1092,6 @@ GEN_VSX_HELPER_X1(xstsqrtdp, 0x14, 0x06, 0, PPC2_VSX)
  GEN_VSX_HELPER_X3(xscmpeqdp, 0x0C, 0x00, 0, PPC2_ISA300)
  GEN_VSX_HELPER_X3(xscmpgtdp, 0x0C, 0x01, 0, PPC2_ISA300)
  GEN_VSX_HELPER_X3(xscmpgedp, 0x0C, 0x02, 0, PPC2_ISA300)
-GEN_VSX_HELPER_X3(xscmpnedp, 0x0C, 0x03, 0, PPC2_ISA300)
  GEN_VSX_HELPER_X2_AB(xscmpexpdp, 0x0C, 0x07, 0, PPC2_ISA300)
  GEN_VSX_HELPER_R2_AB(xscmpexpqp, 0x04, 0x05, 0, PPC2_ISA300)
  GEN_VSX_HELPER_X2_AB(xscmpodp, 0x0C, 0x05, 0, PPC2_VSX)
target/ppc/translate/vsx-ops.c.inc +0 -1
index c974324c4c..67fa7b2e41 100644
@@ -197,7 +197,6 @@ GEN_XX3FORM_NAME(xsnmsubdp, "xsnmsubmdp", 0x04, 0x17, PPC2_VSX),
  GEN_XX3FORM(xscmpeqdp, 0x0C, 0x00, PPC2_ISA300),
  GEN_XX3FORM(xscmpgtdp, 0x0C, 0x01, PPC2_ISA300),
  GEN_XX3FORM(xscmpgedp, 0x0C, 0x02, PPC2_ISA300),
-GEN_XX3FORM(xscmpnedp, 0x0C, 0x03, PPC2_ISA300),
  GEN_XX3FORM(xscmpexpdp, 0x0C, 0x07, PPC2_ISA300),
  GEN_VSX_XFORM_300(xscmpexpqp, 0x04, 0x05, 0x00600001),
  GEN_XX2IFORM(xscmpodp,  0x0C, 0x05, PPC2_VSX),
#3 lore raw
Quoted 13 lines · Greg Kurz
Quoted 10 lines · On Thu, 6 Jan 2022 13:21:46 +0100 Cédric Le Goater <[email protected]> wrote:
Quoted 4 lines · Víctor Colombo

xscmpnedp was added in ISA v3.0 but removed in v3.0B. This patch removes this instruction as it was not in the final version of v3.0.

RFC to know if you think this is the correct approach.

Usually we deprecate a feature for a minimum of two releases before removing it. It might be overkill for this case since the P9 processor implementation is based on v3.0B.

Quoted 6 lines
Quoted 3 lines

I would simply remove the instruction since it never existed on any supported HW. I will wait for some more feedback.

I don't think it makes sense to keep this instruction if it only existed in pre-GA HW.

I agree. If we have a vistigial POWER9 DD1 in the cpu table we should probably remove that anyway.

Quoted 1 line
Quoted 67 lines
Quoted 66 lines

Thanks,

C.

Quoted 57 lines
---
  target/ppc/fpu_helper.c             | 1 -
  target/ppc/helper.h                 | 1 -
  target/ppc/translate/vsx-impl.c.inc | 1 -
  target/ppc/translate/vsx-ops.c.inc  | 1 -
  4 files changed, 4 deletions(-)
target/ppc/fpu_helper.c +0 -1
index e5c29b53b8..f030858cf9 100644
@@ -2270,7 +2270,6 @@ void helper_##op(CPUPPCState *env, ppc_vsr_t *xt,                             \
  VSX_SCALAR_CMP_DP(xscmpeqdp, eq, 1, 0)
  VSX_SCALAR_CMP_DP(xscmpgedp, le, 1, 1)
  VSX_SCALAR_CMP_DP(xscmpgtdp, lt, 1, 1)
-VSX_SCALAR_CMP_DP(xscmpnedp, eq, 0, 0)
 
  void helper_xscmpexpdp(CPUPPCState *env, uint32_t opcode,
                         ppc_vsr_t *xa, ppc_vsr_t *xb)
target/ppc/helper.h +0 -1
index f9c72dcd50..8f02cabaf5 100644
@@ -400,7 +400,6 @@ DEF_HELPER_5(xsnmsubdp, void, env, vsr, vsr, vsr, vsr)
  DEF_HELPER_4(xscmpeqdp, void, env, vsr, vsr, vsr)
  DEF_HELPER_4(xscmpgtdp, void, env, vsr, vsr, vsr)
  DEF_HELPER_4(xscmpgedp, void, env, vsr, vsr, vsr)
-DEF_HELPER_4(xscmpnedp, void, env, vsr, vsr, vsr)
  DEF_HELPER_4(xscmpexpdp, void, env, i32, vsr, vsr)
  DEF_HELPER_4(xscmpexpqp, void, env, i32, vsr, vsr)
  DEF_HELPER_4(xscmpodp, void, env, i32, vsr, vsr)
target/ppc/translate/vsx-impl.c.inc +0 -1
index c08185e857..fbef496257 100644
@@ -1092,7 +1092,6 @@ GEN_VSX_HELPER_X1(xstsqrtdp, 0x14, 0x06, 0, PPC2_VSX)
  GEN_VSX_HELPER_X3(xscmpeqdp, 0x0C, 0x00, 0, PPC2_ISA300)
  GEN_VSX_HELPER_X3(xscmpgtdp, 0x0C, 0x01, 0, PPC2_ISA300)
  GEN_VSX_HELPER_X3(xscmpgedp, 0x0C, 0x02, 0, PPC2_ISA300)
-GEN_VSX_HELPER_X3(xscmpnedp, 0x0C, 0x03, 0, PPC2_ISA300)
  GEN_VSX_HELPER_X2_AB(xscmpexpdp, 0x0C, 0x07, 0, PPC2_ISA300)
  GEN_VSX_HELPER_R2_AB(xscmpexpqp, 0x04, 0x05, 0, PPC2_ISA300)
  GEN_VSX_HELPER_X2_AB(xscmpodp, 0x0C, 0x05, 0, PPC2_VSX)
target/ppc/translate/vsx-ops.c.inc +0 -1
index c974324c4c..67fa7b2e41 100644
@@ -197,7 +197,6 @@ GEN_XX3FORM_NAME(xsnmsubdp, "xsnmsubmdp", 0x04, 0x17, PPC2_VSX),
  GEN_XX3FORM(xscmpeqdp, 0x0C, 0x00, PPC2_ISA300),
  GEN_XX3FORM(xscmpgtdp, 0x0C, 0x01, PPC2_ISA300),
  GEN_XX3FORM(xscmpgedp, 0x0C, 0x02, PPC2_ISA300),
-GEN_XX3FORM(xscmpnedp, 0x0C, 0x03, PPC2_ISA300),
  GEN_XX3FORM(xscmpexpdp, 0x0C, 0x07, PPC2_ISA300),
  GEN_VSX_XFORM_300(xscmpexpqp, 0x04, 0x05, 0x00600001),
  GEN_XX2IFORM(xscmpodp,  0x0C, 0x05, PPC2_VSX),
Signature · 4 lines
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
#5 lore raw
In reply to Víctor Colombo
Quoted 2 lines · Víctor Colombo

xscmpnedp was added in ISA v3.0 but removed in v3.0B. This patch removes this instruction as it was not in the final version of v3.0.

Could please resend on top of the VSX combo patchset ?

Thanks,

C.

#6 lore raw
Quoted 6 lines · Cédric Le Goater
Quoted 2 lines · Víctor Colombo

xscmpnedp was added in ISA v3.0 but removed in v3.0B. This patch removes this instruction as it was not in the final version of v3.0.

Could please resend on top of the VSX combo patchset ?

Absolutely! I will add it between "Implement xvtlsbb instruction" and "Refactor VSX_SCALAR_CMP_DP" instead of on top, to avoid moving it to decodetree just to remove it later. We will send it together with the patchset v2 later.

Quoted 3 lines

Thanks,

C.

Thanks for everyone's time! Best regards,

-- Víctor

#7 lore raw
Quoted 10 lines · Victor Colombo
Quoted 6 lines · Cédric Le Goater
Quoted 2 lines · Víctor Colombo

xscmpnedp was added in ISA v3.0 but removed in v3.0B. This patch removes this instruction as it was not in the final version of v3.0.

Could please resend on top of the VSX combo patchset ?

Absolutely! I will add it between "Implement xvtlsbb instruction" and "Refactor VSX_SCALAR_CMP_DP" instead of on top, to avoid moving it to decodetree just to remove it later. We will send it together with the patchset v2 later.

Ah. if you resend the whole, perfect. It looks correct from the tests I did. And fix your name to Víctor !

Thanks,

Cédric.