[ARM] Allow Thumb division as an extension for ARMv7
authorThomas Preud'homme <thomas.preudhomme@arm.com>
Wed, 21 Jun 2017 14:06:51 +0000 (15:06 +0100)
committerThomas Preud'homme <thomas.preudhomme@arm.com>
Wed, 21 Jun 2017 14:08:49 +0000 (15:08 +0100)
commit3d030cdb4a8d338c87e48b249338a4870fdcd322
tree5e26c0e8fc1d6bb0e45de7bccd9daed4729d97a0
parent54bab2816dfd025fc53618e46be140573d5bc02e
[ARM] Allow Thumb division as an extension for ARMv7

=== Context ===

This patch is part of a patch series to add support for ARMv8-R
architecture. Its purpose is to allow ARMv7 to be selected in automatic
architecture selection in presence of Thumb division instructions.

=== Motivation ===

any-idiv.d and automatic-sdiv.d testcases in GAS testsuite expect
autodetection code to select ARMv7 in presence of Thumb integer
division. However, the definition of ARM_AEXT_V7 and thus ARM_ARCH_V7 do
not contain these instructions and the idiv extension is only available
for ARMv7-A and ARMv7-R. Therefore, under the stricter automatic
detection code proposed in the subsequent patch of the series ARMv7 is
refused if a Thumb division instruction is present.

=== Patch description ===

This patch adds a new "idiv" extension after the existing one that is
available to all ARMv7 targets. This new entry is ignored by all current
code parsing arm_extensions such that it would be unavailable on the
command-line and remain a purely internal hack, easily removed in favor
of a better solution later. This is considered though by the subsequent
patch reworking automatic detection of build attributes such that ARMv7
is allowed to match in present of Thumb division instructions. For good
measure, comments are added in all instances of code browsing
arm_extensions to mention the expected behavior in case of duplicate
entries as well as a new testcase.

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

gas/
* config/tc-arm.c (arm_extensions): New duplicate idiv entry to enable
Thumb division for ARMv7 architecture.
(arm_parse_extension): Document expected behavior for duplicate
entries.
(s_arm_arch_extension): Likewise.
* testsuite/gas/arm/forbid-armv7-idiv-ext.d: New test.
* testsuite/gas/arm/forbid-armv7-idiv-ext.l: New expected output for
above test.
gas/ChangeLog
gas/config/tc-arm.c
gas/testsuite/gas/arm/forbid-armv7-idiv-ext.d [new file with mode: 0644]
gas/testsuite/gas/arm/forbid-armv7-idiv-ext.l [new file with mode: 0644]
This page took 0.028468 seconds and 4 git commands to generate.