ARM: make use of UAL VFP mnemonics when possible
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest3 patches 0 repliesNew
- v23 patches 3 repliesSuperseded
- v13 patches 0 repliesSuperseded
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | ARM: use .fpu assembler directives instead of assembler argumentsarch/ arch/ | +20 | 0 replies | |
| 2/3 | ARM: use VFP assembler mnemonics in register load/store macrosarch/ | +11 | 0 replies | |
| 3/3 | ARM: use VFP assembler mnemonics if availablearch/ arch/ arch/ +3 more | +41 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [PATCH v3 0/3] ARM: make use of UAL VFP mnemonics when possible
To build the kernel with the integrated assembler of Clang 10 and earlier the VFP code needs to make use of the unified assembler language (UAL) VFP mnemonics.
As pointed out by Russell, even for ARMv7 blocking VFP access through MCR/MRC is not correct. This has been addressed in upstream Clang and VFP access will be possible through MCR/MRC (see [0]).
At first I tried to replace all co-processor instructions to access the floating point unit along with the macros. However, due to missing FPINST/FPINST2 argument support in older binutils versions we have to keep them around. Once we drop support for binutils 2.24 and older, the move to UAL VFP mnemonics will be straight forward with this changes applied.
Tested using Clang with integrated assembler as well as external (binutils assembler), various gcc/binutils version down to 4.7/2.23. Disassembled and compared the object files in arch/arm/vfp/ to make sure this changes leads to the same code. Besides different inlining behavior I was not able to spot a difference.
In v2 the check for FPINST argument support is now made in Kconfig.
In v3 reworded commit message and addressed review feedback in patch 1.
--
Stefan
[0] https://reviews.llvm.org/D59733
Stefan Agner (3):
ARM: use .fpu assembler directives instead of assembler arguments
ARM: use VFP assembler mnemonics in register load/store macros
ARM: use VFP assembler mnemonics if available
arch/arm/Kconfig | 2 ++ arch/arm/Kconfig.assembler | 6 ++++++ arch/arm/include/asm/vfp.h | 2 ++ arch/arm/include/asm/vfpmacros.h | 31 ++++++++++++++++++++++--------- arch/arm/vfp/Makefile | 2 -- arch/arm/vfp/vfphw.S | 31 +++++++++++++++++++++---------- arch/arm/vfp/vfpinstr.h | 23 +++++++++++++++++++---- 7 files changed, 72 insertions(+), 25 deletions(-) create mode 100644 arch/arm/Kconfig.assembler
Signature · 1 line
2.27.0