diff options
| author | Jakub Konka <kubkon@jakubkonka.com> | 2022-02-09 08:17:29 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-09 08:17:29 +0100 |
| commit | 4d1e5ef730630badf92a613cdc57a42d2321df12 (patch) | |
| tree | 0ff1abaaa906e41979a553acda71c61150dd1ca3 | |
| parent | 97019bc56d27349e0aeb44faa9d3f738887abe7f (diff) | |
| parent | c689df1215fbe27485eb57751a407e6d5a991ca1 (diff) | |
| download | zig-4d1e5ef730630badf92a613cdc57a42d2321df12.tar.gz zig-4d1e5ef730630badf92a613cdc57a42d2321df12.zip | |
Merge pull request #10846 from ziglang/x64-macho-bringup
stage2: handle direct and got load for stack args on x86_64-macos
| -rw-r--r-- | src/arch/x86_64/CodeGen.zig | 2 | ||||
| -rw-r--r-- | test/behavior/basic.zig | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/arch/x86_64/CodeGen.zig b/src/arch/x86_64/CodeGen.zig index 9abeadad5d..de8f907dea 100644 --- a/src/arch/x86_64/CodeGen.zig +++ b/src/arch/x86_64/CodeGen.zig @@ -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); diff --git a/test/behavior/basic.zig b/test/behavior/basic.zig index 5fc26d15bb..13d7e833d5 100644 --- a/test/behavior/basic.zig +++ b/test/behavior/basic.zig @@ -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(); } |
