]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
[gas][arm] Make .fpu reset the FPU/Coprocessor feature bits
authorMihail Ionescu <mihail.ionescu@arm.com>
Tue, 12 Nov 2019 13:53:06 +0000 (13:53 +0000)
committerKyrylo Tkachov <kyrylo.tkachov@arm.com>
Tue, 12 Nov 2019 14:00:34 +0000 (14:00 +0000)
commitf439988037a589de3798f44e7268301adaec21a9
tree10e4a7636ea4a4abe9791aeeddd50d15c4823e6f
parent51c8edf68bf1e16c6d05fbb31a36e0cc436a9750
[gas][arm] Make .fpu reset the FPU/Coprocessor feature bits

This patch is fixes the '.fpu' behaviour.
Currently, using '.fpu' resets the previously selected '.fpu' options (by overwriting them),
but does not reset previous FPU options selected by other means (ie. when using
'.arch_extension fp' in conjunction with '.fpu <x>', the FPU is not reset).

Example:
.arch armv8-a         @ SET BASE
.arch_extension fp    @ ADD FP-ARMV8
.fpu vfpv2            @ ADD (already existing bits, does not reset)
vfms.f32 s0, s1, s2   @ OK

.arch armv8-a         @ RESET
.fpu fp-armv8         @ ADD FP-ARMV8
vfms.f32 s0, s1, s2   @ OK
.fpu vfpv2            @ RESET to VFPV2
vfms.f32 s0, s1, s2   @ ERROR

After the patch this becomes:
.arch armv8-a         @ SET BASE
.arch_extension fp    @ ADD FP-ARMV8
.fpu vfpv2            @ RESET TO VFPV2
vfms.f32 s0, s1, s2   @ ERROR

.arch armv8-a         @ RESET
.fpu fp-armv8         @ ADD FP-ARMV8
vfms.f32 s0, s1, s2   @ OK
.fpu vfpv2            @ RESET to VFPV2
vfms.f32 s0, s1, s2   @ ERROR

gas/ChangeLog:

2019-11-11  Mihail Ionescu  <mihail.ionescu@arm.com>

        * config/tc-arm.c (s_arm_fpu): Clear selected_cpu fpu bits.
        (fpu_any): Remove OBJ_ELF guards.
        * gas/testsuite/gas/arm/fpu-rst.s: New.
        * gas/testsuite/gas/arm/fpu-rst.d: New.
        * gas/testsuite/gas/arm/fpu-rst.l: New.
gas/ChangeLog
gas/config/tc-arm.c
gas/testsuite/gas/arm/fpu-rst.d [new file with mode: 0644]
gas/testsuite/gas/arm/fpu-rst.l [new file with mode: 0644]
gas/testsuite/gas/arm/fpu-rst.s [new file with mode: 0644]