From 0998467aa58afe4db778e81366076f9cae2e38b2 Mon Sep 17 00:00:00 2001 From: Jacob Young Date: Tue, 26 Aug 2025 19:15:29 -0400 Subject: [PATCH] x86_64: fix multiplication overflow detection with adx Closes #24965 --- src/arch/x86_64/CodeGen.zig | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/arch/x86_64/CodeGen.zig b/src/arch/x86_64/CodeGen.zig index 5b0181cdcda2..5c76b7af92ce 100644 --- a/src/arch/x86_64/CodeGen.zig +++ b/src/arch/x86_64/CodeGen.zig @@ -31490,7 +31490,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void { .{ ._, ._x, .ado, .tmp8q, .tmp3q, ._, ._ }, .{ ._, ._x, .adc, .tmp8q, .tmp3q, ._, ._ }, .{ ._, ._mp, .j, .@"2f", ._, ._, ._ }, - .{ .@"1:", ._, .@"or", .tmp8q, .leai(.tmp1q, .tmp4), ._, ._ }, + .{ .@"1:", ._, .@"or", .tmp8q, .leaid(.tmp1q, .tmp4, 8), ._, ._ }, .{ .@"2:", ._, .sub, .tmp4d, .si(8), ._, ._ }, .{ ._, ._ae, .j, .@"1b", ._, ._, ._ }, .{ ._, ._, .@"or", .tmp2q, .tmp8q, ._, ._ }, @@ -31814,7 +31814,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void { .{ ._, ._x, .ado, .tmp8q, .tmp3q, ._, ._ }, .{ ._, ._x, .adc, .tmp8q, .tmp3q, ._, ._ }, .{ ._, ._mp, .j, .@"2f", ._, ._, ._ }, - .{ .@"1:", ._, .@"or", .tmp8q, .leai(.tmp1q, .tmp4), ._, ._ }, + .{ .@"1:", ._, .@"or", .tmp8q, .leaid(.tmp1q, .tmp4, 8), ._, ._ }, .{ .@"2:", ._, .sub, .tmp4d, .si(8), ._, ._ }, .{ ._, ._ae, .j, .@"1b", ._, ._, ._ }, .{ ._, ._, .@"or", .tmp2q, .tmp8q, ._, ._ }, @@ -32175,7 +32175,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void { .{ ._, ._x, .ado, .tmp8q, .tmp3q, ._, ._ }, .{ ._, ._x, .adc, .tmp8q, .tmp3q, ._, ._ }, .{ ._, ._mp, .j, .@"2f", ._, ._, ._ }, - .{ .@"1:", ._, .@"or", .tmp8q, .leai(.tmp1q, .tmp4), ._, ._ }, + .{ .@"1:", ._, .@"or", .tmp8q, .leaid(.tmp1q, .tmp4, 8), ._, ._ }, .{ .@"2:", ._, .sub, .tmp4d, .si(8), ._, ._ }, .{ ._, ._ae, .j, .@"1b", ._, ._, ._ }, .{ ._, ._, .@"or", .tmp2q, .tmp8q, ._, ._ }, @@ -55062,7 +55062,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void { .{ ._, ._x, .ado, .tmp8q, .tmp3q, ._, ._ }, .{ ._, ._x, .adc, .tmp8q, .tmp3q, ._, ._ }, .{ ._, ._mp, .j, .@"2f", ._, ._, ._ }, - .{ .@"1:", ._, .@"or", .tmp8q, .leai(.tmp1q, .tmp4), ._, ._ }, + .{ .@"1:", ._, .@"or", .tmp8q, .leaid(.tmp1q, .tmp4, 8), ._, ._ }, .{ .@"2:", ._, .sub, .tmp4d, .si(8), ._, ._ }, .{ ._, ._ae, .j, .@"1b", ._, ._, ._ }, .{ ._, ._, .@"or", .tmp2q, .tmp8q, ._, ._ }, @@ -55361,7 +55361,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void { .{ ._, ._x, .ado, .tmp8q, .tmp3q, ._, ._ }, .{ ._, ._x, .adc, .tmp8q, .tmp3q, ._, ._ }, .{ ._, ._mp, .j, .@"2f", ._, ._, ._ }, - .{ .@"1:", ._, .@"or", .tmp8q, .leai(.tmp1q, .tmp4), ._, ._ }, + .{ .@"1:", ._, .@"or", .tmp8q, .leaid(.tmp1q, .tmp4, 8), ._, ._ }, .{ .@"2:", ._, .sub, .tmp4d, .si(8), ._, ._ }, .{ ._, ._ae, .j, .@"1b", ._, ._, ._ }, .{ ._, ._, .@"or", .tmp2q, .tmp8q, ._, ._ }, @@ -55690,7 +55690,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void { .{ ._, ._x, .ado, .tmp8q, .tmp3q, ._, ._ }, .{ ._, ._x, .adc, .tmp8q, .tmp3q, ._, ._ }, .{ ._, ._mp, .j, .@"2f", ._, ._, ._ }, - .{ .@"1:", ._, .@"or", .tmp8q, .leai(.tmp1q, .tmp4), ._, ._ }, + .{ .@"1:", ._, .@"or", .tmp8q, .leaid(.tmp1q, .tmp4, 8), ._, ._ }, .{ .@"2:", ._, .sub, .tmp4d, .si(8), ._, ._ }, .{ ._, ._ae, .j, .@"1b", ._, ._, ._ }, .{ ._, ._, .@"or", .tmp2q, .tmp8q, ._, ._ },