[llvm] [Mips] Fix compiler crash when returning fp128 after calling a functi… (PR #117525)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 6 02:53:23 PST 2025
nikic wrote:
> > For MIPS the ABI for f128 and i128 is different, but the calling convention code sees this as just two i64s in both cases. Is there some cleaner way to distinguish these cases, short of making f128 a legal type?
>
> How are the ABIs different? If it's passed as a pair of FP registers or something like that, maybe could override getRegisterTypeForCallingConv+getNumRegistersForCallingConv to split into 2 x f64
For the hard float ABI it's passed in a pair of FP registers, for the soft float ABI it's passed in GPR, but different ones than usual. I think your suggestion works for the hard float case, but I think it doesn't for soft-float, as we'd still end up with 2 x i64 in that case?
MIPS also has some additional code for handling libcalls though (isF128SoftLibCall), not sure how that fits into things.
https://github.com/llvm/llvm-project/pull/117525
More information about the llvm-commits
mailing list