authorgravatar for 81774659+gracefuu@users.noreply.github.comgracefu <81774659+gracefuu@users.noreply.github.com> 2021-04-11 22:34:23+08:00
committergravatar for 81774659+gracefuu@users.noreply.github.comgracefu <81774659+gracefuu@users.noreply.github.com> 2021-04-16 15:21:17+08:00
log1e63e8d8b6559855eca6efac6eec18f0546ecafd
treeb580b04aef700a7daaa9599a15a21685033c6ef2
parent62e755623fb02257ac5d8fe85be01f5056469cb5
signaturelock-open Commit is signed but in an unrecognized format.

stage2 x86_64: fix codegen ensureCapacity bug for function calls

Co-authored-by: joachimschmidt557 <joachim.schmidt557@outlook.com>

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

src/codegen.zig+1
......@@ -2424,6 +2424,7 @@ fn Function(comptime arch: std.Target.Cpu.Arch) type {
24242424 .x86_64 => {
24252425 try self.genSetReg(inst.base.src, Type.initTag(.u32), .rax, .{ .memory = got_addr });
24262426 // callq *%rax
2427 try self.code.ensureCapacity(self.code.items.len + 2);
24272428 self.code.appendSliceAssumeCapacity(&[2]u8{ 0xff, 0xd0 });
24282429 },
24292430 .aarch64 => {