Add several Power ISA 3.1 32/64-bit vector instructions
PATCH v4 6/11 Update PowerPC AT_HWCAP2 definition
In reply to Lijun PanAdd PPC2_FEATURE2_ARCH_3_10 to the PowerPC AT_HWCAP2 definitions.
---
v4: add missing changes, and split to 5/11, 6/11, 7/11
v3: use tcg_gen_gvec_mul()
v2: fix coding style
use Power ISA 3.1 flag
include/elf.h | 1 + 1 file changed, 1 insertion(+)
include/elf.h +1 -0
@@ -554,6 +554,7 @@ typedef struct {#define PPC_FEATURE2_HTM_NOSC 0x01000000#define PPC_FEATURE2_ARCH_3_00 0x00800000#define PPC_FEATURE2_HAS_IEEE128 0x00400000 +#define PPC_FEATURE2_ARCH_3_10 0x00200000/* Bits present in AT_HWCAP for Sparc. */
Signature · 1 line
2.23.0
PATCH v4 1/11 target/ppc: Introduce Power ISA 3.1 flag
In reply to Lijun PanThis flag will be used for Power10 instructions.
---
v4: split to 01/11 and 02/11
v2: add Power ISA 3.1 flag
target/ppc/cpu.h | 2 ++ 1 file changed, 2 insertions(+)
target/ppc/cpu.h +2 -0
@@ -2191,6 +2191,8 @@ enum {PPC2_PM_ISA206 =0x0000000000040000ULL ,/* POWER ISA 3.0 */ PPC2_ISA300 =0x0000000000080000ULL , +/* POWER ISA 3.1 */ +PPC2_ISA310 =0x0000000000100000ULL , #define PPC_TCG_INSNS2 (PPC2_BOOKE206 | PPC2_VSX | PPC2_PRCNTL | PPC2_DBRX | \ PPC2_ISA205 | PPC2_VSX207 | PPC2_PERM_ISA206 | \
Signature · 1 line
2.23.0
PATCH v4 8/11 target/ppc: add vmulh{su}w instructions
In reply to Lijun Panvmulhsw: Vector Multiply High Signed Word
vmulhuw: Vector Multiply High Unsigned Word
---
v3: inline the helper_vmulh{su}w multiply directly instead of using macro
v2: fix coding style
use Power ISA 3.1 flag
target/ppc/helper.h | 2 ++ target/ppc/int_helper.c | 19 +++++++++++++++++++ target/ppc/translate/vmx-impl.inc.c | 6 ++++++ target/ppc/translate/vmx-ops.inc.c | 4 ++-- 4 files changed, 29 insertions(+), 2 deletions(-)
target/ppc/helper.h +2 -0
@@ -184,6 +184,8 @@ DEF_HELPER_3(vmulosw, void, avr, avr, avr) DEF_HELPER_3(vmuloub, void, avr, avr, avr) DEF_HELPER_3(vmulouh, void, avr, avr, avr) DEF_HELPER_3(vmulouw, void, avr, avr, avr) +DEF_HELPER_3(vmulhsw, void, avr, avr, avr) +DEF_HELPER_3(vmulhuw, void, avr, avr, avr) DEF_HELPER_3(vslo, void, avr, avr, avr) DEF_HELPER_3(vsro, void, avr, avr, avr)DEF_HELPER_3 (vsrv, void, avr, avr, avr)
target/ppc/int_helper.c +19 -0
@@ -1086,6 +1086,25 @@ VMUL(uw, u32, VsrW, VsrD, uint64_t)#undef VMUL_DO_ODD#undef VMUL +void helper_vmulhsw (ppc_avr_t *r,ppc_avr_t *a,ppc_avr_t *b) +{ +int i; + +for (i =0 ; i <4 ; i++) { + r->s32[i] = (int32_t )(((int64_t )a->s32[i] * (int64_t )b->s32[i]) >>32 ); + } +} + +void helper_vmulhuw (ppc_avr_t *r,ppc_avr_t *a,ppc_avr_t *b) +{ +int i; + +for (i =0 ; i <4 ; i++) { + r->u32[i] = (uint32_t )(((uint64_t )a->u32[i] * + (uint64_t )b->u32[i]) >>32 ); + } +} +void helper_vperm (CPUPPCState *env,ppc_avr_t *r,ppc_avr_t *a,ppc_avr_t *b,ppc_avr_t *c) {
target/ppc/translate/vmx-impl.inc.c +6 -0
@@ -811,9 +811,15 @@ GEN_VXFORM_V(vmulld, MO_64, tcg_gen_gvec_mul, 4, 7);GEN_VXFORM (vmuleub,4 ,8 );GEN_VXFORM (vmuleuh,4 ,9 );GEN_VXFORM (vmuleuw,4 ,10 ); +GEN_VXFORM (vmulhuw,4 ,10 ); +GEN_VXFORM_DUAL (vmuleuw,PPC_ALTIVEC ,PPC_NONE , + vmulhuw,PPC_NONE ,PPC2_ISA310 );GEN_VXFORM (vmulesb,4 ,12 );GEN_VXFORM (vmulesh,4 ,13 );GEN_VXFORM (vmulesw,4 ,14 ); +GEN_VXFORM (vmulhsw,4 ,14 ); +GEN_VXFORM_DUAL (vmulesw,PPC_ALTIVEC ,PPC_NONE , + vmulhsw,PPC_NONE ,PPC2_ISA310 );GEN_VXFORM_V (vslb,MO_8 , tcg_gen_gvec_shlv,2 ,4 );GEN_VXFORM_V (vslh,MO_16 , tcg_gen_gvec_shlv,2 ,5 );GEN_VXFORM_V (vslw,MO_32 , tcg_gen_gvec_shlv,2 ,6 );
target/ppc/translate/vmx-ops.inc.c +2 -2
@@ -110,10 +110,10 @@ GEN_VXFORM_207(vmulosw, 4, 6),GEN_VXFORM_310 (vmulld,4 ,7 ),GEN_VXFORM (vmuleub,4 ,8 ),GEN_VXFORM (vmuleuh,4 ,9 ), -GEN_VXFORM_207 (vmuleuw,4 ,10 ), +GEN_VXFORM_DUAL (vmuleuw, vmulhuw,4 ,10 ,PPC_ALTIVEC ,PPC_NONE ),GEN_VXFORM (vmulesb,4 ,12 ),GEN_VXFORM (vmulesh,4 ,13 ), -GEN_VXFORM_207 (vmulesw,4 ,14 ), +GEN_VXFORM_DUAL (vmulesw, vmulhsw,4 ,14 ,PPC_ALTIVEC ,PPC_NONE ),GEN_VXFORM (vslb,2 ,4 ),GEN_VXFORM (vslh,2 ,5 ), GEN_VXFORM_DUAL(vslw, vrlwnm, 2, 6, PPC_ALTIVEC, PPC_NONE),
Signature · 1 line
2.23.0
PATCH v4 2/11 target/ppc: Enable Power ISA 3.1
In reply to Lijun PanThis patch enables the Power ISA 3.1 in QEMU.
---
v4: split to 01/11 and 02/11
v2: add Power ISA 3.1 flag
target/ppc/cpu.h | 2 +- target/ppc/translate_init.inc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
target/ppc/cpu.h +1 -1
@@ -2201,7 +2201,7 @@ enum {PPC2_BCTAR_ISA207 |PPC2_LSQ_ISA207 | \PPC2_ALTIVEC_207 |PPC2_ISA207S |PPC2_DFP | \PPC2_FP_CVT_S64 |PPC2_TM |PPC2_PM_ISA206 | \ - PPC2_ISA300) + PPC2_ISA300 | PPC2_ISA310) };/*****************************************************************************/
target/ppc/translate_init.inc.c +1 -1
@@ -9206,7 +9206,7 @@ POWERPC_FAMILY(POWER10)(ObjectClass *oc, void *data)PPC2_FP_TST_ISA206 |PPC2_BCTAR_ISA207 |PPC2_LSQ_ISA207 |PPC2_ALTIVEC_207 |PPC2_ISA205 |PPC2_ISA207S |PPC2_FP_CVT_S64 | -PPC2_TM |PPC2_ISA300 |PPC2_PRCNTL ; +PPC2_TM |PPC2_ISA300 |PPC2_PRCNTL |PPC2_ISA310 ; pcc->msr_mask = (1ull <<MSR_SF ) | (1ull <<MSR_HV ) | (1ull << MSR_TM) |
Signature · 1 line
2.23.0
v4 cover Add several Power ISA 3.1 32/64-bit vector instructions
This patch series add several newly introduced 32/64-bit vector instructions in Power ISA 3.1. Power ISA 3.1 flag is introduced in this version. In v4 version, coding style issues are fixed, community reviews/suggestions are taken into consideration.
Lijun Pan (11):
target/ppc: Introduce Power ISA 3.1 flag target/ppc: Enable Power ISA 3.1
target/ppc: add byte-reverse br[dwh] instructions target/ppc: convert vmuluwm to tcg_gen_gvec_mul target/ppc: add vmulld instruction
Update PowerPC AT_HWCAP2 definition target/ppc: add vmulld to INDEX_op_mul_vec case target/ppc: add vmulh{su}w instructions
fix the prototype of muls64/mulu64 target/ppc: add vmulh{su}d instructions target/ppc: add vdiv{su}{wd} vmod{su}{wd} instructions
include/elf.h | 1 + include/qemu/host-utils.h | 4 +- target/ppc/cpu.h | 4 +- target/ppc/helper.h | 13 ++++- target/ppc/int_helper.c | 75 ++++++++++++++++++++++++----- target/ppc/translate.c | 43 +++++++++++++++++ target/ppc/translate/vmx-impl.inc.c | 26 +++++++++- target/ppc/translate/vmx-ops.inc.c | 27 +++++++++-- target/ppc/translate_init.inc.c | 2 +- tcg/ppc/tcg-target.h | 2 + tcg/ppc/tcg-target.inc.c | 12 ++++- 11 files changed, 184 insertions(+), 25 deletions(-)
Signature · 1 line
2.23.0
PATCH v4 4/11 target/ppc: convert vmuluwm to tcg_gen_gvec_mul
Convert the original implementation of vmuluwm to the more generic tcg_gen_gvec_mul.
---
v3: newly introduced
target/ppc/helper.h | 1 - target/ppc/int_helper.c | 13 ------------- target/ppc/translate/vmx-impl.inc.c | 2 +- 3 files changed, 1 insertion(+), 15 deletions(-)
target/ppc/helper.h +0 -1
@@ -184,7 +184,6 @@ DEF_HELPER_3(vmulosw, void, avr, avr, avr) DEF_HELPER_3(vmuloub, void, avr, avr, avr) DEF_HELPER_3(vmulouh, void, avr, avr, avr) DEF_HELPER_3(vmulouw, void, avr, avr, avr) -DEF_HELPER_3(vmuluwm, void, avr, avr, avr) DEF_HELPER_3(vslo, void, avr, avr, avr) DEF_HELPER_3(vsro, void, avr, avr, avr)DEF_HELPER_3 (vsrv, void, avr, avr, avr)
target/ppc/int_helper.c +0 -13
@@ -523,19 +523,6 @@ void helper_vprtybq(ppc_avr_t *r, ppc_avr_t *b) r->VsrD (0 ) =0 ; } -#define VARITH_DO (name, op, element) \ - void helper_v##name(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) \ - { \ - int i; \ - \ - for (i = 0; i < ARRAY_SIZE(r->element); i++) { \ - r->element[i] = a->element[i] op b->element[i]; \ - } \ - } -VARITH_DO(muluwm, *, u32) -#undef VARITH_DO -#undef VARITH -#define VARITHFP (suffix, func) \ void helper_v##suffix(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a, \ ppc_avr_t *b) \
target/ppc/translate/vmx-impl.inc.c +1 -1
@@ -801,7 +801,7 @@ static void trans_vclzd(DisasContext *ctx)GEN_VXFORM (vmuloub,4 ,0 );GEN_VXFORM (vmulouh,4 ,1 );GEN_VXFORM (vmulouw,4 ,2 ); -GEN_VXFORM (vmuluwm,4 ,2 ); +GEN_VXFORM_V (vmuluwm,MO_32 , tcg_gen_gvec_mul,4 ,2 );GEN_VXFORM_DUAL (vmulouw,PPC_ALTIVEC ,PPC_NONE , vmuluwm, PPC_NONE, PPC2_ALTIVEC_207)GEN_VXFORM (vmulosb,4 ,4 );
Signature · 1 line
2.23.0
PATCH v4 7/11 target/ppc: add vmulld to INDEX_op_mul_vec case
In reply to Lijun PanGroup vmuluwm and vmulld. Make vmulld-specific
changes since it belongs to new ISA 3.1.
---
v4: add missing changes, and split to 5/11, 6/11, 7/11
v3: use tcg_gen_gvec_mul()
v2: fix coding style
use Power ISA 3.1 flag
tcg/ppc/tcg-target.h | 2 ++ tcg/ppc/tcg-target.inc.c | 12 ++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-)
tcg/ppc/tcg-target.h +2 -0
@@ -63,6 +63,7 @@ typedef enum { tcg_isa_2_06, tcg_isa_2_07, tcg_isa_3_00, + tcg_isa_3_10, } TCGPowerISA;extern TCGPowerISA have_isa;
@@ -72,6 +73,7 @@ extern bool have_vsx;#define have_isa_2_06 (have_isa >= tcg_isa_2_06)#define have_isa_2_07 (have_isa >= tcg_isa_2_07)#define have_isa_3_00 (have_isa >= tcg_isa_3_00) +#define have_isa_3_10 (have_isa >= tcg_isa_3_10)/* optional instructions automatically implemented */ #define TCG_TARGET_HAS_ext8u_i32 0/* andi */
tcg/ppc/tcg-target.inc.c +10 -2
@@ -564,6 +564,7 @@ static int tcg_target_const_match(tcg_target_long val, TCGType type,#define VMULOUH VX4(72)#define VMULOUW VX4(136)/* v2.07 */ #define VMULUWM VX4(137)/* v2.07 */ +#define VMULLD VX4(457)/* v3.10 */ #define VMSUMUHM VX4(38)#define VMRGHB VX4(12)
@@ -3015,6 +3016,8 @@ int tcg_can_emit_vec_op(TCGOpcode opc, TCGType type, unsigned vece)return -1 ;case MO_32 :return have_isa_2_07 ?1 :-1 ; +case MO_64 : +return have_isa_3_10; }return 0 ;case INDEX_op_bitsel_vec:
@@ -3149,6 +3152,7 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc,static const uint32_t add_op[4 ] = {VADDUBM ,VADDUHM ,VADDUWM ,VADDUDM }, sub_op[4 ] = {VSUBUBM ,VSUBUHM ,VSUBUWM ,VSUBUDM }, + mul_op[4 ] = {0 ,0 ,VMULUWM ,VMULLD }, neg_op[4 ] = {0 ,0 ,VNEGW ,VNEGD }, eq_op[4 ] = {VCMPEQUB ,VCMPEQUH ,VCMPEQUW ,VCMPEQUD }, ne_op[4] = { VCMPNEB, VCMPNEH, VCMPNEW, 0 },
@@ -3199,8 +3203,7 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, a1 =0 ;break ;case INDEX_op_mul_vec: -tcg_debug_assert (vece ==MO_32 && have_isa_2_07); - insn =VMULUWM ; + insn = mul_op[vece];break ;case INDEX_op_ssadd_vec: insn = ssadd_op[vece];
@@ -3709,6 +3712,11 @@ static void tcg_target_init(TCGContext *s) have_isa = tcg_isa_3_00; }#endif +#ifdef PPC_FEATURE2_ARCH_3_10 +if (hwcap2 &PPC_FEATURE2_ARCH_3_10 ) { + have_isa = tcg_isa_3_10; + } +#endif #ifdef PPC_FEATURE2_HAS_ISEL /* Prefer explicit instruction from the kernel. */
Signature · 1 line
2.23.0
PATCH v4 9/11 fix the prototype of muls64/mulu64
In reply to Lijun PanThe prototypes of muls64/mulu64 in host-utils.h should match the definitions in host-utils.c
---
no change since v1
include/qemu/host-utils.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/qemu/host-utils.h +2 -2
@@ -77,8 +77,8 @@ static inline int divs128(int64_t *plow, int64_t *phigh, int64_t divisor) } }#else -void muls64 (uint64_t *phigh,uint64_t *plow,int64_t a,int64_t b); -void mulu64 (uint64_t *phigh,uint64_t *plow,uint64_t a,uint64_t b); +void muls64 (uint64_t *plow,uint64_t *phigh,int64_t a,int64_t b); +void mulu64 (uint64_t *plow,uint64_t *phigh,uint64_t a,uint64_t b);int divu128 (uint64_t *plow,uint64_t *phigh,uint64_t divisor);int divs128 (int64_t *plow,int64_t *phigh,int64_t divisor);
Signature · 1 line
2.23.0
PATCH v4 5/11 target/ppc: add vmulld instruction
In reply to Lijun Panvmulld: Vector Multiply Low Doubleword.
---
v4: add missing changes, and split to 5/11, 6/11, 7/11
v3: use tcg_gen_gvec_mul()
v2: fix coding style
use Power ISA 3.1 flag
target/ppc/translate/vmx-impl.inc.c | 1 + target/ppc/translate/vmx-ops.inc.c | 4 ++++ 2 files changed, 5 insertions(+)
target/ppc/translate/vmx-impl.inc.c +1 -0
@@ -807,6 +807,7 @@ GEN_VXFORM_DUAL(vmulouw, PPC_ALTIVEC, PPC_NONE,GEN_VXFORM (vmulosb,4 ,4 );GEN_VXFORM (vmulosh,4 ,5 );GEN_VXFORM (vmulosw,4 ,6 ); +GEN_VXFORM_V (vmulld,MO_64 , tcg_gen_gvec_mul,4 ,7 );GEN_VXFORM (vmuleub,4 ,8 );GEN_VXFORM (vmuleuh,4 ,9 );GEN_VXFORM (vmuleuw,4 ,10 );
target/ppc/translate/vmx-ops.inc.c +4 -0
@@ -48,6 +48,9 @@ GEN_HANDLER_E(name, 0x04, opc2, opc3, inval, PPC_NONE, PPC2_ISA300)GEN_HANDLER_E_2 (name,0x04 , opc2, opc3, opc4,0x00000000 ,PPC_NONE , \ PPC2_ISA300) +#define GEN_VXFORM_310 (name, opc2, opc3) \ +GEN_HANDLER_E(name, 0x04, opc2, opc3, 0x00000000, PPC_NONE, PPC2_ISA310) +#define GEN_VXFORM_DUAL (name0, name1, opc2, opc3, type0, type1) \ GEN_HANDLER_E(name0##_##name1, 0x4, opc2, opc3, 0x00000000, type0, type1)
@@ -104,6 +107,7 @@ GEN_VXFORM_DUAL(vmulouw, vmuluwm, 4, 2, PPC_ALTIVEC, PPC_NONE),GEN_VXFORM (vmulosb,4 ,4 ),GEN_VXFORM (vmulosh,4 ,5 ),GEN_VXFORM_207 (vmulosw,4 ,6 ), +GEN_VXFORM_310 (vmulld,4 ,7 ),GEN_VXFORM (vmuleub,4 ,8 ),GEN_VXFORM (vmuleuh,4 ,9 ), GEN_VXFORM_207(vmuleuw, 4, 10),
Signature · 1 line
2.23.0
PATCH v4 3/11 target/ppc: add byte-reverse br[dwh] instructions
In reply to Lijun PanPOWER ISA 3.1 introduces following byte-reverse instructions:
brd: Byte-Reverse Doubleword X-form
brw: Byte-Reverse Word X-form
brh: Byte-Reverse Halfword X-form
---
v4: make it compile on all targets
v3: fix the store issue in br[dwh]
simplify brw implementation add "if defined(TARGET_PPC64)"
v2: fix coding style
use Power ISA 3.1 flag
target/ppc/translate.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+)
target/ppc/translate.c +40 -0
@@ -6971,7 +6971,47 @@ static void gen_dform3D(DisasContext *ctx)return gen_invalid (ctx); } +#if defined(TARGET_PPC64 ) +/* brd */ +static void gen_brd (DisasContext *ctx) +{ +tcg_gen_bswap64_i64 (cpu_gpr[rA (ctx->opcode)], cpu_gpr[rS (ctx->opcode)]); +} + +/* brw */ +static void gen_brw (DisasContext *ctx) +{ +tcg_gen_bswap64_i64 (cpu_gpr[rA (ctx->opcode)], cpu_gpr[rS (ctx->opcode)]); +tcg_gen_rotli_i64 (cpu_gpr[rA (ctx->opcode)], cpu_gpr[rA (ctx->opcode)],32 ); + +} + +/* brh */ +static void gen_brh (DisasContext *ctx) +{ +TCGv_i64 t0 =tcg_temp_new_i64 (); +TCGv_i64 t1 =tcg_temp_new_i64 (); +TCGv_i64 t2 =tcg_temp_new_i64 (); + +tcg_gen_movi_i64 (t0,0x00ff00ff00ff00ffull ); +tcg_gen_shri_i64 (t1, cpu_gpr[rS (ctx->opcode)],8 ); +tcg_gen_and_i64 (t2, t1, t0); +tcg_gen_and_i64 (t1, cpu_gpr[rS (ctx->opcode)], t0); +tcg_gen_shli_i64 (t1, t1,8 ); +tcg_gen_or_i64 (cpu_gpr[rA (ctx->opcode)], t1, t2); + +tcg_temp_free_i64 (t0); +tcg_temp_free_i64 (t1); +tcg_temp_free_i64 (t2); +} +#endif + static opcode_t opcodes[] = { +#if defined(TARGET_PPC64) +GEN_HANDLER_E(brd, 0x1F, 0x1B, 0x05, 0x0000F801, PPC_NONE, PPC2_ISA310), +GEN_HANDLER_E(brw, 0x1F, 0x1B, 0x04, 0x0000F801, PPC_NONE, PPC2_ISA310), +GEN_HANDLER_E(brh, 0x1F, 0x1B, 0x06, 0x0000F801, PPC_NONE, PPC2_ISA310), +#endif GEN_HANDLER(invalid, 0x00, 0x00, 0x00, 0xFFFFFFFF, PPC_NONE), GEN_HANDLER(cmp, 0x1F, 0x00, 0x00, 0x00400000, PPC_INTEGER), GEN_HANDLER(cmpi, 0x0B, 0xFF, 0xFF, 0x00400000, PPC_INTEGER),
Signature · 1 line
2.23.0
David Gibson
AppliedRe: [PATCH v4 02/11] target/ppc: Enable Power ISA 3.1
In reply to Lijun PanQuoted 3 lines · Lijun Pan
This patch enables the Power ISA 3.1 in QEMU.
Signed-off-by Lijun Pan <[email protected]>
Applied to ppc-for-5.2.
Quoted 34 lines
---
v4: split to 01/11 and 02/11
v2: add Power ISA 3.1 flagtarget/ppc/cpu.h | 2 +- target/ppc/translate_init.inc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)target/ppc/cpu.h +1
-1@@ -2201,7 +2201,7 @@ enum {PPC2_BCTAR_ISA207 |PPC2_LSQ_ISA207 | \PPC2_ALTIVEC_207 |PPC2_ISA207S |PPC2_DFP | \PPC2_FP_CVT_S64 |PPC2_TM |PPC2_PM_ISA206 | \ - PPC2_ISA300) + PPC2_ISA300 | PPC2_ISA310) };/*****************************************************************************/ target/ppc/translate_init.inc.c +1
-1@@ -9206,7 +9206,7 @@ POWERPC_FAMILY(POWER10)(ObjectClass *oc, void *data)PPC2_FP_TST_ISA206 |PPC2_BCTAR_ISA207 |PPC2_LSQ_ISA207 |PPC2_ALTIVEC_207 |PPC2_ISA205 |PPC2_ISA207S |PPC2_FP_CVT_S64 | -PPC2_TM |PPC2_ISA300 |PPC2_PRCNTL ; +PPC2_TM |PPC2_ISA300 |PPC2_PRCNTL |PPC2_ISA310 ; pcc->msr_mask = (1ull <<MSR_SF ) | (1ull <<MSR_HV ) | (1ull << MSR_TM) |
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
David Gibson
AppliedRe: [PATCH v4 01/11] target/ppc: Introduce Power ISA 3.1 flag
In reply to Lijun PanQuoted 3 lines · Lijun Pan
This flag will be used for Power10 instructions.
Signed-off-by Lijun Pan <[email protected]>
Applied to ppc-for-5.2.
Quoted 20 lines
---
v4: split to 01/11 and 02/11
v2: add Power ISA 3.1 flagtarget/ppc/cpu.h | 2 ++ 1 file changed, 2 insertions(+)target/ppc/cpu.h +2
-0@@ -2191,6 +2191,8 @@ enum {PPC2_PM_ISA206 =0x0000000000040000ULL ,/* POWER ISA 3.0 */ PPC2_ISA300 =0x0000000000080000ULL , +/* POWER ISA 3.1 */ +PPC2_ISA310 =0x0000000000100000ULL , #define PPC_TCG_INSNS2 (PPC2_BOOKE206 | PPC2_VSX | PPC2_PRCNTL | PPC2_DBRX | \ PPC2_ISA205 | PPC2_VSX207 | PPC2_PERM_ISA206 | \
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
Quoted 4 lines · Lijun Pan
This patch series add several newly introduced 32/64-bit vector instructions in Power ISA 3.1. Power ISA 3.1 flag is introduced in this version. In v4 version, coding style issues are fixed, community reviews/suggestions are taken into consideration.
So, is the ISA 3.1 document available somewhere?
Quoted 27 lines
Lijun Pan (11):
target/ppc: Introduce Power ISA 3.1 flag target/ppc: Enable Power ISA 3.1
target/ppc: add byte-reverse br[dwh] instructions target/ppc: convert vmuluwm totcg_gen_gvec_multarget/ppc: add vmulld instruction
Update PowerPCAT_HWCAP2definition target/ppc: add vmulld toINDEX_op_mul_veccase target/ppc: add vmulh{su}w instructions
fix the prototype of muls64/mulu64 target/ppc: add vmulh{su}d instructions target/ppc: add vdiv{su}{wd} vmod{su}{wd} instructionsinclude/elf.h | 1 + include/qemu/host-utils.h | 4 +- target/ppc/cpu.h | 4 +- target/ppc/helper.h | 13 ++++- target/ppc/int_helper.c | 75 ++++++++++++++++++++++++----- target/ppc/translate.c | 43 +++++++++++++++++ target/ppc/translate/vmx-impl.inc.c | 26 +++++++++- target/ppc/translate/vmx-ops.inc.c | 27 +++++++++-- target/ppc/translate_init.inc.c | 2 +- tcg/ppc/tcg-target.h | 2 + tcg/ppc/tcg-target.inc.c | 12 ++++- 11 files changed, 184 insertions(+), 25 deletions(-)
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
Quoted 8 lines · On Sun, 5 Jul 2020 19:10:46 +1000 David Gibson <[email protected]>…
Quoted 4 lines · Lijun Pan
This patch series add several newly introduced 32/64-bit vector instructions in Power ISA 3.1. Power ISA 3.1 flag is introduced in this version. In v4 version, coding style issues are fixed, community reviews/suggestions are taken into consideration.
So, is the ISA 3.1 document available somewhere?
In https://www-355.ibm.com/systems/power/openpower/ there's a link to the PDF:
https://ibm.ent.box.com/s/hhjfw0x0lrbtyzmiaffnbxh2fuo0fog0
Quoted 28 lines
Quoted 27 lines
Lijun Pan (11):
target/ppc: Introduce Power ISA 3.1 flag target/ppc: Enable Power ISA 3.1
target/ppc: add byte-reverse br[dwh] instructions target/ppc: convert vmuluwm totcg_gen_gvec_multarget/ppc: add vmulld instruction
Update PowerPCAT_HWCAP2definition target/ppc: add vmulld toINDEX_op_mul_veccase target/ppc: add vmulh{su}w instructions
fix the prototype of muls64/mulu64 target/ppc: add vmulh{su}d instructions target/ppc: add vdiv{su}{wd} vmod{su}{wd} instructionsinclude/elf.h | 1 + include/qemu/host-utils.h | 4 +- target/ppc/cpu.h | 4 +- target/ppc/helper.h | 13 ++++- target/ppc/int_helper.c | 75 ++++++++++++++++++++++++----- target/ppc/translate.c | 43 +++++++++++++++++ target/ppc/translate/vmx-impl.inc.c | 26 +++++++++- target/ppc/translate/vmx-ops.inc.c | 27 +++++++++-- target/ppc/translate_init.inc.c | 2 +- tcg/ppc/tcg-target.h | 2 + tcg/ppc/tcg-target.inc.c | 12 ++++- 11 files changed, 184 insertions(+), 25 deletions(-)
Laurent Vivier
AppliedRe: [PATCH v4 09/11] fix the prototype of muls64/mulu64
In reply to Lijun PanLe 02/07/2020 à 01:43, Lijun Pan a écrit :
Quoted 17 lines
The prototypes of muls64/mulu64 in
host-utils.hshould match the definitions inhost-utils.cSigned-off-by Lijun Pan <[email protected]>---
Reviewed-by Richard Henderson <[email protected]>no change since v1
include/qemu/host-utils.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)include/qemu/host-utils.h +0
-0
include/qemu/host-utils.h static inline int divs128(int64_t *plow, int64_t *phigh, int64_t divisor) · line 84
Quoted 10 lines
include/qemu/host-utils.h +2
-2@@ -77,8 +77,8 @@ static inline int divs128(int64_t *plow, int64_t *phigh, int64_t divisor) } }#else -void muls64 (uint64_t *phigh,uint64_t *plow,int64_t a,int64_t b); -void mulu64 (uint64_t *phigh,uint64_t *plow,uint64_t a,uint64_t b); +void muls64 (uint64_t *plow,uint64_t *phigh,int64_t a,int64_t b); +void mulu64 (uint64_t *plow,uint64_t *phigh,uint64_t a,uint64_t b);int divu128 (uint64_t *plow,uint64_t *phigh,uint64_t divisor);int divs128 (int64_t *plow,int64_t *phigh,int64_t divisor);
Applied to my trivial-patches-for-5.1 branch.
Thanks,
Laurent
David Gibson
AppliedRe: [PATCH v4 03/11] target/ppc: add byte-reverse br[dwh] instructions
In reply to Lijun PanQuoted 6 lines · Lijun Pan
POWER ISA 3.1 introduces following byte-reverse instructions:
brd: Byte-Reverse Doubleword X-form
brw: Byte-Reverse Word X-form
brh: Byte-Reverse Halfword X-formSigned-off-by Lijun Pan <[email protected]>
Applied to ppc-for-5.2.
Quoted 63 lines
---
v4: make it compile on all targets
v3: fix the store issue in br[dwh]
simplify brw implementation add "ifdefined(TARGET_PPC64)"
v2: fix coding style
use Power ISA 3.1 flagtarget/ppc/translate.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+)target/ppc/translate.c +40
-0@@ -6971,7 +6971,47 @@ static void gen_dform3D(DisasContext *ctx)return gen_invalid (ctx); } +#if defined(TARGET_PPC64 ) +/* brd */ +static void gen_brd (DisasContext *ctx) +{ +tcg_gen_bswap64_i64 (cpu_gpr[rA (ctx->opcode)], cpu_gpr[rS (ctx->opcode)]); +} + +/* brw */ +static void gen_brw (DisasContext *ctx) +{ +tcg_gen_bswap64_i64 (cpu_gpr[rA (ctx->opcode)], cpu_gpr[rS (ctx->opcode)]); +tcg_gen_rotli_i64 (cpu_gpr[rA (ctx->opcode)], cpu_gpr[rA (ctx->opcode)],32 ); + +} + +/* brh */ +static void gen_brh (DisasContext *ctx) +{ +TCGv_i64 t0 =tcg_temp_new_i64 (); +TCGv_i64 t1 =tcg_temp_new_i64 (); +TCGv_i64 t2 =tcg_temp_new_i64 (); + +tcg_gen_movi_i64 (t0,0x00ff00ff00ff00ffull ); +tcg_gen_shri_i64 (t1, cpu_gpr[rS (ctx->opcode)],8 ); +tcg_gen_and_i64 (t2, t1, t0); +tcg_gen_and_i64 (t1, cpu_gpr[rS (ctx->opcode)], t0); +tcg_gen_shli_i64 (t1, t1,8 ); +tcg_gen_or_i64 (cpu_gpr[rA (ctx->opcode)], t1, t2); + +tcg_temp_free_i64 (t0); +tcg_temp_free_i64 (t1); +tcg_temp_free_i64 (t2); +} +#endif + static opcode_t opcodes[] = { +#if defined(TARGET_PPC64) +GEN_HANDLER_E(brd, 0x1F, 0x1B, 0x05, 0x0000F801, PPC_NONE, PPC2_ISA310), +GEN_HANDLER_E(brw, 0x1F, 0x1B, 0x04, 0x0000F801, PPC_NONE, PPC2_ISA310), +GEN_HANDLER_E(brh, 0x1F, 0x1B, 0x06, 0x0000F801, PPC_NONE, PPC2_ISA310), +#endif GEN_HANDLER(invalid, 0x00, 0x00, 0x00, 0xFFFFFFFF, PPC_NONE), GEN_HANDLER(cmp, 0x1F, 0x00, 0x00, 0x00400000, PPC_INTEGER), GEN_HANDLER(cmpi, 0x0B, 0xFF, 0xFF, 0x00400000, PPC_INTEGER),
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
David Gibson
AppliedRe: [PATCH v4 04/11] target/ppc: convert vmuluwm to tcg_gen_gvec_mul
In reply to Lijun PanQuoted 4 lines · Lijun Pan
Convert the original implementation of vmuluwm to the more generic
tcg_gen_gvec_mul.Signed-off-by Lijun Pan <[email protected]>
Applied to ppc-for-5.2.
Quoted 58 lines
---
Reviewed-by Richard Henderson <[email protected]>v3: newly introduced
target/ppc/helper.h | 1 - target/ppc/int_helper.c | 13 ------------- target/ppc/translate/vmx-impl.inc.c | 2 +- 3 files changed, 1 insertion(+), 15 deletions(-)target/ppc/helper.h +0
-1@@ -184,7 +184,6 @@ DEF_HELPER_3(vmulosw, void, avr, avr, avr) DEF_HELPER_3(vmuloub, void, avr, avr, avr) DEF_HELPER_3(vmulouh, void, avr, avr, avr) DEF_HELPER_3(vmulouw, void, avr, avr, avr) -DEF_HELPER_3(vmuluwm, void, avr, avr, avr) DEF_HELPER_3(vslo, void, avr, avr, avr) DEF_HELPER_3(vsro, void, avr, avr, avr)DEF_HELPER_3 (vsrv, void, avr, avr, avr)target/ppc/int_helper.c +0
-13@@ -523,19 +523,6 @@ void helper_vprtybq(ppc_avr_t *r, ppc_avr_t *b) r->VsrD (0 ) =0 ; } -#define VARITH_DO (name, op, element) \ - void helper_v##name(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) \ - { \ - int i; \ - \ - for (i = 0; i < ARRAY_SIZE(r->element); i++) { \ - r->element[i] = a->element[i] op b->element[i]; \ - } \ - } -VARITH_DO(muluwm, *, u32) -#undef VARITH_DO -#undef VARITH -#define VARITHFP (suffix, func) \ void helper_v##suffix(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a, \ ppc_avr_t *b) \target/ppc/translate/vmx-impl.inc.c +1
-1@@ -801,7 +801,7 @@ static void trans_vclzd(DisasContext *ctx)GEN_VXFORM (vmuloub,4 ,0 );GEN_VXFORM (vmulouh,4 ,1 );GEN_VXFORM (vmulouw,4 ,2 ); -GEN_VXFORM (vmuluwm,4 ,2 ); +GEN_VXFORM_V (vmuluwm,MO_32 , tcg_gen_gvec_mul,4 ,2 );GEN_VXFORM_DUAL (vmulouw,PPC_ALTIVEC ,PPC_NONE , vmuluwm, PPC_NONE, PPC2_ALTIVEC_207)GEN_VXFORM (vmulosb,4 ,4 );
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
Re: [PATCH v4 06/11] Update PowerPC AT_HWCAP2 definition
In reply to Lijun PanQuoted 17 lines · Lijun Pan
Add
PPC2_FEATURE2_ARCH_3_10to the PowerPCAT_HWCAP2definitions.Signed-off-by Lijun Pan <[email protected]>---
v4: add missing changes, and split to 5/11, 6/11, 7/11
v3: usetcg_gen_gvec_mul()
v2: fix coding style
use Power ISA 3.1 flaginclude/elf.h | 1 + 1 file changed, 1 insertion(+)include/elf.h +0
-0
include/elf.h typedef struct { · line 559
Quoted 6 lines
include/elf.h +1
-0@@ -554,6 +554,7 @@ typedef struct {#define PPC_FEATURE2_HTM_NOSC 0x01000000#define PPC_FEATURE2_ARCH_3_00 0x00800000#define PPC_FEATURE2_HAS_IEEE128 0x00400000 +#define PPC_FEATURE2_ARCH_3_10 0x00200000/* Bits present in AT_HWCAP for Sparc. */
Um.. in the corresponding #defines in the kernel 0x00200000 is given to PPC_FEATURE2_DARN, and several more bits are allocated past that point.
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
David Gibson
AppliedRe: [PATCH v4 05/11] target/ppc: add vmulld instruction
In reply to Lijun PanQuoted 3 lines · Lijun Pan
vmulld: Vector Multiply Low Doubleword.
Signed-off-by Lijun Pan <[email protected]>
Applied to ppc-for-5.2.
Quoted 44 lines
---
v4: add missing changes, and split to 5/11, 6/11, 7/11
v3: usetcg_gen_gvec_mul()
v2: fix coding style
use Power ISA 3.1 flagtarget/ppc/translate/vmx-impl.inc.c | 1 + target/ppc/translate/vmx-ops.inc.c | 4 ++++ 2 files changed, 5 insertions(+)target/ppc/translate/vmx-impl.inc.c +1
-0@@ -807,6 +807,7 @@ GEN_VXFORM_DUAL(vmulouw, PPC_ALTIVEC, PPC_NONE,GEN_VXFORM (vmulosb,4 ,4 );GEN_VXFORM (vmulosh,4 ,5 );GEN_VXFORM (vmulosw,4 ,6 ); +GEN_VXFORM_V (vmulld,MO_64 , tcg_gen_gvec_mul,4 ,7 );GEN_VXFORM (vmuleub,4 ,8 );GEN_VXFORM (vmuleuh,4 ,9 );GEN_VXFORM (vmuleuw,4 ,10 );target/ppc/translate/vmx-ops.inc.c +4
-0@@ -48,6 +48,9 @@ GEN_HANDLER_E(name, 0x04, opc2, opc3, inval, PPC_NONE, PPC2_ISA300)GEN_HANDLER_E_2 (name,0x04 , opc2, opc3, opc4,0x00000000 ,PPC_NONE , \ PPC2_ISA300) +#define GEN_VXFORM_310 (name, opc2, opc3) \ +GEN_HANDLER_E(name, 0x04, opc2, opc3, 0x00000000, PPC_NONE, PPC2_ISA310) +#define GEN_VXFORM_DUAL (name0, name1, opc2, opc3, type0, type1) \ GEN_HANDLER_E(name0##_##name1, 0x4, opc2, opc3, 0x00000000, type0, type1)@@ -104,6 +107,7 @@ GEN_VXFORM_DUAL(vmulouw, vmuluwm, 4, 2, PPC_ALTIVEC, PPC_NONE),GEN_VXFORM (vmulosb,4 ,4 ),GEN_VXFORM (vmulosh,4 ,5 ),GEN_VXFORM_207 (vmulosw,4 ,6 ), +GEN_VXFORM_310 (vmulld,4 ,7 ),GEN_VXFORM (vmuleub,4 ,8 ),GEN_VXFORM (vmuleuh,4 ,9 ), GEN_VXFORM_207(vmuleuw, 4, 10),
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
Re: [PATCH v4 06/11] Update PowerPC AT_HWCAP2 definition
In reply to David GibsonQuoted 27 lines · David Gibson
Quoted 22 lines · Lijun Pan
Add
PPC2_FEATURE2_ARCH_3_10to the PowerPCAT_HWCAP2definitions.Signed-off-by Lijun Pan <[email protected]>---
v4: add missing changes, and split to 5/11, 6/11, 7/11
v3: usetcg_gen_gvec_mul()
v2: fix coding style
use Power ISA 3.1 flag
include/elf.h| 1 +1 file changed, 1 insertion(+)include/elf.h +1
-0@@ -554,6 +554,7 @@ typedef struct {#define PPC_FEATURE2_HTM_NOSC 0x01000000#define PPC_FEATURE2_ARCH_3_00 0x00800000#define PPC_FEATURE2_HAS_IEEE128 0x00400000 +#define PPC_FEATURE2_ARCH_3_10 0x00200000
Quoted 7 lines
include/elf.h typedef struct { · line 559
Quoted 1 line
include/elf.h +0
-0/* Bits present in AT_HWCAP for Sparc. */ Um.. in the corresponding #defines in the kernel
0x00200000is given toPPC_FEATURE2_DARN, and several more bits are allocated past that point.
Then what do you recommend to use?
Thanks,
Lijun
Re: [PATCH v4 08/11] target/ppc: add vmulh{su}w instructions
In reply to Lijun PanQuoted 7 lines · Lijun Pan
vmulhsw: Vector Multiply High Signed Word
vmulhuw: Vector Multiply High Unsigned Word
Quoted 7 lines
Signed-off-by Lijun Pan <[email protected]>---
Reviewed-by Richard Henderson <[email protected]>v3: inline the helper_vmulh{su}w multiply directly instead of using macro
v2: fix coding style
use Power ISA 3.1 flag
any feedback on this one?
Re: [PATCH v4 07/11] target/ppc: add vmulld to INDEX_op_mul_vec case
In reply to Lijun PanQuoted 7 lines · Lijun Pan
Group vmuluwm and vmulld. Make vmulld-specific
changes since it belongs to new ISA 3.1.
Quoted 7 lines
Signed-off-by Lijun Pan <[email protected]>---
v4: add missing changes, and split to 5/11, 6/11, 7/11
v3: usetcg_gen_gvec_mul()
v2: fix coding style
use Power ISA 3.1 flag
Richard,
Do you have any opinion on this one?
Thanks,
Lijun
Quoted 79 lines
tcg/ppc/tcg-target.h| 2 ++tcg/ppc/tcg-target.inc.c| 12 ++++++++++--2 files changed, 12 insertions(+), 2 deletions(-)tcg/ppc/tcg-target.h +2
-0@@ -63,6 +63,7 @@ typedef enum { tcg_isa_2_06, tcg_isa_2_07, tcg_isa_3_00, + tcg_isa_3_10, } TCGPowerISA;extern TCGPowerISA have_isa;@@ -72,6 +73,7 @@ extern bool have_vsx;#define have_isa_2_06 (have_isa >= tcg_isa_2_06)#define have_isa_2_07 (have_isa >= tcg_isa_2_07)#define have_isa_3_00 (have_isa >= tcg_isa_3_00) +#define have_isa_3_10 (have_isa >= tcg_isa_3_10)/* optional instructions automatically implemented */ #define TCG_TARGET_HAS_ext8u_i32 0/* andi */ tcg/ppc/tcg-target.inc.c +10
-2@@ -564,6 +564,7 @@ static int tcg_target_const_match(tcg_target_long val, TCGType type,#define VMULOUH VX4(72)#define VMULOUW VX4(136)/* v2.07 */ #define VMULUWM VX4(137)/* v2.07 */ +#define VMULLD VX4(457)/* v3.10 */ #define VMSUMUHM VX4(38)#define VMRGHB VX4(12)@@ -3015,6 +3016,8 @@ int tcg_can_emit_vec_op(TCGOpcode opc, TCGType type, unsigned vece)return -1 ;case MO_32 :return have_isa_2_07 ?1 :-1 ; +case MO_64 : +return have_isa_3_10; }return 0 ;case INDEX_op_bitsel_vec:@@ -3149,6 +3152,7 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc,static const uint32_t add_op[4 ] = {VADDUBM ,VADDUHM ,VADDUWM ,VADDUDM }, sub_op[4 ] = {VSUBUBM ,VSUBUHM ,VSUBUWM ,VSUBUDM }, + mul_op[4 ] = {0 ,0 ,VMULUWM ,VMULLD }, neg_op[4 ] = {0 ,0 ,VNEGW ,VNEGD }, eq_op[4 ] = {VCMPEQUB ,VCMPEQUH ,VCMPEQUW ,VCMPEQUD }, ne_op[4] = { VCMPNEB, VCMPNEH, VCMPNEW, 0 },@@ -3199,8 +3203,7 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, a1 =0 ;break ;case INDEX_op_mul_vec: -tcg_debug_assert (vece ==MO_32 && have_isa_2_07); - insn =VMULUWM ; + insn = mul_op[vece];break ;case INDEX_op_ssadd_vec: insn = ssadd_op[vece];@@ -3709,6 +3712,11 @@ static void tcg_target_init(TCGContext *s) have_isa = tcg_isa_3_00; }#endif +#ifdef PPC_FEATURE2_ARCH_3_10 +if (hwcap2 &PPC_FEATURE2_ARCH_3_10 ) { + have_isa = tcg_isa_3_10; + } +#endif #ifdef PPC_FEATURE2_HAS_ISEL /* Prefer explicit instruction from the kernel. */ Signature · 1 line
2.23.0
Re: [PATCH v4 06/11] Update PowerPC AT_HWCAP2 definition
In reply to Lijun PanQuoted 27 lines · Lijun Pan
Quoted 27 lines · David Gibson
Quoted 22 lines · Lijun Pan
Add
PPC2_FEATURE2_ARCH_3_10to the PowerPCAT_HWCAP2definitions.Signed-off-by Lijun Pan <[email protected]>---
v4: add missing changes, and split to 5/11, 6/11, 7/11
v3: usetcg_gen_gvec_mul()
v2: fix coding style
use Power ISA 3.1 flag
include/elf.h| 1 +1 file changed, 1 insertion(+)include/elf.h +1
-0@@ -554,6 +554,7 @@ typedef struct {#define PPC_FEATURE2_HTM_NOSC 0x01000000#define PPC_FEATURE2_ARCH_3_00 0x00800000#define PPC_FEATURE2_HAS_IEEE128 0x00400000 +#define PPC_FEATURE2_ARCH_3_10 0x00200000
Quoted 8 lines
Quoted 6 lines
include/elf.h typedef struct { · line 559
Quoted 1 line
include/elf.h +0
-0/* Bits present in AT_HWCAP for Sparc. */ Um.. in the corresponding #defines in the kernel
0x00200000is given toPPC_FEATURE2_DARN, and several more bits are allocated past that point.Then what do you recommend to use?
This is part of exposed userland ABI, so it needs to be standardized at least semi-formally. I'm not actually sure who allocates these in general.
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
Re: [PATCH v4 06/11] Update PowerPC AT_HWCAP2 definition
Quoted 39 lines · David Gibson
Quoted 34 lines · Lijun Pan
Quoted 33 lines · David Gibson
Quoted 17 lines · Lijun Pan
Add
PPC2_FEATURE2_ARCH_3_10to the PowerPCAT_HWCAP2definitions.Signed-off-by Lijun Pan <[email protected]>---
v4: add missing changes, and split to 5/11, 6/11, 7/11
v3: usetcg_gen_gvec_mul()
v2: fix coding style
use Power ISA 3.1 flag
include/elf.h| 1 +1 file changed, 1 insertion(+)include/elf.h +0
-0include/elf.h typedef struct { · line 559
Quoted 6 lines
include/elf.h +1
-0@@ -554,6 +554,7 @@ typedef struct {#define PPC_FEATURE2_HTM_NOSC 0x01000000#define PPC_FEATURE2_ARCH_3_00 0x00800000#define PPC_FEATURE2_HAS_IEEE128 0x00400000 +#define PPC_FEATURE2_ARCH_3_10 0x00200000/* Bits present in AT_HWCAP for Sparc. */ Um.. in the corresponding #defines in the kernel
0x00200000is given toPPC_FEATURE2_DARN, and several more bits are allocated past that point.
Quoted 5 lines
Quoted 1 line
Then what do you recommend to use?
This is part of exposed userland ABI, so it needs to be standardized at least semi-formally. I'm not actually sure who allocates these in general.
Anton,
Do you know the allocation standard since you made the last change into elf.h?
Lijun
Quoted 6 lines
Signature · 5 lines
-- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au <http://gibson.dropbear.id.au/> | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson <http://www.ozlabs.org/~dgibson>