diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2023-10-05 14:47:15 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-05 14:47:15 -0400 |
| commit | e6590fea19e3eab94b35bfd3c36e29b53cefcaaf (patch) | |
| tree | 11fb8283d25a1175895233332720cf68504f2544 /src/codegen.zig | |
| parent | 8b4e3b6aee61a26e7229ea30728e6c5e31c7cd0b (diff) | |
| parent | 54b2d6f072bde7f85c44bbcc4795bd980d79d45e (diff) | |
| download | zig-e6590fea19e3eab94b35bfd3c36e29b53cefcaaf.tar.gz zig-e6590fea19e3eab94b35bfd3c36e29b53cefcaaf.zip | |
Merge pull request #17359 from jacobly0/x86_64
x86_64: improve C abi support
Diffstat (limited to 'src/codegen.zig')
| -rw-r--r-- | src/codegen.zig | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/src/codegen.zig b/src/codegen.zig index dd1b6e0cbf..2c5fd7b630 100644 --- a/src/codegen.zig +++ b/src/codegen.zig @@ -40,28 +40,7 @@ pub const CodeGenError = error{ pub const DebugInfoOutput = union(enum) { dwarf: *link.File.Dwarf.DeclState, - /// the plan9 debuginfo output is a bytecode with 4 opcodes - /// assume all numbers/variables are bytes - /// 0 w x y z -> interpret w x y z as a big-endian i32, and add it to the line offset - /// x when x < 65 -> add x to line offset - /// x when x < 129 -> subtract 64 from x and subtract it from the line offset - /// x -> subtract 129 from x, multiply it by the quanta of the instruction size - /// (1 on x86_64), and add it to the pc - /// after every opcode, add the quanta of the instruction size to the pc - plan9: struct { - /// the actual opcodes - dbg_line: *std.ArrayList(u8), - /// what line the debuginfo starts on - /// this helps because the linker might have to insert some opcodes to make sure that the line count starts at the right amount for the next decl - start_line: *?u32, - /// what the line count ends on after codegen - /// this helps because the linker might have to insert some opcodes to make sure that the line count starts at the right amount for the next decl - end_line: *u32, - /// the last pc change op - /// This is very useful for adding quanta - /// to it if its not actually the last one. - pcop_change_index: *?u32, - }, + plan9: *link.File.Plan9.DebugInfoOutput, none, }; |
