Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: GENERIC64 cross-compilation error



On Thu, Jan 21, 2021 at 11:03:39AM +0000, nia wrote:
> has anyone seen this before / know how I can work around it?

Never seen it, but should be easy to analyze localy:

> /home/nia/cvs/src/sys/crypto/adiantum/adiantum.c:400:2: note: in expansion of macro 'CTASSERT'
>   400 |  CTASSERT(r*w/8 == 16);
>       |  ^~~~~~~~

See the function there:

static void
nh(uint8_t h[static 32], const uint8_t *m, size_t mlen,
    const uint32_t k[static 268 /* u/w + 2s(r - 1) */])
{
        const unsigned w = 32;   /* word size */
        const unsigned s = 2;    /* stride */
        const unsigned r = 4;    /* rounds */
        const unsigned u = 8192; /* unit count (bits per msg unit) */
        uint64_t h0 = 0, h1 = 0, h2 = 0, h3 = 0;
        unsigned i;
 
        CTASSERT(r*w/8 == 16);
        CTASSERT(u/w + 2*s*(r - 1) == 268);


so r=4, w=32 and 4*32/8==16.

I would check the preprocessed output, maybe "w" or "r" are a macro?

Martin


Home | Main Index | Thread Index | Old Index