aboutsummaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorJacob Young <jacobly0@users.noreply.github.com>2024-02-05 06:55:22 +0100
committerJacob Young <jacobly0@users.noreply.github.com>2024-02-12 05:25:07 +0100
commitc619551f7d0aae794d628fc7d2f34cfc70f1cba3 (patch)
tree9a9e108cdf77b853b9760503250e4fd386a6b534 /src/arch
parent6235762c095e0031b4d5c3da1687f184a2125988 (diff)
downloadzig-c619551f7d0aae794d628fc7d2f34cfc70f1cba3.tar.gz
zig-c619551f7d0aae794d628fc7d2f34cfc70f1cba3.zip
x86_64: fix incorrect alignment check
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/x86_64/CodeGen.zig4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/arch/x86_64/CodeGen.zig b/src/arch/x86_64/CodeGen.zig
index ce7ac9bfe2..1b0180d85f 100644
--- a/src/arch/x86_64/CodeGen.zig
+++ b/src/arch/x86_64/CodeGen.zig
@@ -13715,7 +13715,9 @@ fn genSetReg(self: *Self, dst_reg: Register, ty: Type, src_mcv: MCValue) InnerEr
.load_frame => |frame_addr| try self.moveStrategy(
ty,
dst_reg.class(),
- self.getFrameAddrAlignment(frame_addr).compare(.gte, ty.abiAlignment(mod)),
+ self.getFrameAddrAlignment(frame_addr).compare(.gte, Alignment.fromLog2Units(
+ std.math.log2_int_ceil(u10, @divExact(dst_reg.bitSize(), 8)),
+ )),
),
.lea_frame => .{ .move = .{ ._, .lea } },
else => unreachable,