[PATCH v7] PowerPC: Support for Elliptic Curve Cryptography Instructions (RFC02669)
Surya Kumari Jangala
jskumari@linux.ibm.com
Fri Jan 23 07:07:11 GMT 2026
On 20/01/26 11:12 pm, Abhay Kandpal wrote:
>
> On 20/01/26 17:33, Surya Kumari Jangala wrote:
>> Hi,
>>
>> On 13/01/26 12:58 pm, Abhay Kandpal wrote:
>>> opcodes/
>>> * ppc-opc.c: (insert_s3, extract_s3): New functions.
>> There should be a tab of length 8 chars. You should not be inserting 8 spaces.
>> Ditto for the rest of the changelog.
>>
>>> (XX3MUL_MASK, XX3SUM_MASK, XX3MADD_MASK, XX4EXT, P_XX4EXT_MASK
>>> SFUNC, S0EXP, S1EXP, S2EXP, PSSUM, PSSUMEXT): New defines.
>> Please add the entries in the same order in which they occur in the patch.
>> So for this patch the order would be PSSUMEXT, S1EXP and so on.
>> This helps a lot with doing a patch review.
>>
>>> (PS, PSD): Update for new macros.
>>> (powerpc_opcodes): Add xxmulmul, xxmulmulhiadd, xxmulmulloadd,
>>> xxssumudm, xxssumudmc, xsmerge2t3uqm, xsaddadduqm, xsaddaddsuqm,
>>> xsaddsubuqm, xsmerge3t1uqm, xsrebase2t1uqm, xsrebase2t2uqm,
>>> xsrebase3t3uqm, xsrebase2t3uqm, xsrebase2t4uqm, xsaddsubsuqm,
>>> xsmerge2t1uqm, xsmerge2t2uqm, xsrebase3t1uqm, xsrebase3t2uqm,
>>> xxssumudmcext.
>>>
>>> gas/
>>> * testsuite/gas/ppc/future.s: New test.
>>> * testsuite/gas/ppc/future.d: Likewise.
>>> ---
>>> This patch is reg tested.
>>> Changes from v6 -> v7
>>> <Rebased on latest trunc>
>> All the changes from v1 onwards should be mentioned here, not just v6->v7.
>>
>>> gas/testsuite/gas/ppc/future.d | 22 +++++++++
>>> gas/testsuite/gas/ppc/future.s | 21 +++++++++
>>> opcodes/ppc-opc.c | 83 ++++++++++++++++++++++++++++++++--
>>> 3 files changed, 123 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/gas/testsuite/gas/ppc/future.d b/gas/testsuite/gas/ppc/future.d
>>> index facba4365b9..0c686db02b7 100644
>>> --- a/gas/testsuite/gas/ppc/future.d
>>> +++ b/gas/testsuite/gas/ppc/future.d
>>> @@ -136,4 +136,26 @@ Disassembly of section \.text:
>>> .*: (24 38 c8 7c|7c c8 38 24) tlbieio r7,r6,2
>>> .*: (68 04 20 7d|7d 20 04 68) tlbsyncio r9
>>> .*: (a8 04 a0 7c|7c a0 04 a8) ptesyncio r5
>>> +.*: (0f 36 44 ec|ec 44 36 0f) xxmulmul vs34,vs36,vs38,6
>>> +.*: (4d 4d a7 ec|ec a7 4d 4d) xxmulmulhiadd vs37,vs39,vs9,1,0,1
>>> +.*: (8f 69 4c ed|ed 4c 69 8f) xxmulmulloadd vs42,vs44,vs45,0,1
>>> +.*: (c8 34 85 ec|ec 85 34 c8) xxssumudm vs4,vs5,vs6,1
>>> +.*: (c8 39 64 ec|ec 64 39 c8) xxssumudmc vs3,vs4,vs7,0
>>> +.*: (07 ab 74 ee|ee 74 ab 07) xsaddadduqm vs51,vs52,vs53
>>> +.*: (40 13 01 ec|ec 01 13 40) xsaddaddsuqm vs0,vs1,vs2
>>> +.*: (87 fb be ef|ef be fb 87) xsaddsubuqm vs61,vs62,vs63
>>> +.*: (00 2f 64 ec|ec 64 2f 00) xsaddsubsuqm vs3,vs4,vs5
>>> +.*: (40 57 c8 ec|ec c8 57 40) xsmerge2t1uqm vs6,vs8,vs10
>>> +.*: (80 87 8e ed|ed 8e 87 80) xsmerge2t2uqm vs12,vs14,vs16
>>> +.*: (c8 a2 53 ee|ee 53 a2 c8) xsmerge2t3uqm vs18,vs19,vs20
>>> +.*: (c8 cb b7 ee|ee b7 cb c8) xsmerge3t1uqm vs21,vs23,vs25
>>> +.*: (88 f4 7d ef|ef 7d f4 88) xsrebase2t1uqm vs27,vs29,vs30
>>> +.*: (8e 0d e0 ef|ef e0 0d 8e) xsrebase2t2uqm vs31,vs32,vs33
>>> +.*: (8f 26 43 ec|ec 43 26 8f) xsrebase2t3uqm vs34,vs35,vs36
>>> +.*: (cf 2e 64 ec|ec 64 2e cf) xsrebase2t4uqm vs35,vs36,vs37
>>> +.*: (8f 47 c7 ec|ec c7 47 8f) xsrebase3t1uqm vs38,vs39,vs40
>>> +.*: (cf 5f 2a ed|ed 2a 5f cf) xsrebase3t2uqm vs41,vs42,vs43
>>> +.*: (1f 76 8d ed|ed 8d 76 1f) xsrebase3t3uqm vs44,vs45,vs46
>>> +.*: (00 00 00 05|05 00 00 00) xxssumudmcext vs35,vs9,vs11,vs13,1
>>> +.*: (71 5b 69 88|88 69 5b 71)[[:space:]]*
>> As discussed earlier, remove this regex.
>
> Currently test passes with a literal trailing space, encoding this directly in the |.d|file results in |git|whitespace warnings. Are we sure that we want to upstream something with trailing whitespace warning on?
>
> I’m happy to keep the regex as constrained as possible, but I’d prefer this over knowingly adding trailing whitespace to the test files. This also avoids baking objdump formatting artifacts directly into the source.
>
> Additionally, there are existing instructions in the |.d|file that already end with a trailing space and were upstreamed with warnings. I believe we should fix those as well rather than adding new instances of the same issue.
>
> Please let me know if you see a cleaner alternative that avoids both the test failure and the whitespace warning — I’m open to suggestions.
There was a conscious decision to not use regexps in the powerpc tests, unlike say the
ia64 tests. Let us continue to follow the same format.
>>> @@ -9375,6 +9439,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
>>> {"drsp", XRC(59,770,0), X_MASK, POWER6, PPCVLE, {FRT, FRB}},
>>> {"drsp.", XRC(59,770,1), X_MASK, POWER6, PPCVLE, {FRT, FRB}},
>>> +{"xsrebase3t3uqm",XX3(59,195), XX3_MASK, FUTURE, PPCVLE, {XT6, XA6, XB6}},
>>> +
>> New line not needed.
>
> I added the blank line only to visually separate unrelated instruction forms.
>
> If the extra line is removed, the long mnemonic ends up directly adjacent to |denbcd/denbcd.|, which makes the opcode name column appear misaligned, for example:
>
> {"xsrebase3t3uqm",XX3(59,195), XX3_MASK, FUTURE, PPCVLE, {XT6, XA6, XB6}}, {"dcffix", XRC(59,802,0), X_MASK|FRA_MASK, POWER7, PPCVLE, {FRT, FRB}}, {"dcffix.", XRC(59,802,1), X_MASK|FRA_MASK, POWER7, PPCVLE, {FRT, FRB}},
>
> I will change this however I hope that the misalignment of opcode name should be acceptable.
>
> I took reference from existing instruction like dmxvf16gerx2nn, dmxvbf16gerx2nn etc.
>
> Please let me know your preference.
ok, you can retain the new line.
-Surya
More information about the Binutils
mailing list