zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit d20490d25ef007b14b900665fe767ef44bcf3ee2 (tree)
parent 2e1b1728505c20ee38d2bd757148e572e4d95f74
Author: David Rubin <david@vortan.dev>
Date:   Thu, 27 Nov 2025 19:16:29 -0800

c: support `+r` output constraint

Diffstat:
Msrc/codegen/c.zig | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/codegen/c.zig b/src/codegen/c.zig @@ -4790,7 +4790,8 @@ fn airAsm(f: *Function, inst: Air.Inst.Index) !CValue { while (it.next()) |output| { const constraint = output.constraint; - if (constraint.len < 2 or constraint[0] != '=' or + if (constraint.len < 2 or + (constraint[0] != '=' and constraint[0] != '+') or (constraint[1] == '{' and constraint[constraint.len - 1] != '}')) { return f.fail("CBE: constraint not supported: '{s}'", .{constraint});