authorgravatar for joachim.schmidt557@outlook.comJoachim Schmidt <joachim.schmidt557@outlook.com> 2021-01-03 16:56:47+01:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-01-06 15:53:10-08:00
log480d6182ad543ea9e2d7cf0897f6fad7cbefc572
tree94103992dbca47181142ceb10d69bcbaf54c3bf9
parent5afd6204e8e67020659010a17dbb4dffa1cc45ad

stage2 ARM: fix offsets in exitlude jump relocations


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

src/codegen.zig+2-2
...@@ -612,8 +612,8 @@ fn Function(comptime arch: std.Target.Cpu.Arch) type {...@@ -612,8 +612,8 @@ fn Function(comptime arch: std.Target.Cpu.Arch) type {
612 // jump612 // jump
613 self.code.items.len -= 4;613 self.code.items.len -= 4;
614 } else for (self.exitlude_jump_relocs.items) |jmp_reloc| {614 } else for (self.exitlude_jump_relocs.items) |jmp_reloc| {
615 const amt = self.code.items.len - (jmp_reloc + 4);615 const amt = @intCast(i32, self.code.items.len) - @intCast(i32, jmp_reloc + 8);
616 if (amt == 0) {616 if (amt == -4) {
617 // This return is at the end of the617 // This return is at the end of the
618 // code block. We can't just delete618 // code block. We can't just delete
619 // the space because there may be619 // the space because there may be