[libunwind] MIPS/libunwind: Use -mfp64 if compiler is FPXX (PR #68521)

YunQiang Su via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 6 01:18:57 PST 2024


wzssyqa wrote:

Fangrui Song ***@***.***> 于2024年2月6日周二 13:36写道:

> Libunwind supports FP64 and FP32 modes, but not FPXX. The reason is that,
> FP64 and FP32 have different way to save/restore FPRs. If libunwind is
> built as FPXX, we have no idea which one should we use.
>
> Can you edit the description to name the code that doesn't support FPXX?
>
>
> It's not due to the code bug, but rather the nature of FPXX.
FPXX is an ABI which uses only a common subset of FR=1(FP64) and FR=0
(FP32).
So that FPXX binaries can link with both FP64 and FP32 ones, aka.
    FPXX + FP32 -> FP32
    FPXX + FP64 -> FP64

While for libunwind, we should save/restore all of FPRs. If we use FPXX,
we can only save/restore a common subset of FPRs, instead of superset.


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


More information about the cfe-commits mailing list