| ... | ... | @@ -1662,7 +1662,7 @@ const NavGen = struct { |
| 1662 | 1662 | else => unreachable, |
| 1663 | 1663 | } |
| 1664 | 1664 | |
| 1665 | | // Guaranteed by callConvSupportsVarArgs, there are nog SPIR-V CCs which support |
| 1665 | // Guaranteed by callConvSupportsVarArgs, there are no SPIR-V CCs which support |
| 1666 | 1666 | // varargs. |
| 1667 | 1667 | assert(!fn_info.is_var_args); |
| 1668 | 1668 | |
| ... | ... | @@ -6580,8 +6580,16 @@ const NavGen = struct { |
| 6580 | 6580 | // for the string, we still use the next u32 for the null terminator. |
| 6581 | 6581 | input_extra_i += (constraint.len + name.len + (2 + 3)) / 4; |
| 6582 | 6582 | |
| 6583 | | const value = try self.resolve(input); |
| 6584 | | try as.value_map.put(as.gpa, name, .{ .value = value }); |
| 6583 | if (self.typeOf(input).zigTypeTag(zcu) == .type) { |
| 6584 | // This assembly input is a type instead of a value. |
| 6585 | // That's fine for now, just make sure to resolve it as such. |
| 6586 | const val = (try self.air.value(input, self.pt)).?; |
| 6587 | const ty_id = try self.resolveType(val.toType(), .direct); |
| 6588 | try as.value_map.put(as.gpa, name, .{ .ty = ty_id }); |
| 6589 | } else { |
| 6590 | const val_id = try self.resolve(input); |
| 6591 | try as.value_map.put(as.gpa, name, .{ .value = val_id }); |
| 6592 | } |
| 6585 | 6593 | } |
| 6586 | 6594 | |
| 6587 | 6595 | as.assemble() catch |err| switch (err) { |