Skip to content

Conversation

@vhscampos
Copy link
Member

This patch fixes the multilib flags required to select the AArch64 soft nofp variants.

The +nofp and +nosimd arch extensions are specified in the -march or -mcpu command line options. Before this patch, the multilib flags specified this part as -march=armv8-a+nofp+nosimd, however this does not work for any architecture greater than v8, including point releases, nor does it for any -mcpu value whose underlying architecture is greater than v8. In the formed case because any point release would lead to a regular expression mismatch; and in the latter, -mcpu option processing introduces extra architecture extensions in the string.

Hence the correct way is to match agains -march=armvX+nofp and -march=armvX+nosimd. These two multilib flags are inserted by our implementation of multilib.yaml when +nofp and +nosimd are present anywhere in the -march= or -mcpu= values, respectively.

This patch fixes the multilib flags required to select the AArch64 soft
nofp variants.

The `+nofp` and `+nosimd` arch extensions are specified in the `-march`
or `-mcpu` command line options. Before this patch, the multilib flags
specified this part as `-march=armv8-a+nofp+nosimd`, however this does
not work for any architecture greater than v8, including point releases,
nor does it for any `-mcpu` value whose underlying architecture is
greater than v8. In the formed case because any point release would lead
to a regular expression mismatch; and in the latter, `-mcpu` option
processing introduces extra architecture extensions in the string.

Hence the correct way is to match agains `-march=armvX+nofp` and
`-march=armvX+nosimd`. These two multilib flags are inserted by our
implementation of `multilib.yaml` when `+nofp` and `+nosimd` are present
anywhere in the `-march=` or `-mcpu=` values, respectively.
Copy link
Collaborator

@pratlucas pratlucas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@vhscampos vhscampos merged commit 3f6e358 into ARM-software:main Dec 16, 2024
1 check passed
@vhscampos vhscampos deleted the aarch64-soft-nofp-fix-multilib-flags branch December 16, 2024 15:33
Laur59 referenced this pull request in Laur59/LLVM-embedded-toolchain-for-Arm Dec 21, 2024
Fix multilib flags of AArch64 soft nofp (#600)

This patch fixes the multilib flags required to select the AArch64 soft
nofp variants.

The `+nofp` and `+nosimd` arch extensions are specified in the `-march`
or `-mcpu` command line options. Before this patch, the multilib flags
specified this part as `-march=armv8-a+nofp+nosimd`, however this does
not work for any architecture greater than v8, including point releases,
nor does it for any `-mcpu` value whose underlying architecture is
greater than v8. In the former case because any point release would lead
to a regular expression mismatch; and in the latter, `-mcpu` option
processing introduces extra architecture extensions in the string.

Hence the correct way is to match agains `-march=armvX+nofp` and
`-march=armvX+nosimd`. These two multilib flags are inserted by our
implementation of `multilib.yaml` when `+nofp` and `+nosimd` are present
anywhere in the `-march=` or `-mcpu=` values, respectively.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants