ARM Cortex-A7 feature misdetection

Jeffrey Walton noloader at gmail.com
Tue Feb 6 19:47:39 UTC 2018


On Tue, Feb 6, 2018 at 2:33 PM, Torbjörn Granlund <tg at gmplib.org> wrote:
> Jeffrey Walton <noloader at gmail.com> writes:
>
>   > You should edit the .asm source files under mpn/arm/neon. Before m4
>   > processing.
>
> There are at least two neon subdirs under mpn/arm.
>
>   I see one file that looks interesting (lshiftc.asm):
>
>       $ ls mpn/arm/neon/
>       README       lorrshift.asm  sec_tabselect.asm
>       hamdist.asm  lshiftc.asm    popcount.asm
>
>   Does this look about right:
>
>       # mpn/arm/neon/lshiftc.asm
>       ...
>
>       ASM_START()
>           TEXT
>           ALIGN(64)
>           .fpu neon
>       PROLOGUE(mpn_lshiftc)
>       IFLSH(` mov     r12, n, lsl #2  ')
>       IFLSH(` add     rp, rp, r12     ')
>       IFLSH(` add     ap, ap, r12     ')
>
> I think this is perhaps not as clean as one would want it to be.
> Perhaps add a parameter to ASM_START, or add a new macro which could be
> made empty for machines which do not need or accept the new directive.
>
> (About your error: Your adting the lshiftc.asm file. Note the c at the
> end.  Wrong file.)

Thanks .

OK, so I added '.fpu neon' to  mpn/arm/lshift.asm:

    ASM_START()
    PROLOGUE(mpn_lshift)
        .fpu    neon
        add     up, up, n, lsl #2
        push    {r4, r6, r7, r8}
        ...

It produces the same error. I'm still not sure if this is the correct
fix applied to the correct file.

So let me back up and ask, what is the name of the file I should be
editing? Once I have the name of the file we can move on to the
changes that should be made.

Jeff


More information about the gmp-bugs mailing list