authorgravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2022-06-05 21:48:22+03:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-06-06 13:11:54-07:00
log14685e59b26c8dc002ce6c25c6916cbad54e79d0
tree00ed70d37e4a50a99170d75859471b519da3c453
parent32568dba742a31051f2390b55b936a03b5146e17

stage2: use correct type (u29) for alignment


7 files changed, 49 insertions(+), 11 deletions(-)

src/AstGen.zig+6-2
...@@ -291,8 +291,8 @@ pub const ResultLoc = union(enum) {...@@ -291,8 +291,8 @@ pub const ResultLoc = union(enum) {
291 }291 }
292};292};
293293
294pub const align_rl: ResultLoc = .{ .ty = .u16_type };294pub const align_rl: ResultLoc = .{ .ty = .u29_type };
295pub const coerced_align_rl: ResultLoc = .{ .coerced_ty = .u16_type };295pub const coerced_align_rl: ResultLoc = .{ .coerced_ty = .u29_type };
296pub const bool_rl: ResultLoc = .{ .ty = .bool_type };296pub const bool_rl: ResultLoc = .{ .ty = .bool_type };
297pub const type_rl: ResultLoc = .{ .ty = .type_type };297pub const type_rl: ResultLoc = .{ .ty = .type_type };
298pub const coerced_type_rl: ResultLoc = .{ .coerced_ty = .type_type };298pub const coerced_type_rl: ResultLoc = .{ .coerced_ty = .type_type };
...@@ -8077,6 +8077,7 @@ const primitives = std.ComptimeStringMap(Zir.Inst.Ref, .{...@@ -8077,6 +8077,7 @@ const primitives = std.ComptimeStringMap(Zir.Inst.Ref, .{
8077 .{ "true", .bool_true },8077 .{ "true", .bool_true },
8078 .{ "type", .type_type },8078 .{ "type", .type_type },
8079 .{ "u16", .u16_type },8079 .{ "u16", .u16_type },
8080 .{ "u29", .u29_type },
8080 .{ "u32", .u32_type },8081 .{ "u32", .u32_type },
8081 .{ "u64", .u64_type },8082 .{ "u64", .u64_type },
8082 .{ "u128", .u128_type },8083 .{ "u128", .u128_type },
...@@ -8749,6 +8750,7 @@ fn nodeImpliesMoreThanOnePossibleValue(tree: *const Ast, start_node: Ast.Node.In...@@ -8749,6 +8750,7 @@ fn nodeImpliesMoreThanOnePossibleValue(tree: *const Ast, start_node: Ast.Node.In
8749 .isize_type,8750 .isize_type,
8750 .type_type,8751 .type_type,
8751 .u16_type,8752 .u16_type,
8753 .u29_type,
8752 .u32_type,8754 .u32_type,
8753 .u64_type,8755 .u64_type,
8754 .u128_type,8756 .u128_type,
...@@ -8988,6 +8990,7 @@ fn nodeImpliesComptimeOnly(tree: *const Ast, start_node: Ast.Node.Index) bool {...@@ -8988,6 +8990,7 @@ fn nodeImpliesComptimeOnly(tree: *const Ast, start_node: Ast.Node.Index) bool {
8988 .i8_type,8990 .i8_type,
8989 .isize_type,8991 .isize_type,
8990 .u16_type,8992 .u16_type,
8993 .u29_type,
8991 .u32_type,8994 .u32_type,
8992 .u64_type,8995 .u64_type,
8993 .u128_type,8996 .u128_type,
...@@ -9063,6 +9066,7 @@ fn rvalue(...@@ -9063,6 +9066,7 @@ fn rvalue(
9063 as_ty | @enumToInt(Zir.Inst.Ref.u8_type),9066 as_ty | @enumToInt(Zir.Inst.Ref.u8_type),
9064 as_ty | @enumToInt(Zir.Inst.Ref.i8_type),9067 as_ty | @enumToInt(Zir.Inst.Ref.i8_type),
9065 as_ty | @enumToInt(Zir.Inst.Ref.u16_type),9068 as_ty | @enumToInt(Zir.Inst.Ref.u16_type),
9069 as_ty | @enumToInt(Zir.Inst.Ref.u29_type),
9066 as_ty | @enumToInt(Zir.Inst.Ref.i16_type),9070 as_ty | @enumToInt(Zir.Inst.Ref.i16_type),
9067 as_ty | @enumToInt(Zir.Inst.Ref.u32_type),9071 as_ty | @enumToInt(Zir.Inst.Ref.u32_type),
9068 as_ty | @enumToInt(Zir.Inst.Ref.i32_type),9072 as_ty | @enumToInt(Zir.Inst.Ref.i32_type),
src/Module.zig+1-1
...@@ -4016,7 +4016,7 @@ fn semaDecl(mod: *Module, decl_index: Decl.Index) !bool {...@@ -4016,7 +4016,7 @@ fn semaDecl(mod: *Module, decl_index: Decl.Index) !bool {
4016 try wip_captures.finalize();4016 try wip_captures.finalize();
4017 const src: LazySrcLoc = .{ .node_offset = 0 };4017 const src: LazySrcLoc = .{ .node_offset = 0 };
4018 const decl_tv = try sema.resolveInstValue(&block_scope, src, result_ref);4018 const decl_tv = try sema.resolveInstValue(&block_scope, src, result_ref);
4019 const decl_align: u16 = blk: {4019 const decl_align: u32 = blk: {
4020 const align_ref = decl.zirAlignRef();4020 const align_ref = decl.zirAlignRef();
4021 if (align_ref == .none) break :blk 0;4021 if (align_ref == .none) break :blk 0;
4022 break :blk try sema.resolveAlign(&block_scope, src, align_ref);4022 break :blk try sema.resolveAlign(&block_scope, src, align_ref);
src/Sema.zig+9-6
...@@ -1739,9 +1739,9 @@ pub fn resolveAlign(...@@ -1739,9 +1739,9 @@ pub fn resolveAlign(
1739 block: *Block,1739 block: *Block,
1740 src: LazySrcLoc,1740 src: LazySrcLoc,
1741 zir_ref: Zir.Inst.Ref,1741 zir_ref: Zir.Inst.Ref,
1742) !u16 {1742) !u32 {
1743 const alignment_big = try sema.resolveInt(block, src, zir_ref, Type.initTag(.u16));1743 const alignment_big = try sema.resolveInt(block, src, zir_ref, Type.initTag(.u29));
1744 const alignment = @intCast(u16, alignment_big); // We coerce to u16 in the prev line.1744 const alignment = @intCast(u32, alignment_big); // We coerce to u16 in the prev line.
1745 if (alignment == 0) return sema.fail(block, src, "alignment must be >= 1", .{});1745 if (alignment == 0) return sema.fail(block, src, "alignment must be >= 1", .{});
1746 if (!std.math.isPowerOfTwo(alignment)) {1746 if (!std.math.isPowerOfTwo(alignment)) {
1747 return sema.fail(block, src, "alignment value {d} is not a power of two", .{1747 return sema.fail(block, src, "alignment value {d} is not a power of two", .{
...@@ -2663,7 +2663,7 @@ fn zirAllocExtended(...@@ -2663,7 +2663,7 @@ fn zirAllocExtended(
2663 break :blk try sema.resolveType(block, ty_src, type_ref);2663 break :blk try sema.resolveType(block, ty_src, type_ref);
2664 } else undefined;2664 } else undefined;
26652665
2666 const alignment: u16 = if (small.has_align) blk: {2666 const alignment: u32 = if (small.has_align) blk: {
2667 const align_ref = @intToEnum(Zir.Inst.Ref, sema.code.extra[extra_index]);2667 const align_ref = @intToEnum(Zir.Inst.Ref, sema.code.extra[extra_index]);
2668 extra_index += 1;2668 extra_index += 1;
2669 const alignment = try sema.resolveAlign(block, align_src, align_ref);2669 const alignment = try sema.resolveAlign(block, align_src, align_ref);
...@@ -14210,7 +14210,7 @@ fn zirReify(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Air.I...@@ -14210,7 +14210,7 @@ fn zirReify(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Air.I
14210 .size = ptr_size,14210 .size = ptr_size,
14211 .mutable = !is_const_val.toBool(),14211 .mutable = !is_const_val.toBool(),
14212 .@"volatile" = is_volatile_val.toBool(),14212 .@"volatile" = is_volatile_val.toBool(),
14213 .@"align" = @intCast(u16, alignment_val.toUnsignedInt(target)), // TODO: Validate this value.14213 .@"align" = @intCast(u29, alignment_val.toUnsignedInt(target)), // TODO: Validate this value.
14214 .@"addrspace" = address_space_val.toEnum(std.builtin.AddressSpace),14214 .@"addrspace" = address_space_val.toEnum(std.builtin.AddressSpace),
14215 .pointee_type = try child_ty.copy(sema.arena),14215 .pointee_type = try child_ty.copy(sema.arena),
14216 .@"allowzero" = is_allowzero_val.toBool(),14216 .@"allowzero" = is_allowzero_val.toBool(),
...@@ -16984,7 +16984,7 @@ fn zirFuncFancy(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!A...@@ -16984,7 +16984,7 @@ fn zirFuncFancy(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!A
16984 const body = sema.code.extra[extra_index..][0..body_len];16984 const body = sema.code.extra[extra_index..][0..body_len];
16985 extra_index += body.len;16985 extra_index += body.len;
1698616986
16987 const val = try sema.resolveGenericBody(block, align_src, body, inst, Type.u16);16987 const val = try sema.resolveGenericBody(block, align_src, body, inst, Type.u29);
16988 if (val.tag() == .generic_poison) {16988 if (val.tag() == .generic_poison) {
16989 break :blk null;16989 break :blk null;
16990 }16990 }
...@@ -23886,6 +23886,7 @@ pub fn typeHasOnePossibleValue(...@@ -23886,6 +23886,7 @@ pub fn typeHasOnePossibleValue(
23886 .i8,23886 .i8,
23887 .u16,23887 .u16,
23888 .i16,23888 .i16,
23889 .u29,
23889 .u32,23890 .u32,
23890 .i32,23891 .i32,
23891 .u64,23892 .u64,
...@@ -24179,6 +24180,7 @@ pub fn addType(sema: *Sema, ty: Type) !Air.Inst.Ref {...@@ -24179,6 +24180,7 @@ pub fn addType(sema: *Sema, ty: Type) !Air.Inst.Ref {
24179 .u8 => return .u8_type,24180 .u8 => return .u8_type,
24180 .i8 => return .i8_type,24181 .i8 => return .i8_type,
24181 .u16 => return .u16_type,24182 .u16 => return .u16_type,
24183 .u29 => return .u29_type,
24182 .i16 => return .i16_type,24184 .i16 => return .i16_type,
24183 .u32 => return .u32_type,24185 .u32 => return .u32_type,
24184 .i32 => return .i32_type,24186 .i32 => return .i32_type,
...@@ -24549,6 +24551,7 @@ pub fn typeRequiresComptime(sema: *Sema, block: *Block, src: LazySrcLoc, ty: Typ...@@ -24549,6 +24551,7 @@ pub fn typeRequiresComptime(sema: *Sema, block: *Block, src: LazySrcLoc, ty: Typ
24549 .i8,24551 .i8,
24550 .u16,24552 .u16,
24551 .i16,24553 .i16,
24554 .u29,
24552 .u32,24555 .u32,
24553 .i32,24556 .i32,
24554 .u64,24557 .u64,
src/TypedValue.zig+1
...@@ -79,6 +79,7 @@ pub fn print(...@@ -79,6 +79,7 @@ pub fn print(
79 .i8_type => return writer.writeAll("i8"),79 .i8_type => return writer.writeAll("i8"),
80 .u16_type => return writer.writeAll("u16"),80 .u16_type => return writer.writeAll("u16"),
81 .i16_type => return writer.writeAll("i16"),81 .i16_type => return writer.writeAll("i16"),
82 .u29_type => return writer.writeAll("u29"),
82 .u32_type => return writer.writeAll("u32"),83 .u32_type => return writer.writeAll("u32"),
83 .i32_type => return writer.writeAll("i32"),84 .i32_type => return writer.writeAll("i32"),
84 .u64_type => return writer.writeAll("u64"),85 .u64_type => return writer.writeAll("u64"),
src/Zir.zig+5
...@@ -1961,6 +1961,7 @@ pub const Inst = struct {...@@ -1961,6 +1961,7 @@ pub const Inst = struct {
1961 i8_type,1961 i8_type,
1962 u16_type,1962 u16_type,
1963 i16_type,1963 i16_type,
1964 u29_type,
1964 u32_type,1965 u32_type,
1965 i32_type,1966 i32_type,
1966 u64_type,1967 u64_type,
...@@ -2072,6 +2073,10 @@ pub const Inst = struct {...@@ -2072,6 +2073,10 @@ pub const Inst = struct {
2072 .ty = Type.initTag(.type),2073 .ty = Type.initTag(.type),
2073 .val = Value.initTag(.i16_type),2074 .val = Value.initTag(.i16_type),
2074 },2075 },
2076 .u29_type = .{
2077 .ty = Type.initTag(.type),
2078 .val = Value.initTag(.u29_type),
2079 },
2075 .u32_type = .{2080 .u32_type = .{
2076 .ty = Type.initTag(.type),2081 .ty = Type.initTag(.type),
2077 .val = Value.initTag(.u32_type),2082 .val = Value.initTag(.u32_type),
src/type.zig+20
...@@ -36,6 +36,7 @@ pub const Type = extern union {...@@ -36,6 +36,7 @@ pub const Type = extern union {
36 .i8,36 .i8,
37 .u16,37 .u16,
38 .i16,38 .i16,
39 .u29,
39 .u32,40 .u32,
40 .i32,41 .i32,
41 .u64,42 .u64,
...@@ -568,6 +569,7 @@ pub const Type = extern union {...@@ -568,6 +569,7 @@ pub const Type = extern union {
568 .i8,569 .i8,
569 .u16,570 .u16,
570 .i16,571 .i16,
572 .u29,
571 .u32,573 .u32,
572 .i32,574 .i32,
573 .u64,575 .u64,
...@@ -979,6 +981,7 @@ pub const Type = extern union {...@@ -979,6 +981,7 @@ pub const Type = extern union {
979 .i8,981 .i8,
980 .u16,982 .u16,
981 .i16,983 .i16,
984 .u29,
982 .u32,985 .u32,
983 .i32,986 .i32,
984 .u64,987 .u64,
...@@ -1261,6 +1264,7 @@ pub const Type = extern union {...@@ -1261,6 +1264,7 @@ pub const Type = extern union {
1261 .i8,1264 .i8,
1262 .u16,1265 .u16,
1263 .i16,1266 .i16,
1267 .u29,
1264 .u32,1268 .u32,
1265 .i32,1269 .i32,
1266 .u64,1270 .u64,
...@@ -1551,6 +1555,7 @@ pub const Type = extern union {...@@ -1551,6 +1555,7 @@ pub const Type = extern union {
1551 .i8,1555 .i8,
1552 .u16,1556 .u16,
1553 .i16,1557 .i16,
1558 .u29,
1554 .u32,1559 .u32,
1555 .i32,1560 .i32,
1556 .u64,1561 .u64,
...@@ -1935,6 +1940,7 @@ pub const Type = extern union {...@@ -1935,6 +1940,7 @@ pub const Type = extern union {
1935 .i8,1940 .i8,
1936 .u16,1941 .u16,
1937 .i16,1942 .i16,
1943 .u29,
1938 .u32,1944 .u32,
1939 .i32,1945 .i32,
1940 .u64,1946 .u64,
...@@ -2235,6 +2241,7 @@ pub const Type = extern union {...@@ -2235,6 +2241,7 @@ pub const Type = extern union {
2235 .u8 => return Value.initTag(.u8_type),2241 .u8 => return Value.initTag(.u8_type),
2236 .i8 => return Value.initTag(.i8_type),2242 .i8 => return Value.initTag(.i8_type),
2237 .u16 => return Value.initTag(.u16_type),2243 .u16 => return Value.initTag(.u16_type),
2244 .u29 => return Value.initTag(.u29_type),
2238 .i16 => return Value.initTag(.i16_type),2245 .i16 => return Value.initTag(.i16_type),
2239 .u32 => return Value.initTag(.u32_type),2246 .u32 => return Value.initTag(.u32_type),
2240 .i32 => return Value.initTag(.i32_type),2247 .i32 => return Value.initTag(.i32_type),
...@@ -2312,6 +2319,7 @@ pub const Type = extern union {...@@ -2312,6 +2319,7 @@ pub const Type = extern union {
2312 .i8,2319 .i8,
2313 .u16,2320 .u16,
2314 .i16,2321 .i16,
2322 .u29,
2315 .u32,2323 .u32,
2316 .i32,2324 .i32,
2317 .u64,2325 .u64,
...@@ -2560,6 +2568,7 @@ pub const Type = extern union {...@@ -2560,6 +2568,7 @@ pub const Type = extern union {
2560 .i8,2568 .i8,
2561 .u16,2569 .u16,
2562 .i16,2570 .i16,
2571 .u29,
2563 .u32,2572 .u32,
2564 .i32,2573 .i32,
2565 .u64,2574 .u64,
...@@ -2953,6 +2962,7 @@ pub const Type = extern union {...@@ -2953,6 +2962,7 @@ pub const Type = extern union {
2953 .vector => return AbiAlignmentAdvanced{ .scalar = 16 },2962 .vector => return AbiAlignmentAdvanced{ .scalar = 16 },
29542963
2955 .i16, .u16 => return AbiAlignmentAdvanced{ .scalar = intAbiAlignment(16, target) },2964 .i16, .u16 => return AbiAlignmentAdvanced{ .scalar = intAbiAlignment(16, target) },
2965 .u29 => return AbiAlignmentAdvanced{ .scalar = intAbiAlignment(29, target) },
2956 .i32, .u32 => return AbiAlignmentAdvanced{ .scalar = intAbiAlignment(32, target) },2966 .i32, .u32 => return AbiAlignmentAdvanced{ .scalar = intAbiAlignment(32, target) },
2957 .i64, .u64 => return AbiAlignmentAdvanced{ .scalar = intAbiAlignment(64, target) },2967 .i64, .u64 => return AbiAlignmentAdvanced{ .scalar = intAbiAlignment(64, target) },
2958 .u128, .i128 => return AbiAlignmentAdvanced{ .scalar = intAbiAlignment(128, target) },2968 .u128, .i128 => return AbiAlignmentAdvanced{ .scalar = intAbiAlignment(128, target) },
...@@ -3416,6 +3426,7 @@ pub const Type = extern union {...@@ -3416,6 +3426,7 @@ pub const Type = extern union {
3416 },3426 },
34173427
3418 .i16, .u16 => return AbiSizeAdvanced{ .scalar = intAbiSize(16, target) },3428 .i16, .u16 => return AbiSizeAdvanced{ .scalar = intAbiSize(16, target) },
3429 .u29 => return AbiSizeAdvanced{ .scalar = intAbiSize(29, target) },
3419 .i32, .u32 => return AbiSizeAdvanced{ .scalar = intAbiSize(32, target) },3430 .i32, .u32 => return AbiSizeAdvanced{ .scalar = intAbiSize(32, target) },
3420 .i64, .u64 => return AbiSizeAdvanced{ .scalar = intAbiSize(64, target) },3431 .i64, .u64 => return AbiSizeAdvanced{ .scalar = intAbiSize(64, target) },
3421 .u128, .i128 => return AbiSizeAdvanced{ .scalar = intAbiSize(128, target) },3432 .u128, .i128 => return AbiSizeAdvanced{ .scalar = intAbiSize(128, target) },
...@@ -3569,6 +3580,7 @@ pub const Type = extern union {...@@ -3569,6 +3580,7 @@ pub const Type = extern union {
3569 .bool, .u1 => 1,3580 .bool, .u1 => 1,
3570 .u8, .i8 => 8,3581 .u8, .i8 => 8,
3571 .i16, .u16, .f16 => 16,3582 .i16, .u16, .f16 => 16,
3583 .u29 => 29,
3572 .i32, .u32, .f32 => 32,3584 .i32, .u32, .f32 => 32,
3573 .i64, .u64, .f64 => 64,3585 .i64, .u64, .f64 => 64,
3574 .f80 => 80,3586 .f80 => 80,
...@@ -4524,6 +4536,7 @@ pub const Type = extern union {...@@ -4524,6 +4536,7 @@ pub const Type = extern union {
4524 .u1,4536 .u1,
4525 .u8,4537 .u8,
4526 .u16,4538 .u16,
4539 .u29,
4527 .u32,4540 .u32,
4528 .u64,4541 .u64,
4529 .u128,4542 .u128,
...@@ -4550,6 +4563,7 @@ pub const Type = extern union {...@@ -4550,6 +4563,7 @@ pub const Type = extern union {
4550 .i8 => return .{ .signedness = .signed, .bits = 8 },4563 .i8 => return .{ .signedness = .signed, .bits = 8 },
4551 .u16 => return .{ .signedness = .unsigned, .bits = 16 },4564 .u16 => return .{ .signedness = .unsigned, .bits = 16 },
4552 .i16 => return .{ .signedness = .signed, .bits = 16 },4565 .i16 => return .{ .signedness = .signed, .bits = 16 },
4566 .u29 => return .{ .signedness = .unsigned, .bits = 29 },
4553 .u32 => return .{ .signedness = .unsigned, .bits = 32 },4567 .u32 => return .{ .signedness = .unsigned, .bits = 32 },
4554 .i32 => return .{ .signedness = .signed, .bits = 32 },4568 .i32 => return .{ .signedness = .signed, .bits = 32 },
4555 .u64 => return .{ .signedness = .unsigned, .bits = 64 },4569 .u64 => return .{ .signedness = .unsigned, .bits = 64 },
...@@ -4814,6 +4828,7 @@ pub const Type = extern union {...@@ -4814,6 +4828,7 @@ pub const Type = extern union {
4814 .i8,4828 .i8,
4815 .u16,4829 .u16,
4816 .i16,4830 .i16,
4831 .u29,
4817 .u32,4832 .u32,
4818 .i32,4833 .i32,
4819 .u64,4834 .u64,
...@@ -4856,6 +4871,7 @@ pub const Type = extern union {...@@ -4856,6 +4871,7 @@ pub const Type = extern union {
4856 .i8,4871 .i8,
4857 .u16,4872 .u16,
4858 .i16,4873 .i16,
4874 .u29,
4859 .u32,4875 .u32,
4860 .i32,4876 .i32,
4861 .u64,4877 .u64,
...@@ -5072,6 +5088,7 @@ pub const Type = extern union {...@@ -5072,6 +5088,7 @@ pub const Type = extern union {
5072 .i8,5088 .i8,
5073 .u16,5089 .u16,
5074 .i16,5090 .i16,
5091 .u29,
5075 .u32,5092 .u32,
5076 .i32,5093 .i32,
5077 .u64,5094 .u64,
...@@ -5816,6 +5833,7 @@ pub const Type = extern union {...@@ -5816,6 +5833,7 @@ pub const Type = extern union {
5816 i8,5833 i8,
5817 u16,5834 u16,
5818 i16,5835 i16,
5836 u29,
5819 u32,5837 u32,
5820 i32,5838 i32,
5821 u64,5839 u64,
...@@ -5939,6 +5957,7 @@ pub const Type = extern union {...@@ -5939,6 +5957,7 @@ pub const Type = extern union {
5939 .i8,5957 .i8,
5940 .u16,5958 .u16,
5941 .i16,5959 .i16,
5960 .u29,
5942 .u32,5961 .u32,
5943 .i32,5962 .i32,
5944 .u64,5963 .u64,
...@@ -6302,6 +6321,7 @@ pub const Type = extern union {...@@ -6302,6 +6321,7 @@ pub const Type = extern union {
6302 pub const @"u1" = initTag(.u1);6321 pub const @"u1" = initTag(.u1);
6303 pub const @"u8" = initTag(.u8);6322 pub const @"u8" = initTag(.u8);
6304 pub const @"u16" = initTag(.u16);6323 pub const @"u16" = initTag(.u16);
6324 pub const @"u29" = initTag(.u29);
6305 pub const @"u32" = initTag(.u32);6325 pub const @"u32" = initTag(.u32);
6306 pub const @"u64" = initTag(.u64);6326 pub const @"u64" = initTag(.u64);
63076327
src/value.zig+7-2
...@@ -30,6 +30,7 @@ pub const Value = extern union {...@@ -30,6 +30,7 @@ pub const Value = extern union {
30 i8_type,30 i8_type,
31 u16_type,31 u16_type,
32 i16_type,32 i16_type,
33 u29_type,
33 u32_type,34 u32_type,
34 i32_type,35 i32_type,
35 u64_type,36 u64_type,
...@@ -196,6 +197,7 @@ pub const Value = extern union {...@@ -196,6 +197,7 @@ pub const Value = extern union {
196 .i8_type,197 .i8_type,
197 .u16_type,198 .u16_type,
198 .i16_type,199 .i16_type,
200 .u29_type,
199 .u32_type,201 .u32_type,
200 .i32_type,202 .i32_type,
201 .u64_type,203 .u64_type,
...@@ -397,6 +399,7 @@ pub const Value = extern union {...@@ -397,6 +399,7 @@ pub const Value = extern union {
397 .i8_type,399 .i8_type,
398 .u16_type,400 .u16_type,
399 .i16_type,401 .i16_type,
402 .u29_type,
400 .u32_type,403 .u32_type,
401 .i32_type,404 .i32_type,
402 .u64_type,405 .u64_type,
...@@ -660,6 +663,7 @@ pub const Value = extern union {...@@ -660,6 +663,7 @@ pub const Value = extern union {
660 .u8_type => return out_stream.writeAll("u8"),663 .u8_type => return out_stream.writeAll("u8"),
661 .i8_type => return out_stream.writeAll("i8"),664 .i8_type => return out_stream.writeAll("i8"),
662 .u16_type => return out_stream.writeAll("u16"),665 .u16_type => return out_stream.writeAll("u16"),
666 .u29_type => return out_stream.writeAll("u29"),
663 .i16_type => return out_stream.writeAll("i16"),667 .i16_type => return out_stream.writeAll("i16"),
664 .u32_type => return out_stream.writeAll("u32"),668 .u32_type => return out_stream.writeAll("u32"),
665 .i32_type => return out_stream.writeAll("i32"),669 .i32_type => return out_stream.writeAll("i32"),
...@@ -900,6 +904,7 @@ pub const Value = extern union {...@@ -900,6 +904,7 @@ pub const Value = extern union {
900 .i8_type => Type.initTag(.i8),904 .i8_type => Type.initTag(.i8),
901 .u16_type => Type.initTag(.u16),905 .u16_type => Type.initTag(.u16),
902 .i16_type => Type.initTag(.i16),906 .i16_type => Type.initTag(.i16),
907 .u29_type => Type.initTag(.u29),
903 .u32_type => Type.initTag(.u32),908 .u32_type => Type.initTag(.u32),
904 .i32_type => Type.initTag(.i32),909 .i32_type => Type.initTag(.i32),
905 .u64_type => Type.initTag(.u64),910 .u64_type => Type.initTag(.u64),
...@@ -4905,7 +4910,7 @@ pub const Value = extern union {...@@ -4905,7 +4910,7 @@ pub const Value = extern union {
4905 /// `Module.resolvePeerTypes`.4910 /// `Module.resolvePeerTypes`.
4906 stored_inst_list: std.ArrayListUnmanaged(Air.Inst.Ref) = .{},4911 stored_inst_list: std.ArrayListUnmanaged(Air.Inst.Ref) = .{},
4907 /// 0 means ABI-aligned.4912 /// 0 means ABI-aligned.
4908 alignment: u16,4913 alignment: u32,
4909 },4914 },
4910 };4915 };
49114916
...@@ -4916,7 +4921,7 @@ pub const Value = extern union {...@@ -4916,7 +4921,7 @@ pub const Value = extern union {
4916 data: struct {4921 data: struct {
4917 decl_index: Module.Decl.Index,4922 decl_index: Module.Decl.Index,
4918 /// 0 means ABI-aligned.4923 /// 0 means ABI-aligned.
4919 alignment: u16,4924 alignment: u32,
4920 },4925 },
4921 };4926 };
49224927