Maamoun TK <[email protected]> writes:

> On Sun, Jan 31, 2021 at 10:35 AM Niels Möller <[email protected]> wrote:
>
>> For consistency, I'd prefer defining all needed macros using m4.
>
> The macros in gcm-hash.asm file are dependent on defines in the same file
> (shared for macros and function implementation) as they are relevant with
> the implementation context, also moving those macros to another file makes
> confusion for reader IMO.

I'm not suggesting moving them to a different file, just changing the
definition to use m4 define, something like (untested):

C PMUL(in,  param1, param2) 
define(`PMUL', `
        pmull          F.1q, $3.1d, $1.1d
        pmull2         F1.1q, $3.2d, $1.2d
        pmull          R.1q, $2.1d, $1.1d
        pmull2         R1.1q, $2.2d, $1.2d
        eor            F.16b, F.16b, F1.16b
        eor            R.16b, R.16b, R1.16b
')

With the recently added m4-utils.m4, one could also add some checking
with m4_assert_numargs(3) at the start of the macro definition, but
that's completely optional (other similar macros currently don't do
that).

Regards,
/Niels

-- 
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
_______________________________________________
nettle-bugs mailing list
[email protected]
http://lists.lysator.liu.se/mailman/listinfo/nettle-bugs

Reply via email to