| ... | ... | @@ -475,6 +475,7 @@ fn genBody(self: *Self, body: []const Air.Inst.Index) InnerError!void { |
| 475 | 475 | .cmp_gt => @panic("TODO try self.airCmp(inst, .gt)"), |
| 476 | 476 | .cmp_neq => @panic("TODO try self.airCmp(inst, .neq)"), |
| 477 | 477 | .cmp_vector => @panic("TODO try self.airCmpVector(inst)"), |
| 478 | .cmp_lt_errors_len => @panic("TODO try self.airCmpLtErrorsLen(inst)"), |
| 478 | 479 | |
| 479 | 480 | .bool_and => @panic("TODO try self.airBoolOp(inst)"), |
| 480 | 481 | .bool_or => @panic("TODO try self.airBoolOp(inst)"), |
| ... | ... | @@ -647,10 +648,12 @@ fn airAsm(self: *Self, inst: Air.Inst.Index) !void { |
| 647 | 648 | } else null; |
| 648 | 649 | |
| 649 | 650 | for (inputs) |input| { |
| 650 | | const constraint = std.mem.sliceTo(std.mem.sliceAsBytes(self.air.extra[extra_i..]), 0); |
| 651 | const input_bytes = std.mem.sliceAsBytes(self.air.extra[extra_i..]); |
| 652 | const constraint = std.mem.sliceTo(input_bytes, 0); |
| 653 | const input_name = std.mem.sliceTo(input_bytes[constraint.len + 1 ..], 0); |
| 651 | 654 | // This equation accounts for the fact that even if we have exactly 4 bytes |
| 652 | 655 | // for the string, we still use the next u32 for the null terminator. |
| 653 | | extra_i += constraint.len / 4 + 1; |
| 656 | extra_i += (constraint.len + input_name.len + 1) / 4 + 1; |
| 654 | 657 | |
| 655 | 658 | if (constraint.len < 3 or constraint[0] != '{' or constraint[constraint.len - 1] != '}') { |
| 656 | 659 | return self.fail("unrecognized asm input constraint: '{s}'", .{constraint}); |