authorgravatar for david@vortan.devDavid Rubin <david@vortan.dev> 2025-11-27 19:16:29-08:00
committergravatar for sinon@vortan.devDavid Rubin <sinon@vortan.dev> 2026-06-24 02:16:43-05:00
logd20490d25ef007b14b900665fe767ef44bcf3ee2
tree5a54e6d630d4a16d2b81297fb9b85913e4da8853
parent2e1b1728505c20ee38d2bd757148e572e4d95f74

c: support `+r` output constraint


1 files changed, 2 insertions(+), 1 deletions(-)

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