[00/11,2nd,resend] arm: Remove FPA support from gas/binutils

Message ID 20240604115628.784729-1-rearnsha@arm.com
Headers
Series arm: Remove FPA support from gas/binutils |

Message

Richard Earnshaw June 4, 2024, 11:56 a.m. UTC
  [rebased and resending after fixing line encoding issue in one affected file]

As trailed when removing the support for the Maverick co-processor
(https://sourceware.org/pipermail/binutils/2024-May/133947.html), this
patch series removes support for the FPA co-processor as well.
Support for both co-processors was removed from GCC about 12 years
ago.

This patch set is slightly more involved than the one for Maverick
though as it affects the default behaviour of the tools in a few
cases, especially on coff-based targets where we do not default a
default floating point format and pick the default up from the
selected CPU.  To avoid silent code changes I've opted to set the
default for those cases such that they generate an error if the output
might have changed when no FPA instructions were generated; this
affects certain directives such as .float or .double, since the FPA
had a different format for floating-point values.

Richard Earnshaw (11):
  arm: remove FPA related tests
  arm: rename FPU_ARCH_VFP to FPU_ARCH_SOFTVFP
  arm: default to softvfp on armv6 or later cores
  arm: adjust FPU selection logic
  arm: redirect fp constant data directives through a wrapper
  arm: change default FPUs from FPA to none
  arm: remove options to select the FPA
  arm: remove FPA instructions from assembler
  arm: remove disassembly support for the FPA co-processor
  arm: minor documentation cleanup given removal of FPA
  NEWS: arm: note that FPA support has been removed

 binutils/NEWS                                 |    4 +
 gas/config/tc-arm.c                           | 1056 +++--------------
 gas/config/te-armeabi.h                       |    2 +-
 gas/config/te-armfbsdvfp.h                    |    2 +-
 gas/config/te-armlinuxeabi.h                  |    2 +-
 gas/config/te-nacl.h                          |    2 +-
 gas/doc/c-arm.texi                            |   12 +-
 gas/testsuite/gas/all/gas.exp                 |    2 +
 gas/testsuite/gas/arm/attr-mfpu-arm7500fe.d   |   11 -
 gas/testsuite/gas/arm/attr-mfpu-fpa.d         |   11 -
 gas/testsuite/gas/arm/attr-mfpu-fpa10.d       |   11 -
 gas/testsuite/gas/arm/attr-mfpu-fpa11.d       |   11 -
 gas/testsuite/gas/arm/attr-mfpu-fpe.d         |   11 -
 gas/testsuite/gas/arm/attr-mfpu-fpe2.d        |   11 -
 gas/testsuite/gas/arm/attr-mfpu-fpe3.d        |   11 -
 gas/testsuite/gas/arm/attr-mfpu-softfpa.d     |   11 -
 gas/testsuite/gas/arm/attr-override-mcpu.s    |    2 +-
 gas/testsuite/gas/arm/bfloat16-directive-be.d |    2 +-
 gas/testsuite/gas/arm/bfloat16-directive-le.d |    2 +-
 .../gas/arm/copro-arm_v2plus-arm_v2.d         |    6 +-
 .../arm/copro-thumb_v6t2plus-thumb_v6t2-1.d   |    6 +-
 gas/testsuite/gas/arm/float.d                 |  131 --
 gas/testsuite/gas/arm/float.s                 |  163 ---
 gas/testsuite/gas/arm/float16-bad.d           |    1 +
 gas/testsuite/gas/arm/float16-be.d            |    2 +-
 .../gas/arm/float16-format-opt-bad.d          |    2 +-
 gas/testsuite/gas/arm/float16-le.d            |    2 +-
 gas/testsuite/gas/arm/fp-directive-bad.d      |    4 +
 gas/testsuite/gas/arm/fp-directive-bad.l      |    7 +
 gas/testsuite/gas/arm/fp-directive.d          |    9 +
 gas/testsuite/gas/arm/fp-directive.s          |    7 +
 gas/testsuite/gas/arm/fp-save.d               |    9 -
 gas/testsuite/gas/arm/fp-save.s               |    4 -
 gas/testsuite/gas/arm/fpa-dyadic.d            |  166 ---
 gas/testsuite/gas/arm/fpa-dyadic.s            |  172 ---
 gas/testsuite/gas/arm/fpa-mem.d               |   34 -
 gas/testsuite/gas/arm/fpa-mem.s               |   32 -
 gas/testsuite/gas/arm/fpa-monadic.d           |  202 ----
 gas/testsuite/gas/arm/fpa-monadic.s           |  210 ----
 .../gas/arm/group-reloc-ldc-encoding-bad.l    |  192 ---
 .../gas/arm/group-reloc-ldc-encoding-bad.s    |   72 +-
 .../gas/arm/group-reloc-ldc-parsing-bad.l     |   80 --
 .../gas/arm/group-reloc-ldc-parsing-bad.s     |   20 +-
 gas/testsuite/gas/arm/group-reloc-ldc.d       |  336 ++----
 gas/testsuite/gas/arm/group-reloc-ldc.s       |   45 -
 gas/testsuite/gas/arm/le-fpconst.d            |   11 -
 gas/testsuite/gas/arm/le-fpconst.s            |    8 -
 include/opcode/arm.h                          |   12 +-
 opcodes/arm-dis.c                             |  197 +--
 49 files changed, 369 insertions(+), 2949 deletions(-)
 delete mode 100644 gas/testsuite/gas/arm/attr-mfpu-arm7500fe.d
 delete mode 100644 gas/testsuite/gas/arm/attr-mfpu-fpa.d
 delete mode 100644 gas/testsuite/gas/arm/attr-mfpu-fpa10.d
 delete mode 100644 gas/testsuite/gas/arm/attr-mfpu-fpa11.d
 delete mode 100644 gas/testsuite/gas/arm/attr-mfpu-fpe.d
 delete mode 100644 gas/testsuite/gas/arm/attr-mfpu-fpe2.d
 delete mode 100644 gas/testsuite/gas/arm/attr-mfpu-fpe3.d
 delete mode 100644 gas/testsuite/gas/arm/attr-mfpu-softfpa.d
 delete mode 100644 gas/testsuite/gas/arm/float.d
 delete mode 100644 gas/testsuite/gas/arm/float.s
 create mode 100644 gas/testsuite/gas/arm/fp-directive-bad.d
 create mode 100644 gas/testsuite/gas/arm/fp-directive-bad.l
 create mode 100644 gas/testsuite/gas/arm/fp-directive.d
 create mode 100644 gas/testsuite/gas/arm/fp-directive.s
 delete mode 100644 gas/testsuite/gas/arm/fp-save.d
 delete mode 100644 gas/testsuite/gas/arm/fp-save.s
 delete mode 100644 gas/testsuite/gas/arm/fpa-dyadic.d
 delete mode 100644 gas/testsuite/gas/arm/fpa-dyadic.s
 delete mode 100644 gas/testsuite/gas/arm/fpa-mem.d
 delete mode 100644 gas/testsuite/gas/arm/fpa-mem.s
 delete mode 100644 gas/testsuite/gas/arm/fpa-monadic.d
 delete mode 100644 gas/testsuite/gas/arm/fpa-monadic.s
 delete mode 100644 gas/testsuite/gas/arm/le-fpconst.d
 delete mode 100644 gas/testsuite/gas/arm/le-fpconst.s
  

Comments

Alan Modra June 6, 2024, 1:14 a.m. UTC | #1
I didn't verify the exact commit, but I think this series is likely
the culprit for the following fails:
arm-elf  +FAIL: simple FP constants
arm-elf  +FAIL: Tag_ABI_FP_16bit_format EABI attribute written for Arm alternative format.
arm-elf  +FAIL: Tag_ABI_FP_16bit_format written for IEEE float16 format.
arm-elf  +FAIL: Tag_ABI_FP_16bit_format EABI attribute not written when format not specified
arm-elf  +FAIL: bad .bss / .struct data allocation directives
arm-nto  +FAIL: simple FP constants
arm-nto  +FAIL: Tag_ABI_FP_16bit_format EABI attribute written for Arm alternative format.
arm-nto  +FAIL: Tag_ABI_FP_16bit_format written for IEEE float16 format.
arm-nto  +FAIL: Tag_ABI_FP_16bit_format EABI attribute not written when format not specified
arm-nto  +FAIL: bad .bss / .struct data allocation directives
  
Richard Earnshaw (lists) June 6, 2024, 10:25 a.m. UTC | #2
On 06/06/2024 02:14, Alan Modra wrote:
> I didn't verify the exact commit, but I think this series is likely
> the culprit for the following fails:
> arm-elf  +FAIL: simple FP constants
> arm-elf  +FAIL: Tag_ABI_FP_16bit_format EABI attribute written for Arm alternative format.
> arm-elf  +FAIL: Tag_ABI_FP_16bit_format written for IEEE float16 format.
> arm-elf  +FAIL: Tag_ABI_FP_16bit_format EABI attribute not written when format not specified
> arm-elf  +FAIL: bad .bss / .struct data allocation directives
> arm-nto  +FAIL: simple FP constants
> arm-nto  +FAIL: Tag_ABI_FP_16bit_format EABI attribute written for Arm alternative format.
> arm-nto  +FAIL: Tag_ABI_FP_16bit_format written for IEEE float16 format.
> arm-nto  +FAIL: Tag_ABI_FP_16bit_format EABI attribute not written when format not specified
> arm-nto  +FAIL: bad .bss / .struct data allocation directives
> 

Yes it will be this patch set; it's a consequence of it adding a 
target-specific wrapper around the handling of floating-point data 
directives (.float, .double, etc).

The original FPA extension for Arm used a different, incompatible, 
floating-point data format from that used by the VFP extension[1] and 
these ports fall back to FPA format if there hasn't been an explicit 
option passed that says that VFP is in use.  Since I didn't want the 
tools to silently generate different code on an upgrade I chose to add a 
wrapper that faulted any fp-data directive when we were in a mode that 
would previously have treated the value in FPA format.  These failing 
tests are occurring because of that and because these ports were 
defaulting back to FPA format.

The arm-elf port is on my kill list. That used an ABI that was 
superseded 20 years ago now (give or take) by arm-eabi and really nobody 
should be using it any more (at least, not with current tools).  I'm 
less sure about arm-nto (QNX Neutrino), looking through the logs I don't 
see much in the way of port maintenance, but that could just be because 
it didn't need any.

It's pretty easy to fix "simple FP constants" - I already did that for 
arm-coff, and the float16 tests can also be easily skipped.  The tricky 
case might be the generic "bad .bss..." test as that has a general 
target list pattern in the test itself and I don't know if you can also 
have an exclusion list as well.

Anyway, I'll try to find some suitable fixes.

R.

[1] I think technically this difference only applies to types larger 
than .float, but I chose to wrap all the fp-related directives for 
consistency.
  
Richard Earnshaw (lists) June 6, 2024, 10:41 a.m. UTC | #3
On 06/06/2024 11:25, Richard Earnshaw (lists) wrote:
> On 06/06/2024 02:14, Alan Modra wrote:
>> I didn't verify the exact commit, but I think this series is likely
>> the culprit for the following fails:
>> arm-elf  +FAIL: simple FP constants
>> arm-elf  +FAIL: Tag_ABI_FP_16bit_format EABI attribute written for Arm 
>> alternative format.
>> arm-elf  +FAIL: Tag_ABI_FP_16bit_format written for IEEE float16 format.
>> arm-elf  +FAIL: Tag_ABI_FP_16bit_format EABI attribute not written 
>> when format not specified
>> arm-elf  +FAIL: bad .bss / .struct data allocation directives
>> arm-nto  +FAIL: simple FP constants
>> arm-nto  +FAIL: Tag_ABI_FP_16bit_format EABI attribute written for Arm 
>> alternative format.
>> arm-nto  +FAIL: Tag_ABI_FP_16bit_format written for IEEE float16 format.
>> arm-nto  +FAIL: Tag_ABI_FP_16bit_format EABI attribute not written 
>> when format not specified
>> arm-nto  +FAIL: bad .bss / .struct data allocation directives
>>
> 
> Yes it will be this patch set; it's a consequence of it adding a 
> target-specific wrapper around the handling of floating-point data 
> directives (.float, .double, etc).
> 
> The original FPA extension for Arm used a different, incompatible, 
> floating-point data format from that used by the VFP extension[1] and 
> these ports fall back to FPA format if there hasn't been an explicit 
> option passed that says that VFP is in use.  Since I didn't want the 
> tools to silently generate different code on an upgrade I chose to add a 
> wrapper that faulted any fp-data directive when we were in a mode that 
> would previously have treated the value in FPA format.  These failing 
> tests are occurring because of that and because these ports were 
> defaulting back to FPA format.
> 
> The arm-elf port is on my kill list. That used an ABI that was 
> superseded 20 years ago now (give or take) by arm-eabi and really nobody 
> should be using it any more (at least, not with current tools).  I'm 
> less sure about arm-nto (QNX Neutrino), looking through the logs I don't 
> see much in the way of port maintenance, but that could just be because 
> it didn't need any.
> 
> It's pretty easy to fix "simple FP constants" - I already did that for 
> arm-coff, and the float16 tests can also be easily skipped.  The tricky 
> case might be the generic "bad .bss..." test as that has a general 
> target list pattern in the test itself and I don't know if you can also 
> have an exclusion list as well.
> 
> Anyway, I'll try to find some suitable fixes.
> 
> R.
> 
> [1] I think technically this difference only applies to types larger 
> than .float, but I chose to wrap all the fp-related directives for 
> consistency.

I meant to add that I've never seen one of these floating-point data 
directives used outside of the gas testsuite (GCC writes floating-point 
data out in binary format to avoid any possible rounding issues), so I 
don't expect many people to be affected by this faulting behaviour.

R.