]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
arm: default to softvfp on armv6 or later cores
authorRichard Earnshaw <rearnsha@arm.com>
Tue, 4 Jun 2024 11:56:20 +0000 (12:56 +0100)
committerRichard Earnshaw <rearnsha@arm.com>
Wed, 5 Jun 2024 16:45:45 +0000 (17:45 +0100)
From armv6 onwards a lot of cores started to come with a physical VFP
implementation; but many still did not and in some cases there are
both variants.  For the cores that lacked a physical VFP we would fall
back to FPU_NONE if the platform/ABI did not mandate something else.
To make matters worse, FPU_NONE is internal state used to imply
soft-fpa (ie a mixed-endian double format), so any use of .double in
hand-written assembly is almost certainly generating incorrect output.

That's undesirable, all these cores should really default to a softvfp
model.

gas/config/tc-arm.c

index 12e8f7cfc84ab9acff98fe58acd062cd4f1fe403..8452ea17a021f453c8d008f2018e5c5a08186914 100644 (file)
@@ -31458,10 +31458,10 @@ static const struct arm_cpu_option_table arm_cpus[] =
               FPU_ARCH_VFP_V2),
   ARM_CPU_OPT ("arm1136js",      "ARM1136J-S",        ARM_ARCH_V6,
               ARM_ARCH_NONE,
-              FPU_NONE),
+              FPU_ARCH_SOFTVFP),
   ARM_CPU_OPT ("arm1136j-s",     NULL,                ARM_ARCH_V6,
               ARM_ARCH_NONE,
-              FPU_NONE),
+              FPU_ARCH_SOFTVFP),
   ARM_CPU_OPT ("arm1136jfs",     "ARM1136JF-S",       ARM_ARCH_V6,
               ARM_ARCH_NONE,
               FPU_ARCH_VFP_V2),
@@ -31473,22 +31473,22 @@ static const struct arm_cpu_option_table arm_cpus[] =
               FPU_ARCH_VFP_V2),
   ARM_CPU_OPT ("mpcorenovfp",    "MPCore",            ARM_ARCH_V6K,
               ARM_ARCH_NONE,
-              FPU_NONE),
+              FPU_ARCH_SOFTVFP),
   ARM_CPU_OPT ("arm1156t2-s",    NULL,                ARM_ARCH_V6T2,
               ARM_ARCH_NONE,
-              FPU_NONE),
+              FPU_ARCH_SOFTVFP),
   ARM_CPU_OPT ("arm1156t2f-s",   NULL,                ARM_ARCH_V6T2,
               ARM_ARCH_NONE,
               FPU_ARCH_VFP_V2),
   ARM_CPU_OPT ("arm1176jz-s",    NULL,                ARM_ARCH_V6KZ,
               ARM_ARCH_NONE,
-              FPU_NONE),
+              FPU_ARCH_SOFTVFP),
   ARM_CPU_OPT ("arm1176jzf-s",   NULL,                ARM_ARCH_V6KZ,
               ARM_ARCH_NONE,
               FPU_ARCH_VFP_V2),
   ARM_CPU_OPT ("cortex-a5",      "Cortex-A5",         ARM_ARCH_V7A,
               ARM_FEATURE_CORE_LOW (ARM_EXT_MP | ARM_EXT_SEC),
-              FPU_NONE),
+              FPU_ARCH_SOFTVFP),
   ARM_CPU_OPT ("cortex-a7",      "Cortex-A7",         ARM_ARCH_V7VE,
               ARM_ARCH_NONE,
               FPU_ARCH_NEON_VFP_V4),
@@ -31559,13 +31559,13 @@ static const struct arm_cpu_option_table arm_cpus[] =
               FPU_ARCH_CRYPTO_NEON_VFP_ARMV8_DOTPROD),
   ARM_CPU_OPT ("cortex-r4",      "Cortex-R4",         ARM_ARCH_V7R,
               ARM_ARCH_NONE,
-              FPU_NONE),
+              FPU_ARCH_SOFTVFP),
   ARM_CPU_OPT ("cortex-r4f",     "Cortex-R4F",        ARM_ARCH_V7R,
               ARM_ARCH_NONE,
               FPU_ARCH_VFP_V3D16),
   ARM_CPU_OPT ("cortex-r5",      "Cortex-R5",         ARM_ARCH_V7R,
               ARM_FEATURE_CORE_LOW (ARM_EXT_ADIV),
-              FPU_NONE),
+              FPU_ARCH_SOFTVFP),
   ARM_CPU_OPT ("cortex-r7",      "Cortex-R7",         ARM_ARCH_V7R,
               ARM_FEATURE_CORE_LOW (ARM_EXT_ADIV),
               FPU_ARCH_VFP_V3D16),
@@ -31580,31 +31580,31 @@ static const struct arm_cpu_option_table arm_cpus[] =
              FPU_ARCH_NEON_VFP_ARMV8),
   ARM_CPU_OPT ("cortex-m35p",    "Cortex-M35P",       ARM_ARCH_V8M_MAIN,
               ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP | ARM_EXT_V6_DSP),
-              FPU_NONE),
+              FPU_ARCH_SOFTVFP),
   ARM_CPU_OPT ("cortex-m33",     "Cortex-M33",        ARM_ARCH_V8M_MAIN,
               ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP | ARM_EXT_V6_DSP),
-              FPU_NONE),
+              FPU_ARCH_SOFTVFP),
   ARM_CPU_OPT ("cortex-m23",     "Cortex-M23",        ARM_ARCH_V8M_BASE,
               ARM_ARCH_NONE,
-              FPU_NONE),
+              FPU_ARCH_SOFTVFP),
   ARM_CPU_OPT ("cortex-m7",      "Cortex-M7",         ARM_ARCH_V7EM,
               ARM_ARCH_NONE,
-              FPU_NONE),
+              FPU_ARCH_SOFTVFP),
   ARM_CPU_OPT ("cortex-m4",      "Cortex-M4",         ARM_ARCH_V7EM,
               ARM_ARCH_NONE,
-              FPU_NONE),
+              FPU_ARCH_SOFTVFP),
   ARM_CPU_OPT ("cortex-m3",      "Cortex-M3",         ARM_ARCH_V7M,
               ARM_ARCH_NONE,
-              FPU_NONE),
+              FPU_ARCH_SOFTVFP),
   ARM_CPU_OPT ("cortex-m1",      "Cortex-M1",         ARM_ARCH_V6SM,
               ARM_ARCH_NONE,
-              FPU_NONE),
+              FPU_ARCH_SOFTVFP),
   ARM_CPU_OPT ("cortex-m0",      "Cortex-M0",         ARM_ARCH_V6SM,
               ARM_ARCH_NONE,
-              FPU_NONE),
+              FPU_ARCH_SOFTVFP),
   ARM_CPU_OPT ("cortex-m0plus",          "Cortex-M0+",        ARM_ARCH_V6SM,
               ARM_ARCH_NONE,
-              FPU_NONE),
+              FPU_ARCH_SOFTVFP),
   ARM_CPU_OPT ("cortex-x1",   "Cortex-X1",            ARM_ARCH_V8_2A,
               ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST | ARM_EXT2_SB),
               FPU_ARCH_DOTPROD_NEON_VFP_ARMV8),