[compiler-rt] [compiler-rt] Make __aeabi_dcmp aware of endianness (PR #123204)

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 16 10:10:56 PST 2025


smithp35 wrote:

This looks good to me.
Doubles are passed in consecutive as if loaded by a LDM
https://github.com/ARM-software/abi-aa/blob/main/aapcs32/aapcs32.rst#6111handling-values-larger-than-32-bits
`vmov d, r1, r2` according to the Arm ARM puts `r1` into `d[31:0]` and `r2` into `d[63:32]` so we need to reverse the order.

Looking at https://github.com/llvm/llvm-project/blob/main/compiler-rt/lib/builtins/arm/softfloat-alias.list there are several functions that may also use the same trick. At least some of these also use `vmov d, r1, r2` without swapping when big-endian.

Would you be able to check to see if these can be called by a big-endian clang? I expect some of them may not alias to aeabi functions, although it may be possible for the compiler to output these helper functions with some other command-line options.

https://github.com/llvm/llvm-project/pull/123204


More information about the llvm-commits mailing list