summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>2017-12-08 11:19:20 +0000
committerrearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>2017-12-08 11:19:20 +0000
commitca2d1413411d9a92013876b67a32cb637fd6e73d (patch)
tree187f0fccf1b95337f01d962cdc5b4410796c3068
parent9bc5a79a235a221fe119e3782df492a94dd15cf2 (diff)
downloadgcc-ca2d1413411d9a92013876b67a32cb637fd6e73d.tar.gz
[arm] PR target/83206: Make native driver select fp-capable armv6 cores
A quirk in the historical naming of some ARMv6 products means that the main CPU name implies the presence or otherwise of the floating point unit. This causes problems when using -mfpu=auto with -mcpu=native: the driver is picking a CPU that does not support a floating-point unit, even though one may well exist. This patch addresses this by selecting the FP-capable names so that FP instructions will be generated if the other options suggest this is permitted. Note that a more complete fix is really needed here to look up the FP/simd capabilities and append the appropriate capability extensions. This will be the subject of some follow-up patches. * config/arm/driver-arm.c (arm_cpu_table): Use fp-capable product names for armv6 ARM CPU IDs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@255504 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/arm/driver-arm.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6e5eefdbc60..d911f6f9060 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2017-06-08 Richard Earnshaw <rearnsha@arm.com>
+ * config/arm/driver-arm.c (arm_cpu_table): Use fp-capable product names
+ for armv6 ARM CPU IDs.
+
+2017-06-08 Richard Earnshaw <rearnsha@arm.com>
+
* common/config/arm/arm-common.c: Include <algorithm>.
(INCLUDE_VECTOR): Define.
(compare_opt_names): New function.
diff --git a/gcc/config/arm/driver-arm.c b/gcc/config/arm/driver-arm.c
index 5c29b94caab..86212315f13 100644
--- a/gcc/config/arm/driver-arm.c
+++ b/gcc/config/arm/driver-arm.c
@@ -33,12 +33,12 @@ static struct vendor_cpu arm_cpu_table[] = {
{"0x926", "armv5te", "arm926ej-s"},
{"0xa26", "armv5te", "arm1026ej-s"},
{"0xb02", "armv6k", "mpcore"},
- {"0xb36", "armv6j", "arm1136j-s"},
- {"0xb56", "armv6t2", "arm1156t2-s"},
+ {"0xb36", "armv6j", "arm1136jf-s"},
+ {"0xb56", "armv6t2", "arm1156t2f-s"},
/* armv6kz is the correct spelling for ARMv6KZ but may not be supported in
the version of binutils used. The incorrect spelling is supported in
legacy and current binutils so that is used instead. */
- {"0xb76", "armv6zk", "arm1176jz-s"},
+ {"0xb76", "armv6zk", "arm1176jzf-s"},
{"0xc05", "armv7-a", "cortex-a5"},
{"0xc07", "armv7ve", "cortex-a7"},
{"0xc08", "armv7-a", "cortex-a8"},