Fixes D110144.
registers.getFloatRegister is not const in ARM therefor can't be called here.
Details
- Reviewers
mstorsjo - Group Reviewers
Restricted Project - Commits
- rG532783f9e1e6: [libunwind] Fix cfi_register for float registers.
Diff Detail
Event Timeline
Hmm, is there something fundamental in the change from D110144 that makes it unneeded on arm specifically? If that’s the case, this is probably fine.
Register in Register is not supported by EHABI and https://docs.microsoft.com/en-us/cpp/build/arm-exception-handling.
It is feasible by DWARF but I don't think it is used on arm.
Yeah, and this issue only arises in DwarfInstructions.hpp anyway, so it's confined to that case.
It is feasible by DWARF but I don't think it is used on arm.
Just to undestand the context on the original fix from D110144 - does anything automatically generate either of them (.cfi_undefined or .cfi_register) today, or is it only for handling cases with handwritten unwind info? Regarding "I don't think it is used on arm" - isn't it, in principle, just as plausible to want to use it in handwritten code on arm as it is on aarch64?
But I guess this change is fine. FWIW, dwarf on arm on windows is mostly a workaround since LLVM can't generate the proper windows arm unwind info (but it can for aarch64). And if I understand things correctly, Apple mostly uses sjlj on arm (except on armv7k, which is used on apple watch, where they do use dwarf/compact encoding).
As I know .cfi_undefined is not emitted and .cfi_register is emitted for general purpose registers only, while both appear in hand written assembly for floating point registers on aarch64.
It is possible to write assembly code that misses this support on arm with dwarf.
Ok, thanks for the clarification.
With that in mind I guess this approach is fine until there's a real need for that construct on arm, on a platform that uses dwarf then.
clang-tidy: error: use of undeclared identifier 'UNW_STEP_SUCCESS'; did you mean 'UNW_ESUCCESS'? [clang-diagnostic-error]
not useful