commit defef3f1a15be3b8f4e2074d581d43deb8296349 (tree)
parent 88d0fef92d1ae0526ee63fede01e3887aa9f2a2a
Author: Jacob Young <jacobly0@users.noreply.github.com>
Date: Tue, 13 Feb 2024 22:34:20 +0100
x86_64: fix inline asm match constraints
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/src/arch/x86_64/CodeGen.zig b/src/arch/x86_64/CodeGen.zig
@@ -13500,6 +13500,7 @@ fn airAsm(self: *Self, inst: Air.Inst.Index) !void {
} else if (constraint.len == 1 and std.ascii.isDigit(constraint[0])) arg: {
const index = std.fmt.charToDigit(constraint[0], 10) catch unreachable;
if (index >= args.items.len) return self.fail("constraint out of bounds: '{s}'", .{constraint});
+ try self.genCopy(ty, args.items[index], input_mcv, .{});
break :arg args.items[index];
} else return self.fail("invalid constraint: '{s}'", .{constraint});
if (arg_mcv.getReg()) |reg| if (RegisterManager.indexOfRegIntoTracked(reg)) |_| {