diff options
author | Davide Mor <39653004+Tazdevil971@users.noreply.github.com> | 2025-09-28 04:49:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-28 10:49:40 +0800 |
commit | 9630b321a50a3712ca092a53a4a4c7bea94b3af2 (patch) | |
tree | e2d413558a796a2e1b696beeca7a4a47ba20351c /llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp | |
parent | ebfee327df69e6cfeaa4c5300e6abd19476b8bfe (diff) | |
download | llvm-9630b321a50a3712ca092a53a4a4c7bea94b3af2.zip llvm-9630b321a50a3712ca092a53a4a4c7bea94b3af2.tar.gz llvm-9630b321a50a3712ca092a53a4a4c7bea94b3af2.tar.bz2 |
[MIPS][float] Fixed SingleFloat codegen on N32/N64 targets (#140575)
This patch aims at making the combination of single-float and N32/N64
ABI properly work.
Right now when both options are enabled the compiler chooses an
incorrect ABI and in some cases even generates wrong instructions.
The floating point behavior on MIPS is controlled through 3 flags:
soft-float, single-float, fp64. This makes things complicated because
fp64 indicates the presence of 64bit floating point registers, but
cannot be easily disabled (the mips3 feature require it, but mips3 CPUs
with only 32bit floating point exist). Also if fp64 is missing it
doesn't actually disable 64bit floating point operations, because
certain MIPS1/2 CPUs support 64bit floating point with 32bit registers,
hence the single-float option.
I'm guessing that originally single-float was only intended for the
latter case, and that's the reason why it doesn't properly work on 64bit
targets.
So this patch does the following:
- Make single-float a "master disable", even if fp64 is enabled this
should completely disable generation of 64bit floating point operations,
making it available on targets which hard require fp64.
- Add proper calling conventions for N32/N64 single-float combinations.
- Fixup codegen to not generate certain 64bit floating point operations,
apparently not assigning a register class to f64 values is not enough to
prevent them from showing up.
- Add tests for the new calling conventions and codegen.
Diffstat (limited to 'llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp')
0 files changed, 0 insertions, 0 deletions