diff mbox

[ARM] Add vfpv2 and neon-vfpv3

Message ID 31a09c75-c8ed-e26c-5e7c-b281109faf40@arm.com
State New
Headers show

Commit Message

Richard Earnshaw (lists) Nov. 16, 2016, 2:04 p.m. UTC
The options -mfpu=neon and -mfpu=vfp have always meant a specific
version of neon and vfp, but common usage seems to misunderstand this.

To help clarify things I've added a couple of new option values to the
-mfpu= option and have now documented the existing names as aliases.

As discussed at the Cauldron, I would like long term to deprecate -mfpu
entirely (watch this space).  But in the mean time this makes things a
bit clearer and perhaps also smoothes the transition path slightly.

        * arm/arm-fpus.def (vfpv2): New FPU, currently an alias for 'vfp'.
	(neon-vfpv3): New FPU, currently an alias for 'neon'.
	* arm/arm-tables.opt: Regenerated.
        * arm/t-aprofile (MULTILIB_REUSE): Add reuse rules for vfpv2 and
        neon-vfpv3.
	* doc/invoke.texi (ARM: -mfpu): Document new options.  Note that 'vfp'
	and 'neon' are aliases for specific implementations.

Tested on arm-none-eabi.  Installed on trunk.

R.
diff mbox

Patch

diff --git a/gcc/config/arm/arm-fpus.def b/gcc/config/arm/arm-fpus.def
index e0c43651d9392b718ce4fc5e2bbcf5fc1e097123..04b2ef140c44d78a1797a5125896fdf05a5a6fba 100644
--- a/gcc/config/arm/arm-fpus.def
+++ b/gcc/config/arm/arm-fpus.def
@@ -26,6 +26,7 @@ 
    genopt.sh assumes no whitespace up to the first "," in each entry.  */
 
 ARM_FPU("vfp",		2, VFP_REG_D16, FPU_FL_NONE)
+ARM_FPU("vfpv2",	2, VFP_REG_D16, FPU_FL_NONE)
 ARM_FPU("vfpv3",	3, VFP_REG_D32, FPU_FL_NONE)
 ARM_FPU("vfpv3-fp16",	3, VFP_REG_D32, FPU_FL_FP16)
 ARM_FPU("vfpv3-d16",	3, VFP_REG_D16, FPU_FL_NONE)
@@ -33,6 +34,7 @@  ARM_FPU("vfpv3-d16-fp16", 3, VFP_REG_D16, FPU_FL_FP16)
 ARM_FPU("vfpv3xd",	3, VFP_REG_SINGLE, FPU_FL_NONE)
 ARM_FPU("vfpv3xd-fp16",	3, VFP_REG_SINGLE, FPU_FL_FP16)
 ARM_FPU("neon",		3, VFP_REG_D32, FPU_FL_NEON)
+ARM_FPU("neon-vfpv3",	3, VFP_REG_D32, FPU_FL_NEON)
 ARM_FPU("neon-fp16",	3, VFP_REG_D32, FPU_FL_NEON | FPU_FL_FP16)
 ARM_FPU("vfpv4",	4, VFP_REG_D32, FPU_FL_FP16)
 ARM_FPU("vfpv4-d16",	4, VFP_REG_D16, FPU_FL_FP16)
diff --git a/gcc/config/arm/arm-tables.opt b/gcc/config/arm/arm-tables.opt
index ee9e3bb7ec57e0e8f2f15b83442711b9faf82d20..31e069c8177976a01c8cedaa651e1b57d07e7d36 100644
--- a/gcc/config/arm/arm-tables.opt
+++ b/gcc/config/arm/arm-tables.opt
@@ -465,56 +465,62 @@  EnumValue
 Enum(arm_fpu) String(vfp) Value(0)
 
 EnumValue
-Enum(arm_fpu) String(vfpv3) Value(1)
+Enum(arm_fpu) String(vfpv2) Value(1)
 
 EnumValue
-Enum(arm_fpu) String(vfpv3-fp16) Value(2)
+Enum(arm_fpu) String(vfpv3) Value(2)
 
 EnumValue
-Enum(arm_fpu) String(vfpv3-d16) Value(3)
+Enum(arm_fpu) String(vfpv3-fp16) Value(3)
 
 EnumValue
-Enum(arm_fpu) String(vfpv3-d16-fp16) Value(4)
+Enum(arm_fpu) String(vfpv3-d16) Value(4)
 
 EnumValue
-Enum(arm_fpu) String(vfpv3xd) Value(5)
+Enum(arm_fpu) String(vfpv3-d16-fp16) Value(5)
 
 EnumValue
-Enum(arm_fpu) String(vfpv3xd-fp16) Value(6)
+Enum(arm_fpu) String(vfpv3xd) Value(6)
 
 EnumValue
-Enum(arm_fpu) String(neon) Value(7)
+Enum(arm_fpu) String(vfpv3xd-fp16) Value(7)
 
 EnumValue
-Enum(arm_fpu) String(neon-fp16) Value(8)
+Enum(arm_fpu) String(neon) Value(8)
 
 EnumValue
-Enum(arm_fpu) String(vfpv4) Value(9)
+Enum(arm_fpu) String(neon-vfpv3) Value(9)
 
 EnumValue
-Enum(arm_fpu) String(vfpv4-d16) Value(10)
+Enum(arm_fpu) String(neon-fp16) Value(10)
 
 EnumValue
-Enum(arm_fpu) String(fpv4-sp-d16) Value(11)
+Enum(arm_fpu) String(vfpv4) Value(11)
 
 EnumValue
-Enum(arm_fpu) String(fpv5-sp-d16) Value(12)
+Enum(arm_fpu) String(vfpv4-d16) Value(12)
 
 EnumValue
-Enum(arm_fpu) String(fpv5-d16) Value(13)
+Enum(arm_fpu) String(fpv4-sp-d16) Value(13)
 
 EnumValue
-Enum(arm_fpu) String(neon-vfpv4) Value(14)
+Enum(arm_fpu) String(fpv5-sp-d16) Value(14)
 
 EnumValue
-Enum(arm_fpu) String(fp-armv8) Value(15)
+Enum(arm_fpu) String(fpv5-d16) Value(15)
 
 EnumValue
-Enum(arm_fpu) String(neon-fp-armv8) Value(16)
+Enum(arm_fpu) String(neon-vfpv4) Value(16)
 
 EnumValue
-Enum(arm_fpu) String(crypto-neon-fp-armv8) Value(17)
+Enum(arm_fpu) String(fp-armv8) Value(17)
 
 EnumValue
-Enum(arm_fpu) String(vfp3) Value(18)
+Enum(arm_fpu) String(neon-fp-armv8) Value(18)
+
+EnumValue
+Enum(arm_fpu) String(crypto-neon-fp-armv8) Value(19)
+
+EnumValue
+Enum(arm_fpu) String(vfp3) Value(20)
 
diff --git a/gcc/config/arm/t-aprofile b/gcc/config/arm/t-aprofile
index f852ecd04010ed54917c74e699a4580096b38e7f..7c5b10b75998ae0e20268fa946b3f35bf4456ada 100644
--- a/gcc/config/arm/t-aprofile
+++ b/gcc/config/arm/t-aprofile
@@ -111,6 +111,8 @@  MULTILIB_MATCHES       += mfpu?vfpv4-d16=mfpu?vfpv4
 MULTILIB_MATCHES       += mfpu?vfpv4-d16=mfpu?fpv5-d16
 MULTILIB_MATCHES       += mfpu?vfpv4-d16=mfpu?fp-armv8
 MULTILIB_MATCHES       += mfpu?neon-fp-armv8=mfpu?crypto-neon-fp-armv8
+MULTILIB_MATCHES       += mfpu?vfp=mfpu?vfpv2
+MULTILIB_MATCHES       += mfpu?neon=mfpu?neon-vfpv3
 
 
 # Map all requests for vfpv3 with a later CPU to vfpv3-d16 v7-a.
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 3f9c0a07be0ee33203eeb2ae89b89feb18705b9a..7b8070a73b63a0f32c491d697d121e0e7c7629cf 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -14751,12 +14751,14 @@  is unsuccessful the option has no effect.
 @item -mfpu=@var{name}
 @opindex mfpu
 This specifies what floating-point hardware (or hardware emulation) is
-available on the target.  Permissible names are: @samp{vfp}, @samp{vfpv3},
+available on the target.  Permissible names are: @samp{vfpv2}, @samp{vfpv3},
 @samp{vfpv3-fp16}, @samp{vfpv3-d16}, @samp{vfpv3-d16-fp16}, @samp{vfpv3xd},
-@samp{vfpv3xd-fp16}, @samp{neon}, @samp{neon-fp16}, @samp{vfpv4},
+@samp{vfpv3xd-fp16}, @samp{neon-vfpv3}, @samp{neon-fp16}, @samp{vfpv4},
 @samp{vfpv4-d16}, @samp{fpv4-sp-d16}, @samp{neon-vfpv4},
 @samp{fpv5-d16}, @samp{fpv5-sp-d16},
 @samp{fp-armv8}, @samp{neon-fp-armv8} and @samp{crypto-neon-fp-armv8}.
+Note that @samp{neon} is an alias for @samp{neon-vfpv3} and @samp{vfp}
+is an alias for @samp{vfpv2}.
 
 If @option{-msoft-float} is specified this specifies the format of
 floating-point values.