[PATCH 4/10, GAS/ARM] Rework selection of feature bits to base build attributes on
Thomas Preudhomme
thomas.preudhomme@foss.arm.com
Wed Jun 21 10:07:00 GMT 2017
Hi,
=== Context ===
This patch is part of a patch series to add support for ARMv8-R
architecture. Its purpose is to set the feature bits on which to decide
what the build attributes should be according to the mode
(autodetection, user specified architecture or CPU, or
-march/-mcpu=all).
=== Motivation ===
Currently, the flags variable which is used to determine the build
attribute is constructed from the instruction used (arm_arch_used and
thumb_arch_used) as well as the user specified architecture or CPU
(selected_cpu). This means when several .arch are specified the
resulting feature bits can be such that no architecture provide them
all and can thus result in incorrect Tag_CPU_arch. See for instance
what having both .arch armv8-a and .arch armv8-m.base would result in.
This is not caught by the testsuite because of further bugs in the
Tag_CPU_arch build attribute value selection logic (see next patch in
the series).
=== Patch description ===
As one would expect, this patch solves the problem by setting flags
from feature bits used if in autodetection mode [1] and from
selected_cpu otherwise. The logic to set arm_ext_v1, arm_ext_v4t and
arm_ext_os feature bits is also moved to only run in autodetection mode
since otherwise the architecture or CPU would have a consistent set of
feature bits already.
[1] No architecture or CPU was specified by the user
ChangeLog entry is as follows:
*** gas/ChangeLog ***
2017-01-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
* config/tc-arm.c (aeabi_set_public_attributes): Populate flags from
feature bits used or selected_cpu depending on whether a CPU was
selected by the user.
=== Testing ===
Testsuite shows no regression when run for arm-none-eabi targets.
Is this ok for master branch?
Best regards,
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 04_rework_feature_bit_selection_logic.patch
Type: text/x-patch
Size: 2579 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20170621/50c5a641/attachment.bin>
More information about the Binutils
mailing list