[ARM] Rework selection of feature bits to base build attributes on
authorThomas Preud'homme <thomas.preudhomme@arm.com>
Wed, 21 Jun 2017 13:57:53 +0000 (14:57 +0100)
committerThomas Preud'homme <thomas.preudhomme@arm.com>
Wed, 21 Jun 2017 14:08:49 +0000 (15:08 +0100)
commit54bab2816dfd025fc53618e46be140573d5bc02e
tree82d00fbe2a1089c9ada1152f379b71d9bc786940
parentbdab445c82ba93bc9aaad1ae974a3cf5c4aa8a26
[ARM] Rework selection of feature bits to base build attributes on

=== 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

2017-06-21  Thomas Preud'homme  <thomas.preudhomme@arm.com>

gas/
* 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.
gas/ChangeLog
gas/config/tc-arm.c
This page took 0.041938 seconds and 4 git commands to generate.