Fix RISC-V C function ABI when passing/returning structs containing floats

This commit is contained in:
beetrees
2025-04-03 23:53:06 +01:00
parent 68ac5abb06
commit 5723c9997c
13 changed files with 537 additions and 134 deletions

View File

@@ -229,7 +229,7 @@ impl<'ll, 'tcx> ArgAbiExt<'ll, 'tcx> for ArgAbi<'tcx, Ty<'tcx>> {
let llscratch = bx.alloca(scratch_size, scratch_align);
bx.lifetime_start(llscratch, scratch_size);
// ...store the value...
bx.store(val, llscratch, scratch_align);
rustc_codegen_ssa::mir::store_cast(bx, cast, val, llscratch, scratch_align);
// ... and then memcpy it to the intended destination.
bx.memcpy(
dst.val.llval,