================
@@ -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:

Ah, I think it should be correct. The original code is wrong because the caller 
passes the float directly in the extended argument space (%sp+92 upwards).
The psABI docs, instead, specifies that the caller should copy the float into a 
temporary space (starting from %fp-1 downwards) in its own frame, then pass the 
pointer to it to the callee.

https://github.com/llvm/llvm-project/pull/162226
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to