[PATCH v3] PowerPC: Support for SHA2 and SHA3 Compute Instructions (RFC02654)
Surya Kumari Jangala
jskumari@linux.ibm.com
Wed Nov 12 13:22:11 GMT 2025
Hi,
On 07/11/25 7:20 pm, Abhay Kandpal wrote:
> @@ -7507,6 +7548,12 @@ const struct powerpc_opcode powerpc_opcodes[] = {
> {"xxsetaccz", XVA(31,177,3), XACC_MASK, POWER10, 0, {ACC}},
> {"dmmr", XVA(31,177,6), XDMRDMR_MASK,FUTURE, 0, {DMR, DMRAB}},
> {"dmxor", XVA(31,177,7), XDMRDMR_MASK,FUTURE, 0, {DMR, DMRAB}},
> +{"dmsha256hash",X2HASH(31,177,14,0), XDMRDMR_MASK, FUTURE, EXT, {DMR, DMRAB}},
> +{"dmsha512hash",X2HASH(31,177,14,1), XDMRDMR_MASK, FUTURE, EXT, {DMR, DMRAB}},
> +{"dmsha2hash", XVA(31,177,14), XDMRHSH_MASK, FUTURE, 0, {DMR, DMRAB, HASHT}},
> +{"dmsha3dw", X3HASH(31,177,15,0), XDMR3EXT_MASK, FUTURE, EXT, {DMRATp}},
> +{"dmcryshash", X3HASH(31,177,15,12),XDMR3EXT_MASK, FUTURE, EXT, {DMRATp}},
> +{"dmsha3hash", XVA(31,177,15), XDMRSR_MASK, FUTURE, 0, {DMRATp, HASHSR}},
>
> {"mtmsrd", X(31,178), XRLARB_MASK, PPC64, 0, {RS, A_L}},
>
> @@ -9602,6 +9649,15 @@ const struct powerpc_opcode powerpc_opcodes[] = {
> {"xvmovdp", XX3(60,240), XX3_MASK, PPCVSX, PPCVLE|EXT, {XT6, XAB6}},
> {"xvcpsgndp", XX3(60,240), XX3_MASK, PPCVSX, PPCVLE, {XT6, XA6, XB6}},
> {"xvnmsubadp", XX3(60,241), XX3_MASK, PPCVSX, PPCVLE, {XT6, XA6, XB6}},
> +{"dmxxsha3512pad", XX2PAD(60,421,0,0), DMREXT_MASK, FUTURE, PPCVLE, {DMR, XB6, PADE}},
> +{"dmxxsha3384pad", XX2PAD(60,421,0,1), DMREXT_MASK, FUTURE, PPCVLE, {DMR, XB6, PADE}},
> +{"dmxxsha3256pad", XX2PAD(60,421,0,2), DMREXT_MASK, FUTURE, PPCVLE, {DMR, XB6, PADE}},
> +{"dmxxsha3224pad", XX2PAD(60,421,0,3), DMREXT_MASK, FUTURE, PPCVLE, {DMR, XB6, PADE}},
> +{"dmxxshake256pad", XX2PAD(60,421,1,0), DMREXT_MASK, FUTURE, PPCVLE, {DMR, XB6, PADE}},
> +{"dmxxshake128pad", XX2PAD(60,421,1,1), DMREXT_MASK, FUTURE, PPCVLE, {DMR, XB6, PADE}},
> +{"dmxxsha384512pad", XX2PADE(60,421,2,0),DMREXTE_MASK,FUTURE, PPCVLE, {DMR, XB6}},
> +{"dmxxsha224256pad", XX2PADE(60,421,3,0),DMREXTE_MASK,FUTURE, PPCVLE, {DMR, XB6}},
> +{"dmxxshapad", XX2(60,421), XX2ACC_MASK, FUTURE, PPCVLE, {DMR, XB6, PADID, PADE, PADBL}},
These instructions are incorrectly placed. They have to appear before
xvcvuxdsp and after xxaesgenlkp.
Also the extended mnemonics should have EXT in the 5th field, like
PPCVLE|EXT.
While dmxxshapad is using XX2ACC_MASK, the extended mnemoncis are using
masks with a different name that begin with DMR. Please change the names.
You can check other extended mnemonics for ideas.
-Surya
More information about the Binutils
mailing list