stage2 ARM: fix offsets in exitlude jump relocations

This commit is contained in:
joachimschmidt557
2021-01-03 16:56:47 +01:00
committed by Andrew Kelley
parent 5afd6204e8
commit 480d6182ad

View File

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