mirror of
https://github.com/ziglang/zig.git
synced 2026-02-14 05:20:34 +00:00
x86_64: fix store of undefined
This commit is contained in:
parent
9a4e9215fc
commit
5ab426a302
@ -2861,7 +2861,13 @@ fn store(self: *Self, ptr: MCValue, value: MCValue, ptr_ty: Type, value_ty: Type
|
||||
.unreach => unreachable,
|
||||
.eflags => unreachable,
|
||||
.undef => {
|
||||
try self.genSetReg(value_ty, reg, value);
|
||||
switch (abi_size) {
|
||||
1 => try self.store(ptr, .{ .immediate = 0xaa }, ptr_ty, value_ty),
|
||||
2 => try self.store(ptr, .{ .immediate = 0xaaaa }, ptr_ty, value_ty),
|
||||
4 => try self.store(ptr, .{ .immediate = 0xaaaaaaaa }, ptr_ty, value_ty),
|
||||
8 => try self.store(ptr, .{ .immediate = 0xaaaaaaaaaaaaaaaa }, ptr_ty, value_ty),
|
||||
else => try self.genInlineMemset(ptr, .{ .immediate = 0xaa }, .{ .immediate = abi_size }, .{}),
|
||||
}
|
||||
},
|
||||
.immediate => |imm| {
|
||||
switch (abi_size) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user