mirror of
https://github.com/ziglang/zig.git
synced 2026-01-09 17:05:16 +00:00
x86_64: use .rax for local exec as prescribed by the spec
This commit is contained in:
parent
c6833e6273
commit
3d3153c58e
@ -389,14 +389,14 @@ fn emit(lower: *Lower, prefix: Prefix, mnemonic: Mnemonic, ops: []const Operand)
|
||||
// Since we are linking statically, we emit LE model directly.
|
||||
lower.result_insts[lower.result_insts_len] =
|
||||
try Instruction.new(.none, .mov, &[_]Operand{
|
||||
.{ .reg = ops[0].reg.to64() },
|
||||
.{ .reg = .rax },
|
||||
.{ .mem = Memory.sib(.qword, .{ .base = .{ .reg = .fs } }) },
|
||||
});
|
||||
lower.result_insts_len += 1;
|
||||
_ = lower.reloc(.{ .linker_reloc = sym });
|
||||
emit_mnemonic = .lea;
|
||||
break :op .{ .mem = Memory.sib(mem_op.sib.ptr_size, .{
|
||||
.base = .{ .reg = ops[0].reg.to64() },
|
||||
.base = .{ .reg = .rax },
|
||||
.disp = std.math.minInt(i32),
|
||||
}) };
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user