[clang] [compiler-rt] [llvm] [SPARC] Properly handle CC for long double on sparc32 (PR #162226)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 23 23:10:33 PST 2025
================
@@ -268,44 +268,50 @@ define void @test_fptrunc_double(double %d, ptr %p) nounwind {
define void @test_fptrunc_fp128(ptr %dp, ptr %p) nounwind {
; V8-OPT-LABEL: test_fptrunc_fp128:
; V8-OPT: ! %bb.0:
-; V8-OPT-NEXT: save %sp, -104, %sp
+; V8-OPT-NEXT: save %sp, -120, %sp
; V8-OPT-NEXT: ldd [%i0], %f0
; V8-OPT-NEXT: ldd [%i0+8], %f4
-; V8-OPT-NEXT: std %f4, [%sp+100]
+; V8-OPT-NEXT: add %fp, -16, %i0
----------------
koachan wrote:
Because the psABI doc (p. 3-15) seem to specify that the caller should make a temp copy in its own frame instead of passing it in argument space.
Though I just noticed that the computed address is placed in `%sp+92`, which is odd.
I think `__trunctfhf2` is declared as `_Float16 __trunctfhf2(long double a)` which means that the address should live in %o0 instead, no? Lemme look into it.
https://github.com/llvm/llvm-project/pull/162226
More information about the llvm-commits
mailing list