authorgravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2024-10-15 22:02:12+01:00
committergravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2024-10-19 19:21:32+01:00
log3ef8bb6354a4ffff18843c574b596b32d9b675e1
tree300182be5065d903c12f9dddea3a9edfa080fa3c
parent1d1e8e110582580b1a98aacfacf7a3358e56bd38
signaturelock-open Commit is signed but in an unrecognized format.

llvn: fix incorrect mips64 callconv handling


1 files changed, 3 insertions(+), 3 deletions(-)

src/codegen/llvm.zig+3-3
...@@ -11865,7 +11865,7 @@ fn firstParamSRet(fn_info: InternPool.Key.FuncType, zcu: *Zcu, target: std.Targe...@@ -11865,7 +11865,7 @@ fn firstParamSRet(fn_info: InternPool.Key.FuncType, zcu: *Zcu, target: std.Targe
11865 .byval => false,11865 .byval => false,
11866 },11866 },
11867 .riscv64_lp64, .riscv32_ilp32 => riscv_c_abi.classifyType(return_type, zcu) == .memory,11867 .riscv64_lp64, .riscv32_ilp32 => riscv_c_abi.classifyType(return_type, zcu) == .memory,
11868 .mips64_n64, .mips64_n32, .mips_o32 => switch (mips_c_abi.classifyType(return_type, zcu, .ret)) {11868 .mips_o32 => switch (mips_c_abi.classifyType(return_type, zcu, .ret)) {
11869 .memory, .i32_array => true,11869 .memory, .i32_array => true,
11870 .byval => false,11870 .byval => false,
11871 },11871 },
...@@ -11914,7 +11914,7 @@ fn lowerFnRetTy(o: *Object, fn_info: InternPool.Key.FuncType) Allocator.Error!Bu...@@ -11914,7 +11914,7 @@ fn lowerFnRetTy(o: *Object, fn_info: InternPool.Key.FuncType) Allocator.Error!Bu
11914 .i32_array => |len| return if (len == 1) .i32 else .void,11914 .i32_array => |len| return if (len == 1) .i32 else .void,
11915 .byval => return o.lowerType(return_type),11915 .byval => return o.lowerType(return_type),
11916 },11916 },
11917 .mips64_n64, .mips64_n32, .mips_o32 => switch (mips_c_abi.classifyType(return_type, zcu, .ret)) {11917 .mips_o32 => switch (mips_c_abi.classifyType(return_type, zcu, .ret)) {
11918 .memory, .i32_array => return .void,11918 .memory, .i32_array => return .void,
11919 .byval => return o.lowerType(return_type),11919 .byval => return o.lowerType(return_type),
11920 },11920 },
...@@ -12171,7 +12171,7 @@ const ParamTypeIterator = struct {...@@ -12171,7 +12171,7 @@ const ParamTypeIterator = struct {
12171 .i64_array => |size| return Lowering{ .i64_array = size },12171 .i64_array => |size| return Lowering{ .i64_array = size },
12172 }12172 }
12173 },12173 },
12174 .mips64_n64, .mips64_n32, .mips_o32 => {12174 .mips_o32 => {
12175 it.zig_index += 1;12175 it.zig_index += 1;
12176 it.llvm_index += 1;12176 it.llvm_index += 1;
12177 switch (mips_c_abi.classifyType(ty, zcu, .arg)) {12177 switch (mips_c_abi.classifyType(ty, zcu, .arg)) {