Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix multilib flags of AArch64 soft nofp #600

Merged

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 added a commit to Laur59/LLVM-embedded-toolchain-for-Arm that referenced this pull request Dec 21, 2024
Fix multilib flags of AArch64 soft nofp (ARM-software#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