diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-03-18 22:19:28 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-03-18 22:19:28 -0700 |
| commit | b2682237dbe90306b569cb36914f8823cd7b0431 (patch) | |
| tree | 9f35683ad3d3a2b254de6c2041734d37d8385be2 /src/codegen.zig | |
| parent | f5aca4a6a1ba867d3bc343a3740454468a7eff13 (diff) | |
| download | zig-b2682237dbe90306b569cb36914f8823cd7b0431.tar.gz zig-b2682237dbe90306b569cb36914f8823cd7b0431.zip | |
stage2: get Module and Sema compiling again
There are some `@panic("TODO")` in there but I'm trying to get the
branch to the point where collaborators can jump in.
Next is to repair the seam between LazySrcLoc and codegen's expected
absolute file offsets.
Diffstat (limited to 'src/codegen.zig')
| -rw-r--r-- | src/codegen.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/codegen.zig b/src/codegen.zig index 10abc34290..45d66b2767 100644 --- a/src/codegen.zig +++ b/src/codegen.zig @@ -499,7 +499,7 @@ fn Function(comptime arch: std.Target.Cpu.Arch) type { defer function.stack.deinit(bin_file.allocator); defer function.exitlude_jump_relocs.deinit(bin_file.allocator); - var call_info = function.resolveCallingConventionValues(src_loc.byte_offset, fn_type) catch |err| switch (err) { + var call_info = function.resolveCallingConventionValues(src_loc.lazy, fn_type) catch |err| switch (err) { error.CodegenFail => return Result{ .fail = function.err_msg.? }, else => |e| return e, }; @@ -2850,7 +2850,7 @@ fn Function(comptime arch: std.Target.Cpu.Arch) type { return self.fail(inst.base.src, "TODO implement support for more x86 assembly instructions", .{}); } - if (inst.output) |output| { + if (inst.output_name) |output| { if (output.len < 4 or output[0] != '=' or output[1] != '{' or output[output.len - 1] != '}') { return self.fail(inst.base.src, "unrecognized asm output constraint: '{s}'", .{output}); } |
