Merge pull request #10846 from ziglang/x64-macho-bringup

stage2: handle direct and got load for stack args on x86_64-macos
This commit is contained in:
Jakub Konka 2022-02-09 08:17:29 +01:00 committed by GitHub
commit 4d1e5ef730
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -3482,6 +3482,8 @@ fn genSetStackArg(self: *Self, ty: Type, stack_offset: i32, mcv: MCValue) InnerE
},
.memory,
.embedded_in_code,
.direct_load,
.got_load,
=> {
if (abi_size <= 8) {
const reg = try self.copyToTmpRegister(ty, mcv);

View File

@ -194,6 +194,8 @@ test "multiline string comments at multiple places" {
}
test "string concatenation" {
if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
try expect(mem.eql(u8, "OK" ++ " IT " ++ "WORKED", "OK IT WORKED"));
}
@ -395,6 +397,7 @@ fn testTakeAddressOfParameter(f: f32) !void {
test "pointer to void return type" {
if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_x86_64 and builtin.os.tag == .macos) return error.SkipZigTest;
try testPointerToVoidReturnType();
}