authorgravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2026-05-06 10:10:44+02:00
committergravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2026-05-06 10:10:44+02:00
log7eb79daffb16426d1ed78316d5fdf9ff0d015a83
treed79ef13f8fa086262e94c298914b76367d8175af
parentebff436985c9410d2a2759c69a277fcb30831a87
parente393962bc2348a03ee53fd0a6e4dec6250842600

Merge pull request '`std.builtin` -> `std.lang` migration progress' (#32182) from compiler-std-lang into master

Reviewed-on: https://codeberg.org/ziglang/zig/pulls/32182

78 files changed, 5237 insertions(+), 5237 deletions(-)

CMakeLists.txt+2-1
...@@ -239,7 +239,8 @@ set(ZIG_STAGE2_SOURCES...@@ -239,7 +239,8 @@ set(ZIG_STAGE2_SOURCES
239 lib/std/atomic.zig239 lib/std/atomic.zig
240 lib/std/base64.zig240 lib/std/base64.zig
241 lib/std/buf_map.zig241 lib/std/buf_map.zig
242 lib/std/builtin.zig242 lib/std/lang.zig
243 lib/std/lang/assembly.zig
243 lib/std/c.zig244 lib/std/c.zig
244 lib/std/coff.zig245 lib/std/coff.zig
245 lib/std/crypto.zig246 lib/std/crypto.zig
build.zig+10-11
...@@ -1,5 +1,4 @@...@@ -1,5 +1,4 @@
1const std = @import("std");1const std = @import("std");
2const builtin = std.builtin;
3const BufMap = std.BufMap;2const BufMap = std.BufMap;
4const mem = std.mem;3const mem = std.mem;
5const fs = std.fs;4const fs = std.fs;
...@@ -191,7 +190,7 @@ pub fn build(b: *std.Build) !void {...@@ -191,7 +190,7 @@ pub fn build(b: *std.Build) !void {
191 const valgrind = b.option(bool, "valgrind", "Enable valgrind integration");190 const valgrind = b.option(bool, "valgrind", "Enable valgrind integration");
192 const pie = b.option(bool, "pie", "Produce a Position Independent Executable");191 const pie = b.option(bool, "pie", "Produce a Position Independent Executable");
193 const io_mode = b.option(IoMode, "io-mode", "How the compiler performs IO") orelse .threaded;192 const io_mode = b.option(IoMode, "io-mode", "How the compiler performs IO") orelse .threaded;
194 const value_interpret_mode = b.option(ValueInterpretMode, "value-interpret-mode", "How the compiler translates between 'std.builtin' types and its internal datastructures") orelse .direct;193 const value_interpret_mode = b.option(ValueInterpretMode, "value-interpret-mode", "How the compiler translates between 'std.lang' types and its internal datastructures") orelse .direct;
195 const value_tracing = b.option(bool, "value-tracing", "Enable extra state tracking to help troubleshoot bugs in the compiler (using the std.debug.Trace API)") orelse false;194 const value_tracing = b.option(bool, "value-tracing", "Enable extra state tracking to help troubleshoot bugs in the compiler (using the std.debug.Trace API)") orelse false;
196195
197 const mem_leak_frames: u32 = b.option(u32, "mem-leak-frames", "How many stack frames to print when a memory leak occurs. Tests get 2x this amount.") orelse blk: {196 const mem_leak_frames: u32 = b.option(u32, "mem-leak-frames", "How many stack frames to print when a memory leak occurs. Tests get 2x this amount.") orelse blk: {
...@@ -398,22 +397,22 @@ pub fn build(b: *std.Build) !void {...@@ -398,22 +397,22 @@ pub fn build(b: *std.Build) !void {
398 const test_target_filters = b.option([]const []const u8, "test-target-filter", "Skip tests whose target triple do not match any filter") orelse &[0][]const u8{};397 const test_target_filters = b.option([]const []const u8, "test-target-filter", "Skip tests whose target triple do not match any filter") orelse &[0][]const u8{};
399 const test_extra_targets = b.option(bool, "test-extra-targets", "Enable running module tests for additional targets") orelse false;398 const test_extra_targets = b.option(bool, "test-extra-targets", "Enable running module tests for additional targets") orelse false;
400399
401 var chosen_opt_modes_buf: [4]builtin.OptimizeMode = undefined;400 var chosen_opt_modes_buf: [4]std.lang.OptimizeMode = undefined;
402 var chosen_mode_index: usize = 0;401 var chosen_mode_index: usize = 0;
403 if (!skip_debug) {402 if (!skip_debug) {
404 chosen_opt_modes_buf[chosen_mode_index] = builtin.OptimizeMode.Debug;403 chosen_opt_modes_buf[chosen_mode_index] = .Debug;
405 chosen_mode_index += 1;404 chosen_mode_index += 1;
406 }405 }
407 if (!skip_release_safe) {406 if (!skip_release_safe) {
408 chosen_opt_modes_buf[chosen_mode_index] = builtin.OptimizeMode.ReleaseSafe;407 chosen_opt_modes_buf[chosen_mode_index] = .ReleaseSafe;
409 chosen_mode_index += 1;408 chosen_mode_index += 1;
410 }409 }
411 if (!skip_release_fast) {410 if (!skip_release_fast) {
412 chosen_opt_modes_buf[chosen_mode_index] = builtin.OptimizeMode.ReleaseFast;411 chosen_opt_modes_buf[chosen_mode_index] = .ReleaseFast;
413 chosen_mode_index += 1;412 chosen_mode_index += 1;
414 }413 }
415 if (!skip_release_small) {414 if (!skip_release_small) {
416 chosen_opt_modes_buf[chosen_mode_index] = builtin.OptimizeMode.ReleaseSmall;415 chosen_opt_modes_buf[chosen_mode_index] = .ReleaseSmall;
417 chosen_mode_index += 1;416 chosen_mode_index += 1;
418 }417 }
419 const optimize_modes = chosen_opt_modes_buf[0..chosen_mode_index];418 const optimize_modes = chosen_opt_modes_buf[0..chosen_mode_index];
...@@ -706,11 +705,11 @@ fn addWasiUpdateStep(b: *std.Build, version: [:0]const u8) !void {...@@ -706,11 +705,11 @@ fn addWasiUpdateStep(b: *std.Build, version: [:0]const u8) !void {
706 //705 //
707 // * We lose a small amount of performance. This is essentially irrelevant for zig1.706 // * We lose a small amount of performance. This is essentially irrelevant for zig1.
708 //707 //
709 // * We lose the ability to perform trivial renames on certain `std.builtin` types without708 // * We lose the ability to perform trivial renames on certain `std.lang` types without
710 // zig1.wasm updates. For instance, we cannot rename an enum from PascalCase fields to709 // zig1.wasm updates. For instance, we cannot rename an enum from PascalCase fields to
711 // snake_case fields without an update.710 // snake_case fields without an update.
712 //711 //
713 // * We gain the ability to add and remove fields to and from `std.builtin` types without712 // * We gain the ability to add and remove fields to and from `std.lang` types without
714 // zig1.wasm updates. For instance, we can add a new tag to `CallingConvention` without713 // zig1.wasm updates. For instance, we can add a new tag to `CallingConvention` without
715 // an update.714 // an update.
716 //715 //
...@@ -740,7 +739,7 @@ fn addWasiUpdateStep(b: *std.Build, version: [:0]const u8) !void {...@@ -740,7 +739,7 @@ fn addWasiUpdateStep(b: *std.Build, version: [:0]const u8) !void {
740}739}
741740
742const AddCompilerModOptions = struct {741const AddCompilerModOptions = struct {
743 optimize: std.builtin.OptimizeMode,742 optimize: std.lang.OptimizeMode,
744 target: std.Build.ResolvedTarget,743 target: std.Build.ResolvedTarget,
745 strip: ?bool = null,744 strip: ?bool = null,
746 valgrind: ?bool = null,745 valgrind: ?bool = null,
...@@ -1029,7 +1028,7 @@ fn addCMakeLibraryList(mod: *std.Build.Module, list: []const u8) void {...@@ -1029,7 +1028,7 @@ fn addCMakeLibraryList(mod: *std.Build.Module, list: []const u8) void {
1029}1028}
10301029
1031const CMakeConfig = struct {1030const CMakeConfig = struct {
1032 llvm_linkage: std.builtin.LinkMode,1031 llvm_linkage: std.lang.LinkMode,
1033 cmake_binary_dir: []const u8,1032 cmake_binary_dir: []const u8,
1034 cmake_prefix_path: []const u8,1033 cmake_prefix_path: []const u8,
1035 cmake_static_library_prefix: []const u8,1034 cmake_static_library_prefix: []const u8,
doc/langref.html.in+34-34
...@@ -3771,7 +3771,7 @@ void do_a_thing(struct Foo *foo) {...@@ -3771,7 +3771,7 @@ void do_a_thing(struct Foo *foo) {
3771 <tr>3771 <tr>
3772 <th scope="row">{#syntax#}@Int(x, y){#endsyntax#}</th>3772 <th scope="row">{#syntax#}@Int(x, y){#endsyntax#}</th>
3773 <td>-</td>3773 <td>-</td>
3774 <td>{#syntax#}x{#endsyntax#} is a {#syntax#}std.builtin.Signedness{#endsyntax#}, {#syntax#}y{#endsyntax#} is a {#syntax#}u16{#endsyntax#}</td>3774 <td>{#syntax#}x{#endsyntax#} is a {#syntax#}std.lang.Signedness{#endsyntax#}, {#syntax#}y{#endsyntax#} is a {#syntax#}u16{#endsyntax#}</td>
3775 </tr>3775 </tr>
3776 <tr>3776 <tr>
3777 <th scope="row">{#syntax#}@typeInfo(x){#endsyntax#}</th>3777 <th scope="row">{#syntax#}@typeInfo(x){#endsyntax#}</th>
...@@ -4381,7 +4381,7 @@ comptime {...@@ -4381,7 +4381,7 @@ comptime {
4381 {#syntax#}T{#endsyntax#} must be a pointer, a {#syntax#}bool{#endsyntax#}, a float,4381 {#syntax#}T{#endsyntax#} must be a pointer, a {#syntax#}bool{#endsyntax#}, a float,
4382 an integer, an enum, or a packed struct.4382 an integer, an enum, or a packed struct.
4383 </p>4383 </p>
4384 <p>{#syntax#}AtomicOrder{#endsyntax#} can be found with {#syntax#}@import("std").builtin.AtomicOrder{#endsyntax#}.</p>4384 <p>{#syntax#}AtomicOrder{#endsyntax#} can be found with {#syntax#}@import("std").lang.AtomicOrder{#endsyntax#}.</p>
4385 {#see_also|@atomicStore|@atomicRmw||@cmpxchgWeak|@cmpxchgStrong#}4385 {#see_also|@atomicStore|@atomicRmw||@cmpxchgWeak|@cmpxchgStrong#}
4386 {#header_close#}4386 {#header_close#}
43874387
...@@ -4395,8 +4395,8 @@ comptime {...@@ -4395,8 +4395,8 @@ comptime {
4395 {#syntax#}T{#endsyntax#} must be a pointer, a {#syntax#}bool{#endsyntax#}, a float,4395 {#syntax#}T{#endsyntax#} must be a pointer, a {#syntax#}bool{#endsyntax#}, a float,
4396 an integer, an enum, or a packed struct.4396 an integer, an enum, or a packed struct.
4397 </p>4397 </p>
4398 <p>{#syntax#}AtomicOrder{#endsyntax#} can be found with {#syntax#}@import("std").builtin.AtomicOrder{#endsyntax#}.</p>4398 <p>{#syntax#}AtomicOrder{#endsyntax#} can be found with {#syntax#}@import("std").lang.AtomicOrder{#endsyntax#}.</p>
4399 <p>{#syntax#}AtomicRmwOp{#endsyntax#} can be found with {#syntax#}@import("std").builtin.AtomicRmwOp{#endsyntax#}.</p>4399 <p>{#syntax#}AtomicRmwOp{#endsyntax#} can be found with {#syntax#}@import("std").lang.AtomicRmwOp{#endsyntax#}.</p>
4400 {#see_also|@atomicStore|@atomicLoad|@cmpxchgWeak|@cmpxchgStrong#}4400 {#see_also|@atomicStore|@atomicLoad|@cmpxchgWeak|@cmpxchgStrong#}
4401 {#header_close#}4401 {#header_close#}
44024402
...@@ -4409,7 +4409,7 @@ comptime {...@@ -4409,7 +4409,7 @@ comptime {
4409 {#syntax#}T{#endsyntax#} must be a pointer, a {#syntax#}bool{#endsyntax#}, a float,4409 {#syntax#}T{#endsyntax#} must be a pointer, a {#syntax#}bool{#endsyntax#}, a float,
4410 an integer, an enum, or a packed struct.4410 an integer, an enum, or a packed struct.
4411 </p>4411 </p>
4412 <p>{#syntax#}AtomicOrder{#endsyntax#} can be found with {#syntax#}@import("std").builtin.AtomicOrder{#endsyntax#}.</p>4412 <p>{#syntax#}AtomicOrder{#endsyntax#} can be found with {#syntax#}@import("std").lang.AtomicOrder{#endsyntax#}.</p>
4413 {#see_also|@atomicLoad|@atomicRmw|@cmpxchgWeak|@cmpxchgStrong#}4413 {#see_also|@atomicLoad|@atomicRmw|@cmpxchgWeak|@cmpxchgStrong#}
4414 {#header_close#}4414 {#header_close#}
44154415
...@@ -4467,7 +4467,7 @@ comptime {...@@ -4467,7 +4467,7 @@ comptime {
4467 {#header_open|@branchHint#}4467 {#header_open|@branchHint#}
4468 <pre>{#syntax#}@branchHint(hint: BranchHint) void{#endsyntax#}</pre>4468 <pre>{#syntax#}@branchHint(hint: BranchHint) void{#endsyntax#}</pre>
4469 <p>Hints to the optimizer how likely a given branch of control flow is to be reached.</p>4469 <p>Hints to the optimizer how likely a given branch of control flow is to be reached.</p>
4470 <p>{#syntax#}BranchHint{#endsyntax#} can be found with {#syntax#}@import("std").builtin.BranchHint{#endsyntax#}.</p>4470 <p>{#syntax#}BranchHint{#endsyntax#} can be found with {#syntax#}@import("std").lang.BranchHint{#endsyntax#}.</p>
4471 <p>This function is only valid as the first statement in a control flow branch, or the first statement in a function.</p>4471 <p>This function is only valid as the first statement in a control flow branch, or the first statement in a function.</p>
4472 {#header_close#}4472 {#header_close#}
44734473
...@@ -4534,7 +4534,7 @@ comptime {...@@ -4534,7 +4534,7 @@ comptime {
4534 {#header_close#}4534 {#header_close#}
45354535
4536 {#header_open|@call#}4536 {#header_open|@call#}
4537 <pre>{#syntax#}@call(modifier: std.builtin.CallModifier, function: anytype, args: anytype) anytype{#endsyntax#}</pre>4537 <pre>{#syntax#}@call(modifier: std.lang.CallModifier, function: anytype, args: anytype) anytype{#endsyntax#}</pre>
4538 <p>4538 <p>
4539 Calls a function, in the same way that invoking an expression with parentheses does:4539 Calls a function, in the same way that invoking an expression with parentheses does:
4540 </p>4540 </p>
...@@ -4544,7 +4544,7 @@ comptime {...@@ -4544,7 +4544,7 @@ comptime {
4544 {#syntax#}@call{#endsyntax#} allows more flexibility than normal function call syntax does. The4544 {#syntax#}@call{#endsyntax#} allows more flexibility than normal function call syntax does. The
4545 {#syntax#}CallModifier{#endsyntax#} enum is reproduced here:4545 {#syntax#}CallModifier{#endsyntax#} enum is reproduced here:
4546 </p>4546 </p>
4547 {#code|builtin.CallModifier struct.zig#}4547 {#code|lang.CallModifier struct.zig#}
45484548
4549 {#header_close#}4549 {#header_close#}
45504550
...@@ -4584,7 +4584,7 @@ comptime {...@@ -4584,7 +4584,7 @@ comptime {
4584 an integer, an enum, or a packed struct.4584 an integer, an enum, or a packed struct.
4585 </p>4585 </p>
4586 <p>{#syntax#}@typeInfo(@TypeOf(ptr)).pointer.alignment{#endsyntax#} must be {#syntax#}>= @sizeOf(T).{#endsyntax#}</p>4586 <p>{#syntax#}@typeInfo(@TypeOf(ptr)).pointer.alignment{#endsyntax#} must be {#syntax#}>= @sizeOf(T).{#endsyntax#}</p>
4587 <p>{#syntax#}AtomicOrder{#endsyntax#} can be found with {#syntax#}@import("std").builtin.AtomicOrder{#endsyntax#}.</p>4587 <p>{#syntax#}AtomicOrder{#endsyntax#} can be found with {#syntax#}@import("std").lang.AtomicOrder{#endsyntax#}.</p>
4588 {#see_also|@atomicStore|@atomicLoad|@atomicRmw|@cmpxchgWeak#}4588 {#see_also|@atomicStore|@atomicLoad|@atomicRmw|@cmpxchgWeak#}
4589 {#header_close#}4589 {#header_close#}
45904590
...@@ -4616,7 +4616,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val...@@ -4616,7 +4616,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
4616 an integer, an enum, or a packed struct.4616 an integer, an enum, or a packed struct.
4617 </p>4617 </p>
4618 <p>{#syntax#}@typeInfo(@TypeOf(ptr)).pointer.alignment{#endsyntax#} must be {#syntax#}>= @sizeOf(T).{#endsyntax#}</p>4618 <p>{#syntax#}@typeInfo(@TypeOf(ptr)).pointer.alignment{#endsyntax#} must be {#syntax#}>= @sizeOf(T).{#endsyntax#}</p>
4619 <p>{#syntax#}AtomicOrder{#endsyntax#} can be found with {#syntax#}@import("std").builtin.AtomicOrder{#endsyntax#}.</p>4619 <p>{#syntax#}AtomicOrder{#endsyntax#} can be found with {#syntax#}@import("std").lang.AtomicOrder{#endsyntax#}.</p>
4620 {#see_also|@atomicStore|@atomicLoad|@atomicRmw|@cmpxchgStrong#}4620 {#see_also|@atomicStore|@atomicLoad|@atomicRmw|@cmpxchgStrong#}
4621 {#header_close#}4621 {#header_close#}
46224622
...@@ -4678,28 +4678,28 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val...@@ -4678,28 +4678,28 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
4678 {#header_close#}4678 {#header_close#}
46794679
4680 {#header_open|@cVaArg#}4680 {#header_open|@cVaArg#}
4681 <pre>{#syntax#}@cVaArg(operand: *std.builtin.VaList, comptime T: type) T{#endsyntax#}</pre>4681 <pre>{#syntax#}@cVaArg(operand: *std.lang.VaList, comptime T: type) T{#endsyntax#}</pre>
4682 <p>4682 <p>
4683 Implements the C macro {#syntax#}va_arg{#endsyntax#}.4683 Implements the C macro {#syntax#}va_arg{#endsyntax#}.
4684 </p>4684 </p>
4685 {#see_also|@cVaCopy|@cVaEnd|@cVaStart#}4685 {#see_also|@cVaCopy|@cVaEnd|@cVaStart#}
4686 {#header_close#}4686 {#header_close#}
4687 {#header_open|@cVaCopy#}4687 {#header_open|@cVaCopy#}
4688 <pre>{#syntax#}@cVaCopy(src: *std.builtin.VaList) std.builtin.VaList{#endsyntax#}</pre>4688 <pre>{#syntax#}@cVaCopy(src: *std.lang.VaList) std.lang.VaList{#endsyntax#}</pre>
4689 <p>4689 <p>
4690 Implements the C macro {#syntax#}va_copy{#endsyntax#}.4690 Implements the C macro {#syntax#}va_copy{#endsyntax#}.
4691 </p>4691 </p>
4692 {#see_also|@cVaArg|@cVaEnd|@cVaStart#}4692 {#see_also|@cVaArg|@cVaEnd|@cVaStart#}
4693 {#header_close#}4693 {#header_close#}
4694 {#header_open|@cVaEnd#}4694 {#header_open|@cVaEnd#}
4695 <pre>{#syntax#}@cVaEnd(src: *std.builtin.VaList) void{#endsyntax#}</pre>4695 <pre>{#syntax#}@cVaEnd(src: *std.lang.VaList) void{#endsyntax#}</pre>
4696 <p>4696 <p>
4697 Implements the C macro {#syntax#}va_end{#endsyntax#}.4697 Implements the C macro {#syntax#}va_end{#endsyntax#}.
4698 </p>4698 </p>
4699 {#see_also|@cVaArg|@cVaCopy|@cVaStart#}4699 {#see_also|@cVaArg|@cVaCopy|@cVaStart#}
4700 {#header_close#}4700 {#header_close#}
4701 {#header_open|@cVaStart#}4701 {#header_open|@cVaStart#}
4702 <pre>{#syntax#}@cVaStart() std.builtin.VaList{#endsyntax#}</pre>4702 <pre>{#syntax#}@cVaStart() std.lang.VaList{#endsyntax#}</pre>
4703 <p>4703 <p>
4704 Implements the C macro {#syntax#}va_start{#endsyntax#}. Only valid inside a variadic function.4704 Implements the C macro {#syntax#}va_start{#endsyntax#}. Only valid inside a variadic function.
4705 </p>4705 </p>
...@@ -4808,7 +4808,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val...@@ -4808,7 +4808,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
4808 {#header_close#}4808 {#header_close#}
48094809
4810 {#header_open|@errorReturnTrace#}4810 {#header_open|@errorReturnTrace#}
4811 <pre>{#syntax#}@errorReturnTrace() ?*builtin.StackTrace{#endsyntax#}</pre>4811 <pre>{#syntax#}@errorReturnTrace() ?*std.lang.StackTrace{#endsyntax#}</pre>
4812 <p>4812 <p>
4813 If the binary is built with error return tracing, and this function is invoked in a4813 If the binary is built with error return tracing, and this function is invoked in a
4814 function that calls a function with an error or error union return type, returns a4814 function that calls a function with an error or error union return type, returns a
...@@ -4826,7 +4826,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val...@@ -4826,7 +4826,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
4826 {#header_close#}4826 {#header_close#}
48274827
4828 {#header_open|@export#}4828 {#header_open|@export#}
4829 <pre>{#syntax#}@export(comptime ptr: *const anyopaque, comptime options: std.builtin.ExportOptions) void{#endsyntax#}</pre>4829 <pre>{#syntax#}@export(comptime ptr: *const anyopaque, comptime options: std.lang.ExportOptions) void{#endsyntax#}</pre>
4830 <p>Creates a symbol in the output object file which refers to the target of <code>ptr</code>.</p>4830 <p>Creates a symbol in the output object file which refers to the target of <code>ptr</code>.</p>
4831 <p><code>ptr</code> must point to a global variable or a comptime-known constant.</p>4831 <p><code>ptr</code> must point to a global variable or a comptime-known constant.</p>
4832 <p>4832 <p>
...@@ -4852,7 +4852,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val...@@ -4852,7 +4852,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
4852 {#header_close#}4852 {#header_close#}
48534853
4854 {#header_open|@extern#}4854 {#header_open|@extern#}
4855 <pre>{#syntax#}@extern(T: type, comptime options: std.builtin.ExternOptions) T{#endsyntax#}</pre>4855 <pre>{#syntax#}@extern(T: type, comptime options: std.lang.ExternOptions) T{#endsyntax#}</pre>
4856 <p>4856 <p>
4857 Creates a reference to an external symbol in the output object file.4857 Creates a reference to an external symbol in the output object file.
4858 T must be a pointer type.4858 T must be a pointer type.
...@@ -5173,8 +5173,8 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val...@@ -5173,8 +5173,8 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
5173 <p>5173 <p>
5174 Invokes the panic handler function. By default the panic handler function5174 Invokes the panic handler function. By default the panic handler function
5175 calls the public {#syntax#}panic{#endsyntax#} function exposed in the root source file, or5175 calls the public {#syntax#}panic{#endsyntax#} function exposed in the root source file, or
5176 if there is not one specified, the {#syntax#}std.builtin.default_panic{#endsyntax#}5176 if there is not one specified, the {#syntax#}std.lang.default_panic{#endsyntax#}
5177 function from {#syntax#}std/builtin.zig{#endsyntax#}.5177 function from {#syntax#}std/lang.zig{#endsyntax#}.
5178 </p>5178 </p>
5179 <p>Generally it is better to use {#syntax#}@import("std").debug.panic{#endsyntax#}.5179 <p>Generally it is better to use {#syntax#}@import("std").debug.panic{#endsyntax#}.
5180 However, {#syntax#}@panic{#endsyntax#} can be useful for 2 scenarios:5180 However, {#syntax#}@panic{#endsyntax#} can be useful for 2 scenarios:
...@@ -5213,7 +5213,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val...@@ -5213,7 +5213,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
5213 address to prefetch. This function does not dereference the pointer, it is perfectly legal5213 address to prefetch. This function does not dereference the pointer, it is perfectly legal
5214 to pass a pointer to invalid memory to this function and no Illegal Behavior will result.5214 to pass a pointer to invalid memory to this function and no Illegal Behavior will result.
5215 </p>5215 </p>
5216 <p>{#syntax#}PrefetchOptions{#endsyntax#} can be found with {#syntax#}@import("std").builtin.PrefetchOptions{#endsyntax#}.</p>5216 <p>{#syntax#}PrefetchOptions{#endsyntax#} can be found with {#syntax#}@import("std").lang.PrefetchOptions{#endsyntax#}.</p>
5217 {#header_close#}5217 {#header_close#}
52185218
5219 {#header_open|@ptrCast#}5219 {#header_open|@ptrCast#}
...@@ -5336,7 +5336,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val...@@ -5336,7 +5336,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
5336 The floating point mode is inherited by child scopes, and can be overridden in any scope.5336 The floating point mode is inherited by child scopes, and can be overridden in any scope.
5337 You can set the floating point mode in a struct or module scope by using a comptime block.5337 You can set the floating point mode in a struct or module scope by using a comptime block.
5338 </p>5338 </p>
5339 <p>{#syntax#}FloatMode{#endsyntax#} can be found with {#syntax#}@import("std").builtin.FloatMode{#endsyntax#}.</p>5339 <p>{#syntax#}FloatMode{#endsyntax#} can be found with {#syntax#}@import("std").lang.FloatMode{#endsyntax#}.</p>
5340 {#see_also|Floating Point Operations#}5340 {#see_also|Floating Point Operations#}
5341 {#header_close#}5341 {#header_close#}
53425342
...@@ -5472,7 +5472,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val...@@ -5472,7 +5472,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
5472 {#header_close#}5472 {#header_close#}
54735473
5474 {#header_open|@reduce#}5474 {#header_open|@reduce#}
5475 <pre>{#syntax#}@reduce(comptime op: std.builtin.ReduceOp, value: anytype) E{#endsyntax#}</pre>5475 <pre>{#syntax#}@reduce(comptime op: std.lang.ReduceOp, value: anytype) E{#endsyntax#}</pre>
5476 <p>5476 <p>
5477 Transforms a {#link|vector|Vectors#} into a scalar value (of type <code>E</code>)5477 Transforms a {#link|vector|Vectors#} into a scalar value (of type <code>E</code>)
5478 by performing a sequential horizontal reduction of its elements using the5478 by performing a sequential horizontal reduction of its elements using the
...@@ -5502,7 +5502,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val...@@ -5502,7 +5502,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
5502 {#header_close#}5502 {#header_close#}
55035503
5504 {#header_open|@src#}5504 {#header_open|@src#}
5505 <pre>{#syntax#}@src() std.builtin.SourceLocation{#endsyntax#}</pre>5505 <pre>{#syntax#}@src() std.lang.SourceLocation{#endsyntax#}</pre>
5506 <p>5506 <p>
5507 Returns a {#syntax#}SourceLocation{#endsyntax#} struct representing the function's name and location in the source code. This must be called in a function.5507 Returns a {#syntax#}SourceLocation{#endsyntax#} struct representing the function's name and location in the source code. This must be called in a function.
5508 </p>5508 </p>
...@@ -5729,7 +5729,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val...@@ -5729,7 +5729,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
5729 {#header_close#}5729 {#header_close#}
57305730
5731 {#header_open|@Int#}5731 {#header_open|@Int#}
5732 <pre>{#syntax#}@Int(comptime signedness: std.builtin.Signedness, comptime bits: u16) type{#endsyntax#}</pre>5732 <pre>{#syntax#}@Int(comptime signedness: std.lang.Signedness, comptime bits: u16) type{#endsyntax#}</pre>
5733 <p>Returns an integer type with the given signedness and bit width.</p>5733 <p>Returns an integer type with the given signedness and bit width.</p>
5734 <p>For instance, {#syntax#}@Int(.unsigned, 18){#endsyntax#} returns the type {#syntax#}u18{#endsyntax#}.</p>5734 <p>For instance, {#syntax#}@Int(.unsigned, 18){#endsyntax#} returns the type {#syntax#}u18{#endsyntax#}.</p>
5735 {#header_close#}5735 {#header_close#}
...@@ -5741,8 +5741,8 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val...@@ -5741,8 +5741,8 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
57415741
5742 {#header_open|@Pointer#}5742 {#header_open|@Pointer#}
5743 <pre>{#syntax#}@Pointer(5743 <pre>{#syntax#}@Pointer(
5744 comptime size: std.builtin.Type.Pointer.Size,5744 comptime size: std.lang.Type.Pointer.Size,
5745 comptime attrs: std.builtin.Type.Pointer.Attributes,5745 comptime attrs: std.lang.Type.Pointer.Attributes,
5746 comptime Element: type,5746 comptime Element: type,
5747 comptime sentinel: ?Element,5747 comptime sentinel: ?Element,
5748) type{#endsyntax#}</pre>5748) type{#endsyntax#}</pre>
...@@ -5752,32 +5752,32 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val...@@ -5752,32 +5752,32 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
5752 {#header_open|@Fn#}5752 {#header_open|@Fn#}
5753 <pre>{#syntax#}@Fn(5753 <pre>{#syntax#}@Fn(
5754 comptime param_types: []const type,5754 comptime param_types: []const type,
5755 comptime param_attrs: *const [param_types.len]std.builtin.Type.Fn.Param.Attributes,5755 comptime param_attrs: *const [param_types.len]std.lang.Type.Fn.Param.Attributes,
5756 comptime ReturnType: type,5756 comptime ReturnType: type,
5757 comptime attrs: std.builtin.Type.Fn.Attributes,5757 comptime attrs: std.lang.Type.Fn.Attributes,
5758) type{#endsyntax#}</pre>5758) type{#endsyntax#}</pre>
5759 <p>Returns a {#link|function|Functions#} type with the properties specified by the arguments.</p>5759 <p>Returns a {#link|function|Functions#} type with the properties specified by the arguments.</p>
5760 {#header_close#}5760 {#header_close#}
57615761
5762 {#header_open|@Struct#}5762 {#header_open|@Struct#}
5763 <pre>{#syntax#}@Struct(5763 <pre>{#syntax#}@Struct(
5764 comptime layout: std.builtin.Type.ContainerLayout,5764 comptime layout: std.lang.Type.ContainerLayout,
5765 comptime BackingInt: ?type,5765 comptime BackingInt: ?type,
5766 comptime field_names: []const []const u8,5766 comptime field_names: []const []const u8,
5767 comptime field_types: *const [field_names.len]type,5767 comptime field_types: *const [field_names.len]type,
5768 comptime field_attrs: *const [field_names.len]std.builtin.Type.StructField.Attributes,5768 comptime field_attrs: *const [field_names.len]std.lang.Type.StructField.Attributes,
5769) type{#endsyntax#}</pre>5769) type{#endsyntax#}</pre>
5770 <p>Returns a {#link|struct#} type with the properties specified by the arguments.</p>5770 <p>Returns a {#link|struct#} type with the properties specified by the arguments.</p>
5771 {#header_close#}5771 {#header_close#}
57725772
5773 {#header_open|@Union#}5773 {#header_open|@Union#}
5774 <pre>{#syntax#}@Union(5774 <pre>{#syntax#}@Union(
5775 comptime layout: std.builtin.Type.ContainerLayout,5775 comptime layout: std.lang.Type.ContainerLayout,
5776 /// Either the integer tag type, or the integer backing type, depending on `layout`.5776 /// Either the integer tag type, or the integer backing type, depending on `layout`.
5777 comptime ArgType: ?type,5777 comptime ArgType: ?type,
5778 comptime field_names: []const []const u8,5778 comptime field_names: []const []const u8,
5779 comptime field_types: *const [field_names.len]type,5779 comptime field_types: *const [field_names.len]type,
5780 comptime field_attrs: *const [field_names.len]std.builtin.Type.UnionField.Attributes,5780 comptime field_attrs: *const [field_names.len]std.lang.Type.UnionField.Attributes,
5781) type{#endsyntax#}</pre>5781) type{#endsyntax#}</pre>
5782 <p>Returns a {#link|union#} type with the properties specified by the arguments.</p>5782 <p>Returns a {#link|union#} type with the properties specified by the arguments.</p>
5783 {#header_close#}5783 {#header_close#}
...@@ -5785,7 +5785,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val...@@ -5785,7 +5785,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
5785 {#header_open|@Enum#}5785 {#header_open|@Enum#}
5786 <pre>{#syntax#}@Enum(5786 <pre>{#syntax#}@Enum(
5787 comptime TagInt: type,5787 comptime TagInt: type,
5788 comptime mode: std.builtin.Type.Enum.Mode,5788 comptime mode: std.lang.Type.Enum.Mode,
5789 comptime field_names: []const []const u8,5789 comptime field_names: []const []const u8,
5790 comptime field_values: *const [field_names.len]TagInt,5790 comptime field_values: *const [field_names.len]TagInt,
5791) type{#endsyntax#}</pre>5791) type{#endsyntax#}</pre>
...@@ -5793,7 +5793,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val...@@ -5793,7 +5793,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
5793 {#header_close#}5793 {#header_close#}
57945794
5795 {#header_open|@typeInfo#}5795 {#header_open|@typeInfo#}
5796 <pre>{#syntax#}@typeInfo(comptime T: type) std.builtin.Type{#endsyntax#}</pre>5796 <pre>{#syntax#}@typeInfo(comptime T: type) std.lang.Type{#endsyntax#}</pre>
5797 <p>5797 <p>
5798 Provides type reflection.5798 Provides type reflection.
5799 </p>5799 </p>
doc/langref/builtin.CallModifier struct.zig deleted-32
...@@ -1,32 +0,0 @@
1pub const CallModifier = enum {
2 /// Equivalent to function call syntax.
3 auto,
4
5 /// Prevents tail call optimization. This guarantees that the return
6 /// address will point to the callsite, as opposed to the callsite's
7 /// callsite. If the call is otherwise required to be tail-called
8 /// or inlined, a compile error is emitted instead.
9 never_tail,
10
11 /// Guarantees that the call will not be inlined. If the call is
12 /// otherwise required to be inlined, a compile error is emitted instead.
13 never_inline,
14
15 /// Asserts that the function call will not suspend. This allows a
16 /// non-async function to call an async function.
17 no_suspend,
18
19 /// Guarantees that the call will be generated with tail call optimization.
20 /// If this is not possible, a compile error is emitted instead.
21 always_tail,
22
23 /// Guarantees that the call will be inlined at the callsite.
24 /// If this is not possible, a compile error is emitted instead.
25 always_inline,
26
27 /// Evaluates the call at compile-time. If the call cannot be completed at
28 /// compile-time, a compile error is emitted instead.
29 compile_time,
30};
31
32// syntax
doc/langref/lang.CallModifier struct.zig created+32
...@@ -0,0 +1,32 @@
1pub const CallModifier = enum {
2 /// Equivalent to function call syntax.
3 auto,
4
5 /// Prevents tail call optimization. This guarantees that the return
6 /// address will point to the callsite, as opposed to the callsite's
7 /// callsite. If the call is otherwise required to be tail-called
8 /// or inlined, a compile error is emitted instead.
9 never_tail,
10
11 /// Guarantees that the call will not be inlined. If the call is
12 /// otherwise required to be inlined, a compile error is emitted instead.
13 never_inline,
14
15 /// Asserts that the function call will not suspend. This allows a
16 /// non-async function to call an async function.
17 no_suspend,
18
19 /// Guarantees that the call will be generated with tail call optimization.
20 /// If this is not possible, a compile error is emitted instead.
21 always_tail,
22
23 /// Guarantees that the call will be inlined at the callsite.
24 /// If this is not possible, a compile error is emitted instead.
25 always_inline,
26
27 /// Evaluates the call at compile-time. If the call cannot be completed at
28 /// compile-time, a compile error is emitted instead.
29 compile_time,
30};
31
32// syntax
doc/langref/test_noreturn_from_exit.zig+1-4
...@@ -1,10 +1,7 @@...@@ -1,10 +1,7 @@
1const std = @import("std");1const std = @import("std");
2const builtin = @import("builtin");
3const native_arch = builtin.cpu.arch;
4const expectEqual = std.testing.expectEqual;2const expectEqual = std.testing.expectEqual;
53
6const WINAPI: std.builtin.CallingConvention = if (native_arch == .x86) .{ .x86_stdcall = .{} } else .c;4extern "kernel32" fn ExitProcess(exit_code: c_uint) callconv(.winapi) noreturn;
7extern "kernel32" fn ExitProcess(exit_code: c_uint) callconv(WINAPI) noreturn;
85
9test "foo" {6test "foo" {
10 const value = bar() catch ExitProcess(1);7 const value = bar() catch ExitProcess(1);
lib/std/builtin.zig deleted-1254
...@@ -1,1254 +0,0 @@
1//! Types and values provided by the Zig language.
2
3const builtin = @import("builtin");
4const std = @import("std.zig");
5const root = @import("root");
6
7pub const assembly = @import("builtin/assembly.zig");
8
9/// This data structure is used by the Zig language code generation and
10/// therefore must be kept in sync with the compiler implementation.
11pub const StackTrace = struct {
12 index: usize,
13 instruction_addresses: []usize,
14};
15
16/// This data structure is used by the Zig language code generation and
17/// therefore must be kept in sync with the compiler implementation.
18pub const GlobalLinkage = enum(u2) {
19 internal,
20 strong,
21 weak,
22 link_once,
23};
24
25/// This data structure is used by the Zig language code generation and
26/// therefore must be kept in sync with the compiler implementation.
27pub const SymbolVisibility = enum(u2) {
28 default,
29 hidden,
30 protected,
31};
32
33/// This data structure is used by the Zig language code generation and
34/// therefore must be kept in sync with the compiler implementation.
35pub const AtomicOrder = enum {
36 unordered,
37 monotonic,
38 acquire,
39 release,
40 acq_rel,
41 seq_cst,
42};
43
44/// This data structure is used by the Zig language code generation and
45/// therefore must be kept in sync with the compiler implementation.
46pub const ReduceOp = enum {
47 And,
48 Or,
49 Xor,
50 Min,
51 Max,
52 Add,
53 Mul,
54};
55
56/// This data structure is used by the Zig language code generation and
57/// therefore must be kept in sync with the compiler implementation.
58pub const AtomicRmwOp = enum {
59 /// Exchange - store the operand unmodified.
60 /// Supports enums, integers, and floats.
61 Xchg,
62 /// Add operand to existing value.
63 /// Supports integers and floats.
64 /// For integers, two's complement wraparound applies.
65 Add,
66 /// Subtract operand from existing value.
67 /// Supports integers and floats.
68 /// For integers, two's complement wraparound applies.
69 Sub,
70 /// Perform bitwise AND on existing value with operand.
71 /// Supports integers.
72 And,
73 /// Perform bitwise NAND on existing value with operand.
74 /// Supports integers.
75 Nand,
76 /// Perform bitwise OR on existing value with operand.
77 /// Supports integers.
78 Or,
79 /// Perform bitwise XOR on existing value with operand.
80 /// Supports integers.
81 Xor,
82 /// Store operand if it is larger than the existing value.
83 /// Supports integers and floats.
84 Max,
85 /// Store operand if it is smaller than the existing value.
86 /// Supports integers and floats.
87 Min,
88};
89
90/// The code model puts constraints on the location of symbols and the size of code and data.
91/// The selection of a code model is a trade off on speed and restrictions that needs to be selected on a per application basis to meet its requirements.
92/// A slightly more detailed explanation can be found in (for example) the [System V Application Binary Interface (x86_64)](https://github.com/hjl-tools/x86-psABI/wiki/x86-64-psABI-1.0.pdf) 3.5.1.
93///
94/// This data structure is used by the Zig language code generation and
95/// therefore must be kept in sync with the compiler implementation.
96pub const CodeModel = enum {
97 default,
98 extreme,
99 kernel,
100 large,
101 medany,
102 medium,
103 medlow,
104 medmid,
105 normal,
106 small,
107 tiny,
108};
109
110/// This data structure is used by the Zig language code generation and
111/// therefore must be kept in sync with the compiler implementation.
112pub const OptimizeMode = enum {
113 Debug,
114 ReleaseSafe,
115 ReleaseFast,
116 ReleaseSmall,
117};
118
119/// The calling convention of a function defines how arguments and return values are passed, as well
120/// as any other requirements which callers and callees must respect, such as register preservation
121/// and stack alignment.
122///
123/// This data structure is used by the Zig language code generation and
124/// therefore must be kept in sync with the compiler implementation.
125pub const CallingConvention = union(enum(u8)) {
126 pub const Tag = @typeInfo(CallingConvention).@"union".tag_type.?;
127
128 /// This is an alias for the default C calling convention for this target.
129 /// Functions marked as `extern` or `export` are given this calling convention by default.
130 pub const c = builtin.target.cCallingConvention().?;
131
132 pub const winapi: CallingConvention = switch (builtin.target.cpu.arch) {
133 .x86_64 => .{ .x86_64_win = .{} },
134 .x86 => .{ .x86_stdcall = .{} },
135 .aarch64 => .{ .aarch64_aapcs_win = .{} },
136 .thumb => .{ .arm_aapcs_vfp = .{} },
137 else => unreachable,
138 };
139
140 pub const kernel: CallingConvention = switch (builtin.target.cpu.arch) {
141 .amdgcn => .amdgcn_kernel,
142 .nvptx, .nvptx64 => .nvptx_kernel,
143 .spirv32, .spirv64 => .spirv_kernel,
144 else => unreachable,
145 };
146
147 /// The default Zig calling convention when neither `export` nor `inline` is specified.
148 /// This calling convention makes no guarantees about stack alignment, registers, etc.
149 /// It can only be used within this Zig compilation unit.
150 auto,
151
152 /// The calling convention of a function that can be called with `async` syntax. An `async` call
153 /// of a runtime-known function must target a function with this calling convention.
154 /// Comptime-known functions with other calling conventions may be coerced to this one.
155 async,
156
157 /// Functions with this calling convention have no prologue or epilogue, making the function
158 /// uncallable in regular Zig code. This can be useful when integrating with assembly.
159 naked,
160
161 /// This calling convention is exactly equivalent to using the `inline` keyword on a function
162 /// definition. This function will be semantically inlined by the Zig compiler at call sites.
163 /// Pointers to inline functions are comptime-only.
164 @"inline",
165
166 // Calling conventions for the `x86_64` architecture.
167 x86_64_sysv: CommonOptions,
168 x86_64_x32: CommonOptions,
169 x86_64_win: CommonOptions,
170 x86_64_regcall_v3_sysv: CommonOptions,
171 x86_64_regcall_v4_win: CommonOptions,
172 x86_64_vectorcall: CommonOptions,
173 x86_64_interrupt: CommonOptions,
174
175 // Calling conventions for the `x86` architecture.
176 x86_sysv: X86RegparmOptions,
177 x86_win: X86RegparmOptions,
178 x86_stdcall: X86RegparmOptions,
179 x86_fastcall: CommonOptions,
180 x86_thiscall: CommonOptions,
181 x86_thiscall_mingw: CommonOptions,
182 x86_regcall_v3: CommonOptions,
183 x86_regcall_v4_win: CommonOptions,
184 x86_vectorcall: CommonOptions,
185 x86_interrupt: CommonOptions,
186
187 // Calling conventions for the `x86_16` architecture.
188
189 x86_16_cdecl: CommonOptions,
190 x86_16_stdcall: CommonOptions,
191 x86_16_regparmcall: CommonOptions,
192 x86_16_interrupt: CommonOptions,
193
194 // Calling conventions for the `aarch64` and `aarch64_be` architectures.
195 aarch64_aapcs: CommonOptions,
196 aarch64_aapcs_darwin: CommonOptions,
197 aarch64_aapcs_win: CommonOptions,
198 aarch64_vfabi: CommonOptions,
199 aarch64_vfabi_sve: CommonOptions,
200
201 /// The standard `alpha` calling convention.
202 alpha_osf: CommonOptions,
203
204 // Calling convetions for the `arm`, `armeb`, `thumb`, and `thumbeb` architectures.
205 /// ARM Architecture Procedure Call Standard
206 arm_aapcs: CommonOptions,
207 /// ARM Architecture Procedure Call Standard Vector Floating-Point
208 arm_aapcs_vfp: CommonOptions,
209 arm_interrupt: ArmInterruptOptions,
210
211 // Calling conventions for the `mips64` and `mips64el` architectures.
212 mips64_n64: CommonOptions,
213 mips64_n32: CommonOptions,
214 mips64_interrupt: MipsInterruptOptions,
215
216 // Calling conventions for the `mips` and `mipsel` architectures.
217 mips_o32: CommonOptions,
218 mips_interrupt: MipsInterruptOptions,
219
220 // Calling conventions for the `riscv64` architecture.
221 riscv64_lp64: CommonOptions,
222 riscv64_lp64_v: CommonOptions,
223 riscv64_interrupt: RiscvInterruptOptions,
224
225 // Calling conventions for the `riscv32` architecture.
226 riscv32_ilp32: CommonOptions,
227 riscv32_ilp32_v: CommonOptions,
228 riscv32_interrupt: RiscvInterruptOptions,
229
230 // Calling conventions for the `sparc64` architecture.
231 sparc64_sysv: CommonOptions,
232
233 // Calling conventions for the `sparc` architecture.
234 sparc_sysv: CommonOptions,
235
236 // Calling conventions for the `powerpc64` and `powerpc64le` architectures.
237 powerpc64_elf: CommonOptions,
238 powerpc64_elf_altivec: CommonOptions,
239 powerpc64_elf_v2: CommonOptions,
240
241 // Calling conventions for the `powerpc` and `powerpcle` architectures.
242 powerpc_sysv: CommonOptions,
243 powerpc_sysv_altivec: CommonOptions,
244 powerpc_aix: CommonOptions,
245 powerpc_aix_altivec: CommonOptions,
246
247 /// The standard `wasm32` and `wasm64` calling convention, as specified in the WebAssembly Tool Conventions.
248 wasm_mvp: CommonOptions,
249
250 /// The standard `arc`/`arceb` calling convention.
251 arc_sysv: CommonOptions,
252 arc_interrupt: ArcInterruptOptions,
253
254 // Calling conventions for the `avr` architecture.
255 avr_gnu,
256 avr_builtin,
257 avr_signal,
258 avr_interrupt,
259
260 /// The standard `bpfel`/`bpfeb` calling convention.
261 bpf_std: CommonOptions,
262
263 // Calling conventions for the `csky` architecture.
264 csky_sysv: CommonOptions,
265 csky_interrupt: CommonOptions,
266
267 // Calling conventions for the `hexagon` architecture.
268 hexagon_sysv: CommonOptions,
269 hexagon_sysv_hvx: CommonOptions,
270
271 /// The standard `hppa` calling convention.
272 hppa_elf: CommonOptions,
273
274 /// The standard `hppa64` calling convention.
275 hppa64_elf: CommonOptions,
276
277 kvx_lp64: CommonOptions,
278 kvx_ilp32: CommonOptions,
279
280 /// The standard `lanai` calling convention.
281 lanai_sysv: CommonOptions,
282
283 /// The standard `loongarch64` calling convention.
284 loongarch64_lp64: CommonOptions,
285
286 /// The standard `loongarch32` calling convention.
287 loongarch32_ilp32: CommonOptions,
288
289 // Calling conventions for the `m68k` architecture.
290 m68k_sysv: CommonOptions,
291 m68k_gnu: CommonOptions,
292 m68k_rtd: CommonOptions,
293 m68k_interrupt: CommonOptions,
294
295 /// The standard `microblaze`/`microblazeel` calling convention.
296 microblaze_std: CommonOptions,
297 microblaze_interrupt: MicroblazeInterruptOptions,
298
299 /// The standard `msp430` calling convention.
300 msp430_eabi: CommonOptions,
301 msp430_interrupt: CommonOptions,
302
303 /// The standard `or1k` calling convention.
304 or1k_sysv: CommonOptions,
305
306 /// The standard `propeller` calling convention.
307 propeller_sysv: CommonOptions,
308
309 // Calling conventions for the `s390x` architecture.
310 s390x_sysv: CommonOptions,
311 s390x_sysv_vx: CommonOptions,
312
313 // Calling conventions for the `sh`/`sheb` architecture.
314 sh_gnu: CommonOptions,
315 sh_renesas: CommonOptions,
316 sh_interrupt: ShInterruptOptions,
317
318 /// The standard `ve` calling convention.
319 ve_sysv: CommonOptions,
320
321 // Calling conventions for the `xcore` architecture.
322 xcore_xs1: CommonOptions,
323 xcore_xs2: CommonOptions,
324
325 // Calling conventions for the `xtensa`/`xtensaeb` architecture.
326 xtensa_call0: CommonOptions,
327 xtensa_windowed: CommonOptions,
328
329 // Calling conventions for the `amdgcn` architecture.
330 amdgcn_device: CommonOptions,
331 amdgcn_kernel,
332 amdgcn_cs: CommonOptions,
333
334 // Calling conventions for the `nvptx` and `nvptx64` architectures.
335 nvptx_device,
336 nvptx_kernel,
337
338 // Calling conventions for kernels and shaders on the `spirv`, `spirv32`, and `spirv64` architectures.
339 spirv_device,
340 spirv_kernel,
341 spirv_fragment,
342 spirv_vertex,
343
344 // Calling conventions for the `ez80` architecture.
345 ez80_cet,
346 ez80_tiflags,
347
348 /// Options shared across most calling conventions.
349 pub const CommonOptions = struct {
350 /// The boundary the stack is aligned to when the function is called.
351 /// `null` means the default for this calling convention.
352 incoming_stack_alignment: ?u64 = null,
353 };
354
355 /// Options for x86 calling conventions which support the regparm attribute to pass some
356 /// arguments in registers.
357 pub const X86RegparmOptions = struct {
358 /// The boundary the stack is aligned to when the function is called.
359 /// `null` means the default for this calling convention.
360 incoming_stack_alignment: ?u64 = null,
361 /// The number of arguments to pass in registers before passing the remaining arguments
362 /// according to the calling convention.
363 /// Equivalent to `__attribute__((regparm(x)))` in Clang and GCC.
364 register_params: u2 = 0,
365 };
366
367 /// Options for the `arc_interrupt` calling convention.
368 pub const ArcInterruptOptions = struct {
369 /// The boundary the stack is aligned to when the function is called.
370 /// `null` means the default for this calling convention.
371 incoming_stack_alignment: ?u64 = null,
372 /// The kind of interrupt being received.
373 type: InterruptType,
374
375 pub const InterruptType = enum(u2) {
376 ilink1,
377 ilink2,
378 ilink,
379 firq,
380 };
381 };
382
383 /// Options for the `arm_interrupt` calling convention.
384 pub const ArmInterruptOptions = struct {
385 /// The boundary the stack is aligned to when the function is called.
386 /// `null` means the default for this calling convention.
387 incoming_stack_alignment: ?u64 = null,
388 /// The kind of interrupt being received.
389 type: InterruptType = .generic,
390
391 pub const InterruptType = enum(u3) {
392 generic,
393 irq,
394 fiq,
395 swi,
396 abort,
397 undef,
398 };
399 };
400
401 /// Options for the `microblaze_interrupt` calling convention.
402 pub const MicroblazeInterruptOptions = struct {
403 /// The boundary the stack is aligned to when the function is called.
404 /// `null` means the default for this calling convention.
405 incoming_stack_alignment: ?u64 = null,
406 type: InterruptType = .regular,
407
408 pub const InterruptType = enum(u2) {
409 /// User exception; return with `rtsd`.
410 user,
411 /// Regular interrupt; return with `rtid`.
412 regular,
413 /// Fast interrupt; return with `rtid`.
414 fast,
415 /// Software breakpoint; return with `rtbd`.
416 breakpoint,
417 };
418 };
419
420 /// Options for the `mips_interrupt` and `mips64_interrupt` calling conventions.
421 pub const MipsInterruptOptions = struct {
422 /// The boundary the stack is aligned to when the function is called.
423 /// `null` means the default for this calling convention.
424 incoming_stack_alignment: ?u64 = null,
425 /// The interrupt mode.
426 mode: InterruptMode = .eic,
427
428 pub const InterruptMode = enum(u4) {
429 eic,
430 sw0,
431 sw1,
432 hw0,
433 hw1,
434 hw2,
435 hw3,
436 hw4,
437 hw5,
438 };
439 };
440
441 /// Options for the `riscv32_interrupt` and `riscv64_interrupt` calling conventions.
442 pub const RiscvInterruptOptions = struct {
443 /// The boundary the stack is aligned to when the function is called.
444 /// `null` means the default for this calling convention.
445 incoming_stack_alignment: ?u64 = null,
446 /// The privilege mode.
447 mode: PrivilegeMode,
448
449 pub const PrivilegeMode = enum(u2) {
450 supervisor,
451 machine,
452 };
453 };
454
455 /// Options for the `sh_interrupt` calling convention.
456 pub const ShInterruptOptions = struct {
457 /// The boundary the stack is aligned to when the function is called.
458 /// `null` means the default for this calling convention.
459 incoming_stack_alignment: ?u64 = null,
460 save: SaveBehavior = .full,
461
462 pub const SaveBehavior = enum(u3) {
463 /// Save only fpscr (if applicable).
464 fpscr,
465 /// Save only high-numbered registers, i.e. r0 through r7 are *not* saved.
466 high,
467 /// Save all registers normally.
468 full,
469 /// Save all registers using the CPU's fast register bank.
470 bank,
471 };
472 };
473
474 /// Returns the array of `std.Target.Cpu.Arch` to which this `CallingConvention` applies.
475 /// Asserts that `cc` is not `.auto`, `.@"async"`, `.naked`, or `.@"inline"`.
476 pub fn archs(cc: CallingConvention) []const std.Target.Cpu.Arch {
477 return std.Target.Cpu.Arch.fromCallingConvention(cc);
478 }
479
480 pub fn eql(a: CallingConvention, b: CallingConvention) bool {
481 return std.meta.eql(a, b);
482 }
483
484 pub fn withStackAlign(cc: CallingConvention, incoming_stack_alignment: u64) CallingConvention {
485 const tag: CallingConvention.Tag = cc;
486 var result = cc;
487 @field(result, @tagName(tag)).incoming_stack_alignment = incoming_stack_alignment;
488 return result;
489 }
490};
491
492/// This data structure is used by the Zig language code generation and
493/// therefore must be kept in sync with the compiler implementation.
494pub const AddressSpace = enum(u5) {
495 // CPU address spaces.
496 generic,
497 gs,
498 fs,
499 ss,
500
501 // x86_16 extra address spaces.
502 /// Allows addressing the entire address space by storing both segment and offset.
503 far,
504
505 // GPU address spaces.
506 global,
507 constant,
508 param,
509 shared,
510 local,
511 input,
512 output,
513 uniform,
514 push_constant,
515 storage_buffer,
516 physical_storage_buffer,
517
518 // AVR address spaces.
519 flash,
520 flash1,
521 flash2,
522 flash3,
523 flash4,
524 flash5,
525
526 // Propeller address spaces.
527
528 /// This address space only addresses the cog-local ram.
529 cog,
530
531 /// This address space only addresses shared hub ram.
532 hub,
533
534 /// This address space only addresses the "lookup" ram
535 lut,
536};
537
538/// This data structure is used by the Zig language code generation and
539/// therefore must be kept in sync with the compiler implementation.
540pub const SourceLocation = struct {
541 /// The name chosen when compiling. Not a file path.
542 module: [:0]const u8,
543 /// Relative to the root directory of its module.
544 file: [:0]const u8,
545 fn_name: [:0]const u8,
546 line: u32,
547 column: u32,
548};
549
550pub const TypeId = std.meta.Tag(Type);
551
552/// This data structure is used by the Zig language code generation and
553/// therefore must be kept in sync with the compiler implementation.
554pub const Type = union(enum) {
555 type,
556 void,
557 bool,
558 noreturn,
559 int: Int,
560 float: Float,
561 pointer: Pointer,
562 array: Array,
563 @"struct": Struct,
564 comptime_float,
565 comptime_int,
566 undefined,
567 null,
568 optional: Optional,
569 error_union: ErrorUnion,
570 error_set: ErrorSet,
571 @"enum": Enum,
572 @"union": Union,
573 @"fn": Fn,
574 @"opaque": Opaque,
575 frame: Frame,
576 @"anyframe": AnyFrame,
577 vector: Vector,
578 enum_literal,
579
580 /// This data structure is used by the Zig language code generation and
581 /// therefore must be kept in sync with the compiler implementation.
582 pub const Int = struct {
583 signedness: Signedness,
584 bits: u16,
585 };
586
587 /// This data structure is used by the Zig language code generation and
588 /// therefore must be kept in sync with the compiler implementation.
589 pub const Float = struct {
590 bits: u16,
591 };
592
593 /// This data structure is used by the Zig language code generation and
594 /// therefore must be kept in sync with the compiler implementation.
595 pub const Pointer = struct {
596 size: Size,
597 is_const: bool,
598 is_volatile: bool,
599 /// `null` means implicit alignment, which is equivalent to `@alignOf(child)`.
600 alignment: ?usize,
601 address_space: AddressSpace,
602 child: type,
603 is_allowzero: bool,
604
605 /// The type of the sentinel is the element type of the pointer, which is
606 /// the value of the `child` field in this struct. However there is no way
607 /// to refer to that type here, so we use `*const anyopaque`.
608 /// See also: `sentinel`
609 sentinel_ptr: ?*const anyopaque,
610
611 /// Loads the pointer type's sentinel value from `sentinel_ptr`.
612 /// Returns `null` if the pointer type has no sentinel.
613 pub inline fn sentinel(comptime ptr: Pointer) ?ptr.child {
614 const sp: *const ptr.child = @ptrCast(@alignCast(ptr.sentinel_ptr orelse return null));
615 return sp.*;
616 }
617
618 /// This data structure is used by the Zig language code generation and
619 /// therefore must be kept in sync with the compiler implementation.
620 pub const Size = enum(u2) {
621 one,
622 many,
623 slice,
624 c,
625 };
626
627 /// This data structure is used by the Zig language code generation and
628 /// therefore must be kept in sync with the compiler implementation.
629 pub const Attributes = struct {
630 @"const": bool = false,
631 @"volatile": bool = false,
632 @"allowzero": bool = false,
633 @"addrspace": ?AddressSpace = null,
634 @"align": ?usize = null,
635 };
636 };
637
638 /// This data structure is used by the Zig language code generation and
639 /// therefore must be kept in sync with the compiler implementation.
640 pub const Array = struct {
641 len: comptime_int,
642 child: type,
643
644 /// The type of the sentinel is the element type of the array, which is
645 /// the value of the `child` field in this struct. However there is no way
646 /// to refer to that type here, so we use `*const anyopaque`.
647 /// See also: `sentinel`.
648 sentinel_ptr: ?*const anyopaque,
649
650 /// Loads the array type's sentinel value from `sentinel_ptr`.
651 /// Returns `null` if the array type has no sentinel.
652 pub inline fn sentinel(comptime arr: Array) ?arr.child {
653 const sp: *const arr.child = @ptrCast(@alignCast(arr.sentinel_ptr orelse return null));
654 return sp.*;
655 }
656 };
657
658 /// This data structure is used by the Zig language code generation and
659 /// therefore must be kept in sync with the compiler implementation.
660 pub const ContainerLayout = enum(u2) {
661 auto,
662 @"extern",
663 @"packed",
664 };
665
666 /// This data structure is used by the Zig language code generation and
667 /// therefore must be kept in sync with the compiler implementation.
668 pub const StructField = struct {
669 name: [:0]const u8,
670 type: type,
671 /// The type of the default value is the type of this struct field, which
672 /// is the value of the `type` field in this struct. However there is no
673 /// way to refer to that type here, so we use `*const anyopaque`.
674 /// See also: `defaultValue`.
675 default_value_ptr: ?*const anyopaque,
676 is_comptime: bool,
677 /// `null` means the field alignment was not explicitly specified. The
678 /// field will still be aligned to at least `@alignOf` its `type`.
679 alignment: ?usize,
680
681 /// Loads the field's default value from `default_value_ptr`.
682 /// Returns `null` if the field has no default value.
683 pub inline fn defaultValue(comptime sf: StructField) ?sf.type {
684 const dp: *const sf.type = @ptrCast(@alignCast(sf.default_value_ptr orelse return null));
685 return dp.*;
686 }
687
688 /// This data structure is used by the Zig language code generation and
689 /// therefore must be kept in sync with the compiler implementation.
690 pub const Attributes = struct {
691 @"comptime": bool = false,
692 @"align": ?usize = null,
693 default_value_ptr: ?*const anyopaque = null,
694 };
695 };
696
697 /// This data structure is used by the Zig language code generation and
698 /// therefore must be kept in sync with the compiler implementation.
699 pub const Struct = struct {
700 layout: ContainerLayout,
701 /// Only valid if layout is .@"packed"
702 backing_integer: ?type = null,
703 fields: []const StructField,
704 decls: []const Declaration,
705 is_tuple: bool,
706 };
707
708 /// This data structure is used by the Zig language code generation and
709 /// therefore must be kept in sync with the compiler implementation.
710 pub const Optional = struct {
711 child: type,
712 };
713
714 /// This data structure is used by the Zig language code generation and
715 /// therefore must be kept in sync with the compiler implementation.
716 pub const ErrorUnion = struct {
717 error_set: type,
718 payload: type,
719 };
720
721 /// This data structure is used by the Zig language code generation and
722 /// therefore must be kept in sync with the compiler implementation.
723 pub const Error = struct {
724 name: [:0]const u8,
725 };
726
727 /// This data structure is used by the Zig language code generation and
728 /// therefore must be kept in sync with the compiler implementation.
729 pub const ErrorSet = ?[]const Error;
730
731 /// This data structure is used by the Zig language code generation and
732 /// therefore must be kept in sync with the compiler implementation.
733 pub const EnumField = struct {
734 name: [:0]const u8,
735 value: comptime_int,
736 };
737
738 /// This data structure is used by the Zig language code generation and
739 /// therefore must be kept in sync with the compiler implementation.
740 pub const Enum = struct {
741 tag_type: type,
742 fields: []const EnumField,
743 decls: []const Declaration,
744 is_exhaustive: bool,
745
746 /// This data structure is used by the Zig language code generation and
747 /// therefore must be kept in sync with the compiler implementation.
748 pub const Mode = enum { exhaustive, nonexhaustive };
749 };
750
751 /// This data structure is used by the Zig language code generation and
752 /// therefore must be kept in sync with the compiler implementation.
753 pub const UnionField = struct {
754 name: [:0]const u8,
755 type: type,
756 /// `null` means the field alignment was not explicitly specified. The
757 /// field will still be aligned to at least `@alignOf` its `type`.
758 alignment: ?usize,
759
760 /// This data structure is used by the Zig language code generation and
761 /// therefore must be kept in sync with the compiler implementation.
762 pub const Attributes = struct {
763 @"align": ?usize = null,
764 };
765 };
766
767 /// This data structure is used by the Zig language code generation and
768 /// therefore must be kept in sync with the compiler implementation.
769 pub const Union = struct {
770 layout: ContainerLayout,
771 tag_type: ?type,
772 fields: []const UnionField,
773 decls: []const Declaration,
774 };
775
776 /// This data structure is used by the Zig language code generation and
777 /// therefore must be kept in sync with the compiler implementation.
778 pub const Fn = struct {
779 calling_convention: CallingConvention,
780 is_generic: bool,
781 is_var_args: bool,
782 /// TODO change the language spec to make this not optional.
783 return_type: ?type,
784 params: []const Param,
785
786 /// This data structure is used by the Zig language code generation and
787 /// therefore must be kept in sync with the compiler implementation.
788 pub const Param = struct {
789 is_generic: bool,
790 is_noalias: bool,
791 type: ?type,
792
793 /// This data structure is used by the Zig language code generation and
794 /// therefore must be kept in sync with the compiler implementation.
795 pub const Attributes = struct {
796 @"noalias": bool = false,
797 };
798 };
799
800 /// This data structure is used by the Zig language code generation and
801 /// therefore must be kept in sync with the compiler implementation.
802 pub const Attributes = struct {
803 @"callconv": CallingConvention = .auto,
804 varargs: bool = false,
805 };
806 };
807
808 /// This data structure is used by the Zig language code generation and
809 /// therefore must be kept in sync with the compiler implementation.
810 pub const Opaque = struct {
811 decls: []const Declaration,
812 };
813
814 /// This data structure is used by the Zig language code generation and
815 /// therefore must be kept in sync with the compiler implementation.
816 pub const Frame = struct {
817 function: *const anyopaque,
818 };
819
820 /// This data structure is used by the Zig language code generation and
821 /// therefore must be kept in sync with the compiler implementation.
822 pub const AnyFrame = struct {
823 child: ?type,
824 };
825
826 /// This data structure is used by the Zig language code generation and
827 /// therefore must be kept in sync with the compiler implementation.
828 pub const Vector = struct {
829 len: comptime_int,
830 child: type,
831 };
832
833 /// This data structure is used by the Zig language code generation and
834 /// therefore must be kept in sync with the compiler implementation.
835 pub const Declaration = struct {
836 name: [:0]const u8,
837 };
838};
839
840/// This data structure is used by the Zig language code generation and
841/// therefore must be kept in sync with the compiler implementation.
842pub const FloatMode = enum {
843 strict,
844 optimized,
845};
846
847/// This data structure is used by the Zig language code generation and
848/// therefore must be kept in sync with the compiler implementation.
849pub const Endian = enum {
850 big,
851 little,
852
853 pub const native = builtin.target.cpu.arch.endian();
854 pub const foreign: Endian = @enumFromInt(1 - @intFromEnum(native));
855};
856
857/// This data structure is used by the Zig language code generation and
858/// therefore must be kept in sync with the compiler implementation.
859pub const Signedness = enum(u1) {
860 signed,
861 unsigned,
862};
863
864/// This data structure is used by the Zig language code generation and
865/// therefore must be kept in sync with the compiler implementation.
866pub const OutputMode = enum {
867 Exe,
868 Lib,
869 Obj,
870};
871
872/// This data structure is used by the Zig language code generation and
873/// therefore must be kept in sync with the compiler implementation.
874pub const LinkMode = enum {
875 static,
876 dynamic,
877};
878
879/// This data structure is used by the Zig language code generation and
880/// therefore must be kept in sync with the compiler implementation.
881pub const UnwindTables = enum {
882 none,
883 sync,
884 async,
885};
886
887/// This data structure is used by the Zig language code generation and
888/// therefore must be kept in sync with the compiler implementation.
889pub const WasiExecModel = enum {
890 command,
891 reactor,
892};
893
894/// This data structure is used by the Zig language code generation and
895/// therefore must be kept in sync with the compiler implementation.
896pub const CallModifier = enum {
897 /// Equivalent to function call syntax.
898 auto,
899 /// Prevents tail call optimization. This guarantees that the return
900 /// address will point to the callsite, as opposed to the callsite's
901 /// callsite. If the call is otherwise required to be tail-called
902 /// or inlined, a compile error is emitted instead.
903 never_tail,
904 /// Guarantees that the call will not be inlined. If the call is
905 /// otherwise required to be inlined, a compile error is emitted instead.
906 never_inline,
907 /// Asserts that the function call will not suspend. This allows a
908 /// non-async function to call an async function.
909 no_suspend,
910 /// Guarantees that the call will be generated with tail call optimization.
911 /// If this is not possible, a compile error is emitted instead.
912 always_tail,
913 /// Guarantees that the call will be inlined at the callsite.
914 /// If this is not possible, a compile error is emitted instead.
915 always_inline,
916 /// Evaluates the call at compile-time. If the call cannot be completed at
917 /// compile-time, a compile error is emitted instead.
918 compile_time,
919};
920
921/// This data structure is used by the Zig language code generation and
922/// therefore must be kept in sync with the compiler implementation.
923pub const VaListAarch64 = extern struct {
924 __stack: *anyopaque,
925 __gr_top: *anyopaque,
926 __vr_top: *anyopaque,
927 __gr_offs: c_int,
928 __vr_offs: c_int,
929};
930
931/// This data structure is used by the Zig language code generation and
932/// therefore must be kept in sync with the compiler implementation.
933pub const VaListAlpha = extern struct {
934 __base: *anyopaque,
935 __offset: c_int,
936};
937
938/// This data structure is used by the Zig language code generation and
939/// therefore must be kept in sync with the compiler implementation.
940pub const VaListArm = extern struct {
941 __ap: *anyopaque,
942};
943
944/// This data structure is used by the Zig language code generation and
945/// therefore must be kept in sync with the compiler implementation.
946pub const VaListHexagon = extern struct {
947 __gpr: c_long,
948 __fpr: c_long,
949 __overflow_arg_area: *anyopaque,
950 __reg_save_area: *anyopaque,
951};
952
953/// This data structure is used by the Zig language code generation and
954/// therefore must be kept in sync with the compiler implementation.
955pub const VaListPowerPc = extern struct {
956 gpr: u8,
957 fpr: u8,
958 reserved: c_ushort,
959 overflow_arg_area: *anyopaque,
960 reg_save_area: *anyopaque,
961};
962
963/// This data structure is used by the Zig language code generation and
964/// therefore must be kept in sync with the compiler implementation.
965pub const VaListS390x = extern struct {
966 __current_saved_reg_area_pointer: *anyopaque,
967 __saved_reg_area_end_pointer: *anyopaque,
968 __overflow_area_pointer: *anyopaque,
969};
970
971/// This data structure is used by the Zig language code generation and
972/// therefore must be kept in sync with the compiler implementation.
973pub const VaListSh = extern struct {
974 __va_next_o: *anyopaque,
975 __va_next_o_limit: *anyopaque,
976 __va_next_fp: *anyopaque,
977 __va_next_fp_limit: *anyopaque,
978 __va_next_stack: *anyopaque,
979};
980
981/// This data structure is used by the Zig language code generation and
982/// therefore must be kept in sync with the compiler implementation.
983pub const VaListX86_64 = extern struct {
984 gp_offset: c_uint,
985 fp_offset: c_uint,
986 overflow_arg_area: *anyopaque,
987 reg_save_area: *anyopaque,
988};
989
990/// This data structure is used by the Zig language code generation and
991/// therefore must be kept in sync with the compiler implementation.
992pub const VaListXtensa = extern struct {
993 __va_stk: *c_int,
994 __va_reg: *c_int,
995 __va_ndx: c_int,
996};
997
998/// This data structure is used by the Zig language code generation and
999/// therefore must be kept in sync with the compiler implementation.
1000pub const VaList = switch (builtin.cpu.arch) {
1001 .amdgcn,
1002 .msp430,
1003 .nvptx,
1004 .nvptx64,
1005 .powerpc64,
1006 .powerpc64le,
1007 .x86,
1008 => *u8,
1009 .arc,
1010 .arceb,
1011 .avr,
1012 .bpfel,
1013 .bpfeb,
1014 .csky,
1015 .hppa,
1016 .hppa64,
1017 .kvx,
1018 .lanai,
1019 .loongarch32,
1020 .loongarch64,
1021 .m68k,
1022 .microblaze,
1023 .microblazeel,
1024 .mips,
1025 .mipsel,
1026 .mips64,
1027 .mips64el,
1028 .riscv32,
1029 .riscv32be,
1030 .riscv64,
1031 .riscv64be,
1032 .sparc,
1033 .sparc64,
1034 .spirv32,
1035 .spirv64,
1036 .ve,
1037 .wasm32,
1038 .wasm64,
1039 .xcore,
1040 => *anyopaque,
1041 .aarch64, .aarch64_be => switch (builtin.os.tag) {
1042 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .windows => *u8,
1043 else => switch (builtin.zig_backend) {
1044 else => VaListAarch64,
1045 .stage2_llvm => @compileError("disabled due to miscompilations"),
1046 },
1047 },
1048 .alpha => VaListAlpha,
1049 .arm, .armeb, .thumb, .thumbeb => VaListArm,
1050 .hexagon => if (builtin.target.abi.isMusl()) VaListHexagon else *u8,
1051 .powerpc, .powerpcle => VaListPowerPc,
1052 .s390x => VaListS390x,
1053 .sh, .sheb => VaListSh, // This is wrong for `sh_renesas`: https://github.com/ziglang/zig/issues/24692#issuecomment-3150779829
1054 .x86_64 => switch (builtin.os.tag) {
1055 .uefi, .windows => switch (builtin.zig_backend) {
1056 else => *u8,
1057 .stage2_llvm => @compileError("disabled due to miscompilations"),
1058 },
1059 else => VaListX86_64,
1060 },
1061 .xtensa, .xtensaeb => VaListXtensa,
1062 else => @compileError("VaList not supported for this target yet"),
1063};
1064
1065/// This data structure is used by the Zig language code generation and
1066/// therefore must be kept in sync with the compiler implementation.
1067pub const PrefetchOptions = struct {
1068 /// Whether the prefetch should prepare for a read or a write.
1069 rw: Rw = .read,
1070 /// The data's locality in an inclusive range from 0 to 3.
1071 ///
1072 /// 0 means no temporal locality. That is, the data can be immediately
1073 /// dropped from the cache after it is accessed.
1074 ///
1075 /// 3 means high temporal locality. That is, the data should be kept in
1076 /// the cache as it is likely to be accessed again soon.
1077 locality: u2 = 3,
1078 /// The cache that the prefetch should be performed on.
1079 cache: Cache = .data,
1080
1081 pub const Rw = enum(u1) {
1082 read,
1083 write,
1084 };
1085
1086 pub const Cache = enum(u1) {
1087 instruction,
1088 data,
1089 };
1090};
1091
1092/// This data structure is used by the Zig language code generation and
1093/// therefore must be kept in sync with the compiler implementation.
1094pub const ExportOptions = struct {
1095 name: []const u8,
1096 linkage: GlobalLinkage = .strong,
1097 section: ?[]const u8 = null,
1098 visibility: SymbolVisibility = .default,
1099};
1100
1101/// This data structure is used by the Zig language code generation and
1102/// therefore must be kept in sync with the compiler implementation.
1103pub const ExternOptions = struct {
1104 name: []const u8,
1105 library_name: ?[]const u8 = null,
1106 linkage: GlobalLinkage = .strong,
1107 visibility: SymbolVisibility = .default,
1108 /// Setting this to `true` makes the `@extern` a runtime value.
1109 is_thread_local: bool = false,
1110 is_dll_import: bool = false,
1111 relocation: Relocation = .any,
1112 decoration: ?Decoration = null,
1113
1114 pub const Decoration = union(enum) {
1115 location: u32,
1116 descriptor: Descriptor,
1117
1118 pub const Descriptor = struct {
1119 binding: u32,
1120 set: u32,
1121 };
1122 };
1123
1124 pub const Relocation = enum(u1) {
1125 /// Any type of relocation is allowed.
1126 any,
1127 /// A program-counter-relative relocation is required.
1128 /// Using this value makes the `@extern` a runtime value.
1129 pcrel,
1130 };
1131};
1132
1133/// This data structure is used by the Zig language code generation and
1134/// therefore must be kept in sync with the compiler implementation.
1135pub const BranchHint = enum(u3) {
1136 /// Equivalent to no hint given.
1137 none,
1138 /// This branch of control flow is more likely to be reached than its peers.
1139 /// The optimizer should optimize for reaching it.
1140 likely,
1141 /// This branch of control flow is less likely to be reached than its peers.
1142 /// The optimizer should optimize for not reaching it.
1143 unlikely,
1144 /// This branch of control flow is unlikely to *ever* be reached.
1145 /// The optimizer may place it in a different page of memory to optimize other branches.
1146 cold,
1147 /// It is difficult to predict whether this branch of control flow will be reached.
1148 /// The optimizer should avoid branching behavior with expensive mispredictions.
1149 unpredictable,
1150};
1151
1152/// This enum is set by the compiler and communicates which compiler backend is
1153/// used to produce machine code.
1154/// Think carefully before deciding to observe this value. Nearly all code should
1155/// be agnostic to the backend that implements the language. The use case
1156/// to use this value is to **work around problems with compiler implementations.**
1157///
1158/// Avoid failing the compilation if the compiler backend does not match a
1159/// whitelist of backends; rather one should detect that a known problem would
1160/// occur in a blacklist of backends.
1161///
1162/// The enum is nonexhaustive so that alternate Zig language implementations may
1163/// choose a number as their tag (please use a random number generator rather
1164/// than a "cute" number) and codebases can interact with these values even if
1165/// this upstream enum does not have a name for the number. Of course, upstream
1166/// is happy to accept pull requests to add Zig implementations to this enum.
1167///
1168/// This data structure is part of the Zig language specification.
1169pub const CompilerBackend = enum(u64) {
1170 /// It is allowed for a compiler implementation to not reveal its identity,
1171 /// in which case this value is appropriate. Be cool and make sure your
1172 /// code supports `other` Zig compilers!
1173 other = 0,
1174 /// The original Zig compiler created in 2015 by Andrew Kelley. Implemented
1175 /// in C++. Used LLVM. Deleted from the ZSF ziglang/zig codebase on
1176 /// December 6th, 2022.
1177 stage1 = 1,
1178 /// The reference implementation self-hosted compiler of Zig, using the
1179 /// LLVM backend.
1180 stage2_llvm = 2,
1181 /// The reference implementation self-hosted compiler of Zig, using the
1182 /// backend that generates C source code.
1183 /// Note that one can observe whether the compilation will output C code
1184 /// directly with `object_format` value rather than the `compiler_backend` value.
1185 stage2_c = 3,
1186 /// The reference implementation self-hosted compiler of Zig, using the
1187 /// WebAssembly backend.
1188 stage2_wasm = 4,
1189 /// The reference implementation self-hosted compiler of Zig, using the
1190 /// arm backend.
1191 stage2_arm = 5,
1192 /// The reference implementation self-hosted compiler of Zig, using the
1193 /// x86_64 backend.
1194 stage2_x86_64 = 6,
1195 /// The reference implementation self-hosted compiler of Zig, using the
1196 /// aarch64 backend.
1197 stage2_aarch64 = 7,
1198 /// The reference implementation self-hosted compiler of Zig, using the
1199 /// x86 backend.
1200 stage2_x86 = 8,
1201 /// The reference implementation self-hosted compiler of Zig, using the
1202 /// riscv64 backend.
1203 stage2_riscv64 = 9,
1204 /// The reference implementation self-hosted compiler of Zig, using the
1205 /// sparc64 backend.
1206 stage2_sparc64 = 10,
1207 /// The reference implementation self-hosted compiler of Zig, using the
1208 /// spirv backend.
1209 stage2_spirv = 11,
1210 /// The reference implementation self-hosted compiler of Zig, using the
1211 /// powerpc backend.
1212 stage2_powerpc = 12,
1213
1214 _,
1215};
1216
1217/// This function type is used by the Zig language code generation and
1218/// therefore must be kept in sync with the compiler implementation.
1219pub const TestFn = struct {
1220 name: []const u8,
1221 func: *const fn () anyerror!void,
1222};
1223
1224/// This namespace is used by the Zig compiler to emit various kinds of safety
1225/// panics. These can be overridden by making a public `panic` namespace in the
1226/// root source file.
1227pub const panic: type = p: {
1228 if (@hasDecl(root, "panic")) {
1229 if (@TypeOf(root.panic) != type) {
1230 // Deprecated; make `panic` a namespace instead.
1231 break :p std.debug.FullPanic(struct {
1232 fn panic(msg: []const u8, ra: ?usize) noreturn {
1233 root.panic(msg, @errorReturnTrace(), ra);
1234 }
1235 }.panic);
1236 }
1237 break :p root.panic;
1238 }
1239 break :p switch (builtin.zig_backend) {
1240 .stage2_powerpc,
1241 .stage2_riscv64,
1242 => std.debug.simple_panic,
1243 else => std.debug.FullPanic(std.debug.defaultPanic),
1244 };
1245};
1246
1247pub noinline fn returnError() void {
1248 @branchHint(.unlikely);
1249 @setRuntimeSafety(false);
1250 const st = @errorReturnTrace().?;
1251 if (st.index < st.instruction_addresses.len)
1252 st.instruction_addresses[st.index] = @returnAddress();
1253 st.index += 1;
1254}
lib/std/builtin/assembly.zig deleted-3119
...@@ -1,3119 +0,0 @@
1pub const Clobbers = switch (@import("builtin").cpu.arch) {
2 .x86_16, .x86, .x86_64 => packed struct {
3 /// Whether the inline assembly code may perform stores to memory
4 /// addresses other than those derived from input pointer provenance.
5 memory: bool = false,
6
7 /// Condition codes. Subset of the bits in `eflags` and `rflags`.
8 cc: bool = false,
9 dirflag: bool = false,
10 eflags: bool = false,
11 flags: bool = false,
12 fpcr: bool = false,
13 fpsr: bool = false,
14 mxcsr: bool = false,
15 rflags: bool = false,
16
17 rax: bool = false,
18 rcx: bool = false,
19 rdx: bool = false,
20 rbx: bool = false,
21 rsp: bool = false,
22 rbp: bool = false,
23 rsi: bool = false,
24 rdi: bool = false,
25 r8: bool = false,
26 r9: bool = false,
27 r10: bool = false,
28 r11: bool = false,
29 r12: bool = false,
30 r13: bool = false,
31 r14: bool = false,
32 r15: bool = false,
33 eax: bool = false,
34 ecx: bool = false,
35 edx: bool = false,
36 ebx: bool = false,
37 esp: bool = false,
38 ebp: bool = false,
39 esi: bool = false,
40 edi: bool = false,
41 r8d: bool = false,
42 r9d: bool = false,
43 r10d: bool = false,
44 r11d: bool = false,
45 r12d: bool = false,
46 r13d: bool = false,
47 r14d: bool = false,
48 r15d: bool = false,
49 ax: bool = false,
50 cx: bool = false,
51 dx: bool = false,
52 bx: bool = false,
53 sp: bool = false,
54 bp: bool = false,
55 si: bool = false,
56 di: bool = false,
57 r8w: bool = false,
58 r9w: bool = false,
59 r10w: bool = false,
60 r11w: bool = false,
61 r12w: bool = false,
62 r13w: bool = false,
63 r14w: bool = false,
64 r15w: bool = false,
65 al: bool = false,
66 cl: bool = false,
67 dl: bool = false,
68 bl: bool = false,
69 spl: bool = false,
70 bpl: bool = false,
71 sil: bool = false,
72 dil: bool = false,
73 r8b: bool = false,
74 r9b: bool = false,
75 r10b: bool = false,
76 r11b: bool = false,
77 r12b: bool = false,
78 r13b: bool = false,
79 r14b: bool = false,
80 r15b: bool = false,
81 ah: bool = false,
82 ch: bool = false,
83 dh: bool = false,
84 bh: bool = false,
85 zmm0: bool = false,
86 zmm1: bool = false,
87 zmm2: bool = false,
88 zmm3: bool = false,
89 zmm4: bool = false,
90 zmm5: bool = false,
91 zmm6: bool = false,
92 zmm7: bool = false,
93 zmm8: bool = false,
94 zmm9: bool = false,
95 zmm10: bool = false,
96 zmm11: bool = false,
97 zmm12: bool = false,
98 zmm13: bool = false,
99 zmm14: bool = false,
100 zmm15: bool = false,
101 zmm16: bool = false,
102 zmm17: bool = false,
103 zmm18: bool = false,
104 zmm19: bool = false,
105 zmm20: bool = false,
106 zmm21: bool = false,
107 zmm22: bool = false,
108 zmm23: bool = false,
109 zmm24: bool = false,
110 zmm25: bool = false,
111 zmm26: bool = false,
112 zmm27: bool = false,
113 zmm28: bool = false,
114 zmm29: bool = false,
115 zmm30: bool = false,
116 zmm31: bool = false,
117 ymm0: bool = false,
118 ymm1: bool = false,
119 ymm2: bool = false,
120 ymm3: bool = false,
121 ymm4: bool = false,
122 ymm5: bool = false,
123 ymm6: bool = false,
124 ymm7: bool = false,
125 ymm8: bool = false,
126 ymm9: bool = false,
127 ymm10: bool = false,
128 ymm11: bool = false,
129 ymm12: bool = false,
130 ymm13: bool = false,
131 ymm14: bool = false,
132 ymm15: bool = false,
133 ymm16: bool = false,
134 ymm17: bool = false,
135 ymm18: bool = false,
136 ymm19: bool = false,
137 ymm20: bool = false,
138 ymm21: bool = false,
139 ymm22: bool = false,
140 ymm23: bool = false,
141 ymm24: bool = false,
142 ymm25: bool = false,
143 ymm26: bool = false,
144 ymm27: bool = false,
145 ymm28: bool = false,
146 ymm29: bool = false,
147 ymm30: bool = false,
148 ymm31: bool = false,
149 xmm0: bool = false,
150 xmm1: bool = false,
151 xmm2: bool = false,
152 xmm3: bool = false,
153 xmm4: bool = false,
154 xmm5: bool = false,
155 xmm6: bool = false,
156 xmm7: bool = false,
157 xmm8: bool = false,
158 xmm9: bool = false,
159 xmm10: bool = false,
160 xmm11: bool = false,
161 xmm12: bool = false,
162 xmm13: bool = false,
163 xmm14: bool = false,
164 xmm15: bool = false,
165 xmm16: bool = false,
166 xmm17: bool = false,
167 xmm18: bool = false,
168 xmm19: bool = false,
169 xmm20: bool = false,
170 xmm21: bool = false,
171 xmm22: bool = false,
172 xmm23: bool = false,
173 xmm24: bool = false,
174 xmm25: bool = false,
175 xmm26: bool = false,
176 xmm27: bool = false,
177 xmm28: bool = false,
178 xmm29: bool = false,
179 xmm30: bool = false,
180 xmm31: bool = false,
181 mm0: bool = false,
182 mm1: bool = false,
183 mm2: bool = false,
184 mm3: bool = false,
185 mm4: bool = false,
186 mm5: bool = false,
187 mm6: bool = false,
188 mm7: bool = false,
189 st0: bool = false,
190 st1: bool = false,
191 st2: bool = false,
192 st3: bool = false,
193 st4: bool = false,
194 st5: bool = false,
195 st6: bool = false,
196 st7: bool = false,
197 es: bool = false,
198 cs: bool = false,
199 ss: bool = false,
200 ds: bool = false,
201 fs: bool = false,
202 gs: bool = false,
203 },
204 .aarch64, .aarch64_be => packed struct {
205 /// Whether the inline assembly code may perform stores to memory
206 /// addresses other than those derived from input pointer provenance.
207 memory: bool = false,
208
209 nzcv: bool = false,
210
211 x0: bool = false,
212 x1: bool = false,
213 x2: bool = false,
214 x3: bool = false,
215 x4: bool = false,
216 x5: bool = false,
217 x6: bool = false,
218 x7: bool = false,
219 x8: bool = false,
220 x9: bool = false,
221 x10: bool = false,
222 x11: bool = false,
223 x12: bool = false,
224 x13: bool = false,
225 x14: bool = false,
226 x15: bool = false,
227 x16: bool = false,
228 x17: bool = false,
229 x18: bool = false,
230 x19: bool = false,
231 x20: bool = false,
232 x21: bool = false,
233 x22: bool = false,
234 x23: bool = false,
235 x24: bool = false,
236 x25: bool = false,
237 x26: bool = false,
238 x27: bool = false,
239 x28: bool = false,
240 x29: bool = false,
241 x30: bool = false,
242
243 w0: bool = false,
244 w1: bool = false,
245 w2: bool = false,
246 w3: bool = false,
247 w4: bool = false,
248 w5: bool = false,
249 w6: bool = false,
250 w7: bool = false,
251 w8: bool = false,
252 w9: bool = false,
253 w10: bool = false,
254 w11: bool = false,
255 w12: bool = false,
256 w13: bool = false,
257 w14: bool = false,
258 w15: bool = false,
259 w16: bool = false,
260 w17: bool = false,
261 w18: bool = false,
262 w19: bool = false,
263 w20: bool = false,
264 w21: bool = false,
265 w22: bool = false,
266 w23: bool = false,
267 w24: bool = false,
268 w25: bool = false,
269 w26: bool = false,
270 w27: bool = false,
271 w28: bool = false,
272 w29: bool = false,
273
274 lr: bool = false,
275 sp: bool = false,
276 wsp: bool = false,
277 fpcr: bool = false,
278 fpmr: bool = false,
279 fpsr: bool = false,
280 ffr: bool = false,
281
282 p0: bool = false,
283 p1: bool = false,
284 p2: bool = false,
285 p3: bool = false,
286 p4: bool = false,
287 p5: bool = false,
288 p6: bool = false,
289 p7: bool = false,
290 p8: bool = false,
291 p9: bool = false,
292 p10: bool = false,
293 p11: bool = false,
294 p12: bool = false,
295 p13: bool = false,
296 p14: bool = false,
297 p15: bool = false,
298
299 z0: bool = false,
300 z1: bool = false,
301 z2: bool = false,
302 z3: bool = false,
303 z4: bool = false,
304 z5: bool = false,
305 z6: bool = false,
306 z7: bool = false,
307 z8: bool = false,
308 z9: bool = false,
309 z10: bool = false,
310 z11: bool = false,
311 z12: bool = false,
312 z13: bool = false,
313 z14: bool = false,
314 z15: bool = false,
315 z16: bool = false,
316 z17: bool = false,
317 z18: bool = false,
318 z19: bool = false,
319 z20: bool = false,
320 z21: bool = false,
321 z22: bool = false,
322 z23: bool = false,
323 z24: bool = false,
324 z25: bool = false,
325 z26: bool = false,
326 z27: bool = false,
327 z28: bool = false,
328 z29: bool = false,
329 z30: bool = false,
330 z31: bool = false,
331
332 v0: bool = false,
333 v1: bool = false,
334 v2: bool = false,
335 v3: bool = false,
336 v4: bool = false,
337 v5: bool = false,
338 v6: bool = false,
339 v7: bool = false,
340 v8: bool = false,
341 v9: bool = false,
342 v10: bool = false,
343 v11: bool = false,
344 v12: bool = false,
345 v13: bool = false,
346 v14: bool = false,
347 v15: bool = false,
348 v16: bool = false,
349 v17: bool = false,
350 v18: bool = false,
351 v19: bool = false,
352 v20: bool = false,
353 v21: bool = false,
354 v22: bool = false,
355 v23: bool = false,
356 v24: bool = false,
357 v25: bool = false,
358 v26: bool = false,
359 v27: bool = false,
360 v28: bool = false,
361 v29: bool = false,
362 v30: bool = false,
363 v31: bool = false,
364
365 d0: bool = false,
366 d1: bool = false,
367 d2: bool = false,
368 d3: bool = false,
369 d4: bool = false,
370 d5: bool = false,
371 d6: bool = false,
372 d7: bool = false,
373 d8: bool = false,
374 d9: bool = false,
375 d10: bool = false,
376 d11: bool = false,
377 d12: bool = false,
378 d13: bool = false,
379 d14: bool = false,
380 d15: bool = false,
381 d16: bool = false,
382 d17: bool = false,
383 d18: bool = false,
384 d19: bool = false,
385 d20: bool = false,
386 d21: bool = false,
387 d22: bool = false,
388 d23: bool = false,
389 d24: bool = false,
390 d25: bool = false,
391 d26: bool = false,
392 d27: bool = false,
393 d28: bool = false,
394 d29: bool = false,
395 d30: bool = false,
396 d31: bool = false,
397
398 s0: bool = false,
399 s1: bool = false,
400 s2: bool = false,
401 s3: bool = false,
402 s4: bool = false,
403 s5: bool = false,
404 s6: bool = false,
405 s7: bool = false,
406 s8: bool = false,
407 s9: bool = false,
408 s10: bool = false,
409 s11: bool = false,
410 s12: bool = false,
411 s13: bool = false,
412 s14: bool = false,
413 s15: bool = false,
414 s16: bool = false,
415 s17: bool = false,
416 s18: bool = false,
417 s19: bool = false,
418 s20: bool = false,
419 s21: bool = false,
420 s22: bool = false,
421 s23: bool = false,
422 s24: bool = false,
423 s25: bool = false,
424 s26: bool = false,
425 s27: bool = false,
426 s28: bool = false,
427 s29: bool = false,
428 s30: bool = false,
429 s31: bool = false,
430
431 h0: bool = false,
432 h1: bool = false,
433 h2: bool = false,
434 h3: bool = false,
435 h4: bool = false,
436 h5: bool = false,
437 h6: bool = false,
438 h7: bool = false,
439 h8: bool = false,
440 h9: bool = false,
441 h10: bool = false,
442 h11: bool = false,
443 h12: bool = false,
444 h13: bool = false,
445 h14: bool = false,
446 h15: bool = false,
447 h16: bool = false,
448 h17: bool = false,
449 h18: bool = false,
450 h19: bool = false,
451 h20: bool = false,
452 h21: bool = false,
453 h22: bool = false,
454 h23: bool = false,
455 h24: bool = false,
456 h25: bool = false,
457 h26: bool = false,
458 h27: bool = false,
459 h28: bool = false,
460 h29: bool = false,
461 h30: bool = false,
462 h31: bool = false,
463
464 b0: bool = false,
465 b1: bool = false,
466 b2: bool = false,
467 b3: bool = false,
468 b4: bool = false,
469 b5: bool = false,
470 b6: bool = false,
471 b7: bool = false,
472 b8: bool = false,
473 b9: bool = false,
474 b10: bool = false,
475 b11: bool = false,
476 b12: bool = false,
477 b13: bool = false,
478 b14: bool = false,
479 b15: bool = false,
480 b16: bool = false,
481 b17: bool = false,
482 b18: bool = false,
483 b19: bool = false,
484 b20: bool = false,
485 b21: bool = false,
486 b22: bool = false,
487 b23: bool = false,
488 b24: bool = false,
489 b25: bool = false,
490 b26: bool = false,
491 b27: bool = false,
492 b28: bool = false,
493 b29: bool = false,
494 b30: bool = false,
495 b31: bool = false,
496
497 za0q: bool = false,
498 za1q: bool = false,
499 za2q: bool = false,
500 za3q: bool = false,
501 za4q: bool = false,
502 za5q: bool = false,
503 za6q: bool = false,
504 za7q: bool = false,
505 za8q: bool = false,
506 za9q: bool = false,
507 za10q: bool = false,
508 za11q: bool = false,
509 za12q: bool = false,
510 za13q: bool = false,
511 za14q: bool = false,
512 za15q: bool = false,
513
514 za0d: bool = false,
515 za1d: bool = false,
516 za2d: bool = false,
517 za3d: bool = false,
518 za4d: bool = false,
519 za5d: bool = false,
520 za6d: bool = false,
521 za7d: bool = false,
522
523 za0s: bool = false,
524 za1s: bool = false,
525 za2s: bool = false,
526 za3s: bool = false,
527
528 za0h: bool = false,
529 za1h: bool = false,
530 za0b: bool = false,
531
532 zt0: bool = false,
533 },
534 .arm, .armeb, .thumb, .thumbeb => packed struct {
535 /// Whether the inline assembly code may perform stores to memory
536 /// addresses other than those derived from input pointer provenance.
537 memory: bool = false,
538
539 apsr: bool = false,
540 cpsr: bool = false,
541 spsr: bool = false,
542 r0: bool = false,
543 r1: bool = false,
544 r2: bool = false,
545 r3: bool = false,
546 r4: bool = false,
547 r5: bool = false,
548 r6: bool = false,
549 r7: bool = false,
550 r8: bool = false,
551 r9: bool = false,
552 r10: bool = false,
553 r11: bool = false,
554 r12: bool = false,
555 r13: bool = false,
556 r14: bool = false,
557
558 lr: bool = false,
559 sp: bool = false,
560 fpscr: bool = false,
561 vpr: bool = false,
562
563 d0: bool = false,
564 d1: bool = false,
565 d2: bool = false,
566 d3: bool = false,
567 d4: bool = false,
568 d5: bool = false,
569 d6: bool = false,
570 d7: bool = false,
571 d8: bool = false,
572 d9: bool = false,
573 d10: bool = false,
574 d11: bool = false,
575 d12: bool = false,
576 d13: bool = false,
577 d14: bool = false,
578 d15: bool = false,
579 d16: bool = false,
580 d17: bool = false,
581 d18: bool = false,
582 d19: bool = false,
583 d20: bool = false,
584 d21: bool = false,
585 d22: bool = false,
586 d23: bool = false,
587 d24: bool = false,
588 d25: bool = false,
589 d26: bool = false,
590 d27: bool = false,
591 d28: bool = false,
592 d29: bool = false,
593 d30: bool = false,
594 d31: bool = false,
595
596 s0: bool = false,
597 s1: bool = false,
598 s2: bool = false,
599 s3: bool = false,
600 s4: bool = false,
601 s5: bool = false,
602 s6: bool = false,
603 s7: bool = false,
604 s8: bool = false,
605 s9: bool = false,
606 s10: bool = false,
607 s11: bool = false,
608 s12: bool = false,
609 s13: bool = false,
610 s14: bool = false,
611 s15: bool = false,
612 s16: bool = false,
613 s17: bool = false,
614 s18: bool = false,
615 s19: bool = false,
616 s20: bool = false,
617 s21: bool = false,
618 s22: bool = false,
619 s23: bool = false,
620 s24: bool = false,
621 s25: bool = false,
622 s26: bool = false,
623 s27: bool = false,
624 s28: bool = false,
625 s29: bool = false,
626 s30: bool = false,
627 s31: bool = false,
628
629 q0: bool = false,
630 q1: bool = false,
631 q2: bool = false,
632 q3: bool = false,
633 q4: bool = false,
634 q5: bool = false,
635 q6: bool = false,
636 q7: bool = false,
637 q8: bool = false,
638 q9: bool = false,
639 q10: bool = false,
640 q11: bool = false,
641 q12: bool = false,
642 q13: bool = false,
643 q14: bool = false,
644 q15: bool = false,
645 },
646 .riscv32, .riscv32be, .riscv64, .riscv64be => packed struct {
647 /// Whether the inline assembly code may perform stores to memory
648 /// addresses other than those derived from input pointer provenance.
649 memory: bool = false,
650
651 ssp: bool = false,
652
653 x1: bool = false,
654 x2: bool = false,
655 x3: bool = false,
656 x4: bool = false,
657 x5: bool = false,
658 x6: bool = false,
659 x7: bool = false,
660 x8: bool = false,
661 x9: bool = false,
662 x10: bool = false,
663 x11: bool = false,
664 x12: bool = false,
665 x13: bool = false,
666 x14: bool = false,
667 x15: bool = false,
668 x16: bool = false,
669 x17: bool = false,
670 x18: bool = false,
671 x19: bool = false,
672 x20: bool = false,
673 x21: bool = false,
674 x22: bool = false,
675 x23: bool = false,
676 x24: bool = false,
677 x25: bool = false,
678 x26: bool = false,
679 x27: bool = false,
680 x28: bool = false,
681 x29: bool = false,
682 x30: bool = false,
683 x31: bool = false,
684
685 // ABI aliases for integer registers
686 ra: bool = false,
687 sp: bool = false,
688 gp: bool = false,
689 tp: bool = false,
690 t0: bool = false,
691 t1: bool = false,
692 t2: bool = false,
693 s0: bool = false,
694 fp: bool = false,
695 s1: bool = false,
696 a0: bool = false,
697 a1: bool = false,
698 a2: bool = false,
699 a3: bool = false,
700 a4: bool = false,
701 a5: bool = false,
702 a6: bool = false,
703 a7: bool = false,
704 s2: bool = false,
705 s3: bool = false,
706 s4: bool = false,
707 s5: bool = false,
708 s6: bool = false,
709 s7: bool = false,
710 s8: bool = false,
711 s9: bool = false,
712 s10: bool = false,
713 s11: bool = false,
714 t3: bool = false,
715 t4: bool = false,
716 t5: bool = false,
717 t6: bool = false,
718
719 fflags: bool = false,
720 frm: bool = false,
721
722 f0: bool = false,
723 f1: bool = false,
724 f2: bool = false,
725 f3: bool = false,
726 f4: bool = false,
727 f5: bool = false,
728 f6: bool = false,
729 f7: bool = false,
730 f8: bool = false,
731 f9: bool = false,
732 f10: bool = false,
733 f11: bool = false,
734 f12: bool = false,
735 f13: bool = false,
736 f14: bool = false,
737 f15: bool = false,
738 f16: bool = false,
739 f17: bool = false,
740 f18: bool = false,
741 f19: bool = false,
742 f20: bool = false,
743 f21: bool = false,
744 f22: bool = false,
745 f23: bool = false,
746 f24: bool = false,
747 f25: bool = false,
748 f26: bool = false,
749 f27: bool = false,
750 f28: bool = false,
751 f29: bool = false,
752 f30: bool = false,
753 f31: bool = false,
754
755 // ABI aliases for float registers
756 ft0: bool = false,
757 ft1: bool = false,
758 ft2: bool = false,
759 ft3: bool = false,
760 ft4: bool = false,
761 ft5: bool = false,
762 ft6: bool = false,
763 ft7: bool = false,
764 fs0: bool = false,
765 fs1: bool = false,
766 fa0: bool = false,
767 fa1: bool = false,
768 fa2: bool = false,
769 fa3: bool = false,
770 fa4: bool = false,
771 fa5: bool = false,
772 fa6: bool = false,
773 fa7: bool = false,
774 fs2: bool = false,
775 fs3: bool = false,
776 fs4: bool = false,
777 fs5: bool = false,
778 fs6: bool = false,
779 fs7: bool = false,
780 fs8: bool = false,
781 fs9: bool = false,
782 fs10: bool = false,
783 fs11: bool = false,
784 ft8: bool = false,
785 ft9: bool = false,
786 ft10: bool = false,
787 ft11: bool = false,
788
789 vtype: bool = false,
790 vl: bool = false,
791 vxsat: bool = false,
792 vxrm: bool = false,
793 vcsr: bool = false,
794
795 v0: bool = false,
796 v1: bool = false,
797 v2: bool = false,
798 v3: bool = false,
799 v4: bool = false,
800 v5: bool = false,
801 v6: bool = false,
802 v7: bool = false,
803 v8: bool = false,
804 v9: bool = false,
805 v10: bool = false,
806 v11: bool = false,
807 v12: bool = false,
808 v13: bool = false,
809 v14: bool = false,
810 v15: bool = false,
811 v16: bool = false,
812 v17: bool = false,
813 v18: bool = false,
814 v19: bool = false,
815 v20: bool = false,
816 v21: bool = false,
817 v22: bool = false,
818 v23: bool = false,
819 v24: bool = false,
820 v25: bool = false,
821 v26: bool = false,
822 v27: bool = false,
823 v28: bool = false,
824 v29: bool = false,
825 v30: bool = false,
826 v31: bool = false,
827 },
828 .xcore => packed struct {
829 /// Whether the inline assembly code may perform stores to memory
830 /// addresses other than those derived from input pointer provenance.
831 memory: bool = false,
832
833 r0: bool = false,
834 r1: bool = false,
835 r2: bool = false,
836 r3: bool = false,
837 r4: bool = false,
838 r5: bool = false,
839 r6: bool = false,
840 r7: bool = false,
841 r8: bool = false,
842 r9: bool = false,
843 r10: bool = false,
844 r11: bool = false,
845
846 cp: bool = false,
847 dp: bool = false,
848 sp: bool = false,
849 lr: bool = false,
850 sr: bool = false,
851 },
852 .xtensa, .xtensaeb => packed struct {
853 /// Whether the inline assembly code may perform stores to memory
854 /// addresses other than those derived from input pointer provenance.
855 memory: bool = false,
856
857 sar: bool = false,
858 lbeg: bool = false,
859 lend: bool = false,
860 lcount: bool = false,
861 atomctl: bool = false,
862 scompare1: bool = false,
863 threadptr: bool = false,
864 litbase: bool = false,
865 windowbase: bool = false,
866 windowstart: bool = false,
867 ps: bool = false,
868
869 a0: bool = false,
870 a1: bool = false,
871 a2: bool = false,
872 a3: bool = false,
873 a4: bool = false,
874 a5: bool = false,
875 a6: bool = false,
876 a7: bool = false,
877 a8: bool = false,
878 a9: bool = false,
879 a10: bool = false,
880 a11: bool = false,
881 a12: bool = false,
882 a13: bool = false,
883 a14: bool = false,
884 a15: bool = false,
885
886 br: bool = false,
887 b0: bool = false,
888 b1: bool = false,
889 b2: bool = false,
890 b3: bool = false,
891 b4: bool = false,
892 b5: bool = false,
893 b6: bool = false,
894 b7: bool = false,
895 b8: bool = false,
896 b9: bool = false,
897 b10: bool = false,
898 b11: bool = false,
899 b12: bool = false,
900 b13: bool = false,
901 b14: bool = false,
902 b15: bool = false,
903
904 acchi: bool = false,
905 acclo: bool = false,
906 m0: bool = false,
907 m1: bool = false,
908 m2: bool = false,
909 m3: bool = false,
910 fcr: bool = false,
911 fsr: bool = false,
912
913 f0: bool = false,
914 f1: bool = false,
915 f2: bool = false,
916 f3: bool = false,
917 f4: bool = false,
918 f5: bool = false,
919 f6: bool = false,
920 f7: bool = false,
921 f8: bool = false,
922 f9: bool = false,
923 f10: bool = false,
924 f11: bool = false,
925 f12: bool = false,
926 f13: bool = false,
927 f14: bool = false,
928 f15: bool = false,
929 },
930 .kvx => packed struct {
931 /// Whether the inline assembly code may perform stores to memory
932 /// addresses other than those derived from input pointer provenance.
933 memory: bool = false,
934
935 cs: bool = false,
936
937 ra: bool = false,
938
939 ls: bool = false,
940 le: bool = false,
941 lc: bool = false,
942
943 r0: bool = false,
944 r1: bool = false,
945 r2: bool = false,
946 r3: bool = false,
947 r4: bool = false,
948 r5: bool = false,
949 r6: bool = false,
950 r7: bool = false,
951 r8: bool = false,
952 r9: bool = false,
953 r10: bool = false,
954 r11: bool = false,
955 r12: bool = false,
956 r13: bool = false,
957 r14: bool = false,
958 r15: bool = false,
959 r16: bool = false,
960 r17: bool = false,
961 r18: bool = false,
962 r19: bool = false,
963 r20: bool = false,
964 r21: bool = false,
965 r22: bool = false,
966 r23: bool = false,
967 r24: bool = false,
968 r25: bool = false,
969 r26: bool = false,
970 r27: bool = false,
971 r28: bool = false,
972 r29: bool = false,
973 r30: bool = false,
974 r31: bool = false,
975 r32: bool = false,
976 r33: bool = false,
977 r34: bool = false,
978 r35: bool = false,
979 r36: bool = false,
980 r37: bool = false,
981 r38: bool = false,
982 r39: bool = false,
983 r40: bool = false,
984 r41: bool = false,
985 r42: bool = false,
986 r43: bool = false,
987 r44: bool = false,
988 r45: bool = false,
989 r46: bool = false,
990 r47: bool = false,
991 r48: bool = false,
992 r49: bool = false,
993 r50: bool = false,
994 r51: bool = false,
995 r52: bool = false,
996 r53: bool = false,
997 r54: bool = false,
998 r55: bool = false,
999 r56: bool = false,
1000 r57: bool = false,
1001 r58: bool = false,
1002 r59: bool = false,
1003 r60: bool = false,
1004 r61: bool = false,
1005 r62: bool = false,
1006 r63: bool = false,
1007
1008 a0: bool = false,
1009 a1: bool = false,
1010 a2: bool = false,
1011 a3: bool = false,
1012 a4: bool = false,
1013 a5: bool = false,
1014 a6: bool = false,
1015 a7: bool = false,
1016 a8: bool = false,
1017 a9: bool = false,
1018 a10: bool = false,
1019 a11: bool = false,
1020 a12: bool = false,
1021 a13: bool = false,
1022 a14: bool = false,
1023 a15: bool = false,
1024 a16: bool = false,
1025 a17: bool = false,
1026 a18: bool = false,
1027 a19: bool = false,
1028 a20: bool = false,
1029 a21: bool = false,
1030 a22: bool = false,
1031 a23: bool = false,
1032 a24: bool = false,
1033 a25: bool = false,
1034 a26: bool = false,
1035 a27: bool = false,
1036 a28: bool = false,
1037 a29: bool = false,
1038 a30: bool = false,
1039 a31: bool = false,
1040 a32: bool = false,
1041 a33: bool = false,
1042 a34: bool = false,
1043 a35: bool = false,
1044 a36: bool = false,
1045 a37: bool = false,
1046 a38: bool = false,
1047 a39: bool = false,
1048 a40: bool = false,
1049 a41: bool = false,
1050 a42: bool = false,
1051 a43: bool = false,
1052 a44: bool = false,
1053 a45: bool = false,
1054 a46: bool = false,
1055 a47: bool = false,
1056 a48: bool = false,
1057 a49: bool = false,
1058 a50: bool = false,
1059 a51: bool = false,
1060 a52: bool = false,
1061 a53: bool = false,
1062 a54: bool = false,
1063 a55: bool = false,
1064 a56: bool = false,
1065 a57: bool = false,
1066 a58: bool = false,
1067 a59: bool = false,
1068 a60: bool = false,
1069 a61: bool = false,
1070 a62: bool = false,
1071 a63: bool = false,
1072
1073 a0_lo: bool = false,
1074 a0_hi: bool = false,
1075 a1_lo: bool = false,
1076 a1_hi: bool = false,
1077 a2_lo: bool = false,
1078 a2_hi: bool = false,
1079 a3_lo: bool = false,
1080 a3_hi: bool = false,
1081 a4_lo: bool = false,
1082 a4_hi: bool = false,
1083 a5_lo: bool = false,
1084 a5_hi: bool = false,
1085 a6_lo: bool = false,
1086 a6_hi: bool = false,
1087 a7_lo: bool = false,
1088 a7_hi: bool = false,
1089 a8_lo: bool = false,
1090 a8_hi: bool = false,
1091 a9_lo: bool = false,
1092 a9_hi: bool = false,
1093 a10_lo: bool = false,
1094 a10_hi: bool = false,
1095 a11_lo: bool = false,
1096 a11_hi: bool = false,
1097 a12_lo: bool = false,
1098 a12_hi: bool = false,
1099 a13_lo: bool = false,
1100 a13_hi: bool = false,
1101 a14_lo: bool = false,
1102 a14_hi: bool = false,
1103 a15_lo: bool = false,
1104 a15_hi: bool = false,
1105 a16_lo: bool = false,
1106 a16_hi: bool = false,
1107 a17_lo: bool = false,
1108 a17_hi: bool = false,
1109 a18_lo: bool = false,
1110 a18_hi: bool = false,
1111 a19_lo: bool = false,
1112 a19_hi: bool = false,
1113 a20_lo: bool = false,
1114 a20_hi: bool = false,
1115 a21_lo: bool = false,
1116 a21_hi: bool = false,
1117 a22_lo: bool = false,
1118 a22_hi: bool = false,
1119 a23_lo: bool = false,
1120 a23_hi: bool = false,
1121 a24_lo: bool = false,
1122 a24_hi: bool = false,
1123 a25_lo: bool = false,
1124 a25_hi: bool = false,
1125 a26_lo: bool = false,
1126 a26_hi: bool = false,
1127 a27_lo: bool = false,
1128 a27_hi: bool = false,
1129 a28_lo: bool = false,
1130 a28_hi: bool = false,
1131 a29_lo: bool = false,
1132 a29_hi: bool = false,
1133 a30_lo: bool = false,
1134 a30_hi: bool = false,
1135 a31_lo: bool = false,
1136 a31_hi: bool = false,
1137 a32_lo: bool = false,
1138 a32_hi: bool = false,
1139 a33_lo: bool = false,
1140 a33_hi: bool = false,
1141 a34_lo: bool = false,
1142 a34_hi: bool = false,
1143 a35_lo: bool = false,
1144 a35_hi: bool = false,
1145 a36_lo: bool = false,
1146 a36_hi: bool = false,
1147 a37_lo: bool = false,
1148 a37_hi: bool = false,
1149 a38_lo: bool = false,
1150 a38_hi: bool = false,
1151 a39_lo: bool = false,
1152 a39_hi: bool = false,
1153 a40_lo: bool = false,
1154 a40_hi: bool = false,
1155 a41_lo: bool = false,
1156 a41_hi: bool = false,
1157 a42_lo: bool = false,
1158 a42_hi: bool = false,
1159 a43_lo: bool = false,
1160 a43_hi: bool = false,
1161 a44_lo: bool = false,
1162 a44_hi: bool = false,
1163 a45_lo: bool = false,
1164 a45_hi: bool = false,
1165 a46_lo: bool = false,
1166 a46_hi: bool = false,
1167 a47_lo: bool = false,
1168 a47_hi: bool = false,
1169 a48_lo: bool = false,
1170 a48_hi: bool = false,
1171 a49_lo: bool = false,
1172 a49_hi: bool = false,
1173 a50_lo: bool = false,
1174 a50_hi: bool = false,
1175 a51_lo: bool = false,
1176 a51_hi: bool = false,
1177 a52_lo: bool = false,
1178 a52_hi: bool = false,
1179 a53_lo: bool = false,
1180 a53_hi: bool = false,
1181 a54_lo: bool = false,
1182 a54_hi: bool = false,
1183 a55_lo: bool = false,
1184 a55_hi: bool = false,
1185 a56_lo: bool = false,
1186 a56_hi: bool = false,
1187 a57_lo: bool = false,
1188 a57_hi: bool = false,
1189 a58_lo: bool = false,
1190 a58_hi: bool = false,
1191 a59_lo: bool = false,
1192 a59_hi: bool = false,
1193 a60_lo: bool = false,
1194 a60_hi: bool = false,
1195 a61_lo: bool = false,
1196 a61_hi: bool = false,
1197 a62_lo: bool = false,
1198 a62_hi: bool = false,
1199 a63_lo: bool = false,
1200 a63_hi: bool = false,
1201
1202 a0_x: bool = false,
1203 a0_y: bool = false,
1204 a0_z: bool = false,
1205 a0_t: bool = false,
1206 a1_x: bool = false,
1207 a1_y: bool = false,
1208 a1_z: bool = false,
1209 a1_t: bool = false,
1210 a2_x: bool = false,
1211 a2_y: bool = false,
1212 a2_z: bool = false,
1213 a2_t: bool = false,
1214 a3_x: bool = false,
1215 a3_y: bool = false,
1216 a3_z: bool = false,
1217 a3_t: bool = false,
1218 a4_x: bool = false,
1219 a4_y: bool = false,
1220 a4_z: bool = false,
1221 a4_t: bool = false,
1222 a5_x: bool = false,
1223 a5_y: bool = false,
1224 a5_z: bool = false,
1225 a5_t: bool = false,
1226 a6_x: bool = false,
1227 a6_y: bool = false,
1228 a6_z: bool = false,
1229 a6_t: bool = false,
1230 a7_x: bool = false,
1231 a7_y: bool = false,
1232 a7_z: bool = false,
1233 a7_t: bool = false,
1234 a8_x: bool = false,
1235 a8_y: bool = false,
1236 a8_z: bool = false,
1237 a8_t: bool = false,
1238 a9_x: bool = false,
1239 a9_y: bool = false,
1240 a9_z: bool = false,
1241 a9_t: bool = false,
1242 a10_x: bool = false,
1243 a10_y: bool = false,
1244 a10_z: bool = false,
1245 a10_t: bool = false,
1246 a11_x: bool = false,
1247 a11_y: bool = false,
1248 a11_z: bool = false,
1249 a11_t: bool = false,
1250 a12_x: bool = false,
1251 a12_y: bool = false,
1252 a12_z: bool = false,
1253 a12_t: bool = false,
1254 a13_x: bool = false,
1255 a13_y: bool = false,
1256 a13_z: bool = false,
1257 a13_t: bool = false,
1258 a14_x: bool = false,
1259 a14_y: bool = false,
1260 a14_z: bool = false,
1261 a14_t: bool = false,
1262 a15_x: bool = false,
1263 a15_y: bool = false,
1264 a15_z: bool = false,
1265 a15_t: bool = false,
1266 a16_x: bool = false,
1267 a16_y: bool = false,
1268 a16_z: bool = false,
1269 a16_t: bool = false,
1270 a17_x: bool = false,
1271 a17_y: bool = false,
1272 a17_z: bool = false,
1273 a17_t: bool = false,
1274 a18_x: bool = false,
1275 a18_y: bool = false,
1276 a18_z: bool = false,
1277 a18_t: bool = false,
1278 a19_x: bool = false,
1279 a19_y: bool = false,
1280 a19_z: bool = false,
1281 a19_t: bool = false,
1282 a20_x: bool = false,
1283 a20_y: bool = false,
1284 a20_z: bool = false,
1285 a20_t: bool = false,
1286 a21_x: bool = false,
1287 a21_y: bool = false,
1288 a21_z: bool = false,
1289 a21_t: bool = false,
1290 a22_x: bool = false,
1291 a22_y: bool = false,
1292 a22_z: bool = false,
1293 a22_t: bool = false,
1294 a23_x: bool = false,
1295 a23_y: bool = false,
1296 a23_z: bool = false,
1297 a23_t: bool = false,
1298 a24_x: bool = false,
1299 a24_y: bool = false,
1300 a24_z: bool = false,
1301 a24_t: bool = false,
1302 a25_x: bool = false,
1303 a25_y: bool = false,
1304 a25_z: bool = false,
1305 a25_t: bool = false,
1306 a26_x: bool = false,
1307 a26_y: bool = false,
1308 a26_z: bool = false,
1309 a26_t: bool = false,
1310 a27_x: bool = false,
1311 a27_y: bool = false,
1312 a27_z: bool = false,
1313 a27_t: bool = false,
1314 a28_x: bool = false,
1315 a28_y: bool = false,
1316 a28_z: bool = false,
1317 a28_t: bool = false,
1318 a29_x: bool = false,
1319 a29_y: bool = false,
1320 a29_z: bool = false,
1321 a29_t: bool = false,
1322 a30_x: bool = false,
1323 a30_y: bool = false,
1324 a30_z: bool = false,
1325 a30_t: bool = false,
1326 a31_x: bool = false,
1327 a31_y: bool = false,
1328 a31_z: bool = false,
1329 a31_t: bool = false,
1330 a32_x: bool = false,
1331 a32_y: bool = false,
1332 a32_z: bool = false,
1333 a32_t: bool = false,
1334 a33_x: bool = false,
1335 a33_y: bool = false,
1336 a33_z: bool = false,
1337 a33_t: bool = false,
1338 a34_x: bool = false,
1339 a34_y: bool = false,
1340 a34_z: bool = false,
1341 a34_t: bool = false,
1342 a35_x: bool = false,
1343 a35_y: bool = false,
1344 a35_z: bool = false,
1345 a35_t: bool = false,
1346 a36_x: bool = false,
1347 a36_y: bool = false,
1348 a36_z: bool = false,
1349 a36_t: bool = false,
1350 a37_x: bool = false,
1351 a37_y: bool = false,
1352 a37_z: bool = false,
1353 a37_t: bool = false,
1354 a38_x: bool = false,
1355 a38_y: bool = false,
1356 a38_z: bool = false,
1357 a38_t: bool = false,
1358 a39_x: bool = false,
1359 a39_y: bool = false,
1360 a39_z: bool = false,
1361 a39_t: bool = false,
1362 a40_x: bool = false,
1363 a40_y: bool = false,
1364 a40_z: bool = false,
1365 a40_t: bool = false,
1366 a41_x: bool = false,
1367 a41_y: bool = false,
1368 a41_z: bool = false,
1369 a41_t: bool = false,
1370 a42_x: bool = false,
1371 a42_y: bool = false,
1372 a42_z: bool = false,
1373 a42_t: bool = false,
1374 a43_x: bool = false,
1375 a43_y: bool = false,
1376 a43_z: bool = false,
1377 a43_t: bool = false,
1378 a44_x: bool = false,
1379 a44_y: bool = false,
1380 a44_z: bool = false,
1381 a44_t: bool = false,
1382 a45_x: bool = false,
1383 a45_y: bool = false,
1384 a45_z: bool = false,
1385 a45_t: bool = false,
1386 a46_x: bool = false,
1387 a46_y: bool = false,
1388 a46_z: bool = false,
1389 a46_t: bool = false,
1390 a47_x: bool = false,
1391 a47_y: bool = false,
1392 a47_z: bool = false,
1393 a47_t: bool = false,
1394 a48_x: bool = false,
1395 a48_y: bool = false,
1396 a48_z: bool = false,
1397 a48_t: bool = false,
1398 a49_x: bool = false,
1399 a49_y: bool = false,
1400 a49_z: bool = false,
1401 a49_t: bool = false,
1402 a50_x: bool = false,
1403 a50_y: bool = false,
1404 a50_z: bool = false,
1405 a50_t: bool = false,
1406 a51_x: bool = false,
1407 a51_y: bool = false,
1408 a51_z: bool = false,
1409 a51_t: bool = false,
1410 a52_x: bool = false,
1411 a52_y: bool = false,
1412 a52_z: bool = false,
1413 a52_t: bool = false,
1414 a53_x: bool = false,
1415 a53_y: bool = false,
1416 a53_z: bool = false,
1417 a53_t: bool = false,
1418 a54_x: bool = false,
1419 a54_y: bool = false,
1420 a54_z: bool = false,
1421 a54_t: bool = false,
1422 a55_x: bool = false,
1423 a55_y: bool = false,
1424 a55_z: bool = false,
1425 a55_t: bool = false,
1426 a56_x: bool = false,
1427 a56_y: bool = false,
1428 a56_z: bool = false,
1429 a56_t: bool = false,
1430 a57_x: bool = false,
1431 a57_y: bool = false,
1432 a57_z: bool = false,
1433 a57_t: bool = false,
1434 a58_x: bool = false,
1435 a58_y: bool = false,
1436 a58_z: bool = false,
1437 a58_t: bool = false,
1438 a59_x: bool = false,
1439 a59_y: bool = false,
1440 a59_z: bool = false,
1441 a59_t: bool = false,
1442 a60_x: bool = false,
1443 a60_y: bool = false,
1444 a60_z: bool = false,
1445 a60_t: bool = false,
1446 a61_x: bool = false,
1447 a61_y: bool = false,
1448 a61_z: bool = false,
1449 a61_t: bool = false,
1450 a62_x: bool = false,
1451 a62_y: bool = false,
1452 a62_z: bool = false,
1453 a62_t: bool = false,
1454 a63_x: bool = false,
1455 a63_y: bool = false,
1456 a63_z: bool = false,
1457 a63_t: bool = false,
1458 },
1459 .lanai => packed struct {
1460 /// Whether the inline assembly code may perform stores to memory
1461 /// addresses other than those derived from input pointer provenance.
1462 memory: bool = false,
1463 /// Condition flags which aren't accessible outside of conditional execution.
1464 sw: bool = false,
1465
1466 r3: bool = false,
1467 r4: bool = false,
1468 r5: bool = false,
1469 r6: bool = false,
1470 r7: bool = false,
1471 r8: bool = false,
1472 r9: bool = false,
1473 r10: bool = false,
1474 r11: bool = false,
1475 r12: bool = false,
1476 r13: bool = false,
1477 r14: bool = false,
1478 r15: bool = false,
1479 r16: bool = false,
1480 r17: bool = false,
1481 r18: bool = false,
1482 r19: bool = false,
1483 r20: bool = false,
1484 r21: bool = false,
1485 r22: bool = false,
1486 r23: bool = false,
1487 r24: bool = false,
1488 r25: bool = false,
1489 r26: bool = false,
1490 r27: bool = false,
1491 r28: bool = false,
1492 r29: bool = false,
1493 r30: bool = false,
1494 r31: bool = false,
1495 },
1496 .avr => packed struct {
1497 /// Whether the inline assembly code may perform stores to memory
1498 /// addresses other than those derived from input pointer provenance.
1499 memory: bool = false,
1500 flags: bool = false,
1501 r0: bool = false,
1502 r1: bool = false,
1503 r2: bool = false,
1504 r3: bool = false,
1505 r4: bool = false,
1506 r5: bool = false,
1507 r6: bool = false,
1508 r7: bool = false,
1509 r8: bool = false,
1510 r9: bool = false,
1511 r10: bool = false,
1512 r11: bool = false,
1513 r12: bool = false,
1514 r13: bool = false,
1515 r14: bool = false,
1516 r15: bool = false,
1517 r16: bool = false,
1518 r17: bool = false,
1519 r18: bool = false,
1520 r19: bool = false,
1521 r20: bool = false,
1522 r21: bool = false,
1523 r22: bool = false,
1524 r23: bool = false,
1525 r24: bool = false,
1526 r25: bool = false,
1527 r26: bool = false,
1528 r27: bool = false,
1529 r28: bool = false,
1530 r29: bool = false,
1531 r30: bool = false,
1532 r31: bool = false,
1533 },
1534 .msp430 => packed struct {
1535 /// Whether the inline assembly code may perform stores to memory
1536 /// addresses other than those derived from input pointer provenance.
1537 memory: bool = false,
1538
1539 r0: bool = false,
1540 r1: bool = false,
1541 r2: bool = false,
1542
1543 r4: bool = false,
1544 r5: bool = false,
1545 r6: bool = false,
1546 r7: bool = false,
1547 r8: bool = false,
1548 r9: bool = false,
1549 r10: bool = false,
1550 r11: bool = false,
1551 r12: bool = false,
1552 r13: bool = false,
1553 r14: bool = false,
1554 r15: bool = false,
1555 },
1556 .m68k => packed struct {
1557 /// Whether the inline assembly code may perform stores to memory
1558 /// addresses other than those derived from input pointer provenance.
1559 memory: bool = false,
1560
1561 ccr: bool = false,
1562
1563 d0: bool = false,
1564 d1: bool = false,
1565 d2: bool = false,
1566 d3: bool = false,
1567 d4: bool = false,
1568 d5: bool = false,
1569 d6: bool = false,
1570 d7: bool = false,
1571
1572 a0: bool = false,
1573 a1: bool = false,
1574 a2: bool = false,
1575 a3: bool = false,
1576 a4: bool = false,
1577 a5: bool = false,
1578 a6: bool = false,
1579 a7: bool = false,
1580
1581 macsr: bool = false,
1582 acc: bool = false,
1583 acc0: bool = false,
1584 acc1: bool = false,
1585 acc2: bool = false,
1586 acc3: bool = false,
1587
1588 mask: bool = false,
1589 fpcr: bool = false,
1590 fpsr: bool = false,
1591
1592 fp0: bool = false,
1593 fp1: bool = false,
1594 fp2: bool = false,
1595 fp3: bool = false,
1596 fp4: bool = false,
1597 fp5: bool = false,
1598 fp6: bool = false,
1599 fp7: bool = false,
1600 },
1601 .sparc, .sparc64 => packed struct {
1602 /// Whether the inline assembly code may perform stores to memory
1603 /// addresses other than those derived from input pointer provenance.
1604 memory: bool = false,
1605
1606 psr: bool = false,
1607 gsr: bool = false,
1608 y: bool = false,
1609
1610 /// asr2; v9+
1611 ccr: bool = false,
1612 /// Lower bits of `ccr`.
1613 icc: bool = false,
1614 /// Upper bits of `ccr`.
1615 xcc: bool = false,
1616
1617 g1: bool = false,
1618 g2: bool = false,
1619 g3: bool = false,
1620 g4: bool = false,
1621 g5: bool = false,
1622 g6: bool = false,
1623 g7: bool = false,
1624
1625 o0: bool = false,
1626 o1: bool = false,
1627 o2: bool = false,
1628 o3: bool = false,
1629 o4: bool = false,
1630 o5: bool = false,
1631 o6: bool = false,
1632 o7: bool = false,
1633
1634 l0: bool = false,
1635 l1: bool = false,
1636 l2: bool = false,
1637 l3: bool = false,
1638 l4: bool = false,
1639 l5: bool = false,
1640 l6: bool = false,
1641 l7: bool = false,
1642
1643 i0: bool = false,
1644 i1: bool = false,
1645 i2: bool = false,
1646 i3: bool = false,
1647 i4: bool = false,
1648 i5: bool = false,
1649 i6: bool = false,
1650 i7: bool = false,
1651
1652 fsr: bool = false,
1653 fprs: bool = false,
1654
1655 q0: bool = false,
1656 q1: bool = false,
1657 q2: bool = false,
1658 q3: bool = false,
1659 q4: bool = false,
1660 q5: bool = false,
1661 q6: bool = false,
1662 q7: bool = false,
1663 q8: bool = false,
1664 q9: bool = false,
1665 q10: bool = false,
1666 q11: bool = false,
1667 q12: bool = false,
1668 q13: bool = false,
1669 q14: bool = false,
1670 q15: bool = false,
1671 },
1672 .bpfel, .bpfeb => packed struct {
1673 /// Whether the inline assembly code may perform stores to memory
1674 /// addresses other than those derived from input pointer provenance.
1675 memory: bool = false,
1676
1677 r0: bool = false,
1678 r1: bool = false,
1679 r2: bool = false,
1680 r3: bool = false,
1681 r4: bool = false,
1682 r5: bool = false,
1683 r6: bool = false,
1684 r7: bool = false,
1685 r8: bool = false,
1686 r9: bool = false,
1687
1688 w0: bool = false,
1689 w1: bool = false,
1690 w2: bool = false,
1691 w3: bool = false,
1692 w4: bool = false,
1693 w5: bool = false,
1694 w6: bool = false,
1695 w7: bool = false,
1696 w8: bool = false,
1697 w9: bool = false,
1698 },
1699 .hexagon => packed struct {
1700 /// Whether the inline assembly code may perform stores to memory
1701 /// addresses other than those derived from input pointer provenance.
1702 memory: bool = false,
1703
1704 sa0: bool = false,
1705 sa1: bool = false,
1706 lc0: bool = false,
1707 lc1: bool = false,
1708 m0: bool = false,
1709 m1: bool = false,
1710 usr: bool = false,
1711 ugp: bool = false,
1712 gp: bool = false,
1713 cs0: bool = false,
1714 cs1: bool = false,
1715 framelimit: bool = false,
1716 framekey: bool = false,
1717
1718 p0: bool = false,
1719 p1: bool = false,
1720 p2: bool = false,
1721 p3: bool = false,
1722
1723 r0: bool = false,
1724 r1: bool = false,
1725 r2: bool = false,
1726 r3: bool = false,
1727 r4: bool = false,
1728 r5: bool = false,
1729 r6: bool = false,
1730 r7: bool = false,
1731 r8: bool = false,
1732 r9: bool = false,
1733 r10: bool = false,
1734 r11: bool = false,
1735 r12: bool = false,
1736 r13: bool = false,
1737 r14: bool = false,
1738 r15: bool = false,
1739 r16: bool = false,
1740 r17: bool = false,
1741 r18: bool = false,
1742 r19: bool = false,
1743 r20: bool = false,
1744 r21: bool = false,
1745 r22: bool = false,
1746 r23: bool = false,
1747 r24: bool = false,
1748 r25: bool = false,
1749 r26: bool = false,
1750 r27: bool = false,
1751 r28: bool = false,
1752 r29: bool = false,
1753 r30: bool = false,
1754 r31: bool = false,
1755
1756 q0: bool = false,
1757 q1: bool = false,
1758 q2: bool = false,
1759 q3: bool = false,
1760
1761 v0: bool = false,
1762 v1: bool = false,
1763 v2: bool = false,
1764 v3: bool = false,
1765 v4: bool = false,
1766 v5: bool = false,
1767 v6: bool = false,
1768 v7: bool = false,
1769 v8: bool = false,
1770 v9: bool = false,
1771 v10: bool = false,
1772 v11: bool = false,
1773 v12: bool = false,
1774 v13: bool = false,
1775 v14: bool = false,
1776 v15: bool = false,
1777 v16: bool = false,
1778 v17: bool = false,
1779 v18: bool = false,
1780 v19: bool = false,
1781 v20: bool = false,
1782 v21: bool = false,
1783 v22: bool = false,
1784 v23: bool = false,
1785 v24: bool = false,
1786 v25: bool = false,
1787 v26: bool = false,
1788 v27: bool = false,
1789 v28: bool = false,
1790 v29: bool = false,
1791 v30: bool = false,
1792 v31: bool = false,
1793 },
1794 .s390x => packed struct {
1795 /// Whether the inline assembly code may perform stores to memory
1796 /// addresses other than those derived from input pointer provenance.
1797 memory: bool = false,
1798
1799 ps: bool = false,
1800 r0: bool = false,
1801 r1: bool = false,
1802 r2: bool = false,
1803 r3: bool = false,
1804 r4: bool = false,
1805 r5: bool = false,
1806 r6: bool = false,
1807 r7: bool = false,
1808 r8: bool = false,
1809 r9: bool = false,
1810 r10: bool = false,
1811 r11: bool = false,
1812 r12: bool = false,
1813 r13: bool = false,
1814 r14: bool = false,
1815 r15: bool = false,
1816
1817 fpc: bool = false,
1818
1819 v0: bool = false,
1820 v1: bool = false,
1821 v2: bool = false,
1822 v3: bool = false,
1823 v4: bool = false,
1824 v5: bool = false,
1825 v6: bool = false,
1826 v7: bool = false,
1827 v8: bool = false,
1828 v9: bool = false,
1829 v10: bool = false,
1830 v11: bool = false,
1831 v12: bool = false,
1832 v13: bool = false,
1833 v14: bool = false,
1834 v15: bool = false,
1835 v16: bool = false,
1836 v17: bool = false,
1837 v18: bool = false,
1838 v19: bool = false,
1839 v20: bool = false,
1840 v21: bool = false,
1841 v22: bool = false,
1842 v23: bool = false,
1843 v24: bool = false,
1844 v25: bool = false,
1845 v26: bool = false,
1846 v27: bool = false,
1847 v28: bool = false,
1848 v29: bool = false,
1849 v30: bool = false,
1850 v31: bool = false,
1851
1852 f0: bool = false,
1853 f1: bool = false,
1854 f2: bool = false,
1855 f3: bool = false,
1856 f4: bool = false,
1857 f5: bool = false,
1858 f6: bool = false,
1859 f7: bool = false,
1860 f8: bool = false,
1861 f9: bool = false,
1862 f10: bool = false,
1863 f11: bool = false,
1864 f12: bool = false,
1865 f13: bool = false,
1866 f14: bool = false,
1867 f15: bool = false,
1868 },
1869 .ve => packed struct {
1870 /// Whether the inline assembly code may perform stores to memory
1871 /// addresses other than those derived from input pointer provenance.
1872 memory: bool = false,
1873
1874 psw: bool = false,
1875
1876 s0: bool = false,
1877 s1: bool = false,
1878 s2: bool = false,
1879 s3: bool = false,
1880 s4: bool = false,
1881 s5: bool = false,
1882 s6: bool = false,
1883 s7: bool = false,
1884 s8: bool = false,
1885 s9: bool = false,
1886 s10: bool = false,
1887 s11: bool = false,
1888 s12: bool = false,
1889 s13: bool = false,
1890 s14: bool = false,
1891 s15: bool = false,
1892 s16: bool = false,
1893 s17: bool = false,
1894 s18: bool = false,
1895 s19: bool = false,
1896 s20: bool = false,
1897 s21: bool = false,
1898 s22: bool = false,
1899 s23: bool = false,
1900 s24: bool = false,
1901 s25: bool = false,
1902 s26: bool = false,
1903 s27: bool = false,
1904 s28: bool = false,
1905 s29: bool = false,
1906 s30: bool = false,
1907 s31: bool = false,
1908 s32: bool = false,
1909 s33: bool = false,
1910 s34: bool = false,
1911 s35: bool = false,
1912 s36: bool = false,
1913 s37: bool = false,
1914 s38: bool = false,
1915 s39: bool = false,
1916 s40: bool = false,
1917 s41: bool = false,
1918 s42: bool = false,
1919 s43: bool = false,
1920 s44: bool = false,
1921 s45: bool = false,
1922 s46: bool = false,
1923 s47: bool = false,
1924 s48: bool = false,
1925 s49: bool = false,
1926 s50: bool = false,
1927 s51: bool = false,
1928 s52: bool = false,
1929 s53: bool = false,
1930 s54: bool = false,
1931 s55: bool = false,
1932 s56: bool = false,
1933 s57: bool = false,
1934 s58: bool = false,
1935 s59: bool = false,
1936 s60: bool = false,
1937 s61: bool = false,
1938 s62: bool = false,
1939 s63: bool = false,
1940
1941 vixr: bool = false,
1942 vl: bool = false,
1943
1944 vm0: bool = false,
1945 vm1: bool = false,
1946 vm2: bool = false,
1947 vm3: bool = false,
1948 vm4: bool = false,
1949 vm5: bool = false,
1950 vm6: bool = false,
1951 vm7: bool = false,
1952 vm8: bool = false,
1953 vm9: bool = false,
1954 vm10: bool = false,
1955 vm11: bool = false,
1956 vm12: bool = false,
1957 vm13: bool = false,
1958 vm14: bool = false,
1959 vm15: bool = false,
1960
1961 v0: bool = false,
1962 v1: bool = false,
1963 v2: bool = false,
1964 v3: bool = false,
1965 v4: bool = false,
1966 v5: bool = false,
1967 v6: bool = false,
1968 v7: bool = false,
1969 v8: bool = false,
1970 v9: bool = false,
1971 v10: bool = false,
1972 v11: bool = false,
1973 v12: bool = false,
1974 v13: bool = false,
1975 v14: bool = false,
1976 v15: bool = false,
1977 v16: bool = false,
1978 v17: bool = false,
1979 v18: bool = false,
1980 v19: bool = false,
1981 v20: bool = false,
1982 v21: bool = false,
1983 v22: bool = false,
1984 v23: bool = false,
1985 v24: bool = false,
1986 v25: bool = false,
1987 v26: bool = false,
1988 v27: bool = false,
1989 v28: bool = false,
1990 v29: bool = false,
1991 v30: bool = false,
1992 v31: bool = false,
1993 v32: bool = false,
1994 v33: bool = false,
1995 v34: bool = false,
1996 v35: bool = false,
1997 v36: bool = false,
1998 v37: bool = false,
1999 v38: bool = false,
2000 v39: bool = false,
2001 v40: bool = false,
2002 v41: bool = false,
2003 v42: bool = false,
2004 v43: bool = false,
2005 v44: bool = false,
2006 v45: bool = false,
2007 v46: bool = false,
2008 v47: bool = false,
2009 v48: bool = false,
2010 v49: bool = false,
2011 v50: bool = false,
2012 v51: bool = false,
2013 v52: bool = false,
2014 v53: bool = false,
2015 v54: bool = false,
2016 v55: bool = false,
2017 v56: bool = false,
2018 v57: bool = false,
2019 v58: bool = false,
2020 v59: bool = false,
2021 v60: bool = false,
2022 v61: bool = false,
2023 v62: bool = false,
2024 v63: bool = false,
2025 },
2026 .kalimba => packed struct {
2027 /// Whether the inline assembly code may perform stores to memory
2028 /// addresses other than those derived from input pointer provenance.
2029 memory: bool = false,
2030
2031 i0: bool = false,
2032 i1: bool = false,
2033 i2: bool = false,
2034 i3: bool = false,
2035 i4: bool = false,
2036 i5: bool = false,
2037 i6: bool = false,
2038 i7: bool = false,
2039
2040 m0: bool = false,
2041 m1: bool = false,
2042 m2: bool = false,
2043 m3: bool = false,
2044 l0: bool = false,
2045 l1: bool = false,
2046 l2: bool = false,
2047 l3: bool = false,
2048 l4: bool = false,
2049 l5: bool = false,
2050 doloopstart: bool = false,
2051 doloopend: bool = false,
2052 divresult: bool = false,
2053 divremainder: bool = false,
2054 rmac: bool = false,
2055 rmac0: bool = false,
2056 rmac1: bool = false,
2057 rmac2: bool = false,
2058 rlink: bool = false,
2059 rflags: bool = false,
2060 r0: bool = false,
2061 r1: bool = false,
2062 r2: bool = false,
2063 r3: bool = false,
2064 r4: bool = false,
2065 r5: bool = false,
2066 r6: bool = false,
2067 r7: bool = false,
2068 r8: bool = false,
2069 r9: bool = false,
2070 r10: bool = false,
2071 },
2072 .or1k => packed struct {
2073 /// Whether the inline assembly code may perform stores to memory
2074 /// addresses other than those derived from input pointer provenance.
2075 memory: bool = false,
2076
2077 maclo: bool = false,
2078 machi: bool = false,
2079 fpcsr: bool = false,
2080 fpmaddlo: bool = false,
2081 fpmaddhi: bool = false,
2082 vmaclo: bool = false,
2083 vmachi: bool = false,
2084
2085 r0: bool = false,
2086 r1: bool = false,
2087 r2: bool = false,
2088 r3: bool = false,
2089 r4: bool = false,
2090 r5: bool = false,
2091 r6: bool = false,
2092 r7: bool = false,
2093 r8: bool = false,
2094 r9: bool = false,
2095 r10: bool = false,
2096 r11: bool = false,
2097 r12: bool = false,
2098 r13: bool = false,
2099 r14: bool = false,
2100 r15: bool = false,
2101 r16: bool = false,
2102 r17: bool = false,
2103 r18: bool = false,
2104 r19: bool = false,
2105 r20: bool = false,
2106 r21: bool = false,
2107 r22: bool = false,
2108 r23: bool = false,
2109 r24: bool = false,
2110 r25: bool = false,
2111 r26: bool = false,
2112 r27: bool = false,
2113 r28: bool = false,
2114 r29: bool = false,
2115 r30: bool = false,
2116 r31: bool = false,
2117 },
2118 .csky => packed struct {
2119 /// Whether the inline assembly code may perform stores to memory
2120 /// addresses other than those derived from input pointer provenance.
2121 memory: bool = false,
2122
2123 psr: bool = false,
2124 hi: bool = false,
2125 lo: bool = false,
2126
2127 r0: bool = false,
2128 r1: bool = false,
2129 r2: bool = false,
2130 r3: bool = false,
2131 r4: bool = false,
2132 r5: bool = false,
2133 r6: bool = false,
2134 r7: bool = false,
2135 r8: bool = false,
2136 r9: bool = false,
2137 r10: bool = false,
2138 r11: bool = false,
2139 r12: bool = false,
2140 r13: bool = false,
2141 r14: bool = false,
2142 r15: bool = false,
2143 r16: bool = false,
2144 r17: bool = false,
2145 r18: bool = false,
2146 r19: bool = false,
2147 r20: bool = false,
2148 r21: bool = false,
2149 r22: bool = false,
2150 r23: bool = false,
2151 r24: bool = false,
2152 r25: bool = false,
2153 r26: bool = false,
2154 r27: bool = false,
2155 r28: bool = false,
2156 r29: bool = false,
2157 r30: bool = false,
2158 r31: bool = false,
2159
2160 vr0: bool = false,
2161 vr1: bool = false,
2162 vr2: bool = false,
2163 vr3: bool = false,
2164 vr4: bool = false,
2165 vr5: bool = false,
2166 vr6: bool = false,
2167 vr7: bool = false,
2168 vr8: bool = false,
2169 vr9: bool = false,
2170 vr10: bool = false,
2171 vr11: bool = false,
2172 vr12: bool = false,
2173 vr13: bool = false,
2174 vr14: bool = false,
2175 vr15: bool = false,
2176 vr16: bool = false,
2177 vr17: bool = false,
2178 vr18: bool = false,
2179 vr19: bool = false,
2180 vr20: bool = false,
2181 vr21: bool = false,
2182 vr22: bool = false,
2183 vr23: bool = false,
2184 vr24: bool = false,
2185 vr25: bool = false,
2186 vr26: bool = false,
2187 vr27: bool = false,
2188 vr28: bool = false,
2189 vr29: bool = false,
2190 vr30: bool = false,
2191 vr31: bool = false,
2192 },
2193 .arc, .arceb => packed struct {
2194 /// Whether the inline assembly code may perform stores to memory
2195 /// addresses other than those derived from input pointer provenance.
2196 memory: bool = false,
2197
2198 status32: bool = false,
2199 aux_macmode: bool = false,
2200 mulhi: bool = false,
2201 lp_start: bool = false,
2202 lp_end: bool = false,
2203 jli_base: bool = false,
2204 ldi_base: bool = false,
2205 ei_base: bool = false,
2206
2207 r0: bool = false,
2208 r1: bool = false,
2209 r2: bool = false,
2210 r3: bool = false,
2211 r4: bool = false,
2212 r5: bool = false,
2213 r6: bool = false,
2214 r7: bool = false,
2215 r8: bool = false,
2216 r9: bool = false,
2217 r10: bool = false,
2218 r11: bool = false,
2219 r12: bool = false,
2220 r13: bool = false,
2221 r14: bool = false,
2222 r15: bool = false,
2223 r16: bool = false,
2224 r17: bool = false,
2225 r18: bool = false,
2226 r19: bool = false,
2227 r20: bool = false,
2228 r21: bool = false,
2229 r22: bool = false,
2230 r23: bool = false,
2231 r24: bool = false,
2232 r25: bool = false,
2233 r26: bool = false,
2234 r27: bool = false,
2235 r28: bool = false,
2236 r29: bool = false,
2237 r30: bool = false,
2238 r31: bool = false,
2239 r32: bool = false,
2240 r33: bool = false,
2241 r34: bool = false,
2242 r35: bool = false,
2243 r36: bool = false,
2244 r37: bool = false,
2245 r38: bool = false,
2246 r39: bool = false,
2247 r40: bool = false,
2248 r41: bool = false,
2249 r42: bool = false,
2250 r43: bool = false,
2251 r44: bool = false,
2252 r45: bool = false,
2253 r46: bool = false,
2254 r47: bool = false,
2255 r48: bool = false,
2256 r49: bool = false,
2257 r50: bool = false,
2258 r51: bool = false,
2259 r52: bool = false,
2260 r53: bool = false,
2261 r54: bool = false,
2262 r55: bool = false,
2263 r56: bool = false,
2264 r57: bool = false,
2265 r58: bool = false,
2266 r59: bool = false,
2267 r60: bool = false,
2268
2269 fmp_ctrl: bool = false,
2270 dsp_ctrl: bool = false,
2271 acc0_lo: bool = false,
2272 acc0_glo: bool = false,
2273 acc0_hi: bool = false,
2274 acc0_ghi: bool = false,
2275 fp_ctrl: bool = false,
2276 fpu_status: bool = false,
2277 vfpu_status: bool = false,
2278
2279 f0: bool = false,
2280 f1: bool = false,
2281 f2: bool = false,
2282 f3: bool = false,
2283 f4: bool = false,
2284 f5: bool = false,
2285 f6: bool = false,
2286 f7: bool = false,
2287 f8: bool = false,
2288 f9: bool = false,
2289 f10: bool = false,
2290 f11: bool = false,
2291 f12: bool = false,
2292 f13: bool = false,
2293 f14: bool = false,
2294 f15: bool = false,
2295 f16: bool = false,
2296 f17: bool = false,
2297 f18: bool = false,
2298 f19: bool = false,
2299 f20: bool = false,
2300 f21: bool = false,
2301 f22: bool = false,
2302 f23: bool = false,
2303 f24: bool = false,
2304 f25: bool = false,
2305 f26: bool = false,
2306 f27: bool = false,
2307 f28: bool = false,
2308 f29: bool = false,
2309 f30: bool = false,
2310 f31: bool = false,
2311 },
2312 .loongarch32, .loongarch64 => packed struct {
2313 /// Whether the inline assembly code may perform stores to memory
2314 /// addresses other than those derived from input pointer provenance.
2315 memory: bool = false,
2316
2317 r1: bool = false,
2318 r2: bool = false,
2319 r3: bool = false,
2320 r4: bool = false,
2321 r5: bool = false,
2322 r6: bool = false,
2323 r7: bool = false,
2324 r8: bool = false,
2325 r9: bool = false,
2326 r10: bool = false,
2327 r11: bool = false,
2328 r12: bool = false,
2329 r13: bool = false,
2330 r14: bool = false,
2331 r15: bool = false,
2332 r16: bool = false,
2333 r17: bool = false,
2334 r18: bool = false,
2335 r19: bool = false,
2336 r20: bool = false,
2337 r21: bool = false,
2338 r22: bool = false,
2339 r23: bool = false,
2340 r24: bool = false,
2341 r25: bool = false,
2342 r26: bool = false,
2343 r27: bool = false,
2344 r28: bool = false,
2345 r29: bool = false,
2346 r30: bool = false,
2347 r31: bool = false,
2348
2349 fcc0: bool = false,
2350 fcc1: bool = false,
2351 fcc2: bool = false,
2352 fcc3: bool = false,
2353 fcc4: bool = false,
2354 fcc5: bool = false,
2355 fcc6: bool = false,
2356 fcc7: bool = false,
2357
2358 fcsr0: bool = false,
2359 fcsr1: bool = false,
2360 fcsr2: bool = false,
2361 fcsr3: bool = false,
2362
2363 xr0: bool = false,
2364 xr1: bool = false,
2365 xr2: bool = false,
2366 xr3: bool = false,
2367 xr4: bool = false,
2368 xr5: bool = false,
2369 xr6: bool = false,
2370 xr7: bool = false,
2371 xr8: bool = false,
2372 xr9: bool = false,
2373 xr10: bool = false,
2374 xr11: bool = false,
2375 xr12: bool = false,
2376 xr13: bool = false,
2377 xr14: bool = false,
2378 xr15: bool = false,
2379 xr16: bool = false,
2380 xr17: bool = false,
2381 xr18: bool = false,
2382 xr19: bool = false,
2383 xr20: bool = false,
2384 xr21: bool = false,
2385 xr22: bool = false,
2386 xr23: bool = false,
2387 xr24: bool = false,
2388 xr25: bool = false,
2389 xr26: bool = false,
2390 xr27: bool = false,
2391 xr28: bool = false,
2392 xr29: bool = false,
2393 xr30: bool = false,
2394 xr31: bool = false,
2395
2396 vr0: bool = false,
2397 vr1: bool = false,
2398 vr2: bool = false,
2399 vr3: bool = false,
2400 vr4: bool = false,
2401 vr5: bool = false,
2402 vr6: bool = false,
2403 vr7: bool = false,
2404 vr8: bool = false,
2405 vr9: bool = false,
2406 vr10: bool = false,
2407 vr11: bool = false,
2408 vr12: bool = false,
2409 vr13: bool = false,
2410 vr14: bool = false,
2411 vr15: bool = false,
2412 vr16: bool = false,
2413 vr17: bool = false,
2414 vr18: bool = false,
2415 vr19: bool = false,
2416 vr20: bool = false,
2417 vr21: bool = false,
2418 vr22: bool = false,
2419 vr23: bool = false,
2420 vr24: bool = false,
2421 vr25: bool = false,
2422 vr26: bool = false,
2423 vr27: bool = false,
2424 vr28: bool = false,
2425 vr29: bool = false,
2426 vr30: bool = false,
2427 vr31: bool = false,
2428
2429 f0: bool = false,
2430 f1: bool = false,
2431 f2: bool = false,
2432 f3: bool = false,
2433 f4: bool = false,
2434 f5: bool = false,
2435 f6: bool = false,
2436 f7: bool = false,
2437 f8: bool = false,
2438 f9: bool = false,
2439 f10: bool = false,
2440 f11: bool = false,
2441 f12: bool = false,
2442 f13: bool = false,
2443 f14: bool = false,
2444 f15: bool = false,
2445 f16: bool = false,
2446 f17: bool = false,
2447 f18: bool = false,
2448 f19: bool = false,
2449 f20: bool = false,
2450 f21: bool = false,
2451 f22: bool = false,
2452 f23: bool = false,
2453 f24: bool = false,
2454 f25: bool = false,
2455 f26: bool = false,
2456 f27: bool = false,
2457 f28: bool = false,
2458 f29: bool = false,
2459 f30: bool = false,
2460 f31: bool = false,
2461 },
2462 .powerpc, .powerpcle, .powerpc64, .powerpc64le => packed struct {
2463 /// Whether the inline assembly code may perform stores to memory
2464 /// addresses other than those derived from input pointer provenance.
2465 memory: bool = false,
2466
2467 cr0: bool = false,
2468 cr1: bool = false,
2469 cr2: bool = false,
2470 cr3: bool = false,
2471 cr4: bool = false,
2472 cr5: bool = false,
2473 cr6: bool = false,
2474 cr7: bool = false,
2475
2476 xer: bool = false,
2477 ctr: bool = false,
2478 lr: bool = false,
2479
2480 r0: bool = false,
2481 r1: bool = false,
2482 r2: bool = false,
2483 r3: bool = false,
2484 r4: bool = false,
2485 r5: bool = false,
2486 r6: bool = false,
2487 r7: bool = false,
2488 r8: bool = false,
2489 r9: bool = false,
2490 r10: bool = false,
2491 r11: bool = false,
2492 r12: bool = false,
2493 r13: bool = false,
2494 r14: bool = false,
2495 r15: bool = false,
2496 r16: bool = false,
2497 r17: bool = false,
2498 r18: bool = false,
2499 r19: bool = false,
2500 r20: bool = false,
2501 r21: bool = false,
2502 r22: bool = false,
2503 r23: bool = false,
2504 r24: bool = false,
2505 r25: bool = false,
2506 r26: bool = false,
2507 r27: bool = false,
2508 r28: bool = false,
2509 r29: bool = false,
2510 r30: bool = false,
2511 r31: bool = false,
2512
2513 fpscr: bool = false,
2514 vscr: bool = false,
2515
2516 vs0: bool = false,
2517 vs1: bool = false,
2518 vs2: bool = false,
2519 vs3: bool = false,
2520 vs4: bool = false,
2521 vs5: bool = false,
2522 vs6: bool = false,
2523 vs7: bool = false,
2524 vs8: bool = false,
2525 vs9: bool = false,
2526 vs10: bool = false,
2527 vs11: bool = false,
2528 vs12: bool = false,
2529 vs13: bool = false,
2530 vs14: bool = false,
2531 vs15: bool = false,
2532 vs16: bool = false,
2533 vs17: bool = false,
2534 vs18: bool = false,
2535 vs19: bool = false,
2536 vs20: bool = false,
2537 vs21: bool = false,
2538 vs22: bool = false,
2539 vs23: bool = false,
2540 vs24: bool = false,
2541 vs25: bool = false,
2542 vs26: bool = false,
2543 vs27: bool = false,
2544 vs28: bool = false,
2545 vs29: bool = false,
2546 vs30: bool = false,
2547 vs31: bool = false,
2548 vs32: bool = false,
2549 vs33: bool = false,
2550 vs34: bool = false,
2551 vs35: bool = false,
2552 vs36: bool = false,
2553 vs37: bool = false,
2554 vs38: bool = false,
2555 vs39: bool = false,
2556 vs40: bool = false,
2557 vs41: bool = false,
2558 vs42: bool = false,
2559 vs43: bool = false,
2560 vs44: bool = false,
2561 vs45: bool = false,
2562 vs46: bool = false,
2563 vs47: bool = false,
2564 vs48: bool = false,
2565 vs49: bool = false,
2566 vs50: bool = false,
2567 vs51: bool = false,
2568 vs52: bool = false,
2569 vs53: bool = false,
2570 vs54: bool = false,
2571 vs55: bool = false,
2572 vs56: bool = false,
2573 vs57: bool = false,
2574 vs58: bool = false,
2575 vs59: bool = false,
2576 vs60: bool = false,
2577 vs61: bool = false,
2578 vs62: bool = false,
2579 vs63: bool = false,
2580
2581 f0: bool = false,
2582 f1: bool = false,
2583 f2: bool = false,
2584 f3: bool = false,
2585 f4: bool = false,
2586 f5: bool = false,
2587 f6: bool = false,
2588 f7: bool = false,
2589 f8: bool = false,
2590 f9: bool = false,
2591 f10: bool = false,
2592 f11: bool = false,
2593 f12: bool = false,
2594 f13: bool = false,
2595 f14: bool = false,
2596 f15: bool = false,
2597 f16: bool = false,
2598 f17: bool = false,
2599 f18: bool = false,
2600 f19: bool = false,
2601 f20: bool = false,
2602 f21: bool = false,
2603 f22: bool = false,
2604 f23: bool = false,
2605 f24: bool = false,
2606 f25: bool = false,
2607 f26: bool = false,
2608 f27: bool = false,
2609 f28: bool = false,
2610 f29: bool = false,
2611 f30: bool = false,
2612 f31: bool = false,
2613
2614 v0: bool = false,
2615 v1: bool = false,
2616 v2: bool = false,
2617 v3: bool = false,
2618 v4: bool = false,
2619 v5: bool = false,
2620 v6: bool = false,
2621 v7: bool = false,
2622 v8: bool = false,
2623 v9: bool = false,
2624 v10: bool = false,
2625 v11: bool = false,
2626 v12: bool = false,
2627 v13: bool = false,
2628 v14: bool = false,
2629 v15: bool = false,
2630 v16: bool = false,
2631 v17: bool = false,
2632 v18: bool = false,
2633 v19: bool = false,
2634 v20: bool = false,
2635 v21: bool = false,
2636 v22: bool = false,
2637 v23: bool = false,
2638 v24: bool = false,
2639 v25: bool = false,
2640 v26: bool = false,
2641 v27: bool = false,
2642 v28: bool = false,
2643 v29: bool = false,
2644 v30: bool = false,
2645 v31: bool = false,
2646
2647 acc0: bool = false,
2648 acc1: bool = false,
2649 acc2: bool = false,
2650 acc3: bool = false,
2651 acc4: bool = false,
2652 acc5: bool = false,
2653 acc6: bool = false,
2654 acc7: bool = false,
2655
2656 acc: bool = false,
2657 spefsc: bool = false,
2658 },
2659 .mips, .mipsel, .mips64, .mips64el => packed struct {
2660 /// Whether the inline assembly code may perform stores to memory
2661 /// addresses other than those derived from input pointer provenance.
2662 memory: bool = false,
2663
2664 lr: bool = false,
2665
2666 hi: bool = false,
2667 lo: bool = false,
2668 ac0: bool = false,
2669 ac1: bool = false,
2670 ac2: bool = false,
2671 ac3: bool = false,
2672 acx: bool = false,
2673
2674 r1: bool = false,
2675 r2: bool = false,
2676 r3: bool = false,
2677 r4: bool = false,
2678 r5: bool = false,
2679 r6: bool = false,
2680 r7: bool = false,
2681 r8: bool = false,
2682 r9: bool = false,
2683 r10: bool = false,
2684 r11: bool = false,
2685 r12: bool = false,
2686 r13: bool = false,
2687 r14: bool = false,
2688 r15: bool = false,
2689 r16: bool = false,
2690 r17: bool = false,
2691 r18: bool = false,
2692 r19: bool = false,
2693 r20: bool = false,
2694 r21: bool = false,
2695 r22: bool = false,
2696 r23: bool = false,
2697 r24: bool = false,
2698 r25: bool = false,
2699 r26: bool = false,
2700 r27: bool = false,
2701 r28: bool = false,
2702 r29: bool = false,
2703 r30: bool = false,
2704 r31: bool = false,
2705
2706 fcsr: bool = false,
2707 fcc0: bool = false,
2708 fcc1: bool = false,
2709 fcc2: bool = false,
2710 fcc3: bool = false,
2711 fcc4: bool = false,
2712 fcc5: bool = false,
2713 fcc6: bool = false,
2714 fcc7: bool = false,
2715
2716 w0: bool = false,
2717 w1: bool = false,
2718 w2: bool = false,
2719 w3: bool = false,
2720 w4: bool = false,
2721 w5: bool = false,
2722 w6: bool = false,
2723 w7: bool = false,
2724 w8: bool = false,
2725 w9: bool = false,
2726 w10: bool = false,
2727 w11: bool = false,
2728 w12: bool = false,
2729 w13: bool = false,
2730 w14: bool = false,
2731 w15: bool = false,
2732 w16: bool = false,
2733 w17: bool = false,
2734 w18: bool = false,
2735 w19: bool = false,
2736 w20: bool = false,
2737 w21: bool = false,
2738 w22: bool = false,
2739 w23: bool = false,
2740 w24: bool = false,
2741 w25: bool = false,
2742 w26: bool = false,
2743 w27: bool = false,
2744 w28: bool = false,
2745 w29: bool = false,
2746 w30: bool = false,
2747 w31: bool = false,
2748
2749 f0: bool = false,
2750 f1: bool = false,
2751 f2: bool = false,
2752 f3: bool = false,
2753 f4: bool = false,
2754 f5: bool = false,
2755 f6: bool = false,
2756 f7: bool = false,
2757 f8: bool = false,
2758 f9: bool = false,
2759 f10: bool = false,
2760 f11: bool = false,
2761 f12: bool = false,
2762 f13: bool = false,
2763 f14: bool = false,
2764 f15: bool = false,
2765 f16: bool = false,
2766 f17: bool = false,
2767 f18: bool = false,
2768 f19: bool = false,
2769 f20: bool = false,
2770 f21: bool = false,
2771 f22: bool = false,
2772 f23: bool = false,
2773 f24: bool = false,
2774 f25: bool = false,
2775 f26: bool = false,
2776 f27: bool = false,
2777 f28: bool = false,
2778 f29: bool = false,
2779 f30: bool = false,
2780 f31: bool = false,
2781
2782 mpl0: bool = false,
2783 mpl1: bool = false,
2784 mpl2: bool = false,
2785
2786 p0: bool = false,
2787 p1: bool = false,
2788 p2: bool = false,
2789
2790 msa_ir: bool = false,
2791 msa_csr: bool = false,
2792 msa_access: bool = false,
2793 msa_save: bool = false,
2794 msa_modify: bool = false,
2795 msa_request: bool = false,
2796 msa_map: bool = false,
2797 msa_unmap: bool = false,
2798 },
2799 .alpha => packed struct {
2800 /// Whether the inline assembly code may perform stores to memory
2801 /// addresses other than those derived from input pointer provenance.
2802 memory: bool = false,
2803
2804 r0: bool = false,
2805 r1: bool = false,
2806 r2: bool = false,
2807 r3: bool = false,
2808 r4: bool = false,
2809 r5: bool = false,
2810 r6: bool = false,
2811 r7: bool = false,
2812 r8: bool = false,
2813 r9: bool = false,
2814 r10: bool = false,
2815 r11: bool = false,
2816 r12: bool = false,
2817 r13: bool = false,
2818 r14: bool = false,
2819 r15: bool = false,
2820 r16: bool = false,
2821 r17: bool = false,
2822 r18: bool = false,
2823 r19: bool = false,
2824 r20: bool = false,
2825 r21: bool = false,
2826 r22: bool = false,
2827 r23: bool = false,
2828 r24: bool = false,
2829 r25: bool = false,
2830 r26: bool = false,
2831 r27: bool = false,
2832 r28: bool = false,
2833 r29: bool = false,
2834 r30: bool = false,
2835
2836 f0: bool = false,
2837 f1: bool = false,
2838 f2: bool = false,
2839 f3: bool = false,
2840 f4: bool = false,
2841 f5: bool = false,
2842 f6: bool = false,
2843 f7: bool = false,
2844 f8: bool = false,
2845 f9: bool = false,
2846 f10: bool = false,
2847 f11: bool = false,
2848 f12: bool = false,
2849 f13: bool = false,
2850 f14: bool = false,
2851 f15: bool = false,
2852 f16: bool = false,
2853 f17: bool = false,
2854 f18: bool = false,
2855 f19: bool = false,
2856 f20: bool = false,
2857 f21: bool = false,
2858 f22: bool = false,
2859 f23: bool = false,
2860 f24: bool = false,
2861 f25: bool = false,
2862 f26: bool = false,
2863 f27: bool = false,
2864 f28: bool = false,
2865 f29: bool = false,
2866 f30: bool = false,
2867 },
2868 .hppa, .hppa64 => packed struct {
2869 /// Whether the inline assembly code may perform stores to memory
2870 /// addresses other than those derived from input pointer provenance.
2871 memory: bool = false,
2872
2873 sar: bool = false,
2874
2875 r1: bool = false,
2876 r2: bool = false,
2877 r3: bool = false,
2878 r4: bool = false,
2879 r5: bool = false,
2880 r6: bool = false,
2881 r7: bool = false,
2882 r8: bool = false,
2883 r9: bool = false,
2884 r10: bool = false,
2885 r11: bool = false,
2886 r12: bool = false,
2887 r13: bool = false,
2888 r14: bool = false,
2889 r15: bool = false,
2890 r16: bool = false,
2891 r17: bool = false,
2892 r18: bool = false,
2893 r19: bool = false,
2894 r20: bool = false,
2895 r21: bool = false,
2896 r22: bool = false,
2897 r23: bool = false,
2898 r24: bool = false,
2899 r25: bool = false,
2900 r26: bool = false,
2901 r27: bool = false,
2902 r28: bool = false,
2903 r29: bool = false,
2904 r30: bool = false,
2905 r31: bool = false,
2906
2907 fr4: bool = false,
2908 fr5: bool = false,
2909 fr6: bool = false,
2910 fr7: bool = false,
2911 fr8: bool = false,
2912 fr9: bool = false,
2913 fr10: bool = false,
2914 fr11: bool = false,
2915 fr12: bool = false,
2916 fr13: bool = false,
2917 fr14: bool = false,
2918 fr15: bool = false,
2919 fr16: bool = false,
2920 fr17: bool = false,
2921 fr18: bool = false,
2922 fr19: bool = false,
2923 fr20: bool = false,
2924 fr21: bool = false,
2925 fr22: bool = false,
2926 fr23: bool = false,
2927 fr24: bool = false,
2928 fr25: bool = false,
2929 fr26: bool = false,
2930 fr27: bool = false,
2931 fr28: bool = false,
2932 fr29: bool = false,
2933 fr30: bool = false,
2934 fr31: bool = false,
2935
2936 fr4r: bool = false,
2937 fr5r: bool = false,
2938 fr6r: bool = false,
2939 fr7r: bool = false,
2940 fr8r: bool = false,
2941 fr9r: bool = false,
2942 fr10r: bool = false,
2943 fr11r: bool = false,
2944 fr12r: bool = false,
2945 fr13r: bool = false,
2946 fr14r: bool = false,
2947 fr15r: bool = false,
2948 fr16r: bool = false,
2949 fr17r: bool = false,
2950 fr18r: bool = false,
2951 fr19r: bool = false,
2952 fr20r: bool = false,
2953 fr21r: bool = false,
2954 fr22r: bool = false,
2955 fr23r: bool = false,
2956 fr24r: bool = false,
2957 fr25r: bool = false,
2958 fr26r: bool = false,
2959 fr27r: bool = false,
2960 fr28r: bool = false,
2961 fr29r: bool = false,
2962 fr30r: bool = false,
2963 fr31r: bool = false,
2964 },
2965 .microblaze, .microblazeel => packed struct {
2966 /// Whether the inline assembly code may perform stores to memory
2967 /// addresses other than those derived from input pointer provenance.
2968 memory: bool = false,
2969
2970 rmsr: bool = false,
2971
2972 r1: bool = false,
2973 r2: bool = false,
2974 r3: bool = false,
2975 r4: bool = false,
2976 r5: bool = false,
2977 r6: bool = false,
2978 r7: bool = false,
2979 r8: bool = false,
2980 r9: bool = false,
2981 r10: bool = false,
2982 r11: bool = false,
2983 r12: bool = false,
2984 r13: bool = false,
2985 r14: bool = false,
2986 r15: bool = false,
2987 r16: bool = false,
2988 r17: bool = false,
2989 r18: bool = false,
2990 r19: bool = false,
2991 r20: bool = false,
2992 r21: bool = false,
2993 r22: bool = false,
2994 r23: bool = false,
2995 r24: bool = false,
2996 r25: bool = false,
2997 r26: bool = false,
2998 r27: bool = false,
2999 r28: bool = false,
3000 r29: bool = false,
3001 r30: bool = false,
3002 r31: bool = false,
3003 },
3004 .sh, .sheb => packed struct {
3005 /// Whether the inline assembly code may perform stores to memory
3006 /// addresses other than those derived from input pointer provenance.
3007 memory: bool = false,
3008
3009 sr: bool = false,
3010 gbr: bool = false,
3011 pr: bool = false,
3012
3013 r0: bool = false,
3014 r1: bool = false,
3015 r2: bool = false,
3016 r3: bool = false,
3017 r4: bool = false,
3018 r5: bool = false,
3019 r6: bool = false,
3020 r7: bool = false,
3021 r8: bool = false,
3022 r9: bool = false,
3023 r10: bool = false,
3024 r11: bool = false,
3025 r12: bool = false,
3026 r13: bool = false,
3027 r14: bool = false,
3028 r15: bool = false,
3029
3030 mach: bool = false,
3031 macl: bool = false,
3032
3033 fr0: bool = false,
3034 fr1: bool = false,
3035 fr2: bool = false,
3036 fr3: bool = false,
3037 fr4: bool = false,
3038 fr5: bool = false,
3039 fr6: bool = false,
3040 fr7: bool = false,
3041 fr8: bool = false,
3042 fr9: bool = false,
3043 fr10: bool = false,
3044 fr11: bool = false,
3045 fr12: bool = false,
3046 fr13: bool = false,
3047 fr14: bool = false,
3048 fr15: bool = false,
3049
3050 dr0: bool = false,
3051 dr2: bool = false,
3052 dr4: bool = false,
3053 dr6: bool = false,
3054 dr8: bool = false,
3055 dr10: bool = false,
3056 dr12: bool = false,
3057 dr14: bool = false,
3058
3059 fv0: bool = false,
3060 fv4: bool = false,
3061 fv8: bool = false,
3062 fv12: bool = false,
3063
3064 xf0: bool = false,
3065 xf1: bool = false,
3066 xf2: bool = false,
3067 xf3: bool = false,
3068 xf4: bool = false,
3069 xf5: bool = false,
3070 xf6: bool = false,
3071 xf7: bool = false,
3072 xf8: bool = false,
3073 xf9: bool = false,
3074 xf10: bool = false,
3075 xf11: bool = false,
3076 xf12: bool = false,
3077 xf13: bool = false,
3078 xf14: bool = false,
3079 xf15: bool = false,
3080
3081 xd0: bool = false,
3082 xd2: bool = false,
3083 xd4: bool = false,
3084 xd6: bool = false,
3085 xd8: bool = false,
3086 xd10: bool = false,
3087 xd12: bool = false,
3088 xd14: bool = false,
3089
3090 xmtrx: bool = false,
3091
3092 fpul: bool = false,
3093 fpscr: bool = false,
3094
3095 ms: bool = false,
3096 me: bool = false,
3097
3098 rs: bool = false,
3099 re: bool = false,
3100
3101 a0: bool = false,
3102 a0g: bool = false,
3103 a1: bool = false,
3104 a1g: bool = false,
3105 m0: bool = false,
3106 m1: bool = false,
3107 x0: bool = false,
3108 x1: bool = false,
3109 y0: bool = false,
3110 y1: bool = false,
3111
3112 dsr: bool = false,
3113 },
3114 else => packed struct {
3115 /// Whether the inline assembly code may perform stores to memory
3116 /// addresses other than those derived from input pointer provenance.
3117 memory: bool = false,
3118 },
3119};
lib/std/lang.zig created+1254
...@@ -0,0 +1,1254 @@
1//! Types and values provided by the Zig language.
2
3const builtin = @import("builtin");
4const std = @import("std.zig");
5const root = @import("root");
6
7pub const assembly = @import("lang/assembly.zig");
8
9/// This data structure is used by the Zig language code generation and
10/// therefore must be kept in sync with the compiler implementation.
11pub const StackTrace = struct {
12 index: usize,
13 instruction_addresses: []usize,
14};
15
16/// This data structure is used by the Zig language code generation and
17/// therefore must be kept in sync with the compiler implementation.
18pub const GlobalLinkage = enum(u2) {
19 internal,
20 strong,
21 weak,
22 link_once,
23};
24
25/// This data structure is used by the Zig language code generation and
26/// therefore must be kept in sync with the compiler implementation.
27pub const SymbolVisibility = enum(u2) {
28 default,
29 hidden,
30 protected,
31};
32
33/// This data structure is used by the Zig language code generation and
34/// therefore must be kept in sync with the compiler implementation.
35pub const AtomicOrder = enum {
36 unordered,
37 monotonic,
38 acquire,
39 release,
40 acq_rel,
41 seq_cst,
42};
43
44/// This data structure is used by the Zig language code generation and
45/// therefore must be kept in sync with the compiler implementation.
46pub const ReduceOp = enum {
47 And,
48 Or,
49 Xor,
50 Min,
51 Max,
52 Add,
53 Mul,
54};
55
56/// This data structure is used by the Zig language code generation and
57/// therefore must be kept in sync with the compiler implementation.
58pub const AtomicRmwOp = enum {
59 /// Exchange - store the operand unmodified.
60 /// Supports enums, integers, and floats.
61 Xchg,
62 /// Add operand to existing value.
63 /// Supports integers and floats.
64 /// For integers, two's complement wraparound applies.
65 Add,
66 /// Subtract operand from existing value.
67 /// Supports integers and floats.
68 /// For integers, two's complement wraparound applies.
69 Sub,
70 /// Perform bitwise AND on existing value with operand.
71 /// Supports integers.
72 And,
73 /// Perform bitwise NAND on existing value with operand.
74 /// Supports integers.
75 Nand,
76 /// Perform bitwise OR on existing value with operand.
77 /// Supports integers.
78 Or,
79 /// Perform bitwise XOR on existing value with operand.
80 /// Supports integers.
81 Xor,
82 /// Store operand if it is larger than the existing value.
83 /// Supports integers and floats.
84 Max,
85 /// Store operand if it is smaller than the existing value.
86 /// Supports integers and floats.
87 Min,
88};
89
90/// The code model puts constraints on the location of symbols and the size of code and data.
91/// The selection of a code model is a trade off on speed and restrictions that needs to be selected on a per application basis to meet its requirements.
92/// A slightly more detailed explanation can be found in (for example) the [System V Application Binary Interface (x86_64)](https://github.com/hjl-tools/x86-psABI/wiki/x86-64-psABI-1.0.pdf) 3.5.1.
93///
94/// This data structure is used by the Zig language code generation and
95/// therefore must be kept in sync with the compiler implementation.
96pub const CodeModel = enum {
97 default,
98 extreme,
99 kernel,
100 large,
101 medany,
102 medium,
103 medlow,
104 medmid,
105 normal,
106 small,
107 tiny,
108};
109
110/// This data structure is used by the Zig language code generation and
111/// therefore must be kept in sync with the compiler implementation.
112pub const OptimizeMode = enum {
113 Debug,
114 ReleaseSafe,
115 ReleaseFast,
116 ReleaseSmall,
117};
118
119/// The calling convention of a function defines how arguments and return values are passed, as well
120/// as any other requirements which callers and callees must respect, such as register preservation
121/// and stack alignment.
122///
123/// This data structure is used by the Zig language code generation and
124/// therefore must be kept in sync with the compiler implementation.
125pub const CallingConvention = union(enum(u8)) {
126 pub const Tag = @typeInfo(CallingConvention).@"union".tag_type.?;
127
128 /// This is an alias for the default C calling convention for this target.
129 /// Functions marked as `extern` or `export` are given this calling convention by default.
130 pub const c = builtin.target.cCallingConvention().?;
131
132 pub const winapi: CallingConvention = switch (builtin.target.cpu.arch) {
133 .x86_64 => .{ .x86_64_win = .{} },
134 .x86 => .{ .x86_stdcall = .{} },
135 .aarch64 => .{ .aarch64_aapcs_win = .{} },
136 .thumb => .{ .arm_aapcs_vfp = .{} },
137 else => unreachable,
138 };
139
140 pub const kernel: CallingConvention = switch (builtin.target.cpu.arch) {
141 .amdgcn => .amdgcn_kernel,
142 .nvptx, .nvptx64 => .nvptx_kernel,
143 .spirv32, .spirv64 => .spirv_kernel,
144 else => unreachable,
145 };
146
147 /// The default Zig calling convention when neither `export` nor `inline` is specified.
148 /// This calling convention makes no guarantees about stack alignment, registers, etc.
149 /// It can only be used within this Zig compilation unit.
150 auto,
151
152 /// The calling convention of a function that can be called with `async` syntax. An `async` call
153 /// of a runtime-known function must target a function with this calling convention.
154 /// Comptime-known functions with other calling conventions may be coerced to this one.
155 async,
156
157 /// Functions with this calling convention have no prologue or epilogue, making the function
158 /// uncallable in regular Zig code. This can be useful when integrating with assembly.
159 naked,
160
161 /// This calling convention is exactly equivalent to using the `inline` keyword on a function
162 /// definition. This function will be semantically inlined by the Zig compiler at call sites.
163 /// Pointers to inline functions are comptime-only.
164 @"inline",
165
166 // Calling conventions for the `x86_64` architecture.
167 x86_64_sysv: CommonOptions,
168 x86_64_x32: CommonOptions,
169 x86_64_win: CommonOptions,
170 x86_64_regcall_v3_sysv: CommonOptions,
171 x86_64_regcall_v4_win: CommonOptions,
172 x86_64_vectorcall: CommonOptions,
173 x86_64_interrupt: CommonOptions,
174
175 // Calling conventions for the `x86` architecture.
176 x86_sysv: X86RegparmOptions,
177 x86_win: X86RegparmOptions,
178 x86_stdcall: X86RegparmOptions,
179 x86_fastcall: CommonOptions,
180 x86_thiscall: CommonOptions,
181 x86_thiscall_mingw: CommonOptions,
182 x86_regcall_v3: CommonOptions,
183 x86_regcall_v4_win: CommonOptions,
184 x86_vectorcall: CommonOptions,
185 x86_interrupt: CommonOptions,
186
187 // Calling conventions for the `x86_16` architecture.
188
189 x86_16_cdecl: CommonOptions,
190 x86_16_stdcall: CommonOptions,
191 x86_16_regparmcall: CommonOptions,
192 x86_16_interrupt: CommonOptions,
193
194 // Calling conventions for the `aarch64` and `aarch64_be` architectures.
195 aarch64_aapcs: CommonOptions,
196 aarch64_aapcs_darwin: CommonOptions,
197 aarch64_aapcs_win: CommonOptions,
198 aarch64_vfabi: CommonOptions,
199 aarch64_vfabi_sve: CommonOptions,
200
201 /// The standard `alpha` calling convention.
202 alpha_osf: CommonOptions,
203
204 // Calling convetions for the `arm`, `armeb`, `thumb`, and `thumbeb` architectures.
205 /// ARM Architecture Procedure Call Standard
206 arm_aapcs: CommonOptions,
207 /// ARM Architecture Procedure Call Standard Vector Floating-Point
208 arm_aapcs_vfp: CommonOptions,
209 arm_interrupt: ArmInterruptOptions,
210
211 // Calling conventions for the `mips64` and `mips64el` architectures.
212 mips64_n64: CommonOptions,
213 mips64_n32: CommonOptions,
214 mips64_interrupt: MipsInterruptOptions,
215
216 // Calling conventions for the `mips` and `mipsel` architectures.
217 mips_o32: CommonOptions,
218 mips_interrupt: MipsInterruptOptions,
219
220 // Calling conventions for the `riscv64` architecture.
221 riscv64_lp64: CommonOptions,
222 riscv64_lp64_v: CommonOptions,
223 riscv64_interrupt: RiscvInterruptOptions,
224
225 // Calling conventions for the `riscv32` architecture.
226 riscv32_ilp32: CommonOptions,
227 riscv32_ilp32_v: CommonOptions,
228 riscv32_interrupt: RiscvInterruptOptions,
229
230 // Calling conventions for the `sparc64` architecture.
231 sparc64_sysv: CommonOptions,
232
233 // Calling conventions for the `sparc` architecture.
234 sparc_sysv: CommonOptions,
235
236 // Calling conventions for the `powerpc64` and `powerpc64le` architectures.
237 powerpc64_elf: CommonOptions,
238 powerpc64_elf_altivec: CommonOptions,
239 powerpc64_elf_v2: CommonOptions,
240
241 // Calling conventions for the `powerpc` and `powerpcle` architectures.
242 powerpc_sysv: CommonOptions,
243 powerpc_sysv_altivec: CommonOptions,
244 powerpc_aix: CommonOptions,
245 powerpc_aix_altivec: CommonOptions,
246
247 /// The standard `wasm32` and `wasm64` calling convention, as specified in the WebAssembly Tool Conventions.
248 wasm_mvp: CommonOptions,
249
250 /// The standard `arc`/`arceb` calling convention.
251 arc_sysv: CommonOptions,
252 arc_interrupt: ArcInterruptOptions,
253
254 // Calling conventions for the `avr` architecture.
255 avr_gnu,
256 avr_builtin,
257 avr_signal,
258 avr_interrupt,
259
260 /// The standard `bpfel`/`bpfeb` calling convention.
261 bpf_std: CommonOptions,
262
263 // Calling conventions for the `csky` architecture.
264 csky_sysv: CommonOptions,
265 csky_interrupt: CommonOptions,
266
267 // Calling conventions for the `hexagon` architecture.
268 hexagon_sysv: CommonOptions,
269 hexagon_sysv_hvx: CommonOptions,
270
271 /// The standard `hppa` calling convention.
272 hppa_elf: CommonOptions,
273
274 /// The standard `hppa64` calling convention.
275 hppa64_elf: CommonOptions,
276
277 kvx_lp64: CommonOptions,
278 kvx_ilp32: CommonOptions,
279
280 /// The standard `lanai` calling convention.
281 lanai_sysv: CommonOptions,
282
283 /// The standard `loongarch64` calling convention.
284 loongarch64_lp64: CommonOptions,
285
286 /// The standard `loongarch32` calling convention.
287 loongarch32_ilp32: CommonOptions,
288
289 // Calling conventions for the `m68k` architecture.
290 m68k_sysv: CommonOptions,
291 m68k_gnu: CommonOptions,
292 m68k_rtd: CommonOptions,
293 m68k_interrupt: CommonOptions,
294
295 /// The standard `microblaze`/`microblazeel` calling convention.
296 microblaze_std: CommonOptions,
297 microblaze_interrupt: MicroblazeInterruptOptions,
298
299 /// The standard `msp430` calling convention.
300 msp430_eabi: CommonOptions,
301 msp430_interrupt: CommonOptions,
302
303 /// The standard `or1k` calling convention.
304 or1k_sysv: CommonOptions,
305
306 /// The standard `propeller` calling convention.
307 propeller_sysv: CommonOptions,
308
309 // Calling conventions for the `s390x` architecture.
310 s390x_sysv: CommonOptions,
311 s390x_sysv_vx: CommonOptions,
312
313 // Calling conventions for the `sh`/`sheb` architecture.
314 sh_gnu: CommonOptions,
315 sh_renesas: CommonOptions,
316 sh_interrupt: ShInterruptOptions,
317
318 /// The standard `ve` calling convention.
319 ve_sysv: CommonOptions,
320
321 // Calling conventions for the `xcore` architecture.
322 xcore_xs1: CommonOptions,
323 xcore_xs2: CommonOptions,
324
325 // Calling conventions for the `xtensa`/`xtensaeb` architecture.
326 xtensa_call0: CommonOptions,
327 xtensa_windowed: CommonOptions,
328
329 // Calling conventions for the `amdgcn` architecture.
330 amdgcn_device: CommonOptions,
331 amdgcn_kernel,
332 amdgcn_cs: CommonOptions,
333
334 // Calling conventions for the `nvptx` and `nvptx64` architectures.
335 nvptx_device,
336 nvptx_kernel,
337
338 // Calling conventions for kernels and shaders on the `spirv`, `spirv32`, and `spirv64` architectures.
339 spirv_device,
340 spirv_kernel,
341 spirv_fragment,
342 spirv_vertex,
343
344 // Calling conventions for the `ez80` architecture.
345 ez80_cet,
346 ez80_tiflags,
347
348 /// Options shared across most calling conventions.
349 pub const CommonOptions = struct {
350 /// The boundary the stack is aligned to when the function is called.
351 /// `null` means the default for this calling convention.
352 incoming_stack_alignment: ?u64 = null,
353 };
354
355 /// Options for x86 calling conventions which support the regparm attribute to pass some
356 /// arguments in registers.
357 pub const X86RegparmOptions = struct {
358 /// The boundary the stack is aligned to when the function is called.
359 /// `null` means the default for this calling convention.
360 incoming_stack_alignment: ?u64 = null,
361 /// The number of arguments to pass in registers before passing the remaining arguments
362 /// according to the calling convention.
363 /// Equivalent to `__attribute__((regparm(x)))` in Clang and GCC.
364 register_params: u2 = 0,
365 };
366
367 /// Options for the `arc_interrupt` calling convention.
368 pub const ArcInterruptOptions = struct {
369 /// The boundary the stack is aligned to when the function is called.
370 /// `null` means the default for this calling convention.
371 incoming_stack_alignment: ?u64 = null,
372 /// The kind of interrupt being received.
373 type: InterruptType,
374
375 pub const InterruptType = enum(u2) {
376 ilink1,
377 ilink2,
378 ilink,
379 firq,
380 };
381 };
382
383 /// Options for the `arm_interrupt` calling convention.
384 pub const ArmInterruptOptions = struct {
385 /// The boundary the stack is aligned to when the function is called.
386 /// `null` means the default for this calling convention.
387 incoming_stack_alignment: ?u64 = null,
388 /// The kind of interrupt being received.
389 type: InterruptType = .generic,
390
391 pub const InterruptType = enum(u3) {
392 generic,
393 irq,
394 fiq,
395 swi,
396 abort,
397 undef,
398 };
399 };
400
401 /// Options for the `microblaze_interrupt` calling convention.
402 pub const MicroblazeInterruptOptions = struct {
403 /// The boundary the stack is aligned to when the function is called.
404 /// `null` means the default for this calling convention.
405 incoming_stack_alignment: ?u64 = null,
406 type: InterruptType = .regular,
407
408 pub const InterruptType = enum(u2) {
409 /// User exception; return with `rtsd`.
410 user,
411 /// Regular interrupt; return with `rtid`.
412 regular,
413 /// Fast interrupt; return with `rtid`.
414 fast,
415 /// Software breakpoint; return with `rtbd`.
416 breakpoint,
417 };
418 };
419
420 /// Options for the `mips_interrupt` and `mips64_interrupt` calling conventions.
421 pub const MipsInterruptOptions = struct {
422 /// The boundary the stack is aligned to when the function is called.
423 /// `null` means the default for this calling convention.
424 incoming_stack_alignment: ?u64 = null,
425 /// The interrupt mode.
426 mode: InterruptMode = .eic,
427
428 pub const InterruptMode = enum(u4) {
429 eic,
430 sw0,
431 sw1,
432 hw0,
433 hw1,
434 hw2,
435 hw3,
436 hw4,
437 hw5,
438 };
439 };
440
441 /// Options for the `riscv32_interrupt` and `riscv64_interrupt` calling conventions.
442 pub const RiscvInterruptOptions = struct {
443 /// The boundary the stack is aligned to when the function is called.
444 /// `null` means the default for this calling convention.
445 incoming_stack_alignment: ?u64 = null,
446 /// The privilege mode.
447 mode: PrivilegeMode,
448
449 pub const PrivilegeMode = enum(u2) {
450 supervisor,
451 machine,
452 };
453 };
454
455 /// Options for the `sh_interrupt` calling convention.
456 pub const ShInterruptOptions = struct {
457 /// The boundary the stack is aligned to when the function is called.
458 /// `null` means the default for this calling convention.
459 incoming_stack_alignment: ?u64 = null,
460 save: SaveBehavior = .full,
461
462 pub const SaveBehavior = enum(u3) {
463 /// Save only fpscr (if applicable).
464 fpscr,
465 /// Save only high-numbered registers, i.e. r0 through r7 are *not* saved.
466 high,
467 /// Save all registers normally.
468 full,
469 /// Save all registers using the CPU's fast register bank.
470 bank,
471 };
472 };
473
474 /// Returns the array of `std.Target.Cpu.Arch` to which this `CallingConvention` applies.
475 /// Asserts that `cc` is not `.auto`, `.@"async"`, `.naked`, or `.@"inline"`.
476 pub fn archs(cc: CallingConvention) []const std.Target.Cpu.Arch {
477 return std.Target.Cpu.Arch.fromCallingConvention(cc);
478 }
479
480 pub fn eql(a: CallingConvention, b: CallingConvention) bool {
481 return std.meta.eql(a, b);
482 }
483
484 pub fn withStackAlign(cc: CallingConvention, incoming_stack_alignment: u64) CallingConvention {
485 const tag: CallingConvention.Tag = cc;
486 var result = cc;
487 @field(result, @tagName(tag)).incoming_stack_alignment = incoming_stack_alignment;
488 return result;
489 }
490};
491
492/// This data structure is used by the Zig language code generation and
493/// therefore must be kept in sync with the compiler implementation.
494pub const AddressSpace = enum(u5) {
495 // CPU address spaces.
496 generic,
497 gs,
498 fs,
499 ss,
500
501 // x86_16 extra address spaces.
502 /// Allows addressing the entire address space by storing both segment and offset.
503 far,
504
505 // GPU address spaces.
506 global,
507 constant,
508 param,
509 shared,
510 local,
511 input,
512 output,
513 uniform,
514 push_constant,
515 storage_buffer,
516 physical_storage_buffer,
517
518 // AVR address spaces.
519 flash,
520 flash1,
521 flash2,
522 flash3,
523 flash4,
524 flash5,
525
526 // Propeller address spaces.
527
528 /// This address space only addresses the cog-local ram.
529 cog,
530
531 /// This address space only addresses shared hub ram.
532 hub,
533
534 /// This address space only addresses the "lookup" ram
535 lut,
536};
537
538/// This data structure is used by the Zig language code generation and
539/// therefore must be kept in sync with the compiler implementation.
540pub const SourceLocation = struct {
541 /// The name chosen when compiling. Not a file path.
542 module: [:0]const u8,
543 /// Relative to the root directory of its module.
544 file: [:0]const u8,
545 fn_name: [:0]const u8,
546 line: u32,
547 column: u32,
548};
549
550pub const TypeId = std.meta.Tag(Type);
551
552/// This data structure is used by the Zig language code generation and
553/// therefore must be kept in sync with the compiler implementation.
554pub const Type = union(enum) {
555 type,
556 void,
557 bool,
558 noreturn,
559 int: Int,
560 float: Float,
561 pointer: Pointer,
562 array: Array,
563 @"struct": Struct,
564 comptime_float,
565 comptime_int,
566 undefined,
567 null,
568 optional: Optional,
569 error_union: ErrorUnion,
570 error_set: ErrorSet,
571 @"enum": Enum,
572 @"union": Union,
573 @"fn": Fn,
574 @"opaque": Opaque,
575 frame: Frame,
576 @"anyframe": AnyFrame,
577 vector: Vector,
578 enum_literal,
579
580 /// This data structure is used by the Zig language code generation and
581 /// therefore must be kept in sync with the compiler implementation.
582 pub const Int = struct {
583 signedness: Signedness,
584 bits: u16,
585 };
586
587 /// This data structure is used by the Zig language code generation and
588 /// therefore must be kept in sync with the compiler implementation.
589 pub const Float = struct {
590 bits: u16,
591 };
592
593 /// This data structure is used by the Zig language code generation and
594 /// therefore must be kept in sync with the compiler implementation.
595 pub const Pointer = struct {
596 size: Size,
597 is_const: bool,
598 is_volatile: bool,
599 /// `null` means implicit alignment, which is equivalent to `@alignOf(child)`.
600 alignment: ?usize,
601 address_space: AddressSpace,
602 child: type,
603 is_allowzero: bool,
604
605 /// The type of the sentinel is the element type of the pointer, which is
606 /// the value of the `child` field in this struct. However there is no way
607 /// to refer to that type here, so we use `*const anyopaque`.
608 /// See also: `sentinel`
609 sentinel_ptr: ?*const anyopaque,
610
611 /// Loads the pointer type's sentinel value from `sentinel_ptr`.
612 /// Returns `null` if the pointer type has no sentinel.
613 pub inline fn sentinel(comptime ptr: Pointer) ?ptr.child {
614 const sp: *const ptr.child = @ptrCast(@alignCast(ptr.sentinel_ptr orelse return null));
615 return sp.*;
616 }
617
618 /// This data structure is used by the Zig language code generation and
619 /// therefore must be kept in sync with the compiler implementation.
620 pub const Size = enum(u2) {
621 one,
622 many,
623 slice,
624 c,
625 };
626
627 /// This data structure is used by the Zig language code generation and
628 /// therefore must be kept in sync with the compiler implementation.
629 pub const Attributes = struct {
630 @"const": bool = false,
631 @"volatile": bool = false,
632 @"allowzero": bool = false,
633 @"addrspace": ?AddressSpace = null,
634 @"align": ?usize = null,
635 };
636 };
637
638 /// This data structure is used by the Zig language code generation and
639 /// therefore must be kept in sync with the compiler implementation.
640 pub const Array = struct {
641 len: comptime_int,
642 child: type,
643
644 /// The type of the sentinel is the element type of the array, which is
645 /// the value of the `child` field in this struct. However there is no way
646 /// to refer to that type here, so we use `*const anyopaque`.
647 /// See also: `sentinel`.
648 sentinel_ptr: ?*const anyopaque,
649
650 /// Loads the array type's sentinel value from `sentinel_ptr`.
651 /// Returns `null` if the array type has no sentinel.
652 pub inline fn sentinel(comptime arr: Array) ?arr.child {
653 const sp: *const arr.child = @ptrCast(@alignCast(arr.sentinel_ptr orelse return null));
654 return sp.*;
655 }
656 };
657
658 /// This data structure is used by the Zig language code generation and
659 /// therefore must be kept in sync with the compiler implementation.
660 pub const ContainerLayout = enum(u2) {
661 auto,
662 @"extern",
663 @"packed",
664 };
665
666 /// This data structure is used by the Zig language code generation and
667 /// therefore must be kept in sync with the compiler implementation.
668 pub const StructField = struct {
669 name: [:0]const u8,
670 type: type,
671 /// The type of the default value is the type of this struct field, which
672 /// is the value of the `type` field in this struct. However there is no
673 /// way to refer to that type here, so we use `*const anyopaque`.
674 /// See also: `defaultValue`.
675 default_value_ptr: ?*const anyopaque,
676 is_comptime: bool,
677 /// `null` means the field alignment was not explicitly specified. The
678 /// field will still be aligned to at least `@alignOf` its `type`.
679 alignment: ?usize,
680
681 /// Loads the field's default value from `default_value_ptr`.
682 /// Returns `null` if the field has no default value.
683 pub inline fn defaultValue(comptime sf: StructField) ?sf.type {
684 const dp: *const sf.type = @ptrCast(@alignCast(sf.default_value_ptr orelse return null));
685 return dp.*;
686 }
687
688 /// This data structure is used by the Zig language code generation and
689 /// therefore must be kept in sync with the compiler implementation.
690 pub const Attributes = struct {
691 @"comptime": bool = false,
692 @"align": ?usize = null,
693 default_value_ptr: ?*const anyopaque = null,
694 };
695 };
696
697 /// This data structure is used by the Zig language code generation and
698 /// therefore must be kept in sync with the compiler implementation.
699 pub const Struct = struct {
700 layout: ContainerLayout,
701 /// Only valid if layout is .@"packed"
702 backing_integer: ?type = null,
703 fields: []const StructField,
704 decls: []const Declaration,
705 is_tuple: bool,
706 };
707
708 /// This data structure is used by the Zig language code generation and
709 /// therefore must be kept in sync with the compiler implementation.
710 pub const Optional = struct {
711 child: type,
712 };
713
714 /// This data structure is used by the Zig language code generation and
715 /// therefore must be kept in sync with the compiler implementation.
716 pub const ErrorUnion = struct {
717 error_set: type,
718 payload: type,
719 };
720
721 /// This data structure is used by the Zig language code generation and
722 /// therefore must be kept in sync with the compiler implementation.
723 pub const Error = struct {
724 name: [:0]const u8,
725 };
726
727 /// This data structure is used by the Zig language code generation and
728 /// therefore must be kept in sync with the compiler implementation.
729 pub const ErrorSet = ?[]const Error;
730
731 /// This data structure is used by the Zig language code generation and
732 /// therefore must be kept in sync with the compiler implementation.
733 pub const EnumField = struct {
734 name: [:0]const u8,
735 value: comptime_int,
736 };
737
738 /// This data structure is used by the Zig language code generation and
739 /// therefore must be kept in sync with the compiler implementation.
740 pub const Enum = struct {
741 tag_type: type,
742 fields: []const EnumField,
743 decls: []const Declaration,
744 is_exhaustive: bool,
745
746 /// This data structure is used by the Zig language code generation and
747 /// therefore must be kept in sync with the compiler implementation.
748 pub const Mode = enum { exhaustive, nonexhaustive };
749 };
750
751 /// This data structure is used by the Zig language code generation and
752 /// therefore must be kept in sync with the compiler implementation.
753 pub const UnionField = struct {
754 name: [:0]const u8,
755 type: type,
756 /// `null` means the field alignment was not explicitly specified. The
757 /// field will still be aligned to at least `@alignOf` its `type`.
758 alignment: ?usize,
759
760 /// This data structure is used by the Zig language code generation and
761 /// therefore must be kept in sync with the compiler implementation.
762 pub const Attributes = struct {
763 @"align": ?usize = null,
764 };
765 };
766
767 /// This data structure is used by the Zig language code generation and
768 /// therefore must be kept in sync with the compiler implementation.
769 pub const Union = struct {
770 layout: ContainerLayout,
771 tag_type: ?type,
772 fields: []const UnionField,
773 decls: []const Declaration,
774 };
775
776 /// This data structure is used by the Zig language code generation and
777 /// therefore must be kept in sync with the compiler implementation.
778 pub const Fn = struct {
779 calling_convention: CallingConvention,
780 is_generic: bool,
781 is_var_args: bool,
782 /// TODO change the language spec to make this not optional.
783 return_type: ?type,
784 params: []const Param,
785
786 /// This data structure is used by the Zig language code generation and
787 /// therefore must be kept in sync with the compiler implementation.
788 pub const Param = struct {
789 is_generic: bool,
790 is_noalias: bool,
791 type: ?type,
792
793 /// This data structure is used by the Zig language code generation and
794 /// therefore must be kept in sync with the compiler implementation.
795 pub const Attributes = struct {
796 @"noalias": bool = false,
797 };
798 };
799
800 /// This data structure is used by the Zig language code generation and
801 /// therefore must be kept in sync with the compiler implementation.
802 pub const Attributes = struct {
803 @"callconv": CallingConvention = .auto,
804 varargs: bool = false,
805 };
806 };
807
808 /// This data structure is used by the Zig language code generation and
809 /// therefore must be kept in sync with the compiler implementation.
810 pub const Opaque = struct {
811 decls: []const Declaration,
812 };
813
814 /// This data structure is used by the Zig language code generation and
815 /// therefore must be kept in sync with the compiler implementation.
816 pub const Frame = struct {
817 function: *const anyopaque,
818 };
819
820 /// This data structure is used by the Zig language code generation and
821 /// therefore must be kept in sync with the compiler implementation.
822 pub const AnyFrame = struct {
823 child: ?type,
824 };
825
826 /// This data structure is used by the Zig language code generation and
827 /// therefore must be kept in sync with the compiler implementation.
828 pub const Vector = struct {
829 len: comptime_int,
830 child: type,
831 };
832
833 /// This data structure is used by the Zig language code generation and
834 /// therefore must be kept in sync with the compiler implementation.
835 pub const Declaration = struct {
836 name: [:0]const u8,
837 };
838};
839
840/// This data structure is used by the Zig language code generation and
841/// therefore must be kept in sync with the compiler implementation.
842pub const FloatMode = enum {
843 strict,
844 optimized,
845};
846
847/// This data structure is used by the Zig language code generation and
848/// therefore must be kept in sync with the compiler implementation.
849pub const Endian = enum {
850 big,
851 little,
852
853 pub const native = builtin.target.cpu.arch.endian();
854 pub const foreign: Endian = @enumFromInt(1 - @intFromEnum(native));
855};
856
857/// This data structure is used by the Zig language code generation and
858/// therefore must be kept in sync with the compiler implementation.
859pub const Signedness = enum(u1) {
860 signed,
861 unsigned,
862};
863
864/// This data structure is used by the Zig language code generation and
865/// therefore must be kept in sync with the compiler implementation.
866pub const OutputMode = enum {
867 Exe,
868 Lib,
869 Obj,
870};
871
872/// This data structure is used by the Zig language code generation and
873/// therefore must be kept in sync with the compiler implementation.
874pub const LinkMode = enum {
875 static,
876 dynamic,
877};
878
879/// This data structure is used by the Zig language code generation and
880/// therefore must be kept in sync with the compiler implementation.
881pub const UnwindTables = enum {
882 none,
883 sync,
884 async,
885};
886
887/// This data structure is used by the Zig language code generation and
888/// therefore must be kept in sync with the compiler implementation.
889pub const WasiExecModel = enum {
890 command,
891 reactor,
892};
893
894/// This data structure is used by the Zig language code generation and
895/// therefore must be kept in sync with the compiler implementation.
896pub const CallModifier = enum {
897 /// Equivalent to function call syntax.
898 auto,
899 /// Prevents tail call optimization. This guarantees that the return
900 /// address will point to the callsite, as opposed to the callsite's
901 /// callsite. If the call is otherwise required to be tail-called
902 /// or inlined, a compile error is emitted instead.
903 never_tail,
904 /// Guarantees that the call will not be inlined. If the call is
905 /// otherwise required to be inlined, a compile error is emitted instead.
906 never_inline,
907 /// Asserts that the function call will not suspend. This allows a
908 /// non-async function to call an async function.
909 no_suspend,
910 /// Guarantees that the call will be generated with tail call optimization.
911 /// If this is not possible, a compile error is emitted instead.
912 always_tail,
913 /// Guarantees that the call will be inlined at the callsite.
914 /// If this is not possible, a compile error is emitted instead.
915 always_inline,
916 /// Evaluates the call at compile-time. If the call cannot be completed at
917 /// compile-time, a compile error is emitted instead.
918 compile_time,
919};
920
921/// This data structure is used by the Zig language code generation and
922/// therefore must be kept in sync with the compiler implementation.
923pub const VaListAarch64 = extern struct {
924 __stack: *anyopaque,
925 __gr_top: *anyopaque,
926 __vr_top: *anyopaque,
927 __gr_offs: c_int,
928 __vr_offs: c_int,
929};
930
931/// This data structure is used by the Zig language code generation and
932/// therefore must be kept in sync with the compiler implementation.
933pub const VaListAlpha = extern struct {
934 __base: *anyopaque,
935 __offset: c_int,
936};
937
938/// This data structure is used by the Zig language code generation and
939/// therefore must be kept in sync with the compiler implementation.
940pub const VaListArm = extern struct {
941 __ap: *anyopaque,
942};
943
944/// This data structure is used by the Zig language code generation and
945/// therefore must be kept in sync with the compiler implementation.
946pub const VaListHexagon = extern struct {
947 __gpr: c_long,
948 __fpr: c_long,
949 __overflow_arg_area: *anyopaque,
950 __reg_save_area: *anyopaque,
951};
952
953/// This data structure is used by the Zig language code generation and
954/// therefore must be kept in sync with the compiler implementation.
955pub const VaListPowerPc = extern struct {
956 gpr: u8,
957 fpr: u8,
958 reserved: c_ushort,
959 overflow_arg_area: *anyopaque,
960 reg_save_area: *anyopaque,
961};
962
963/// This data structure is used by the Zig language code generation and
964/// therefore must be kept in sync with the compiler implementation.
965pub const VaListS390x = extern struct {
966 __current_saved_reg_area_pointer: *anyopaque,
967 __saved_reg_area_end_pointer: *anyopaque,
968 __overflow_area_pointer: *anyopaque,
969};
970
971/// This data structure is used by the Zig language code generation and
972/// therefore must be kept in sync with the compiler implementation.
973pub const VaListSh = extern struct {
974 __va_next_o: *anyopaque,
975 __va_next_o_limit: *anyopaque,
976 __va_next_fp: *anyopaque,
977 __va_next_fp_limit: *anyopaque,
978 __va_next_stack: *anyopaque,
979};
980
981/// This data structure is used by the Zig language code generation and
982/// therefore must be kept in sync with the compiler implementation.
983pub const VaListX86_64 = extern struct {
984 gp_offset: c_uint,
985 fp_offset: c_uint,
986 overflow_arg_area: *anyopaque,
987 reg_save_area: *anyopaque,
988};
989
990/// This data structure is used by the Zig language code generation and
991/// therefore must be kept in sync with the compiler implementation.
992pub const VaListXtensa = extern struct {
993 __va_stk: *c_int,
994 __va_reg: *c_int,
995 __va_ndx: c_int,
996};
997
998/// This data structure is used by the Zig language code generation and
999/// therefore must be kept in sync with the compiler implementation.
1000pub const VaList = switch (builtin.cpu.arch) {
1001 .amdgcn,
1002 .msp430,
1003 .nvptx,
1004 .nvptx64,
1005 .powerpc64,
1006 .powerpc64le,
1007 .x86,
1008 => *u8,
1009 .arc,
1010 .arceb,
1011 .avr,
1012 .bpfel,
1013 .bpfeb,
1014 .csky,
1015 .hppa,
1016 .hppa64,
1017 .kvx,
1018 .lanai,
1019 .loongarch32,
1020 .loongarch64,
1021 .m68k,
1022 .microblaze,
1023 .microblazeel,
1024 .mips,
1025 .mipsel,
1026 .mips64,
1027 .mips64el,
1028 .riscv32,
1029 .riscv32be,
1030 .riscv64,
1031 .riscv64be,
1032 .sparc,
1033 .sparc64,
1034 .spirv32,
1035 .spirv64,
1036 .ve,
1037 .wasm32,
1038 .wasm64,
1039 .xcore,
1040 => *anyopaque,
1041 .aarch64, .aarch64_be => switch (builtin.os.tag) {
1042 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .windows => *u8,
1043 else => switch (builtin.zig_backend) {
1044 else => VaListAarch64,
1045 .stage2_llvm => @compileError("disabled due to miscompilations"),
1046 },
1047 },
1048 .alpha => VaListAlpha,
1049 .arm, .armeb, .thumb, .thumbeb => VaListArm,
1050 .hexagon => if (builtin.target.abi.isMusl()) VaListHexagon else *u8,
1051 .powerpc, .powerpcle => VaListPowerPc,
1052 .s390x => VaListS390x,
1053 .sh, .sheb => VaListSh, // This is wrong for `sh_renesas`: https://github.com/ziglang/zig/issues/24692#issuecomment-3150779829
1054 .x86_64 => switch (builtin.os.tag) {
1055 .uefi, .windows => switch (builtin.zig_backend) {
1056 else => *u8,
1057 .stage2_llvm => @compileError("disabled due to miscompilations"),
1058 },
1059 else => VaListX86_64,
1060 },
1061 .xtensa, .xtensaeb => VaListXtensa,
1062 else => @compileError("VaList not supported for this target yet"),
1063};
1064
1065/// This data structure is used by the Zig language code generation and
1066/// therefore must be kept in sync with the compiler implementation.
1067pub const PrefetchOptions = struct {
1068 /// Whether the prefetch should prepare for a read or a write.
1069 rw: Rw = .read,
1070 /// The data's locality in an inclusive range from 0 to 3.
1071 ///
1072 /// 0 means no temporal locality. That is, the data can be immediately
1073 /// dropped from the cache after it is accessed.
1074 ///
1075 /// 3 means high temporal locality. That is, the data should be kept in
1076 /// the cache as it is likely to be accessed again soon.
1077 locality: u2 = 3,
1078 /// The cache that the prefetch should be performed on.
1079 cache: Cache = .data,
1080
1081 pub const Rw = enum(u1) {
1082 read,
1083 write,
1084 };
1085
1086 pub const Cache = enum(u1) {
1087 instruction,
1088 data,
1089 };
1090};
1091
1092/// This data structure is used by the Zig language code generation and
1093/// therefore must be kept in sync with the compiler implementation.
1094pub const ExportOptions = struct {
1095 name: []const u8,
1096 linkage: GlobalLinkage = .strong,
1097 section: ?[]const u8 = null,
1098 visibility: SymbolVisibility = .default,
1099};
1100
1101/// This data structure is used by the Zig language code generation and
1102/// therefore must be kept in sync with the compiler implementation.
1103pub const ExternOptions = struct {
1104 name: []const u8,
1105 library_name: ?[]const u8 = null,
1106 linkage: GlobalLinkage = .strong,
1107 visibility: SymbolVisibility = .default,
1108 /// Setting this to `true` makes the `@extern` a runtime value.
1109 is_thread_local: bool = false,
1110 is_dll_import: bool = false,
1111 relocation: Relocation = .any,
1112 decoration: ?Decoration = null,
1113
1114 pub const Decoration = union(enum) {
1115 location: u32,
1116 descriptor: Descriptor,
1117
1118 pub const Descriptor = struct {
1119 binding: u32,
1120 set: u32,
1121 };
1122 };
1123
1124 pub const Relocation = enum(u1) {
1125 /// Any type of relocation is allowed.
1126 any,
1127 /// A program-counter-relative relocation is required.
1128 /// Using this value makes the `@extern` a runtime value.
1129 pcrel,
1130 };
1131};
1132
1133/// This data structure is used by the Zig language code generation and
1134/// therefore must be kept in sync with the compiler implementation.
1135pub const BranchHint = enum(u3) {
1136 /// Equivalent to no hint given.
1137 none,
1138 /// This branch of control flow is more likely to be reached than its peers.
1139 /// The optimizer should optimize for reaching it.
1140 likely,
1141 /// This branch of control flow is less likely to be reached than its peers.
1142 /// The optimizer should optimize for not reaching it.
1143 unlikely,
1144 /// This branch of control flow is unlikely to *ever* be reached.
1145 /// The optimizer may place it in a different page of memory to optimize other branches.
1146 cold,
1147 /// It is difficult to predict whether this branch of control flow will be reached.
1148 /// The optimizer should avoid branching behavior with expensive mispredictions.
1149 unpredictable,
1150};
1151
1152/// This enum is set by the compiler and communicates which compiler backend is
1153/// used to produce machine code.
1154/// Think carefully before deciding to observe this value. Nearly all code should
1155/// be agnostic to the backend that implements the language. The use case
1156/// to use this value is to **work around problems with compiler implementations.**
1157///
1158/// Avoid failing the compilation if the compiler backend does not match a
1159/// whitelist of backends; rather one should detect that a known problem would
1160/// occur in a blacklist of backends.
1161///
1162/// The enum is nonexhaustive so that alternate Zig language implementations may
1163/// choose a number as their tag (please use a random number generator rather
1164/// than a "cute" number) and codebases can interact with these values even if
1165/// this upstream enum does not have a name for the number. Of course, upstream
1166/// is happy to accept pull requests to add Zig implementations to this enum.
1167///
1168/// This data structure is part of the Zig language specification.
1169pub const CompilerBackend = enum(u64) {
1170 /// It is allowed for a compiler implementation to not reveal its identity,
1171 /// in which case this value is appropriate. Be cool and make sure your
1172 /// code supports `other` Zig compilers!
1173 other = 0,
1174 /// The original Zig compiler created in 2015 by Andrew Kelley. Implemented
1175 /// in C++. Used LLVM. Deleted from the ZSF ziglang/zig codebase on
1176 /// December 6th, 2022.
1177 stage1 = 1,
1178 /// The reference implementation self-hosted compiler of Zig, using the
1179 /// LLVM backend.
1180 stage2_llvm = 2,
1181 /// The reference implementation self-hosted compiler of Zig, using the
1182 /// backend that generates C source code.
1183 /// Note that one can observe whether the compilation will output C code
1184 /// directly with `object_format` value rather than the `compiler_backend` value.
1185 stage2_c = 3,
1186 /// The reference implementation self-hosted compiler of Zig, using the
1187 /// WebAssembly backend.
1188 stage2_wasm = 4,
1189 /// The reference implementation self-hosted compiler of Zig, using the
1190 /// arm backend.
1191 stage2_arm = 5,
1192 /// The reference implementation self-hosted compiler of Zig, using the
1193 /// x86_64 backend.
1194 stage2_x86_64 = 6,
1195 /// The reference implementation self-hosted compiler of Zig, using the
1196 /// aarch64 backend.
1197 stage2_aarch64 = 7,
1198 /// The reference implementation self-hosted compiler of Zig, using the
1199 /// x86 backend.
1200 stage2_x86 = 8,
1201 /// The reference implementation self-hosted compiler of Zig, using the
1202 /// riscv64 backend.
1203 stage2_riscv64 = 9,
1204 /// The reference implementation self-hosted compiler of Zig, using the
1205 /// sparc64 backend.
1206 stage2_sparc64 = 10,
1207 /// The reference implementation self-hosted compiler of Zig, using the
1208 /// spirv backend.
1209 stage2_spirv = 11,
1210 /// The reference implementation self-hosted compiler of Zig, using the
1211 /// powerpc backend.
1212 stage2_powerpc = 12,
1213
1214 _,
1215};
1216
1217/// This function type is used by the Zig language code generation and
1218/// therefore must be kept in sync with the compiler implementation.
1219pub const TestFn = struct {
1220 name: []const u8,
1221 func: *const fn () anyerror!void,
1222};
1223
1224/// This namespace is used by the Zig compiler to emit various kinds of safety
1225/// panics. These can be overridden by making a public `panic` namespace in the
1226/// root source file.
1227pub const panic: type = p: {
1228 if (@hasDecl(root, "panic")) {
1229 if (@TypeOf(root.panic) != type) {
1230 // Deprecated; make `panic` a namespace instead.
1231 break :p std.debug.FullPanic(struct {
1232 fn panic(msg: []const u8, ra: ?usize) noreturn {
1233 root.panic(msg, @errorReturnTrace(), ra);
1234 }
1235 }.panic);
1236 }
1237 break :p root.panic;
1238 }
1239 break :p switch (builtin.zig_backend) {
1240 .stage2_powerpc,
1241 .stage2_riscv64,
1242 => std.debug.simple_panic,
1243 else => std.debug.FullPanic(std.debug.defaultPanic),
1244 };
1245};
1246
1247pub noinline fn returnError() void {
1248 @branchHint(.unlikely);
1249 @setRuntimeSafety(false);
1250 const st = @errorReturnTrace().?;
1251 if (st.index < st.instruction_addresses.len)
1252 st.instruction_addresses[st.index] = @returnAddress();
1253 st.index += 1;
1254}
lib/std/lang/assembly.zig created+3119
...@@ -0,0 +1,3119 @@
1pub const Clobbers = switch (@import("builtin").cpu.arch) {
2 .x86_16, .x86, .x86_64 => packed struct {
3 /// Whether the inline assembly code may perform stores to memory
4 /// addresses other than those derived from input pointer provenance.
5 memory: bool = false,
6
7 /// Condition codes. Subset of the bits in `eflags` and `rflags`.
8 cc: bool = false,
9 dirflag: bool = false,
10 eflags: bool = false,
11 flags: bool = false,
12 fpcr: bool = false,
13 fpsr: bool = false,
14 mxcsr: bool = false,
15 rflags: bool = false,
16
17 rax: bool = false,
18 rcx: bool = false,
19 rdx: bool = false,
20 rbx: bool = false,
21 rsp: bool = false,
22 rbp: bool = false,
23 rsi: bool = false,
24 rdi: bool = false,
25 r8: bool = false,
26 r9: bool = false,
27 r10: bool = false,
28 r11: bool = false,
29 r12: bool = false,
30 r13: bool = false,
31 r14: bool = false,
32 r15: bool = false,
33 eax: bool = false,
34 ecx: bool = false,
35 edx: bool = false,
36 ebx: bool = false,
37 esp: bool = false,
38 ebp: bool = false,
39 esi: bool = false,
40 edi: bool = false,
41 r8d: bool = false,
42 r9d: bool = false,
43 r10d: bool = false,
44 r11d: bool = false,
45 r12d: bool = false,
46 r13d: bool = false,
47 r14d: bool = false,
48 r15d: bool = false,
49 ax: bool = false,
50 cx: bool = false,
51 dx: bool = false,
52 bx: bool = false,
53 sp: bool = false,
54 bp: bool = false,
55 si: bool = false,
56 di: bool = false,
57 r8w: bool = false,
58 r9w: bool = false,
59 r10w: bool = false,
60 r11w: bool = false,
61 r12w: bool = false,
62 r13w: bool = false,
63 r14w: bool = false,
64 r15w: bool = false,
65 al: bool = false,
66 cl: bool = false,
67 dl: bool = false,
68 bl: bool = false,
69 spl: bool = false,
70 bpl: bool = false,
71 sil: bool = false,
72 dil: bool = false,
73 r8b: bool = false,
74 r9b: bool = false,
75 r10b: bool = false,
76 r11b: bool = false,
77 r12b: bool = false,
78 r13b: bool = false,
79 r14b: bool = false,
80 r15b: bool = false,
81 ah: bool = false,
82 ch: bool = false,
83 dh: bool = false,
84 bh: bool = false,
85 zmm0: bool = false,
86 zmm1: bool = false,
87 zmm2: bool = false,
88 zmm3: bool = false,
89 zmm4: bool = false,
90 zmm5: bool = false,
91 zmm6: bool = false,
92 zmm7: bool = false,
93 zmm8: bool = false,
94 zmm9: bool = false,
95 zmm10: bool = false,
96 zmm11: bool = false,
97 zmm12: bool = false,
98 zmm13: bool = false,
99 zmm14: bool = false,
100 zmm15: bool = false,
101 zmm16: bool = false,
102 zmm17: bool = false,
103 zmm18: bool = false,
104 zmm19: bool = false,
105 zmm20: bool = false,
106 zmm21: bool = false,
107 zmm22: bool = false,
108 zmm23: bool = false,
109 zmm24: bool = false,
110 zmm25: bool = false,
111 zmm26: bool = false,
112 zmm27: bool = false,
113 zmm28: bool = false,
114 zmm29: bool = false,
115 zmm30: bool = false,
116 zmm31: bool = false,
117 ymm0: bool = false,
118 ymm1: bool = false,
119 ymm2: bool = false,
120 ymm3: bool = false,
121 ymm4: bool = false,
122 ymm5: bool = false,
123 ymm6: bool = false,
124 ymm7: bool = false,
125 ymm8: bool = false,
126 ymm9: bool = false,
127 ymm10: bool = false,
128 ymm11: bool = false,
129 ymm12: bool = false,
130 ymm13: bool = false,
131 ymm14: bool = false,
132 ymm15: bool = false,
133 ymm16: bool = false,
134 ymm17: bool = false,
135 ymm18: bool = false,
136 ymm19: bool = false,
137 ymm20: bool = false,
138 ymm21: bool = false,
139 ymm22: bool = false,
140 ymm23: bool = false,
141 ymm24: bool = false,
142 ymm25: bool = false,
143 ymm26: bool = false,
144 ymm27: bool = false,
145 ymm28: bool = false,
146 ymm29: bool = false,
147 ymm30: bool = false,
148 ymm31: bool = false,
149 xmm0: bool = false,
150 xmm1: bool = false,
151 xmm2: bool = false,
152 xmm3: bool = false,
153 xmm4: bool = false,
154 xmm5: bool = false,
155 xmm6: bool = false,
156 xmm7: bool = false,
157 xmm8: bool = false,
158 xmm9: bool = false,
159 xmm10: bool = false,
160 xmm11: bool = false,
161 xmm12: bool = false,
162 xmm13: bool = false,
163 xmm14: bool = false,
164 xmm15: bool = false,
165 xmm16: bool = false,
166 xmm17: bool = false,
167 xmm18: bool = false,
168 xmm19: bool = false,
169 xmm20: bool = false,
170 xmm21: bool = false,
171 xmm22: bool = false,
172 xmm23: bool = false,
173 xmm24: bool = false,
174 xmm25: bool = false,
175 xmm26: bool = false,
176 xmm27: bool = false,
177 xmm28: bool = false,
178 xmm29: bool = false,
179 xmm30: bool = false,
180 xmm31: bool = false,
181 mm0: bool = false,
182 mm1: bool = false,
183 mm2: bool = false,
184 mm3: bool = false,
185 mm4: bool = false,
186 mm5: bool = false,
187 mm6: bool = false,
188 mm7: bool = false,
189 st0: bool = false,
190 st1: bool = false,
191 st2: bool = false,
192 st3: bool = false,
193 st4: bool = false,
194 st5: bool = false,
195 st6: bool = false,
196 st7: bool = false,
197 es: bool = false,
198 cs: bool = false,
199 ss: bool = false,
200 ds: bool = false,
201 fs: bool = false,
202 gs: bool = false,
203 },
204 .aarch64, .aarch64_be => packed struct {
205 /// Whether the inline assembly code may perform stores to memory
206 /// addresses other than those derived from input pointer provenance.
207 memory: bool = false,
208
209 nzcv: bool = false,
210
211 x0: bool = false,
212 x1: bool = false,
213 x2: bool = false,
214 x3: bool = false,
215 x4: bool = false,
216 x5: bool = false,
217 x6: bool = false,
218 x7: bool = false,
219 x8: bool = false,
220 x9: bool = false,
221 x10: bool = false,
222 x11: bool = false,
223 x12: bool = false,
224 x13: bool = false,
225 x14: bool = false,
226 x15: bool = false,
227 x16: bool = false,
228 x17: bool = false,
229 x18: bool = false,
230 x19: bool = false,
231 x20: bool = false,
232 x21: bool = false,
233 x22: bool = false,
234 x23: bool = false,
235 x24: bool = false,
236 x25: bool = false,
237 x26: bool = false,
238 x27: bool = false,
239 x28: bool = false,
240 x29: bool = false,
241 x30: bool = false,
242
243 w0: bool = false,
244 w1: bool = false,
245 w2: bool = false,
246 w3: bool = false,
247 w4: bool = false,
248 w5: bool = false,
249 w6: bool = false,
250 w7: bool = false,
251 w8: bool = false,
252 w9: bool = false,
253 w10: bool = false,
254 w11: bool = false,
255 w12: bool = false,
256 w13: bool = false,
257 w14: bool = false,
258 w15: bool = false,
259 w16: bool = false,
260 w17: bool = false,
261 w18: bool = false,
262 w19: bool = false,
263 w20: bool = false,
264 w21: bool = false,
265 w22: bool = false,
266 w23: bool = false,
267 w24: bool = false,
268 w25: bool = false,
269 w26: bool = false,
270 w27: bool = false,
271 w28: bool = false,
272 w29: bool = false,
273
274 lr: bool = false,
275 sp: bool = false,
276 wsp: bool = false,
277 fpcr: bool = false,
278 fpmr: bool = false,
279 fpsr: bool = false,
280 ffr: bool = false,
281
282 p0: bool = false,
283 p1: bool = false,
284 p2: bool = false,
285 p3: bool = false,
286 p4: bool = false,
287 p5: bool = false,
288 p6: bool = false,
289 p7: bool = false,
290 p8: bool = false,
291 p9: bool = false,
292 p10: bool = false,
293 p11: bool = false,
294 p12: bool = false,
295 p13: bool = false,
296 p14: bool = false,
297 p15: bool = false,
298
299 z0: bool = false,
300 z1: bool = false,
301 z2: bool = false,
302 z3: bool = false,
303 z4: bool = false,
304 z5: bool = false,
305 z6: bool = false,
306 z7: bool = false,
307 z8: bool = false,
308 z9: bool = false,
309 z10: bool = false,
310 z11: bool = false,
311 z12: bool = false,
312 z13: bool = false,
313 z14: bool = false,
314 z15: bool = false,
315 z16: bool = false,
316 z17: bool = false,
317 z18: bool = false,
318 z19: bool = false,
319 z20: bool = false,
320 z21: bool = false,
321 z22: bool = false,
322 z23: bool = false,
323 z24: bool = false,
324 z25: bool = false,
325 z26: bool = false,
326 z27: bool = false,
327 z28: bool = false,
328 z29: bool = false,
329 z30: bool = false,
330 z31: bool = false,
331
332 v0: bool = false,
333 v1: bool = false,
334 v2: bool = false,
335 v3: bool = false,
336 v4: bool = false,
337 v5: bool = false,
338 v6: bool = false,
339 v7: bool = false,
340 v8: bool = false,
341 v9: bool = false,
342 v10: bool = false,
343 v11: bool = false,
344 v12: bool = false,
345 v13: bool = false,
346 v14: bool = false,
347 v15: bool = false,
348 v16: bool = false,
349 v17: bool = false,
350 v18: bool = false,
351 v19: bool = false,
352 v20: bool = false,
353 v21: bool = false,
354 v22: bool = false,
355 v23: bool = false,
356 v24: bool = false,
357 v25: bool = false,
358 v26: bool = false,
359 v27: bool = false,
360 v28: bool = false,
361 v29: bool = false,
362 v30: bool = false,
363 v31: bool = false,
364
365 d0: bool = false,
366 d1: bool = false,
367 d2: bool = false,
368 d3: bool = false,
369 d4: bool = false,
370 d5: bool = false,
371 d6: bool = false,
372 d7: bool = false,
373 d8: bool = false,
374 d9: bool = false,
375 d10: bool = false,
376 d11: bool = false,
377 d12: bool = false,
378 d13: bool = false,
379 d14: bool = false,
380 d15: bool = false,
381 d16: bool = false,
382 d17: bool = false,
383 d18: bool = false,
384 d19: bool = false,
385 d20: bool = false,
386 d21: bool = false,
387 d22: bool = false,
388 d23: bool = false,
389 d24: bool = false,
390 d25: bool = false,
391 d26: bool = false,
392 d27: bool = false,
393 d28: bool = false,
394 d29: bool = false,
395 d30: bool = false,
396 d31: bool = false,
397
398 s0: bool = false,
399 s1: bool = false,
400 s2: bool = false,
401 s3: bool = false,
402 s4: bool = false,
403 s5: bool = false,
404 s6: bool = false,
405 s7: bool = false,
406 s8: bool = false,
407 s9: bool = false,
408 s10: bool = false,
409 s11: bool = false,
410 s12: bool = false,
411 s13: bool = false,
412 s14: bool = false,
413 s15: bool = false,
414 s16: bool = false,
415 s17: bool = false,
416 s18: bool = false,
417 s19: bool = false,
418 s20: bool = false,
419 s21: bool = false,
420 s22: bool = false,
421 s23: bool = false,
422 s24: bool = false,
423 s25: bool = false,
424 s26: bool = false,
425 s27: bool = false,
426 s28: bool = false,
427 s29: bool = false,
428 s30: bool = false,
429 s31: bool = false,
430
431 h0: bool = false,
432 h1: bool = false,
433 h2: bool = false,
434 h3: bool = false,
435 h4: bool = false,
436 h5: bool = false,
437 h6: bool = false,
438 h7: bool = false,
439 h8: bool = false,
440 h9: bool = false,
441 h10: bool = false,
442 h11: bool = false,
443 h12: bool = false,
444 h13: bool = false,
445 h14: bool = false,
446 h15: bool = false,
447 h16: bool = false,
448 h17: bool = false,
449 h18: bool = false,
450 h19: bool = false,
451 h20: bool = false,
452 h21: bool = false,
453 h22: bool = false,
454 h23: bool = false,
455 h24: bool = false,
456 h25: bool = false,
457 h26: bool = false,
458 h27: bool = false,
459 h28: bool = false,
460 h29: bool = false,
461 h30: bool = false,
462 h31: bool = false,
463
464 b0: bool = false,
465 b1: bool = false,
466 b2: bool = false,
467 b3: bool = false,
468 b4: bool = false,
469 b5: bool = false,
470 b6: bool = false,
471 b7: bool = false,
472 b8: bool = false,
473 b9: bool = false,
474 b10: bool = false,
475 b11: bool = false,
476 b12: bool = false,
477 b13: bool = false,
478 b14: bool = false,
479 b15: bool = false,
480 b16: bool = false,
481 b17: bool = false,
482 b18: bool = false,
483 b19: bool = false,
484 b20: bool = false,
485 b21: bool = false,
486 b22: bool = false,
487 b23: bool = false,
488 b24: bool = false,
489 b25: bool = false,
490 b26: bool = false,
491 b27: bool = false,
492 b28: bool = false,
493 b29: bool = false,
494 b30: bool = false,
495 b31: bool = false,
496
497 za0q: bool = false,
498 za1q: bool = false,
499 za2q: bool = false,
500 za3q: bool = false,
501 za4q: bool = false,
502 za5q: bool = false,
503 za6q: bool = false,
504 za7q: bool = false,
505 za8q: bool = false,
506 za9q: bool = false,
507 za10q: bool = false,
508 za11q: bool = false,
509 za12q: bool = false,
510 za13q: bool = false,
511 za14q: bool = false,
512 za15q: bool = false,
513
514 za0d: bool = false,
515 za1d: bool = false,
516 za2d: bool = false,
517 za3d: bool = false,
518 za4d: bool = false,
519 za5d: bool = false,
520 za6d: bool = false,
521 za7d: bool = false,
522
523 za0s: bool = false,
524 za1s: bool = false,
525 za2s: bool = false,
526 za3s: bool = false,
527
528 za0h: bool = false,
529 za1h: bool = false,
530 za0b: bool = false,
531
532 zt0: bool = false,
533 },
534 .arm, .armeb, .thumb, .thumbeb => packed struct {
535 /// Whether the inline assembly code may perform stores to memory
536 /// addresses other than those derived from input pointer provenance.
537 memory: bool = false,
538
539 apsr: bool = false,
540 cpsr: bool = false,
541 spsr: bool = false,
542 r0: bool = false,
543 r1: bool = false,
544 r2: bool = false,
545 r3: bool = false,
546 r4: bool = false,
547 r5: bool = false,
548 r6: bool = false,
549 r7: bool = false,
550 r8: bool = false,
551 r9: bool = false,
552 r10: bool = false,
553 r11: bool = false,
554 r12: bool = false,
555 r13: bool = false,
556 r14: bool = false,
557
558 lr: bool = false,
559 sp: bool = false,
560 fpscr: bool = false,
561 vpr: bool = false,
562
563 d0: bool = false,
564 d1: bool = false,
565 d2: bool = false,
566 d3: bool = false,
567 d4: bool = false,
568 d5: bool = false,
569 d6: bool = false,
570 d7: bool = false,
571 d8: bool = false,
572 d9: bool = false,
573 d10: bool = false,
574 d11: bool = false,
575 d12: bool = false,
576 d13: bool = false,
577 d14: bool = false,
578 d15: bool = false,
579 d16: bool = false,
580 d17: bool = false,
581 d18: bool = false,
582 d19: bool = false,
583 d20: bool = false,
584 d21: bool = false,
585 d22: bool = false,
586 d23: bool = false,
587 d24: bool = false,
588 d25: bool = false,
589 d26: bool = false,
590 d27: bool = false,
591 d28: bool = false,
592 d29: bool = false,
593 d30: bool = false,
594 d31: bool = false,
595
596 s0: bool = false,
597 s1: bool = false,
598 s2: bool = false,
599 s3: bool = false,
600 s4: bool = false,
601 s5: bool = false,
602 s6: bool = false,
603 s7: bool = false,
604 s8: bool = false,
605 s9: bool = false,
606 s10: bool = false,
607 s11: bool = false,
608 s12: bool = false,
609 s13: bool = false,
610 s14: bool = false,
611 s15: bool = false,
612 s16: bool = false,
613 s17: bool = false,
614 s18: bool = false,
615 s19: bool = false,
616 s20: bool = false,
617 s21: bool = false,
618 s22: bool = false,
619 s23: bool = false,
620 s24: bool = false,
621 s25: bool = false,
622 s26: bool = false,
623 s27: bool = false,
624 s28: bool = false,
625 s29: bool = false,
626 s30: bool = false,
627 s31: bool = false,
628
629 q0: bool = false,
630 q1: bool = false,
631 q2: bool = false,
632 q3: bool = false,
633 q4: bool = false,
634 q5: bool = false,
635 q6: bool = false,
636 q7: bool = false,
637 q8: bool = false,
638 q9: bool = false,
639 q10: bool = false,
640 q11: bool = false,
641 q12: bool = false,
642 q13: bool = false,
643 q14: bool = false,
644 q15: bool = false,
645 },
646 .riscv32, .riscv32be, .riscv64, .riscv64be => packed struct {
647 /// Whether the inline assembly code may perform stores to memory
648 /// addresses other than those derived from input pointer provenance.
649 memory: bool = false,
650
651 ssp: bool = false,
652
653 x1: bool = false,
654 x2: bool = false,
655 x3: bool = false,
656 x4: bool = false,
657 x5: bool = false,
658 x6: bool = false,
659 x7: bool = false,
660 x8: bool = false,
661 x9: bool = false,
662 x10: bool = false,
663 x11: bool = false,
664 x12: bool = false,
665 x13: bool = false,
666 x14: bool = false,
667 x15: bool = false,
668 x16: bool = false,
669 x17: bool = false,
670 x18: bool = false,
671 x19: bool = false,
672 x20: bool = false,
673 x21: bool = false,
674 x22: bool = false,
675 x23: bool = false,
676 x24: bool = false,
677 x25: bool = false,
678 x26: bool = false,
679 x27: bool = false,
680 x28: bool = false,
681 x29: bool = false,
682 x30: bool = false,
683 x31: bool = false,
684
685 // ABI aliases for integer registers
686 ra: bool = false,
687 sp: bool = false,
688 gp: bool = false,
689 tp: bool = false,
690 t0: bool = false,
691 t1: bool = false,
692 t2: bool = false,
693 s0: bool = false,
694 fp: bool = false,
695 s1: bool = false,
696 a0: bool = false,
697 a1: bool = false,
698 a2: bool = false,
699 a3: bool = false,
700 a4: bool = false,
701 a5: bool = false,
702 a6: bool = false,
703 a7: bool = false,
704 s2: bool = false,
705 s3: bool = false,
706 s4: bool = false,
707 s5: bool = false,
708 s6: bool = false,
709 s7: bool = false,
710 s8: bool = false,
711 s9: bool = false,
712 s10: bool = false,
713 s11: bool = false,
714 t3: bool = false,
715 t4: bool = false,
716 t5: bool = false,
717 t6: bool = false,
718
719 fflags: bool = false,
720 frm: bool = false,
721
722 f0: bool = false,
723 f1: bool = false,
724 f2: bool = false,
725 f3: bool = false,
726 f4: bool = false,
727 f5: bool = false,
728 f6: bool = false,
729 f7: bool = false,
730 f8: bool = false,
731 f9: bool = false,
732 f10: bool = false,
733 f11: bool = false,
734 f12: bool = false,
735 f13: bool = false,
736 f14: bool = false,
737 f15: bool = false,
738 f16: bool = false,
739 f17: bool = false,
740 f18: bool = false,
741 f19: bool = false,
742 f20: bool = false,
743 f21: bool = false,
744 f22: bool = false,
745 f23: bool = false,
746 f24: bool = false,
747 f25: bool = false,
748 f26: bool = false,
749 f27: bool = false,
750 f28: bool = false,
751 f29: bool = false,
752 f30: bool = false,
753 f31: bool = false,
754
755 // ABI aliases for float registers
756 ft0: bool = false,
757 ft1: bool = false,
758 ft2: bool = false,
759 ft3: bool = false,
760 ft4: bool = false,
761 ft5: bool = false,
762 ft6: bool = false,
763 ft7: bool = false,
764 fs0: bool = false,
765 fs1: bool = false,
766 fa0: bool = false,
767 fa1: bool = false,
768 fa2: bool = false,
769 fa3: bool = false,
770 fa4: bool = false,
771 fa5: bool = false,
772 fa6: bool = false,
773 fa7: bool = false,
774 fs2: bool = false,
775 fs3: bool = false,
776 fs4: bool = false,
777 fs5: bool = false,
778 fs6: bool = false,
779 fs7: bool = false,
780 fs8: bool = false,
781 fs9: bool = false,
782 fs10: bool = false,
783 fs11: bool = false,
784 ft8: bool = false,
785 ft9: bool = false,
786 ft10: bool = false,
787 ft11: bool = false,
788
789 vtype: bool = false,
790 vl: bool = false,
791 vxsat: bool = false,
792 vxrm: bool = false,
793 vcsr: bool = false,
794
795 v0: bool = false,
796 v1: bool = false,
797 v2: bool = false,
798 v3: bool = false,
799 v4: bool = false,
800 v5: bool = false,
801 v6: bool = false,
802 v7: bool = false,
803 v8: bool = false,
804 v9: bool = false,
805 v10: bool = false,
806 v11: bool = false,
807 v12: bool = false,
808 v13: bool = false,
809 v14: bool = false,
810 v15: bool = false,
811 v16: bool = false,
812 v17: bool = false,
813 v18: bool = false,
814 v19: bool = false,
815 v20: bool = false,
816 v21: bool = false,
817 v22: bool = false,
818 v23: bool = false,
819 v24: bool = false,
820 v25: bool = false,
821 v26: bool = false,
822 v27: bool = false,
823 v28: bool = false,
824 v29: bool = false,
825 v30: bool = false,
826 v31: bool = false,
827 },
828 .xcore => packed struct {
829 /// Whether the inline assembly code may perform stores to memory
830 /// addresses other than those derived from input pointer provenance.
831 memory: bool = false,
832
833 r0: bool = false,
834 r1: bool = false,
835 r2: bool = false,
836 r3: bool = false,
837 r4: bool = false,
838 r5: bool = false,
839 r6: bool = false,
840 r7: bool = false,
841 r8: bool = false,
842 r9: bool = false,
843 r10: bool = false,
844 r11: bool = false,
845
846 cp: bool = false,
847 dp: bool = false,
848 sp: bool = false,
849 lr: bool = false,
850 sr: bool = false,
851 },
852 .xtensa, .xtensaeb => packed struct {
853 /// Whether the inline assembly code may perform stores to memory
854 /// addresses other than those derived from input pointer provenance.
855 memory: bool = false,
856
857 sar: bool = false,
858 lbeg: bool = false,
859 lend: bool = false,
860 lcount: bool = false,
861 atomctl: bool = false,
862 scompare1: bool = false,
863 threadptr: bool = false,
864 litbase: bool = false,
865 windowbase: bool = false,
866 windowstart: bool = false,
867 ps: bool = false,
868
869 a0: bool = false,
870 a1: bool = false,
871 a2: bool = false,
872 a3: bool = false,
873 a4: bool = false,
874 a5: bool = false,
875 a6: bool = false,
876 a7: bool = false,
877 a8: bool = false,
878 a9: bool = false,
879 a10: bool = false,
880 a11: bool = false,
881 a12: bool = false,
882 a13: bool = false,
883 a14: bool = false,
884 a15: bool = false,
885
886 br: bool = false,
887 b0: bool = false,
888 b1: bool = false,
889 b2: bool = false,
890 b3: bool = false,
891 b4: bool = false,
892 b5: bool = false,
893 b6: bool = false,
894 b7: bool = false,
895 b8: bool = false,
896 b9: bool = false,
897 b10: bool = false,
898 b11: bool = false,
899 b12: bool = false,
900 b13: bool = false,
901 b14: bool = false,
902 b15: bool = false,
903
904 acchi: bool = false,
905 acclo: bool = false,
906 m0: bool = false,
907 m1: bool = false,
908 m2: bool = false,
909 m3: bool = false,
910 fcr: bool = false,
911 fsr: bool = false,
912
913 f0: bool = false,
914 f1: bool = false,
915 f2: bool = false,
916 f3: bool = false,
917 f4: bool = false,
918 f5: bool = false,
919 f6: bool = false,
920 f7: bool = false,
921 f8: bool = false,
922 f9: bool = false,
923 f10: bool = false,
924 f11: bool = false,
925 f12: bool = false,
926 f13: bool = false,
927 f14: bool = false,
928 f15: bool = false,
929 },
930 .kvx => packed struct {
931 /// Whether the inline assembly code may perform stores to memory
932 /// addresses other than those derived from input pointer provenance.
933 memory: bool = false,
934
935 cs: bool = false,
936
937 ra: bool = false,
938
939 ls: bool = false,
940 le: bool = false,
941 lc: bool = false,
942
943 r0: bool = false,
944 r1: bool = false,
945 r2: bool = false,
946 r3: bool = false,
947 r4: bool = false,
948 r5: bool = false,
949 r6: bool = false,
950 r7: bool = false,
951 r8: bool = false,
952 r9: bool = false,
953 r10: bool = false,
954 r11: bool = false,
955 r12: bool = false,
956 r13: bool = false,
957 r14: bool = false,
958 r15: bool = false,
959 r16: bool = false,
960 r17: bool = false,
961 r18: bool = false,
962 r19: bool = false,
963 r20: bool = false,
964 r21: bool = false,
965 r22: bool = false,
966 r23: bool = false,
967 r24: bool = false,
968 r25: bool = false,
969 r26: bool = false,
970 r27: bool = false,
971 r28: bool = false,
972 r29: bool = false,
973 r30: bool = false,
974 r31: bool = false,
975 r32: bool = false,
976 r33: bool = false,
977 r34: bool = false,
978 r35: bool = false,
979 r36: bool = false,
980 r37: bool = false,
981 r38: bool = false,
982 r39: bool = false,
983 r40: bool = false,
984 r41: bool = false,
985 r42: bool = false,
986 r43: bool = false,
987 r44: bool = false,
988 r45: bool = false,
989 r46: bool = false,
990 r47: bool = false,
991 r48: bool = false,
992 r49: bool = false,
993 r50: bool = false,
994 r51: bool = false,
995 r52: bool = false,
996 r53: bool = false,
997 r54: bool = false,
998 r55: bool = false,
999 r56: bool = false,
1000 r57: bool = false,
1001 r58: bool = false,
1002 r59: bool = false,
1003 r60: bool = false,
1004 r61: bool = false,
1005 r62: bool = false,
1006 r63: bool = false,
1007
1008 a0: bool = false,
1009 a1: bool = false,
1010 a2: bool = false,
1011 a3: bool = false,
1012 a4: bool = false,
1013 a5: bool = false,
1014 a6: bool = false,
1015 a7: bool = false,
1016 a8: bool = false,
1017 a9: bool = false,
1018 a10: bool = false,
1019 a11: bool = false,
1020 a12: bool = false,
1021 a13: bool = false,
1022 a14: bool = false,
1023 a15: bool = false,
1024 a16: bool = false,
1025 a17: bool = false,
1026 a18: bool = false,
1027 a19: bool = false,
1028 a20: bool = false,
1029 a21: bool = false,
1030 a22: bool = false,
1031 a23: bool = false,
1032 a24: bool = false,
1033 a25: bool = false,
1034 a26: bool = false,
1035 a27: bool = false,
1036 a28: bool = false,
1037 a29: bool = false,
1038 a30: bool = false,
1039 a31: bool = false,
1040 a32: bool = false,
1041 a33: bool = false,
1042 a34: bool = false,
1043 a35: bool = false,
1044 a36: bool = false,
1045 a37: bool = false,
1046 a38: bool = false,
1047 a39: bool = false,
1048 a40: bool = false,
1049 a41: bool = false,
1050 a42: bool = false,
1051 a43: bool = false,
1052 a44: bool = false,
1053 a45: bool = false,
1054 a46: bool = false,
1055 a47: bool = false,
1056 a48: bool = false,
1057 a49: bool = false,
1058 a50: bool = false,
1059 a51: bool = false,
1060 a52: bool = false,
1061 a53: bool = false,
1062 a54: bool = false,
1063 a55: bool = false,
1064 a56: bool = false,
1065 a57: bool = false,
1066 a58: bool = false,
1067 a59: bool = false,
1068 a60: bool = false,
1069 a61: bool = false,
1070 a62: bool = false,
1071 a63: bool = false,
1072
1073 a0_lo: bool = false,
1074 a0_hi: bool = false,
1075 a1_lo: bool = false,
1076 a1_hi: bool = false,
1077 a2_lo: bool = false,
1078 a2_hi: bool = false,
1079 a3_lo: bool = false,
1080 a3_hi: bool = false,
1081 a4_lo: bool = false,
1082 a4_hi: bool = false,
1083 a5_lo: bool = false,
1084 a5_hi: bool = false,
1085 a6_lo: bool = false,
1086 a6_hi: bool = false,
1087 a7_lo: bool = false,
1088 a7_hi: bool = false,
1089 a8_lo: bool = false,
1090 a8_hi: bool = false,
1091 a9_lo: bool = false,
1092 a9_hi: bool = false,
1093 a10_lo: bool = false,
1094 a10_hi: bool = false,
1095 a11_lo: bool = false,
1096 a11_hi: bool = false,
1097 a12_lo: bool = false,
1098 a12_hi: bool = false,
1099 a13_lo: bool = false,
1100 a13_hi: bool = false,
1101 a14_lo: bool = false,
1102 a14_hi: bool = false,
1103 a15_lo: bool = false,
1104 a15_hi: bool = false,
1105 a16_lo: bool = false,
1106 a16_hi: bool = false,
1107 a17_lo: bool = false,
1108 a17_hi: bool = false,
1109 a18_lo: bool = false,
1110 a18_hi: bool = false,
1111 a19_lo: bool = false,
1112 a19_hi: bool = false,
1113 a20_lo: bool = false,
1114 a20_hi: bool = false,
1115 a21_lo: bool = false,
1116 a21_hi: bool = false,
1117 a22_lo: bool = false,
1118 a22_hi: bool = false,
1119 a23_lo: bool = false,
1120 a23_hi: bool = false,
1121 a24_lo: bool = false,
1122 a24_hi: bool = false,
1123 a25_lo: bool = false,
1124 a25_hi: bool = false,
1125 a26_lo: bool = false,
1126 a26_hi: bool = false,
1127 a27_lo: bool = false,
1128 a27_hi: bool = false,
1129 a28_lo: bool = false,
1130 a28_hi: bool = false,
1131 a29_lo: bool = false,
1132 a29_hi: bool = false,
1133 a30_lo: bool = false,
1134 a30_hi: bool = false,
1135 a31_lo: bool = false,
1136 a31_hi: bool = false,
1137 a32_lo: bool = false,
1138 a32_hi: bool = false,
1139 a33_lo: bool = false,
1140 a33_hi: bool = false,
1141 a34_lo: bool = false,
1142 a34_hi: bool = false,
1143 a35_lo: bool = false,
1144 a35_hi: bool = false,
1145 a36_lo: bool = false,
1146 a36_hi: bool = false,
1147 a37_lo: bool = false,
1148 a37_hi: bool = false,
1149 a38_lo: bool = false,
1150 a38_hi: bool = false,
1151 a39_lo: bool = false,
1152 a39_hi: bool = false,
1153 a40_lo: bool = false,
1154 a40_hi: bool = false,
1155 a41_lo: bool = false,
1156 a41_hi: bool = false,
1157 a42_lo: bool = false,
1158 a42_hi: bool = false,
1159 a43_lo: bool = false,
1160 a43_hi: bool = false,
1161 a44_lo: bool = false,
1162 a44_hi: bool = false,
1163 a45_lo: bool = false,
1164 a45_hi: bool = false,
1165 a46_lo: bool = false,
1166 a46_hi: bool = false,
1167 a47_lo: bool = false,
1168 a47_hi: bool = false,
1169 a48_lo: bool = false,
1170 a48_hi: bool = false,
1171 a49_lo: bool = false,
1172 a49_hi: bool = false,
1173 a50_lo: bool = false,
1174 a50_hi: bool = false,
1175 a51_lo: bool = false,
1176 a51_hi: bool = false,
1177 a52_lo: bool = false,
1178 a52_hi: bool = false,
1179 a53_lo: bool = false,
1180 a53_hi: bool = false,
1181 a54_lo: bool = false,
1182 a54_hi: bool = false,
1183 a55_lo: bool = false,
1184 a55_hi: bool = false,
1185 a56_lo: bool = false,
1186 a56_hi: bool = false,
1187 a57_lo: bool = false,
1188 a57_hi: bool = false,
1189 a58_lo: bool = false,
1190 a58_hi: bool = false,
1191 a59_lo: bool = false,
1192 a59_hi: bool = false,
1193 a60_lo: bool = false,
1194 a60_hi: bool = false,
1195 a61_lo: bool = false,
1196 a61_hi: bool = false,
1197 a62_lo: bool = false,
1198 a62_hi: bool = false,
1199 a63_lo: bool = false,
1200 a63_hi: bool = false,
1201
1202 a0_x: bool = false,
1203 a0_y: bool = false,
1204 a0_z: bool = false,
1205 a0_t: bool = false,
1206 a1_x: bool = false,
1207 a1_y: bool = false,
1208 a1_z: bool = false,
1209 a1_t: bool = false,
1210 a2_x: bool = false,
1211 a2_y: bool = false,
1212 a2_z: bool = false,
1213 a2_t: bool = false,
1214 a3_x: bool = false,
1215 a3_y: bool = false,
1216 a3_z: bool = false,
1217 a3_t: bool = false,
1218 a4_x: bool = false,
1219 a4_y: bool = false,
1220 a4_z: bool = false,
1221 a4_t: bool = false,
1222 a5_x: bool = false,
1223 a5_y: bool = false,
1224 a5_z: bool = false,
1225 a5_t: bool = false,
1226 a6_x: bool = false,
1227 a6_y: bool = false,
1228 a6_z: bool = false,
1229 a6_t: bool = false,
1230 a7_x: bool = false,
1231 a7_y: bool = false,
1232 a7_z: bool = false,
1233 a7_t: bool = false,
1234 a8_x: bool = false,
1235 a8_y: bool = false,
1236 a8_z: bool = false,
1237 a8_t: bool = false,
1238 a9_x: bool = false,
1239 a9_y: bool = false,
1240 a9_z: bool = false,
1241 a9_t: bool = false,
1242 a10_x: bool = false,
1243 a10_y: bool = false,
1244 a10_z: bool = false,
1245 a10_t: bool = false,
1246 a11_x: bool = false,
1247 a11_y: bool = false,
1248 a11_z: bool = false,
1249 a11_t: bool = false,
1250 a12_x: bool = false,
1251 a12_y: bool = false,
1252 a12_z: bool = false,
1253 a12_t: bool = false,
1254 a13_x: bool = false,
1255 a13_y: bool = false,
1256 a13_z: bool = false,
1257 a13_t: bool = false,
1258 a14_x: bool = false,
1259 a14_y: bool = false,
1260 a14_z: bool = false,
1261 a14_t: bool = false,
1262 a15_x: bool = false,
1263 a15_y: bool = false,
1264 a15_z: bool = false,
1265 a15_t: bool = false,
1266 a16_x: bool = false,
1267 a16_y: bool = false,
1268 a16_z: bool = false,
1269 a16_t: bool = false,
1270 a17_x: bool = false,
1271 a17_y: bool = false,
1272 a17_z: bool = false,
1273 a17_t: bool = false,
1274 a18_x: bool = false,
1275 a18_y: bool = false,
1276 a18_z: bool = false,
1277 a18_t: bool = false,
1278 a19_x: bool = false,
1279 a19_y: bool = false,
1280 a19_z: bool = false,
1281 a19_t: bool = false,
1282 a20_x: bool = false,
1283 a20_y: bool = false,
1284 a20_z: bool = false,
1285 a20_t: bool = false,
1286 a21_x: bool = false,
1287 a21_y: bool = false,
1288 a21_z: bool = false,
1289 a21_t: bool = false,
1290 a22_x: bool = false,
1291 a22_y: bool = false,
1292 a22_z: bool = false,
1293 a22_t: bool = false,
1294 a23_x: bool = false,
1295 a23_y: bool = false,
1296 a23_z: bool = false,
1297 a23_t: bool = false,
1298 a24_x: bool = false,
1299 a24_y: bool = false,
1300 a24_z: bool = false,
1301 a24_t: bool = false,
1302 a25_x: bool = false,
1303 a25_y: bool = false,
1304 a25_z: bool = false,
1305 a25_t: bool = false,
1306 a26_x: bool = false,
1307 a26_y: bool = false,
1308 a26_z: bool = false,
1309 a26_t: bool = false,
1310 a27_x: bool = false,
1311 a27_y: bool = false,
1312 a27_z: bool = false,
1313 a27_t: bool = false,
1314 a28_x: bool = false,
1315 a28_y: bool = false,
1316 a28_z: bool = false,
1317 a28_t: bool = false,
1318 a29_x: bool = false,
1319 a29_y: bool = false,
1320 a29_z: bool = false,
1321 a29_t: bool = false,
1322 a30_x: bool = false,
1323 a30_y: bool = false,
1324 a30_z: bool = false,
1325 a30_t: bool = false,
1326 a31_x: bool = false,
1327 a31_y: bool = false,
1328 a31_z: bool = false,
1329 a31_t: bool = false,
1330 a32_x: bool = false,
1331 a32_y: bool = false,
1332 a32_z: bool = false,
1333 a32_t: bool = false,
1334 a33_x: bool = false,
1335 a33_y: bool = false,
1336 a33_z: bool = false,
1337 a33_t: bool = false,
1338 a34_x: bool = false,
1339 a34_y: bool = false,
1340 a34_z: bool = false,
1341 a34_t: bool = false,
1342 a35_x: bool = false,
1343 a35_y: bool = false,
1344 a35_z: bool = false,
1345 a35_t: bool = false,
1346 a36_x: bool = false,
1347 a36_y: bool = false,
1348 a36_z: bool = false,
1349 a36_t: bool = false,
1350 a37_x: bool = false,
1351 a37_y: bool = false,
1352 a37_z: bool = false,
1353 a37_t: bool = false,
1354 a38_x: bool = false,
1355 a38_y: bool = false,
1356 a38_z: bool = false,
1357 a38_t: bool = false,
1358 a39_x: bool = false,
1359 a39_y: bool = false,
1360 a39_z: bool = false,
1361 a39_t: bool = false,
1362 a40_x: bool = false,
1363 a40_y: bool = false,
1364 a40_z: bool = false,
1365 a40_t: bool = false,
1366 a41_x: bool = false,
1367 a41_y: bool = false,
1368 a41_z: bool = false,
1369 a41_t: bool = false,
1370 a42_x: bool = false,
1371 a42_y: bool = false,
1372 a42_z: bool = false,
1373 a42_t: bool = false,
1374 a43_x: bool = false,
1375 a43_y: bool = false,
1376 a43_z: bool = false,
1377 a43_t: bool = false,
1378 a44_x: bool = false,
1379 a44_y: bool = false,
1380 a44_z: bool = false,
1381 a44_t: bool = false,
1382 a45_x: bool = false,
1383 a45_y: bool = false,
1384 a45_z: bool = false,
1385 a45_t: bool = false,
1386 a46_x: bool = false,
1387 a46_y: bool = false,
1388 a46_z: bool = false,
1389 a46_t: bool = false,
1390 a47_x: bool = false,
1391 a47_y: bool = false,
1392 a47_z: bool = false,
1393 a47_t: bool = false,
1394 a48_x: bool = false,
1395 a48_y: bool = false,
1396 a48_z: bool = false,
1397 a48_t: bool = false,
1398 a49_x: bool = false,
1399 a49_y: bool = false,
1400 a49_z: bool = false,
1401 a49_t: bool = false,
1402 a50_x: bool = false,
1403 a50_y: bool = false,
1404 a50_z: bool = false,
1405 a50_t: bool = false,
1406 a51_x: bool = false,
1407 a51_y: bool = false,
1408 a51_z: bool = false,
1409 a51_t: bool = false,
1410 a52_x: bool = false,
1411 a52_y: bool = false,
1412 a52_z: bool = false,
1413 a52_t: bool = false,
1414 a53_x: bool = false,
1415 a53_y: bool = false,
1416 a53_z: bool = false,
1417 a53_t: bool = false,
1418 a54_x: bool = false,
1419 a54_y: bool = false,
1420 a54_z: bool = false,
1421 a54_t: bool = false,
1422 a55_x: bool = false,
1423 a55_y: bool = false,
1424 a55_z: bool = false,
1425 a55_t: bool = false,
1426 a56_x: bool = false,
1427 a56_y: bool = false,
1428 a56_z: bool = false,
1429 a56_t: bool = false,
1430 a57_x: bool = false,
1431 a57_y: bool = false,
1432 a57_z: bool = false,
1433 a57_t: bool = false,
1434 a58_x: bool = false,
1435 a58_y: bool = false,
1436 a58_z: bool = false,
1437 a58_t: bool = false,
1438 a59_x: bool = false,
1439 a59_y: bool = false,
1440 a59_z: bool = false,
1441 a59_t: bool = false,
1442 a60_x: bool = false,
1443 a60_y: bool = false,
1444 a60_z: bool = false,
1445 a60_t: bool = false,
1446 a61_x: bool = false,
1447 a61_y: bool = false,
1448 a61_z: bool = false,
1449 a61_t: bool = false,
1450 a62_x: bool = false,
1451 a62_y: bool = false,
1452 a62_z: bool = false,
1453 a62_t: bool = false,
1454 a63_x: bool = false,
1455 a63_y: bool = false,
1456 a63_z: bool = false,
1457 a63_t: bool = false,
1458 },
1459 .lanai => packed struct {
1460 /// Whether the inline assembly code may perform stores to memory
1461 /// addresses other than those derived from input pointer provenance.
1462 memory: bool = false,
1463 /// Condition flags which aren't accessible outside of conditional execution.
1464 sw: bool = false,
1465
1466 r3: bool = false,
1467 r4: bool = false,
1468 r5: bool = false,
1469 r6: bool = false,
1470 r7: bool = false,
1471 r8: bool = false,
1472 r9: bool = false,
1473 r10: bool = false,
1474 r11: bool = false,
1475 r12: bool = false,
1476 r13: bool = false,
1477 r14: bool = false,
1478 r15: bool = false,
1479 r16: bool = false,
1480 r17: bool = false,
1481 r18: bool = false,
1482 r19: bool = false,
1483 r20: bool = false,
1484 r21: bool = false,
1485 r22: bool = false,
1486 r23: bool = false,
1487 r24: bool = false,
1488 r25: bool = false,
1489 r26: bool = false,
1490 r27: bool = false,
1491 r28: bool = false,
1492 r29: bool = false,
1493 r30: bool = false,
1494 r31: bool = false,
1495 },
1496 .avr => packed struct {
1497 /// Whether the inline assembly code may perform stores to memory
1498 /// addresses other than those derived from input pointer provenance.
1499 memory: bool = false,
1500 flags: bool = false,
1501 r0: bool = false,
1502 r1: bool = false,
1503 r2: bool = false,
1504 r3: bool = false,
1505 r4: bool = false,
1506 r5: bool = false,
1507 r6: bool = false,
1508 r7: bool = false,
1509 r8: bool = false,
1510 r9: bool = false,
1511 r10: bool = false,
1512 r11: bool = false,
1513 r12: bool = false,
1514 r13: bool = false,
1515 r14: bool = false,
1516 r15: bool = false,
1517 r16: bool = false,
1518 r17: bool = false,
1519 r18: bool = false,
1520 r19: bool = false,
1521 r20: bool = false,
1522 r21: bool = false,
1523 r22: bool = false,
1524 r23: bool = false,
1525 r24: bool = false,
1526 r25: bool = false,
1527 r26: bool = false,
1528 r27: bool = false,
1529 r28: bool = false,
1530 r29: bool = false,
1531 r30: bool = false,
1532 r31: bool = false,
1533 },
1534 .msp430 => packed struct {
1535 /// Whether the inline assembly code may perform stores to memory
1536 /// addresses other than those derived from input pointer provenance.
1537 memory: bool = false,
1538
1539 r0: bool = false,
1540 r1: bool = false,
1541 r2: bool = false,
1542
1543 r4: bool = false,
1544 r5: bool = false,
1545 r6: bool = false,
1546 r7: bool = false,
1547 r8: bool = false,
1548 r9: bool = false,
1549 r10: bool = false,
1550 r11: bool = false,
1551 r12: bool = false,
1552 r13: bool = false,
1553 r14: bool = false,
1554 r15: bool = false,
1555 },
1556 .m68k => packed struct {
1557 /// Whether the inline assembly code may perform stores to memory
1558 /// addresses other than those derived from input pointer provenance.
1559 memory: bool = false,
1560
1561 ccr: bool = false,
1562
1563 d0: bool = false,
1564 d1: bool = false,
1565 d2: bool = false,
1566 d3: bool = false,
1567 d4: bool = false,
1568 d5: bool = false,
1569 d6: bool = false,
1570 d7: bool = false,
1571
1572 a0: bool = false,
1573 a1: bool = false,
1574 a2: bool = false,
1575 a3: bool = false,
1576 a4: bool = false,
1577 a5: bool = false,
1578 a6: bool = false,
1579 a7: bool = false,
1580
1581 macsr: bool = false,
1582 acc: bool = false,
1583 acc0: bool = false,
1584 acc1: bool = false,
1585 acc2: bool = false,
1586 acc3: bool = false,
1587
1588 mask: bool = false,
1589 fpcr: bool = false,
1590 fpsr: bool = false,
1591
1592 fp0: bool = false,
1593 fp1: bool = false,
1594 fp2: bool = false,
1595 fp3: bool = false,
1596 fp4: bool = false,
1597 fp5: bool = false,
1598 fp6: bool = false,
1599 fp7: bool = false,
1600 },
1601 .sparc, .sparc64 => packed struct {
1602 /// Whether the inline assembly code may perform stores to memory
1603 /// addresses other than those derived from input pointer provenance.
1604 memory: bool = false,
1605
1606 psr: bool = false,
1607 gsr: bool = false,
1608 y: bool = false,
1609
1610 /// asr2; v9+
1611 ccr: bool = false,
1612 /// Lower bits of `ccr`.
1613 icc: bool = false,
1614 /// Upper bits of `ccr`.
1615 xcc: bool = false,
1616
1617 g1: bool = false,
1618 g2: bool = false,
1619 g3: bool = false,
1620 g4: bool = false,
1621 g5: bool = false,
1622 g6: bool = false,
1623 g7: bool = false,
1624
1625 o0: bool = false,
1626 o1: bool = false,
1627 o2: bool = false,
1628 o3: bool = false,
1629 o4: bool = false,
1630 o5: bool = false,
1631 o6: bool = false,
1632 o7: bool = false,
1633
1634 l0: bool = false,
1635 l1: bool = false,
1636 l2: bool = false,
1637 l3: bool = false,
1638 l4: bool = false,
1639 l5: bool = false,
1640 l6: bool = false,
1641 l7: bool = false,
1642
1643 i0: bool = false,
1644 i1: bool = false,
1645 i2: bool = false,
1646 i3: bool = false,
1647 i4: bool = false,
1648 i5: bool = false,
1649 i6: bool = false,
1650 i7: bool = false,
1651
1652 fsr: bool = false,
1653 fprs: bool = false,
1654
1655 q0: bool = false,
1656 q1: bool = false,
1657 q2: bool = false,
1658 q3: bool = false,
1659 q4: bool = false,
1660 q5: bool = false,
1661 q6: bool = false,
1662 q7: bool = false,
1663 q8: bool = false,
1664 q9: bool = false,
1665 q10: bool = false,
1666 q11: bool = false,
1667 q12: bool = false,
1668 q13: bool = false,
1669 q14: bool = false,
1670 q15: bool = false,
1671 },
1672 .bpfel, .bpfeb => packed struct {
1673 /// Whether the inline assembly code may perform stores to memory
1674 /// addresses other than those derived from input pointer provenance.
1675 memory: bool = false,
1676
1677 r0: bool = false,
1678 r1: bool = false,
1679 r2: bool = false,
1680 r3: bool = false,
1681 r4: bool = false,
1682 r5: bool = false,
1683 r6: bool = false,
1684 r7: bool = false,
1685 r8: bool = false,
1686 r9: bool = false,
1687
1688 w0: bool = false,
1689 w1: bool = false,
1690 w2: bool = false,
1691 w3: bool = false,
1692 w4: bool = false,
1693 w5: bool = false,
1694 w6: bool = false,
1695 w7: bool = false,
1696 w8: bool = false,
1697 w9: bool = false,
1698 },
1699 .hexagon => packed struct {
1700 /// Whether the inline assembly code may perform stores to memory
1701 /// addresses other than those derived from input pointer provenance.
1702 memory: bool = false,
1703
1704 sa0: bool = false,
1705 sa1: bool = false,
1706 lc0: bool = false,
1707 lc1: bool = false,
1708 m0: bool = false,
1709 m1: bool = false,
1710 usr: bool = false,
1711 ugp: bool = false,
1712 gp: bool = false,
1713 cs0: bool = false,
1714 cs1: bool = false,
1715 framelimit: bool = false,
1716 framekey: bool = false,
1717
1718 p0: bool = false,
1719 p1: bool = false,
1720 p2: bool = false,
1721 p3: bool = false,
1722
1723 r0: bool = false,
1724 r1: bool = false,
1725 r2: bool = false,
1726 r3: bool = false,
1727 r4: bool = false,
1728 r5: bool = false,
1729 r6: bool = false,
1730 r7: bool = false,
1731 r8: bool = false,
1732 r9: bool = false,
1733 r10: bool = false,
1734 r11: bool = false,
1735 r12: bool = false,
1736 r13: bool = false,
1737 r14: bool = false,
1738 r15: bool = false,
1739 r16: bool = false,
1740 r17: bool = false,
1741 r18: bool = false,
1742 r19: bool = false,
1743 r20: bool = false,
1744 r21: bool = false,
1745 r22: bool = false,
1746 r23: bool = false,
1747 r24: bool = false,
1748 r25: bool = false,
1749 r26: bool = false,
1750 r27: bool = false,
1751 r28: bool = false,
1752 r29: bool = false,
1753 r30: bool = false,
1754 r31: bool = false,
1755
1756 q0: bool = false,
1757 q1: bool = false,
1758 q2: bool = false,
1759 q3: bool = false,
1760
1761 v0: bool = false,
1762 v1: bool = false,
1763 v2: bool = false,
1764 v3: bool = false,
1765 v4: bool = false,
1766 v5: bool = false,
1767 v6: bool = false,
1768 v7: bool = false,
1769 v8: bool = false,
1770 v9: bool = false,
1771 v10: bool = false,
1772 v11: bool = false,
1773 v12: bool = false,
1774 v13: bool = false,
1775 v14: bool = false,
1776 v15: bool = false,
1777 v16: bool = false,
1778 v17: bool = false,
1779 v18: bool = false,
1780 v19: bool = false,
1781 v20: bool = false,
1782 v21: bool = false,
1783 v22: bool = false,
1784 v23: bool = false,
1785 v24: bool = false,
1786 v25: bool = false,
1787 v26: bool = false,
1788 v27: bool = false,
1789 v28: bool = false,
1790 v29: bool = false,
1791 v30: bool = false,
1792 v31: bool = false,
1793 },
1794 .s390x => packed struct {
1795 /// Whether the inline assembly code may perform stores to memory
1796 /// addresses other than those derived from input pointer provenance.
1797 memory: bool = false,
1798
1799 ps: bool = false,
1800 r0: bool = false,
1801 r1: bool = false,
1802 r2: bool = false,
1803 r3: bool = false,
1804 r4: bool = false,
1805 r5: bool = false,
1806 r6: bool = false,
1807 r7: bool = false,
1808 r8: bool = false,
1809 r9: bool = false,
1810 r10: bool = false,
1811 r11: bool = false,
1812 r12: bool = false,
1813 r13: bool = false,
1814 r14: bool = false,
1815 r15: bool = false,
1816
1817 fpc: bool = false,
1818
1819 v0: bool = false,
1820 v1: bool = false,
1821 v2: bool = false,
1822 v3: bool = false,
1823 v4: bool = false,
1824 v5: bool = false,
1825 v6: bool = false,
1826 v7: bool = false,
1827 v8: bool = false,
1828 v9: bool = false,
1829 v10: bool = false,
1830 v11: bool = false,
1831 v12: bool = false,
1832 v13: bool = false,
1833 v14: bool = false,
1834 v15: bool = false,
1835 v16: bool = false,
1836 v17: bool = false,
1837 v18: bool = false,
1838 v19: bool = false,
1839 v20: bool = false,
1840 v21: bool = false,
1841 v22: bool = false,
1842 v23: bool = false,
1843 v24: bool = false,
1844 v25: bool = false,
1845 v26: bool = false,
1846 v27: bool = false,
1847 v28: bool = false,
1848 v29: bool = false,
1849 v30: bool = false,
1850 v31: bool = false,
1851
1852 f0: bool = false,
1853 f1: bool = false,
1854 f2: bool = false,
1855 f3: bool = false,
1856 f4: bool = false,
1857 f5: bool = false,
1858 f6: bool = false,
1859 f7: bool = false,
1860 f8: bool = false,
1861 f9: bool = false,
1862 f10: bool = false,
1863 f11: bool = false,
1864 f12: bool = false,
1865 f13: bool = false,
1866 f14: bool = false,
1867 f15: bool = false,
1868 },
1869 .ve => packed struct {
1870 /// Whether the inline assembly code may perform stores to memory
1871 /// addresses other than those derived from input pointer provenance.
1872 memory: bool = false,
1873
1874 psw: bool = false,
1875
1876 s0: bool = false,
1877 s1: bool = false,
1878 s2: bool = false,
1879 s3: bool = false,
1880 s4: bool = false,
1881 s5: bool = false,
1882 s6: bool = false,
1883 s7: bool = false,
1884 s8: bool = false,
1885 s9: bool = false,
1886 s10: bool = false,
1887 s11: bool = false,
1888 s12: bool = false,
1889 s13: bool = false,
1890 s14: bool = false,
1891 s15: bool = false,
1892 s16: bool = false,
1893 s17: bool = false,
1894 s18: bool = false,
1895 s19: bool = false,
1896 s20: bool = false,
1897 s21: bool = false,
1898 s22: bool = false,
1899 s23: bool = false,
1900 s24: bool = false,
1901 s25: bool = false,
1902 s26: bool = false,
1903 s27: bool = false,
1904 s28: bool = false,
1905 s29: bool = false,
1906 s30: bool = false,
1907 s31: bool = false,
1908 s32: bool = false,
1909 s33: bool = false,
1910 s34: bool = false,
1911 s35: bool = false,
1912 s36: bool = false,
1913 s37: bool = false,
1914 s38: bool = false,
1915 s39: bool = false,
1916 s40: bool = false,
1917 s41: bool = false,
1918 s42: bool = false,
1919 s43: bool = false,
1920 s44: bool = false,
1921 s45: bool = false,
1922 s46: bool = false,
1923 s47: bool = false,
1924 s48: bool = false,
1925 s49: bool = false,
1926 s50: bool = false,
1927 s51: bool = false,
1928 s52: bool = false,
1929 s53: bool = false,
1930 s54: bool = false,
1931 s55: bool = false,
1932 s56: bool = false,
1933 s57: bool = false,
1934 s58: bool = false,
1935 s59: bool = false,
1936 s60: bool = false,
1937 s61: bool = false,
1938 s62: bool = false,
1939 s63: bool = false,
1940
1941 vixr: bool = false,
1942 vl: bool = false,
1943
1944 vm0: bool = false,
1945 vm1: bool = false,
1946 vm2: bool = false,
1947 vm3: bool = false,
1948 vm4: bool = false,
1949 vm5: bool = false,
1950 vm6: bool = false,
1951 vm7: bool = false,
1952 vm8: bool = false,
1953 vm9: bool = false,
1954 vm10: bool = false,
1955 vm11: bool = false,
1956 vm12: bool = false,
1957 vm13: bool = false,
1958 vm14: bool = false,
1959 vm15: bool = false,
1960
1961 v0: bool = false,
1962 v1: bool = false,
1963 v2: bool = false,
1964 v3: bool = false,
1965 v4: bool = false,
1966 v5: bool = false,
1967 v6: bool = false,
1968 v7: bool = false,
1969 v8: bool = false,
1970 v9: bool = false,
1971 v10: bool = false,
1972 v11: bool = false,
1973 v12: bool = false,
1974 v13: bool = false,
1975 v14: bool = false,
1976 v15: bool = false,
1977 v16: bool = false,
1978 v17: bool = false,
1979 v18: bool = false,
1980 v19: bool = false,
1981 v20: bool = false,
1982 v21: bool = false,
1983 v22: bool = false,
1984 v23: bool = false,
1985 v24: bool = false,
1986 v25: bool = false,
1987 v26: bool = false,
1988 v27: bool = false,
1989 v28: bool = false,
1990 v29: bool = false,
1991 v30: bool = false,
1992 v31: bool = false,
1993 v32: bool = false,
1994 v33: bool = false,
1995 v34: bool = false,
1996 v35: bool = false,
1997 v36: bool = false,
1998 v37: bool = false,
1999 v38: bool = false,
2000 v39: bool = false,
2001 v40: bool = false,
2002 v41: bool = false,
2003 v42: bool = false,
2004 v43: bool = false,
2005 v44: bool = false,
2006 v45: bool = false,
2007 v46: bool = false,
2008 v47: bool = false,
2009 v48: bool = false,
2010 v49: bool = false,
2011 v50: bool = false,
2012 v51: bool = false,
2013 v52: bool = false,
2014 v53: bool = false,
2015 v54: bool = false,
2016 v55: bool = false,
2017 v56: bool = false,
2018 v57: bool = false,
2019 v58: bool = false,
2020 v59: bool = false,
2021 v60: bool = false,
2022 v61: bool = false,
2023 v62: bool = false,
2024 v63: bool = false,
2025 },
2026 .kalimba => packed struct {
2027 /// Whether the inline assembly code may perform stores to memory
2028 /// addresses other than those derived from input pointer provenance.
2029 memory: bool = false,
2030
2031 i0: bool = false,
2032 i1: bool = false,
2033 i2: bool = false,
2034 i3: bool = false,
2035 i4: bool = false,
2036 i5: bool = false,
2037 i6: bool = false,
2038 i7: bool = false,
2039
2040 m0: bool = false,
2041 m1: bool = false,
2042 m2: bool = false,
2043 m3: bool = false,
2044 l0: bool = false,
2045 l1: bool = false,
2046 l2: bool = false,
2047 l3: bool = false,
2048 l4: bool = false,
2049 l5: bool = false,
2050 doloopstart: bool = false,
2051 doloopend: bool = false,
2052 divresult: bool = false,
2053 divremainder: bool = false,
2054 rmac: bool = false,
2055 rmac0: bool = false,
2056 rmac1: bool = false,
2057 rmac2: bool = false,
2058 rlink: bool = false,
2059 rflags: bool = false,
2060 r0: bool = false,
2061 r1: bool = false,
2062 r2: bool = false,
2063 r3: bool = false,
2064 r4: bool = false,
2065 r5: bool = false,
2066 r6: bool = false,
2067 r7: bool = false,
2068 r8: bool = false,
2069 r9: bool = false,
2070 r10: bool = false,
2071 },
2072 .or1k => packed struct {
2073 /// Whether the inline assembly code may perform stores to memory
2074 /// addresses other than those derived from input pointer provenance.
2075 memory: bool = false,
2076
2077 maclo: bool = false,
2078 machi: bool = false,
2079 fpcsr: bool = false,
2080 fpmaddlo: bool = false,
2081 fpmaddhi: bool = false,
2082 vmaclo: bool = false,
2083 vmachi: bool = false,
2084
2085 r0: bool = false,
2086 r1: bool = false,
2087 r2: bool = false,
2088 r3: bool = false,
2089 r4: bool = false,
2090 r5: bool = false,
2091 r6: bool = false,
2092 r7: bool = false,
2093 r8: bool = false,
2094 r9: bool = false,
2095 r10: bool = false,
2096 r11: bool = false,
2097 r12: bool = false,
2098 r13: bool = false,
2099 r14: bool = false,
2100 r15: bool = false,
2101 r16: bool = false,
2102 r17: bool = false,
2103 r18: bool = false,
2104 r19: bool = false,
2105 r20: bool = false,
2106 r21: bool = false,
2107 r22: bool = false,
2108 r23: bool = false,
2109 r24: bool = false,
2110 r25: bool = false,
2111 r26: bool = false,
2112 r27: bool = false,
2113 r28: bool = false,
2114 r29: bool = false,
2115 r30: bool = false,
2116 r31: bool = false,
2117 },
2118 .csky => packed struct {
2119 /// Whether the inline assembly code may perform stores to memory
2120 /// addresses other than those derived from input pointer provenance.
2121 memory: bool = false,
2122
2123 psr: bool = false,
2124 hi: bool = false,
2125 lo: bool = false,
2126
2127 r0: bool = false,
2128 r1: bool = false,
2129 r2: bool = false,
2130 r3: bool = false,
2131 r4: bool = false,
2132 r5: bool = false,
2133 r6: bool = false,
2134 r7: bool = false,
2135 r8: bool = false,
2136 r9: bool = false,
2137 r10: bool = false,
2138 r11: bool = false,
2139 r12: bool = false,
2140 r13: bool = false,
2141 r14: bool = false,
2142 r15: bool = false,
2143 r16: bool = false,
2144 r17: bool = false,
2145 r18: bool = false,
2146 r19: bool = false,
2147 r20: bool = false,
2148 r21: bool = false,
2149 r22: bool = false,
2150 r23: bool = false,
2151 r24: bool = false,
2152 r25: bool = false,
2153 r26: bool = false,
2154 r27: bool = false,
2155 r28: bool = false,
2156 r29: bool = false,
2157 r30: bool = false,
2158 r31: bool = false,
2159
2160 vr0: bool = false,
2161 vr1: bool = false,
2162 vr2: bool = false,
2163 vr3: bool = false,
2164 vr4: bool = false,
2165 vr5: bool = false,
2166 vr6: bool = false,
2167 vr7: bool = false,
2168 vr8: bool = false,
2169 vr9: bool = false,
2170 vr10: bool = false,
2171 vr11: bool = false,
2172 vr12: bool = false,
2173 vr13: bool = false,
2174 vr14: bool = false,
2175 vr15: bool = false,
2176 vr16: bool = false,
2177 vr17: bool = false,
2178 vr18: bool = false,
2179 vr19: bool = false,
2180 vr20: bool = false,
2181 vr21: bool = false,
2182 vr22: bool = false,
2183 vr23: bool = false,
2184 vr24: bool = false,
2185 vr25: bool = false,
2186 vr26: bool = false,
2187 vr27: bool = false,
2188 vr28: bool = false,
2189 vr29: bool = false,
2190 vr30: bool = false,
2191 vr31: bool = false,
2192 },
2193 .arc, .arceb => packed struct {
2194 /// Whether the inline assembly code may perform stores to memory
2195 /// addresses other than those derived from input pointer provenance.
2196 memory: bool = false,
2197
2198 status32: bool = false,
2199 aux_macmode: bool = false,
2200 mulhi: bool = false,
2201 lp_start: bool = false,
2202 lp_end: bool = false,
2203 jli_base: bool = false,
2204 ldi_base: bool = false,
2205 ei_base: bool = false,
2206
2207 r0: bool = false,
2208 r1: bool = false,
2209 r2: bool = false,
2210 r3: bool = false,
2211 r4: bool = false,
2212 r5: bool = false,
2213 r6: bool = false,
2214 r7: bool = false,
2215 r8: bool = false,
2216 r9: bool = false,
2217 r10: bool = false,
2218 r11: bool = false,
2219 r12: bool = false,
2220 r13: bool = false,
2221 r14: bool = false,
2222 r15: bool = false,
2223 r16: bool = false,
2224 r17: bool = false,
2225 r18: bool = false,
2226 r19: bool = false,
2227 r20: bool = false,
2228 r21: bool = false,
2229 r22: bool = false,
2230 r23: bool = false,
2231 r24: bool = false,
2232 r25: bool = false,
2233 r26: bool = false,
2234 r27: bool = false,
2235 r28: bool = false,
2236 r29: bool = false,
2237 r30: bool = false,
2238 r31: bool = false,
2239 r32: bool = false,
2240 r33: bool = false,
2241 r34: bool = false,
2242 r35: bool = false,
2243 r36: bool = false,
2244 r37: bool = false,
2245 r38: bool = false,
2246 r39: bool = false,
2247 r40: bool = false,
2248 r41: bool = false,
2249 r42: bool = false,
2250 r43: bool = false,
2251 r44: bool = false,
2252 r45: bool = false,
2253 r46: bool = false,
2254 r47: bool = false,
2255 r48: bool = false,
2256 r49: bool = false,
2257 r50: bool = false,
2258 r51: bool = false,
2259 r52: bool = false,
2260 r53: bool = false,
2261 r54: bool = false,
2262 r55: bool = false,
2263 r56: bool = false,
2264 r57: bool = false,
2265 r58: bool = false,
2266 r59: bool = false,
2267 r60: bool = false,
2268
2269 fmp_ctrl: bool = false,
2270 dsp_ctrl: bool = false,
2271 acc0_lo: bool = false,
2272 acc0_glo: bool = false,
2273 acc0_hi: bool = false,
2274 acc0_ghi: bool = false,
2275 fp_ctrl: bool = false,
2276 fpu_status: bool = false,
2277 vfpu_status: bool = false,
2278
2279 f0: bool = false,
2280 f1: bool = false,
2281 f2: bool = false,
2282 f3: bool = false,
2283 f4: bool = false,
2284 f5: bool = false,
2285 f6: bool = false,
2286 f7: bool = false,
2287 f8: bool = false,
2288 f9: bool = false,
2289 f10: bool = false,
2290 f11: bool = false,
2291 f12: bool = false,
2292 f13: bool = false,
2293 f14: bool = false,
2294 f15: bool = false,
2295 f16: bool = false,
2296 f17: bool = false,
2297 f18: bool = false,
2298 f19: bool = false,
2299 f20: bool = false,
2300 f21: bool = false,
2301 f22: bool = false,
2302 f23: bool = false,
2303 f24: bool = false,
2304 f25: bool = false,
2305 f26: bool = false,
2306 f27: bool = false,
2307 f28: bool = false,
2308 f29: bool = false,
2309 f30: bool = false,
2310 f31: bool = false,
2311 },
2312 .loongarch32, .loongarch64 => packed struct {
2313 /// Whether the inline assembly code may perform stores to memory
2314 /// addresses other than those derived from input pointer provenance.
2315 memory: bool = false,
2316
2317 r1: bool = false,
2318 r2: bool = false,
2319 r3: bool = false,
2320 r4: bool = false,
2321 r5: bool = false,
2322 r6: bool = false,
2323 r7: bool = false,
2324 r8: bool = false,
2325 r9: bool = false,
2326 r10: bool = false,
2327 r11: bool = false,
2328 r12: bool = false,
2329 r13: bool = false,
2330 r14: bool = false,
2331 r15: bool = false,
2332 r16: bool = false,
2333 r17: bool = false,
2334 r18: bool = false,
2335 r19: bool = false,
2336 r20: bool = false,
2337 r21: bool = false,
2338 r22: bool = false,
2339 r23: bool = false,
2340 r24: bool = false,
2341 r25: bool = false,
2342 r26: bool = false,
2343 r27: bool = false,
2344 r28: bool = false,
2345 r29: bool = false,
2346 r30: bool = false,
2347 r31: bool = false,
2348
2349 fcc0: bool = false,
2350 fcc1: bool = false,
2351 fcc2: bool = false,
2352 fcc3: bool = false,
2353 fcc4: bool = false,
2354 fcc5: bool = false,
2355 fcc6: bool = false,
2356 fcc7: bool = false,
2357
2358 fcsr0: bool = false,
2359 fcsr1: bool = false,
2360 fcsr2: bool = false,
2361 fcsr3: bool = false,
2362
2363 xr0: bool = false,
2364 xr1: bool = false,
2365 xr2: bool = false,
2366 xr3: bool = false,
2367 xr4: bool = false,
2368 xr5: bool = false,
2369 xr6: bool = false,
2370 xr7: bool = false,
2371 xr8: bool = false,
2372 xr9: bool = false,
2373 xr10: bool = false,
2374 xr11: bool = false,
2375 xr12: bool = false,
2376 xr13: bool = false,
2377 xr14: bool = false,
2378 xr15: bool = false,
2379 xr16: bool = false,
2380 xr17: bool = false,
2381 xr18: bool = false,
2382 xr19: bool = false,
2383 xr20: bool = false,
2384 xr21: bool = false,
2385 xr22: bool = false,
2386 xr23: bool = false,
2387 xr24: bool = false,
2388 xr25: bool = false,
2389 xr26: bool = false,
2390 xr27: bool = false,
2391 xr28: bool = false,
2392 xr29: bool = false,
2393 xr30: bool = false,
2394 xr31: bool = false,
2395
2396 vr0: bool = false,
2397 vr1: bool = false,
2398 vr2: bool = false,
2399 vr3: bool = false,
2400 vr4: bool = false,
2401 vr5: bool = false,
2402 vr6: bool = false,
2403 vr7: bool = false,
2404 vr8: bool = false,
2405 vr9: bool = false,
2406 vr10: bool = false,
2407 vr11: bool = false,
2408 vr12: bool = false,
2409 vr13: bool = false,
2410 vr14: bool = false,
2411 vr15: bool = false,
2412 vr16: bool = false,
2413 vr17: bool = false,
2414 vr18: bool = false,
2415 vr19: bool = false,
2416 vr20: bool = false,
2417 vr21: bool = false,
2418 vr22: bool = false,
2419 vr23: bool = false,
2420 vr24: bool = false,
2421 vr25: bool = false,
2422 vr26: bool = false,
2423 vr27: bool = false,
2424 vr28: bool = false,
2425 vr29: bool = false,
2426 vr30: bool = false,
2427 vr31: bool = false,
2428
2429 f0: bool = false,
2430 f1: bool = false,
2431 f2: bool = false,
2432 f3: bool = false,
2433 f4: bool = false,
2434 f5: bool = false,
2435 f6: bool = false,
2436 f7: bool = false,
2437 f8: bool = false,
2438 f9: bool = false,
2439 f10: bool = false,
2440 f11: bool = false,
2441 f12: bool = false,
2442 f13: bool = false,
2443 f14: bool = false,
2444 f15: bool = false,
2445 f16: bool = false,
2446 f17: bool = false,
2447 f18: bool = false,
2448 f19: bool = false,
2449 f20: bool = false,
2450 f21: bool = false,
2451 f22: bool = false,
2452 f23: bool = false,
2453 f24: bool = false,
2454 f25: bool = false,
2455 f26: bool = false,
2456 f27: bool = false,
2457 f28: bool = false,
2458 f29: bool = false,
2459 f30: bool = false,
2460 f31: bool = false,
2461 },
2462 .powerpc, .powerpcle, .powerpc64, .powerpc64le => packed struct {
2463 /// Whether the inline assembly code may perform stores to memory
2464 /// addresses other than those derived from input pointer provenance.
2465 memory: bool = false,
2466
2467 cr0: bool = false,
2468 cr1: bool = false,
2469 cr2: bool = false,
2470 cr3: bool = false,
2471 cr4: bool = false,
2472 cr5: bool = false,
2473 cr6: bool = false,
2474 cr7: bool = false,
2475
2476 xer: bool = false,
2477 ctr: bool = false,
2478 lr: bool = false,
2479
2480 r0: bool = false,
2481 r1: bool = false,
2482 r2: bool = false,
2483 r3: bool = false,
2484 r4: bool = false,
2485 r5: bool = false,
2486 r6: bool = false,
2487 r7: bool = false,
2488 r8: bool = false,
2489 r9: bool = false,
2490 r10: bool = false,
2491 r11: bool = false,
2492 r12: bool = false,
2493 r13: bool = false,
2494 r14: bool = false,
2495 r15: bool = false,
2496 r16: bool = false,
2497 r17: bool = false,
2498 r18: bool = false,
2499 r19: bool = false,
2500 r20: bool = false,
2501 r21: bool = false,
2502 r22: bool = false,
2503 r23: bool = false,
2504 r24: bool = false,
2505 r25: bool = false,
2506 r26: bool = false,
2507 r27: bool = false,
2508 r28: bool = false,
2509 r29: bool = false,
2510 r30: bool = false,
2511 r31: bool = false,
2512
2513 fpscr: bool = false,
2514 vscr: bool = false,
2515
2516 vs0: bool = false,
2517 vs1: bool = false,
2518 vs2: bool = false,
2519 vs3: bool = false,
2520 vs4: bool = false,
2521 vs5: bool = false,
2522 vs6: bool = false,
2523 vs7: bool = false,
2524 vs8: bool = false,
2525 vs9: bool = false,
2526 vs10: bool = false,
2527 vs11: bool = false,
2528 vs12: bool = false,
2529 vs13: bool = false,
2530 vs14: bool = false,
2531 vs15: bool = false,
2532 vs16: bool = false,
2533 vs17: bool = false,
2534 vs18: bool = false,
2535 vs19: bool = false,
2536 vs20: bool = false,
2537 vs21: bool = false,
2538 vs22: bool = false,
2539 vs23: bool = false,
2540 vs24: bool = false,
2541 vs25: bool = false,
2542 vs26: bool = false,
2543 vs27: bool = false,
2544 vs28: bool = false,
2545 vs29: bool = false,
2546 vs30: bool = false,
2547 vs31: bool = false,
2548 vs32: bool = false,
2549 vs33: bool = false,
2550 vs34: bool = false,
2551 vs35: bool = false,
2552 vs36: bool = false,
2553 vs37: bool = false,
2554 vs38: bool = false,
2555 vs39: bool = false,
2556 vs40: bool = false,
2557 vs41: bool = false,
2558 vs42: bool = false,
2559 vs43: bool = false,
2560 vs44: bool = false,
2561 vs45: bool = false,
2562 vs46: bool = false,
2563 vs47: bool = false,
2564 vs48: bool = false,
2565 vs49: bool = false,
2566 vs50: bool = false,
2567 vs51: bool = false,
2568 vs52: bool = false,
2569 vs53: bool = false,
2570 vs54: bool = false,
2571 vs55: bool = false,
2572 vs56: bool = false,
2573 vs57: bool = false,
2574 vs58: bool = false,
2575 vs59: bool = false,
2576 vs60: bool = false,
2577 vs61: bool = false,
2578 vs62: bool = false,
2579 vs63: bool = false,
2580
2581 f0: bool = false,
2582 f1: bool = false,
2583 f2: bool = false,
2584 f3: bool = false,
2585 f4: bool = false,
2586 f5: bool = false,
2587 f6: bool = false,
2588 f7: bool = false,
2589 f8: bool = false,
2590 f9: bool = false,
2591 f10: bool = false,
2592 f11: bool = false,
2593 f12: bool = false,
2594 f13: bool = false,
2595 f14: bool = false,
2596 f15: bool = false,
2597 f16: bool = false,
2598 f17: bool = false,
2599 f18: bool = false,
2600 f19: bool = false,
2601 f20: bool = false,
2602 f21: bool = false,
2603 f22: bool = false,
2604 f23: bool = false,
2605 f24: bool = false,
2606 f25: bool = false,
2607 f26: bool = false,
2608 f27: bool = false,
2609 f28: bool = false,
2610 f29: bool = false,
2611 f30: bool = false,
2612 f31: bool = false,
2613
2614 v0: bool = false,
2615 v1: bool = false,
2616 v2: bool = false,
2617 v3: bool = false,
2618 v4: bool = false,
2619 v5: bool = false,
2620 v6: bool = false,
2621 v7: bool = false,
2622 v8: bool = false,
2623 v9: bool = false,
2624 v10: bool = false,
2625 v11: bool = false,
2626 v12: bool = false,
2627 v13: bool = false,
2628 v14: bool = false,
2629 v15: bool = false,
2630 v16: bool = false,
2631 v17: bool = false,
2632 v18: bool = false,
2633 v19: bool = false,
2634 v20: bool = false,
2635 v21: bool = false,
2636 v22: bool = false,
2637 v23: bool = false,
2638 v24: bool = false,
2639 v25: bool = false,
2640 v26: bool = false,
2641 v27: bool = false,
2642 v28: bool = false,
2643 v29: bool = false,
2644 v30: bool = false,
2645 v31: bool = false,
2646
2647 acc0: bool = false,
2648 acc1: bool = false,
2649 acc2: bool = false,
2650 acc3: bool = false,
2651 acc4: bool = false,
2652 acc5: bool = false,
2653 acc6: bool = false,
2654 acc7: bool = false,
2655
2656 acc: bool = false,
2657 spefsc: bool = false,
2658 },
2659 .mips, .mipsel, .mips64, .mips64el => packed struct {
2660 /// Whether the inline assembly code may perform stores to memory
2661 /// addresses other than those derived from input pointer provenance.
2662 memory: bool = false,
2663
2664 lr: bool = false,
2665
2666 hi: bool = false,
2667 lo: bool = false,
2668 ac0: bool = false,
2669 ac1: bool = false,
2670 ac2: bool = false,
2671 ac3: bool = false,
2672 acx: bool = false,
2673
2674 r1: bool = false,
2675 r2: bool = false,
2676 r3: bool = false,
2677 r4: bool = false,
2678 r5: bool = false,
2679 r6: bool = false,
2680 r7: bool = false,
2681 r8: bool = false,
2682 r9: bool = false,
2683 r10: bool = false,
2684 r11: bool = false,
2685 r12: bool = false,
2686 r13: bool = false,
2687 r14: bool = false,
2688 r15: bool = false,
2689 r16: bool = false,
2690 r17: bool = false,
2691 r18: bool = false,
2692 r19: bool = false,
2693 r20: bool = false,
2694 r21: bool = false,
2695 r22: bool = false,
2696 r23: bool = false,
2697 r24: bool = false,
2698 r25: bool = false,
2699 r26: bool = false,
2700 r27: bool = false,
2701 r28: bool = false,
2702 r29: bool = false,
2703 r30: bool = false,
2704 r31: bool = false,
2705
2706 fcsr: bool = false,
2707 fcc0: bool = false,
2708 fcc1: bool = false,
2709 fcc2: bool = false,
2710 fcc3: bool = false,
2711 fcc4: bool = false,
2712 fcc5: bool = false,
2713 fcc6: bool = false,
2714 fcc7: bool = false,
2715
2716 w0: bool = false,
2717 w1: bool = false,
2718 w2: bool = false,
2719 w3: bool = false,
2720 w4: bool = false,
2721 w5: bool = false,
2722 w6: bool = false,
2723 w7: bool = false,
2724 w8: bool = false,
2725 w9: bool = false,
2726 w10: bool = false,
2727 w11: bool = false,
2728 w12: bool = false,
2729 w13: bool = false,
2730 w14: bool = false,
2731 w15: bool = false,
2732 w16: bool = false,
2733 w17: bool = false,
2734 w18: bool = false,
2735 w19: bool = false,
2736 w20: bool = false,
2737 w21: bool = false,
2738 w22: bool = false,
2739 w23: bool = false,
2740 w24: bool = false,
2741 w25: bool = false,
2742 w26: bool = false,
2743 w27: bool = false,
2744 w28: bool = false,
2745 w29: bool = false,
2746 w30: bool = false,
2747 w31: bool = false,
2748
2749 f0: bool = false,
2750 f1: bool = false,
2751 f2: bool = false,
2752 f3: bool = false,
2753 f4: bool = false,
2754 f5: bool = false,
2755 f6: bool = false,
2756 f7: bool = false,
2757 f8: bool = false,
2758 f9: bool = false,
2759 f10: bool = false,
2760 f11: bool = false,
2761 f12: bool = false,
2762 f13: bool = false,
2763 f14: bool = false,
2764 f15: bool = false,
2765 f16: bool = false,
2766 f17: bool = false,
2767 f18: bool = false,
2768 f19: bool = false,
2769 f20: bool = false,
2770 f21: bool = false,
2771 f22: bool = false,
2772 f23: bool = false,
2773 f24: bool = false,
2774 f25: bool = false,
2775 f26: bool = false,
2776 f27: bool = false,
2777 f28: bool = false,
2778 f29: bool = false,
2779 f30: bool = false,
2780 f31: bool = false,
2781
2782 mpl0: bool = false,
2783 mpl1: bool = false,
2784 mpl2: bool = false,
2785
2786 p0: bool = false,
2787 p1: bool = false,
2788 p2: bool = false,
2789
2790 msa_ir: bool = false,
2791 msa_csr: bool = false,
2792 msa_access: bool = false,
2793 msa_save: bool = false,
2794 msa_modify: bool = false,
2795 msa_request: bool = false,
2796 msa_map: bool = false,
2797 msa_unmap: bool = false,
2798 },
2799 .alpha => packed struct {
2800 /// Whether the inline assembly code may perform stores to memory
2801 /// addresses other than those derived from input pointer provenance.
2802 memory: bool = false,
2803
2804 r0: bool = false,
2805 r1: bool = false,
2806 r2: bool = false,
2807 r3: bool = false,
2808 r4: bool = false,
2809 r5: bool = false,
2810 r6: bool = false,
2811 r7: bool = false,
2812 r8: bool = false,
2813 r9: bool = false,
2814 r10: bool = false,
2815 r11: bool = false,
2816 r12: bool = false,
2817 r13: bool = false,
2818 r14: bool = false,
2819 r15: bool = false,
2820 r16: bool = false,
2821 r17: bool = false,
2822 r18: bool = false,
2823 r19: bool = false,
2824 r20: bool = false,
2825 r21: bool = false,
2826 r22: bool = false,
2827 r23: bool = false,
2828 r24: bool = false,
2829 r25: bool = false,
2830 r26: bool = false,
2831 r27: bool = false,
2832 r28: bool = false,
2833 r29: bool = false,
2834 r30: bool = false,
2835
2836 f0: bool = false,
2837 f1: bool = false,
2838 f2: bool = false,
2839 f3: bool = false,
2840 f4: bool = false,
2841 f5: bool = false,
2842 f6: bool = false,
2843 f7: bool = false,
2844 f8: bool = false,
2845 f9: bool = false,
2846 f10: bool = false,
2847 f11: bool = false,
2848 f12: bool = false,
2849 f13: bool = false,
2850 f14: bool = false,
2851 f15: bool = false,
2852 f16: bool = false,
2853 f17: bool = false,
2854 f18: bool = false,
2855 f19: bool = false,
2856 f20: bool = false,
2857 f21: bool = false,
2858 f22: bool = false,
2859 f23: bool = false,
2860 f24: bool = false,
2861 f25: bool = false,
2862 f26: bool = false,
2863 f27: bool = false,
2864 f28: bool = false,
2865 f29: bool = false,
2866 f30: bool = false,
2867 },
2868 .hppa, .hppa64 => packed struct {
2869 /// Whether the inline assembly code may perform stores to memory
2870 /// addresses other than those derived from input pointer provenance.
2871 memory: bool = false,
2872
2873 sar: bool = false,
2874
2875 r1: bool = false,
2876 r2: bool = false,
2877 r3: bool = false,
2878 r4: bool = false,
2879 r5: bool = false,
2880 r6: bool = false,
2881 r7: bool = false,
2882 r8: bool = false,
2883 r9: bool = false,
2884 r10: bool = false,
2885 r11: bool = false,
2886 r12: bool = false,
2887 r13: bool = false,
2888 r14: bool = false,
2889 r15: bool = false,
2890 r16: bool = false,
2891 r17: bool = false,
2892 r18: bool = false,
2893 r19: bool = false,
2894 r20: bool = false,
2895 r21: bool = false,
2896 r22: bool = false,
2897 r23: bool = false,
2898 r24: bool = false,
2899 r25: bool = false,
2900 r26: bool = false,
2901 r27: bool = false,
2902 r28: bool = false,
2903 r29: bool = false,
2904 r30: bool = false,
2905 r31: bool = false,
2906
2907 fr4: bool = false,
2908 fr5: bool = false,
2909 fr6: bool = false,
2910 fr7: bool = false,
2911 fr8: bool = false,
2912 fr9: bool = false,
2913 fr10: bool = false,
2914 fr11: bool = false,
2915 fr12: bool = false,
2916 fr13: bool = false,
2917 fr14: bool = false,
2918 fr15: bool = false,
2919 fr16: bool = false,
2920 fr17: bool = false,
2921 fr18: bool = false,
2922 fr19: bool = false,
2923 fr20: bool = false,
2924 fr21: bool = false,
2925 fr22: bool = false,
2926 fr23: bool = false,
2927 fr24: bool = false,
2928 fr25: bool = false,
2929 fr26: bool = false,
2930 fr27: bool = false,
2931 fr28: bool = false,
2932 fr29: bool = false,
2933 fr30: bool = false,
2934 fr31: bool = false,
2935
2936 fr4r: bool = false,
2937 fr5r: bool = false,
2938 fr6r: bool = false,
2939 fr7r: bool = false,
2940 fr8r: bool = false,
2941 fr9r: bool = false,
2942 fr10r: bool = false,
2943 fr11r: bool = false,
2944 fr12r: bool = false,
2945 fr13r: bool = false,
2946 fr14r: bool = false,
2947 fr15r: bool = false,
2948 fr16r: bool = false,
2949 fr17r: bool = false,
2950 fr18r: bool = false,
2951 fr19r: bool = false,
2952 fr20r: bool = false,
2953 fr21r: bool = false,
2954 fr22r: bool = false,
2955 fr23r: bool = false,
2956 fr24r: bool = false,
2957 fr25r: bool = false,
2958 fr26r: bool = false,
2959 fr27r: bool = false,
2960 fr28r: bool = false,
2961 fr29r: bool = false,
2962 fr30r: bool = false,
2963 fr31r: bool = false,
2964 },
2965 .microblaze, .microblazeel => packed struct {
2966 /// Whether the inline assembly code may perform stores to memory
2967 /// addresses other than those derived from input pointer provenance.
2968 memory: bool = false,
2969
2970 rmsr: bool = false,
2971
2972 r1: bool = false,
2973 r2: bool = false,
2974 r3: bool = false,
2975 r4: bool = false,
2976 r5: bool = false,
2977 r6: bool = false,
2978 r7: bool = false,
2979 r8: bool = false,
2980 r9: bool = false,
2981 r10: bool = false,
2982 r11: bool = false,
2983 r12: bool = false,
2984 r13: bool = false,
2985 r14: bool = false,
2986 r15: bool = false,
2987 r16: bool = false,
2988 r17: bool = false,
2989 r18: bool = false,
2990 r19: bool = false,
2991 r20: bool = false,
2992 r21: bool = false,
2993 r22: bool = false,
2994 r23: bool = false,
2995 r24: bool = false,
2996 r25: bool = false,
2997 r26: bool = false,
2998 r27: bool = false,
2999 r28: bool = false,
3000 r29: bool = false,
3001 r30: bool = false,
3002 r31: bool = false,
3003 },
3004 .sh, .sheb => packed struct {
3005 /// Whether the inline assembly code may perform stores to memory
3006 /// addresses other than those derived from input pointer provenance.
3007 memory: bool = false,
3008
3009 sr: bool = false,
3010 gbr: bool = false,
3011 pr: bool = false,
3012
3013 r0: bool = false,
3014 r1: bool = false,
3015 r2: bool = false,
3016 r3: bool = false,
3017 r4: bool = false,
3018 r5: bool = false,
3019 r6: bool = false,
3020 r7: bool = false,
3021 r8: bool = false,
3022 r9: bool = false,
3023 r10: bool = false,
3024 r11: bool = false,
3025 r12: bool = false,
3026 r13: bool = false,
3027 r14: bool = false,
3028 r15: bool = false,
3029
3030 mach: bool = false,
3031 macl: bool = false,
3032
3033 fr0: bool = false,
3034 fr1: bool = false,
3035 fr2: bool = false,
3036 fr3: bool = false,
3037 fr4: bool = false,
3038 fr5: bool = false,
3039 fr6: bool = false,
3040 fr7: bool = false,
3041 fr8: bool = false,
3042 fr9: bool = false,
3043 fr10: bool = false,
3044 fr11: bool = false,
3045 fr12: bool = false,
3046 fr13: bool = false,
3047 fr14: bool = false,
3048 fr15: bool = false,
3049
3050 dr0: bool = false,
3051 dr2: bool = false,
3052 dr4: bool = false,
3053 dr6: bool = false,
3054 dr8: bool = false,
3055 dr10: bool = false,
3056 dr12: bool = false,
3057 dr14: bool = false,
3058
3059 fv0: bool = false,
3060 fv4: bool = false,
3061 fv8: bool = false,
3062 fv12: bool = false,
3063
3064 xf0: bool = false,
3065 xf1: bool = false,
3066 xf2: bool = false,
3067 xf3: bool = false,
3068 xf4: bool = false,
3069 xf5: bool = false,
3070 xf6: bool = false,
3071 xf7: bool = false,
3072 xf8: bool = false,
3073 xf9: bool = false,
3074 xf10: bool = false,
3075 xf11: bool = false,
3076 xf12: bool = false,
3077 xf13: bool = false,
3078 xf14: bool = false,
3079 xf15: bool = false,
3080
3081 xd0: bool = false,
3082 xd2: bool = false,
3083 xd4: bool = false,
3084 xd6: bool = false,
3085 xd8: bool = false,
3086 xd10: bool = false,
3087 xd12: bool = false,
3088 xd14: bool = false,
3089
3090 xmtrx: bool = false,
3091
3092 fpul: bool = false,
3093 fpscr: bool = false,
3094
3095 ms: bool = false,
3096 me: bool = false,
3097
3098 rs: bool = false,
3099 re: bool = false,
3100
3101 a0: bool = false,
3102 a0g: bool = false,
3103 a1: bool = false,
3104 a1g: bool = false,
3105 m0: bool = false,
3106 m1: bool = false,
3107 x0: bool = false,
3108 x1: bool = false,
3109 y0: bool = false,
3110 y1: bool = false,
3111
3112 dsr: bool = false,
3113 },
3114 else => packed struct {
3115 /// Whether the inline assembly code may perform stores to memory
3116 /// addresses other than those derived from input pointer provenance.
3117 memory: bool = false,
3118 },
3119};
lib/std/std.zig+4-1
...@@ -65,8 +65,11 @@ pub const array_hash_map = @import("array_hash_map.zig");...@@ -65,8 +65,11 @@ pub const array_hash_map = @import("array_hash_map.zig");
65pub const atomic = @import("atomic.zig");65pub const atomic = @import("atomic.zig");
66pub const base64 = @import("base64.zig");66pub const base64 = @import("base64.zig");
67pub const bit_set = @import("bit_set.zig");67pub const bit_set = @import("bit_set.zig");
68/// Deprecated; use `lang`.
69///
70/// To be removed after Zig 0.17.0.
68pub const builtin = lang;71pub const builtin = lang;
69pub const lang = @import("builtin.zig");72pub const lang = @import("lang.zig");
70pub const c = @import("c.zig");73pub const c = @import("c.zig");
71pub const coff = @import("coff.zig");74pub const coff = @import("coff.zig");
72pub const compress = @import("compress.zig");75pub const compress = @import("compress.zig");
lib/std/zig.zig+2-2
...@@ -876,7 +876,7 @@ pub const SimpleComptimeReason = enum(u32) {...@@ -876,7 +876,7 @@ pub const SimpleComptimeReason = enum(u32) {
876 casted_to_comptime_enum,876 casted_to_comptime_enum,
877 casted_to_comptime_int,877 casted_to_comptime_int,
878 casted_to_comptime_float,878 casted_to_comptime_float,
879 std_builtin_decl,879 std_lang_decl,
880880
881 pub fn message(r: SimpleComptimeReason) []const u8 {881 pub fn message(r: SimpleComptimeReason) []const u8 {
882 return switch (r) {882 return switch (r) {
...@@ -959,7 +959,7 @@ pub const SimpleComptimeReason = enum(u32) {...@@ -959,7 +959,7 @@ pub const SimpleComptimeReason = enum(u32) {
959 .casted_to_comptime_enum => "value casted to enum with 'comptime_int' tag type must be comptime-known",959 .casted_to_comptime_enum => "value casted to enum with 'comptime_int' tag type must be comptime-known",
960 .casted_to_comptime_int => "value casted to 'comptime_int' must be comptime-known",960 .casted_to_comptime_int => "value casted to 'comptime_int' must be comptime-known",
961 .casted_to_comptime_float => "value casted to 'comptime_float' must be comptime-known",961 .casted_to_comptime_float => "value casted to 'comptime_float' must be comptime-known",
962 .std_builtin_decl => "'std.builtin' declaration values must be comptime-known",962 .std_lang_decl => "'std.lang' declaration values must be comptime-known",
963 // zig fmt: on963 // zig fmt: on
964 };964 };
965 }965 }
lib/std/zig/Ast.zig+2-2
...@@ -2103,7 +2103,7 @@ fn fullFnProtoComponents(tree: Ast, info: full.FnProto.Components) full.FnProto...@@ -2103,7 +2103,7 @@ fn fullFnProtoComponents(tree: Ast, info: full.FnProto.Components) full.FnProto
2103}2103}
21042104
2105fn fullPtrTypeComponents(tree: Ast, info: full.PtrType.Components) full.PtrType {2105fn fullPtrTypeComponents(tree: Ast, info: full.PtrType.Components) full.PtrType {
2106 const size: std.builtin.Type.Pointer.Size = switch (tree.tokenTag(info.main_token)) {2106 const size: std.lang.Type.Pointer.Size = switch (tree.tokenTag(info.main_token)) {
2107 .asterisk => .one,2107 .asterisk => .one,
2108 .l_bracket => switch (tree.tokenTag(info.main_token + 1)) {2108 .l_bracket => switch (tree.tokenTag(info.main_token + 1)) {
2109 .asterisk => if (tree.tokenTag(info.main_token + 2) == .identifier) .c else .many,2109 .asterisk => if (tree.tokenTag(info.main_token + 2) == .identifier) .c else .many,
...@@ -2726,7 +2726,7 @@ pub const full = struct {...@@ -2726,7 +2726,7 @@ pub const full = struct {
2726 };2726 };
27272727
2728 pub const PtrType = struct {2728 pub const PtrType = struct {
2729 size: std.builtin.Type.Pointer.Size,2729 size: std.lang.Type.Pointer.Size,
2730 allowzero_token: ?TokenIndex,2730 allowzero_token: ?TokenIndex,
2731 const_token: ?TokenIndex,2731 const_token: ?TokenIndex,
2732 volatile_token: ?TokenIndex,2732 volatile_token: ?TokenIndex,
lib/std/zig/AstGen.zig+37-37
...@@ -1398,12 +1398,12 @@ fn fnProtoExprInner(...@@ -1398,12 +1398,12 @@ fn fnProtoExprInner(
1398 try comptimeExpr(1398 try comptimeExpr(
1399 &block_scope,1399 &block_scope,
1400 scope,1400 scope,
1401 .{ .rl = .{ .coerced_ty = try block_scope.addBuiltinValue(callconv_expr, .calling_convention) } },1401 .{ .rl = .{ .coerced_ty = try block_scope.addStdLangValue(callconv_expr, .calling_convention) } },
1402 callconv_expr,1402 callconv_expr,
1403 .@"callconv",1403 .@"callconv",
1404 )1404 )
1405 else if (implicit_ccc)1405 else if (implicit_ccc)
1406 try block_scope.addBuiltinValue(node, .calling_convention_c)1406 try block_scope.addStdLangValue(node, .calling_convention_c)
1407 else1407 else
1408 .none;1408 .none;
14091409
...@@ -3782,7 +3782,7 @@ fn ptrType(...@@ -3782,7 +3782,7 @@ fn ptrType(
3782 gz.astgen.source_line = source_line;3782 gz.astgen.source_line = source_line;
3783 gz.astgen.source_column = source_column;3783 gz.astgen.source_column = source_column;
37843784
3785 const addrspace_ty = try gz.addBuiltinValue(addrspace_node, .address_space);3785 const addrspace_ty = try gz.addStdLangValue(addrspace_node, .address_space);
3786 addrspace_ref = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = addrspace_ty } }, addrspace_node, .@"addrspace");3786 addrspace_ref = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = addrspace_ty } }, addrspace_node, .@"addrspace");
3787 trailing_count += 1;3787 trailing_count += 1;
3788 }3788 }
...@@ -4077,7 +4077,7 @@ fn fnDecl(...@@ -4077,7 +4077,7 @@ fn fnDecl(
40774077
4078 if (fn_proto.ast.addrspace_expr.unwrap()) |addrspace_expr| {4078 if (fn_proto.ast.addrspace_expr.unwrap()) |addrspace_expr| {
4079 astgen.restoreSourceCursor(saved_cursor);4079 astgen.restoreSourceCursor(saved_cursor);
4080 const addrspace_ty = try addrspace_gz.addBuiltinValue(addrspace_expr, .address_space);4080 const addrspace_ty = try addrspace_gz.addStdLangValue(addrspace_expr, .address_space);
4081 const inst = try expr(&addrspace_gz, &addrspace_gz.base, .{ .rl = .{ .coerced_ty = addrspace_ty } }, addrspace_expr);4081 const inst = try expr(&addrspace_gz, &addrspace_gz.base, .{ .rl = .{ .coerced_ty = addrspace_ty } }, addrspace_expr);
4082 _ = try addrspace_gz.addBreakWithSrcNode(.break_inline, decl_inst, inst, decl_node);4082 _ = try addrspace_gz.addBreakWithSrcNode(.break_inline, decl_inst, inst, decl_node);
4083 }4083 }
...@@ -4285,7 +4285,7 @@ fn fnDeclInner(...@@ -4285,7 +4285,7 @@ fn fnDeclInner(
4285 const inst = try expr(4285 const inst = try expr(
4286 &cc_gz,4286 &cc_gz,
4287 scope,4287 scope,
4288 .{ .rl = .{ .coerced_ty = try cc_gz.addBuiltinValue(callconv_expr, .calling_convention) } },4288 .{ .rl = .{ .coerced_ty = try cc_gz.addStdLangValue(callconv_expr, .calling_convention) } },
4289 callconv_expr,4289 callconv_expr,
4290 );4290 );
4291 if (cc_gz.instructionsSlice().len == 0) {4291 if (cc_gz.instructionsSlice().len == 0) {
...@@ -4295,7 +4295,7 @@ fn fnDeclInner(...@@ -4295,7 +4295,7 @@ fn fnDeclInner(
4295 _ = try cc_gz.addBreak(.break_inline, @enumFromInt(0), inst);4295 _ = try cc_gz.addBreak(.break_inline, @enumFromInt(0), inst);
4296 break :blk inst;4296 break :blk inst;
4297 } else if (has_inline_keyword) {4297 } else if (has_inline_keyword) {
4298 const inst = try cc_gz.addBuiltinValue(decl_node, .calling_convention_inline);4298 const inst = try cc_gz.addStdLangValue(decl_node, .calling_convention_inline);
4299 _ = try cc_gz.addBreak(.break_inline, @enumFromInt(0), inst);4299 _ = try cc_gz.addBreak(.break_inline, @enumFromInt(0), inst);
4300 break :blk inst;4300 break :blk inst;
4301 } else {4301 } else {
...@@ -4493,7 +4493,7 @@ fn globalVarDecl(...@@ -4493,7 +4493,7 @@ fn globalVarDecl(
4493 defer addrspace_gz.unstack();4493 defer addrspace_gz.unstack();
44944494
4495 if (var_decl.ast.addrspace_node.unwrap()) |addrspace_node| {4495 if (var_decl.ast.addrspace_node.unwrap()) |addrspace_node| {
4496 const addrspace_ty = try addrspace_gz.addBuiltinValue(addrspace_node, .address_space);4496 const addrspace_ty = try addrspace_gz.addStdLangValue(addrspace_node, .address_space);
4497 const addrspace_inst = try expr(&addrspace_gz, &addrspace_gz.base, .{ .rl = .{ .coerced_ty = addrspace_ty } }, addrspace_node);4497 const addrspace_inst = try expr(&addrspace_gz, &addrspace_gz.base, .{ .rl = .{ .coerced_ty = addrspace_ty } }, addrspace_node);
4498 _ = try addrspace_gz.addBreakWithSrcNode(.break_inline, decl_inst, addrspace_inst, node);4498 _ = try addrspace_gz.addBreakWithSrcNode(.break_inline, decl_inst, addrspace_inst, node);
4499 }4499 }
...@@ -4815,7 +4815,7 @@ fn structDeclInner(...@@ -4815,7 +4815,7 @@ fn structDeclInner(
4815 scope: *Scope,4815 scope: *Scope,
4816 node: Ast.Node.Index,4816 node: Ast.Node.Index,
4817 container_decl: Ast.full.ContainerDecl,4817 container_decl: Ast.full.ContainerDecl,
4818 layout: std.builtin.Type.ContainerLayout,4818 layout: std.lang.Type.ContainerLayout,
4819 maybe_backing_int_node: Ast.Node.OptionalIndex,4819 maybe_backing_int_node: Ast.Node.OptionalIndex,
4820 name_strat: Zir.Inst.NameStrategy,4820 name_strat: Zir.Inst.NameStrategy,
4821) InnerError!Zir.Inst.Ref {4821) InnerError!Zir.Inst.Ref {
...@@ -5020,7 +5020,7 @@ fn tupleDecl(...@@ -5020,7 +5020,7 @@ fn tupleDecl(
5020 scope: *Scope,5020 scope: *Scope,
5021 node: Ast.Node.Index,5021 node: Ast.Node.Index,
5022 container_decl: Ast.full.ContainerDecl,5022 container_decl: Ast.full.ContainerDecl,
5023 layout: std.builtin.Type.ContainerLayout,5023 layout: std.lang.Type.ContainerLayout,
5024 backing_int_node: Ast.Node.OptionalIndex,5024 backing_int_node: Ast.Node.OptionalIndex,
5025) InnerError!Zir.Inst.Ref {5025) InnerError!Zir.Inst.Ref {
5026 const astgen = gz.astgen;5026 const astgen = gz.astgen;
...@@ -5117,7 +5117,7 @@ fn unionDeclInner(...@@ -5117,7 +5117,7 @@ fn unionDeclInner(
5117 scope: *Scope,5117 scope: *Scope,
5118 node: Ast.Node.Index,5118 node: Ast.Node.Index,
5119 members: []const Ast.Node.Index,5119 members: []const Ast.Node.Index,
5120 layout: std.builtin.Type.ContainerLayout,5120 layout: std.lang.Type.ContainerLayout,
5121 opt_arg_node: Ast.Node.OptionalIndex,5121 opt_arg_node: Ast.Node.OptionalIndex,
5122 auto_enum_tok: ?Ast.TokenIndex,5122 auto_enum_tok: ?Ast.TokenIndex,
5123 name_strat: Zir.Inst.NameStrategy,5123 name_strat: Zir.Inst.NameStrategy,
...@@ -5324,7 +5324,7 @@ fn containerDecl(...@@ -5324,7 +5324,7 @@ fn containerDecl(
53245324
5325 switch (tree.tokenTag(container_decl.ast.main_token)) {5325 switch (tree.tokenTag(container_decl.ast.main_token)) {
5326 .keyword_struct => {5326 .keyword_struct => {
5327 const layout: std.builtin.Type.ContainerLayout = if (container_decl.layout_token) |t| switch (tree.tokenTag(t)) {5327 const layout: std.lang.Type.ContainerLayout = if (container_decl.layout_token) |t| switch (tree.tokenTag(t)) {
5328 .keyword_packed => .@"packed",5328 .keyword_packed => .@"packed",
5329 .keyword_extern => .@"extern",5329 .keyword_extern => .@"extern",
5330 else => unreachable,5330 else => unreachable,
...@@ -5334,7 +5334,7 @@ fn containerDecl(...@@ -5334,7 +5334,7 @@ fn containerDecl(
5334 return rvalue(gz, ri, result, node);5334 return rvalue(gz, ri, result, node);
5335 },5335 },
5336 .keyword_union => {5336 .keyword_union => {
5337 const layout: std.builtin.Type.ContainerLayout = if (container_decl.layout_token) |t| switch (tree.tokenTag(t)) {5337 const layout: std.lang.Type.ContainerLayout = if (container_decl.layout_token) |t| switch (tree.tokenTag(t)) {
5338 .keyword_packed => .@"packed",5338 .keyword_packed => .@"packed",
5339 .keyword_extern => .@"extern",5339 .keyword_extern => .@"extern",
5340 else => unreachable,5340 else => unreachable,
...@@ -8060,7 +8060,7 @@ fn identifier(...@@ -8060,7 +8060,7 @@ fn identifier(
80608060
8061 int_type: {8061 int_type: {
8062 if (ident_name_raw.len < 2) break :int_type;8062 if (ident_name_raw.len < 2) break :int_type;
8063 const signedness: std.builtin.Signedness = switch (ident_name_raw[0]) {8063 const signedness: std.lang.Signedness = switch (ident_name_raw[0]) {
8064 'u' => .unsigned,8064 'u' => .unsigned,
8065 'i' => .signed,8065 'i' => .signed,
8066 else => break :int_type,8066 else => break :int_type,
...@@ -8650,7 +8650,7 @@ fn asmExpr(...@@ -8650,7 +8650,7 @@ fn asmExpr(
86508650
8651 const clobbers: Zir.Inst.Ref = if (full.ast.clobbers.unwrap()) |clobbers_node|8651 const clobbers: Zir.Inst.Ref = if (full.ast.clobbers.unwrap()) |clobbers_node|
8652 try comptimeExpr(gz, scope, .{ .rl = .{8652 try comptimeExpr(gz, scope, .{ .rl = .{
8653 .coerced_ty = try gz.addBuiltinValue(clobbers_node, .clobbers),8653 .coerced_ty = try gz.addStdLangValue(clobbers_node, .clobbers),
8654 } }, clobbers_node, .clobber)8654 } }, clobbers_node, .clobber)
8655 else8655 else
8656 .none;8656 .none;
...@@ -8992,7 +8992,7 @@ fn builtinCall(...@@ -8992,7 +8992,7 @@ fn builtinCall(
8992 if (!allow_branch_hint) {8992 if (!allow_branch_hint) {
8993 return astgen.failNode(node, "'@branchHint' must appear as the first statement in a function or conditional branch", .{});8993 return astgen.failNode(node, "'@branchHint' must appear as the first statement in a function or conditional branch", .{});
8994 }8994 }
8995 const hint_ty = try gz.addBuiltinValue(node, .branch_hint);8995 const hint_ty = try gz.addStdLangValue(node, .branch_hint);
8996 const hint_val = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = hint_ty } }, params[0], .operand_branchHint);8996 const hint_val = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = hint_ty } }, params[0], .operand_branchHint);
8997 _ = try gz.addExtendedPayload(.branch_hint, Zir.Inst.UnNode{8997 _ = try gz.addExtendedPayload(.branch_hint, Zir.Inst.UnNode{
8998 .node = gz.nodeIndexToRelative(node),8998 .node = gz.nodeIndexToRelative(node),
...@@ -9090,7 +9090,7 @@ fn builtinCall(...@@ -9090,7 +9090,7 @@ fn builtinCall(
90909090
9091 .@"export" => {9091 .@"export" => {
9092 const exported = try expr(gz, scope, .{ .rl = .none }, params[0]);9092 const exported = try expr(gz, scope, .{ .rl = .none }, params[0]);
9093 const export_options_ty = try gz.addBuiltinValue(node, .export_options);9093 const export_options_ty = try gz.addStdLangValue(node, .export_options);
9094 const options = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = export_options_ty } }, params[1], .export_options);9094 const options = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = export_options_ty } }, params[1], .export_options);
9095 _ = try gz.addPlNode(.@"export", node, Zir.Inst.Export{9095 _ = try gz.addPlNode(.@"export", node, Zir.Inst.Export{
9096 .exported = exported,9096 .exported = exported,
...@@ -9100,7 +9100,7 @@ fn builtinCall(...@@ -9100,7 +9100,7 @@ fn builtinCall(
9100 },9100 },
9101 .@"extern" => {9101 .@"extern" => {
9102 const type_inst = try typeExpr(gz, scope, params[0]);9102 const type_inst = try typeExpr(gz, scope, params[0]);
9103 const extern_options_ty = try gz.addBuiltinValue(node, .extern_options);9103 const extern_options_ty = try gz.addStdLangValue(node, .extern_options);
9104 const options = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = extern_options_ty } }, params[1], .extern_options);9104 const options = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = extern_options_ty } }, params[1], .extern_options);
9105 const result = try gz.addExtendedPayload(.builtin_extern, Zir.Inst.BinNode{9105 const result = try gz.addExtendedPayload(.builtin_extern, Zir.Inst.BinNode{
9106 .node = gz.nodeIndexToRelative(node),9106 .node = gz.nodeIndexToRelative(node),
...@@ -9110,7 +9110,7 @@ fn builtinCall(...@@ -9110,7 +9110,7 @@ fn builtinCall(
9110 return rvalue(gz, ri, result, node);9110 return rvalue(gz, ri, result, node);
9111 },9111 },
9112 .set_float_mode => {9112 .set_float_mode => {
9113 const float_mode_ty = try gz.addBuiltinValue(node, .float_mode);9113 const float_mode_ty = try gz.addStdLangValue(node, .float_mode);
9114 const order = try expr(gz, scope, .{ .rl = .{ .coerced_ty = float_mode_ty } }, params[0]);9114 const order = try expr(gz, scope, .{ .rl = .{ .coerced_ty = float_mode_ty } }, params[0]);
9115 _ = try gz.addExtendedPayload(.set_float_mode, Zir.Inst.UnNode{9115 _ = try gz.addExtendedPayload(.set_float_mode, Zir.Inst.UnNode{
9116 .node = gz.nodeIndexToRelative(node),9116 .node = gz.nodeIndexToRelative(node),
...@@ -9196,7 +9196,7 @@ fn builtinCall(...@@ -9196,7 +9196,7 @@ fn builtinCall(
91969196
9197 .EnumLiteral => return rvalue(gz, ri, .enum_literal_type, node),9197 .EnumLiteral => return rvalue(gz, ri, .enum_literal_type, node),
9198 .Int => {9198 .Int => {
9199 const signedness_ty = try gz.addBuiltinValue(node, .signedness);9199 const signedness_ty = try gz.addStdLangValue(node, .signedness);
9200 const result = try gz.addPlNode(.reify_int, node, Zir.Inst.Bin{9200 const result = try gz.addPlNode(.reify_int, node, Zir.Inst.Bin{
9201 .lhs = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = signedness_ty } }, params[0], .int_signedness),9201 .lhs = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = signedness_ty } }, params[0], .int_signedness),
9202 .rhs = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = .u16_type } }, params[1], .int_bit_width),9202 .rhs = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = .u16_type } }, params[1], .int_bit_width),
...@@ -9211,8 +9211,8 @@ fn builtinCall(...@@ -9211,8 +9211,8 @@ fn builtinCall(
9211 return rvalue(gz, ri, result, node);9211 return rvalue(gz, ri, result, node);
9212 },9212 },
9213 .Pointer => {9213 .Pointer => {
9214 const ptr_size_ty = try gz.addBuiltinValue(node, .pointer_size);9214 const ptr_size_ty = try gz.addStdLangValue(node, .pointer_size);
9215 const ptr_attrs_ty = try gz.addBuiltinValue(node, .pointer_attributes);9215 const ptr_attrs_ty = try gz.addStdLangValue(node, .pointer_attributes);
9216 const size = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = ptr_size_ty } }, params[0], .pointer_size);9216 const size = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = ptr_size_ty } }, params[0], .pointer_size);
9217 const attrs = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = ptr_attrs_ty } }, params[1], .pointer_attrs);9217 const attrs = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = ptr_attrs_ty } }, params[1], .pointer_attrs);
9218 const elem_ty = try typeExpr(gz, scope, params[2]);9218 const elem_ty = try typeExpr(gz, scope, params[2]);
...@@ -9231,7 +9231,7 @@ fn builtinCall(...@@ -9231,7 +9231,7 @@ fn builtinCall(
9231 return rvalue(gz, ri, result, node);9231 return rvalue(gz, ri, result, node);
9232 },9232 },
9233 .Fn => {9233 .Fn => {
9234 const fn_attrs_ty = try gz.addBuiltinValue(node, .fn_attributes);9234 const fn_attrs_ty = try gz.addStdLangValue(node, .fn_attributes);
9235 const param_types = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = .slice_const_type_type } }, params[0], .fn_param_types);9235 const param_types = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = .slice_const_type_type } }, params[0], .fn_param_types);
9236 const param_attrs_ty = try gz.addExtendedPayloadSmall(9236 const param_attrs_ty = try gz.addExtendedPayloadSmall(
9237 .reify_slice_arg_ty,9237 .reify_slice_arg_ty,
...@@ -9251,7 +9251,7 @@ fn builtinCall(...@@ -9251,7 +9251,7 @@ fn builtinCall(
9251 return rvalue(gz, ri, result, node);9251 return rvalue(gz, ri, result, node);
9252 },9252 },
9253 .Struct => {9253 .Struct => {
9254 const container_layout_ty = try gz.addBuiltinValue(node, .container_layout);9254 const container_layout_ty = try gz.addStdLangValue(node, .container_layout);
9255 const layout = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = container_layout_ty } }, params[0], .struct_layout);9255 const layout = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = container_layout_ty } }, params[0], .struct_layout);
9256 const backing_ty = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = .optional_type_type } }, params[1], .type);9256 const backing_ty = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = .optional_type_type } }, params[1], .type);
9257 const field_names = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = .slice_const_slice_const_u8_type } }, params[2], .struct_field_names);9257 const field_names = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = .slice_const_slice_const_u8_type } }, params[2], .struct_field_names);
...@@ -9279,7 +9279,7 @@ fn builtinCall(...@@ -9279,7 +9279,7 @@ fn builtinCall(
9279 return rvalue(gz, ri, result, node);9279 return rvalue(gz, ri, result, node);
9280 },9280 },
9281 .Union => {9281 .Union => {
9282 const container_layout_ty = try gz.addBuiltinValue(node, .container_layout);9282 const container_layout_ty = try gz.addStdLangValue(node, .container_layout);
9283 const layout = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = container_layout_ty } }, params[0], .union_layout);9283 const layout = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = container_layout_ty } }, params[0], .union_layout);
9284 const arg_ty = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = .optional_type_type } }, params[1], .type);9284 const arg_ty = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = .optional_type_type } }, params[1], .type);
9285 const field_names = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = .slice_const_slice_const_u8_type } }, params[2], .union_field_names);9285 const field_names = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = .slice_const_slice_const_u8_type } }, params[2], .union_field_names);
...@@ -9307,7 +9307,7 @@ fn builtinCall(...@@ -9307,7 +9307,7 @@ fn builtinCall(
9307 return rvalue(gz, ri, result, node);9307 return rvalue(gz, ri, result, node);
9308 },9308 },
9309 .Enum => {9309 .Enum => {
9310 const enum_mode_ty = try gz.addBuiltinValue(node, .enum_mode);9310 const enum_mode_ty = try gz.addStdLangValue(node, .enum_mode);
9311 const tag_ty = try typeExpr(gz, scope, params[0]);9311 const tag_ty = try typeExpr(gz, scope, params[0]);
9312 const mode = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = enum_mode_ty } }, params[1], .type);9312 const mode = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = enum_mode_ty } }, params[1], .type);
9313 const field_names = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = .slice_const_slice_const_u8_type } }, params[2], .enum_field_names);9313 const field_names = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = .slice_const_slice_const_u8_type } }, params[2], .enum_field_names);
...@@ -9425,7 +9425,7 @@ fn builtinCall(...@@ -9425,7 +9425,7 @@ fn builtinCall(
9425 return rvalue(gz, ri, result, node);9425 return rvalue(gz, ri, result, node);
9426 },9426 },
9427 .reduce => {9427 .reduce => {
9428 const reduce_op_ty = try gz.addBuiltinValue(node, .reduce_op);9428 const reduce_op_ty = try gz.addStdLangValue(node, .reduce_op);
9429 const op = try expr(gz, scope, .{ .rl = .{ .coerced_ty = reduce_op_ty } }, params[0]);9429 const op = try expr(gz, scope, .{ .rl = .{ .coerced_ty = reduce_op_ty } }, params[0]);
9430 const scalar = try expr(gz, scope, .{ .rl = .none }, params[1]);9430 const scalar = try expr(gz, scope, .{ .rl = .none }, params[1]);
9431 const result = try gz.addPlNode(.reduce, node, Zir.Inst.Bin{9431 const result = try gz.addPlNode(.reduce, node, Zir.Inst.Bin{
...@@ -9441,7 +9441,7 @@ fn builtinCall(...@@ -9441,7 +9441,7 @@ fn builtinCall(
9441 .shl_with_overflow => return overflowArithmetic(gz, scope, ri, node, params, .shl_with_overflow),9441 .shl_with_overflow => return overflowArithmetic(gz, scope, ri, node, params, .shl_with_overflow),
94429442
9443 .atomic_load => {9443 .atomic_load => {
9444 const atomic_order_type = try gz.addBuiltinValue(node, .atomic_order);9444 const atomic_order_type = try gz.addStdLangValue(node, .atomic_order);
9445 const result = try gz.addPlNode(.atomic_load, node, Zir.Inst.AtomicLoad{9445 const result = try gz.addPlNode(.atomic_load, node, Zir.Inst.AtomicLoad{
9446 // zig fmt: off9446 // zig fmt: off
9447 .elem_type = try typeExpr(gz, scope, params[0]),9447 .elem_type = try typeExpr(gz, scope, params[0]),
...@@ -9452,8 +9452,8 @@ fn builtinCall(...@@ -9452,8 +9452,8 @@ fn builtinCall(
9452 return rvalue(gz, ri, result, node);9452 return rvalue(gz, ri, result, node);
9453 },9453 },
9454 .atomic_rmw => {9454 .atomic_rmw => {
9455 const atomic_order_type = try gz.addBuiltinValue(node, .atomic_order);9455 const atomic_order_type = try gz.addStdLangValue(node, .atomic_order);
9456 const atomic_rmw_op_type = try gz.addBuiltinValue(node, .atomic_rmw_op);9456 const atomic_rmw_op_type = try gz.addStdLangValue(node, .atomic_rmw_op);
9457 const int_type = try typeExpr(gz, scope, params[0]);9457 const int_type = try typeExpr(gz, scope, params[0]);
9458 const result = try gz.addPlNode(.atomic_rmw, node, Zir.Inst.AtomicRmw{9458 const result = try gz.addPlNode(.atomic_rmw, node, Zir.Inst.AtomicRmw{
9459 // zig fmt: off9459 // zig fmt: off
...@@ -9466,7 +9466,7 @@ fn builtinCall(...@@ -9466,7 +9466,7 @@ fn builtinCall(
9466 return rvalue(gz, ri, result, node);9466 return rvalue(gz, ri, result, node);
9467 },9467 },
9468 .atomic_store => {9468 .atomic_store => {
9469 const atomic_order_type = try gz.addBuiltinValue(node, .atomic_order);9469 const atomic_order_type = try gz.addStdLangValue(node, .atomic_order);
9470 const int_type = try typeExpr(gz, scope, params[0]);9470 const int_type = try typeExpr(gz, scope, params[0]);
9471 _ = try gz.addPlNode(.atomic_store, node, Zir.Inst.AtomicStore{9471 _ = try gz.addPlNode(.atomic_store, node, Zir.Inst.AtomicStore{
9472 // zig fmt: off9472 // zig fmt: off
...@@ -9490,7 +9490,7 @@ fn builtinCall(...@@ -9490,7 +9490,7 @@ fn builtinCall(
9490 return rvalue(gz, ri, result, node);9490 return rvalue(gz, ri, result, node);
9491 },9491 },
9492 .call => {9492 .call => {
9493 const call_modifier_ty = try gz.addBuiltinValue(node, .call_modifier);9493 const call_modifier_ty = try gz.addStdLangValue(node, .call_modifier);
9494 const modifier = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = call_modifier_ty } }, params[0], .call_modifier);9494 const modifier = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = call_modifier_ty } }, params[0], .call_modifier);
9495 const callee = try expr(gz, scope, .{ .rl = .none }, params[1]);9495 const callee = try expr(gz, scope, .{ .rl = .none }, params[1]);
9496 const args = try expr(gz, scope, .{ .rl = .none }, params[2]);9496 const args = try expr(gz, scope, .{ .rl = .none }, params[2]);
...@@ -9567,7 +9567,7 @@ fn builtinCall(...@@ -9567,7 +9567,7 @@ fn builtinCall(
9567 return rvalue(gz, ri, result, node);9567 return rvalue(gz, ri, result, node);
9568 },9568 },
9569 .prefetch => {9569 .prefetch => {
9570 const prefetch_options_ty = try gz.addBuiltinValue(node, .prefetch_options);9570 const prefetch_options_ty = try gz.addStdLangValue(node, .prefetch_options);
9571 const ptr = try expr(gz, scope, .{ .rl = .none }, params[0]);9571 const ptr = try expr(gz, scope, .{ .rl = .none }, params[0]);
9572 const options = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = prefetch_options_ty } }, params[1], .prefetch_options);9572 const options = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = prefetch_options_ty } }, params[1], .prefetch_options);
9573 _ = try gz.addExtendedPayload(.prefetch, Zir.Inst.BinNode{9573 _ = try gz.addExtendedPayload(.prefetch, Zir.Inst.BinNode{
...@@ -9800,7 +9800,7 @@ fn cmpxchg(...@@ -9800,7 +9800,7 @@ fn cmpxchg(
9800 small: u16,9800 small: u16,
9801) InnerError!Zir.Inst.Ref {9801) InnerError!Zir.Inst.Ref {
9802 const int_type = try typeExpr(gz, scope, params[0]);9802 const int_type = try typeExpr(gz, scope, params[0]);
9803 const atomic_order_type = try gz.addBuiltinValue(node, .atomic_order);9803 const atomic_order_type = try gz.addStdLangValue(node, .atomic_order);
9804 const result = try gz.addExtendedPayloadSmall(.cmpxchg, small, Zir.Inst.Cmpxchg{9804 const result = try gz.addExtendedPayloadSmall(.cmpxchg, small, Zir.Inst.Cmpxchg{
9805 // zig fmt: off9805 // zig fmt: off
9806 .node = gz.nodeIndexToRelative(node),9806 .node = gz.nodeIndexToRelative(node),
...@@ -9925,7 +9925,7 @@ fn callExpr(...@@ -9925,7 +9925,7 @@ fn callExpr(
9925 const astgen = gz.astgen;9925 const astgen = gz.astgen;
99269926
9927 const callee = try calleeExpr(gz, scope, ri.rl, override_decl_literal_type, call.ast.fn_expr);9927 const callee = try calleeExpr(gz, scope, ri.rl, override_decl_literal_type, call.ast.fn_expr);
9928 const modifier: std.builtin.CallModifier = blk: {9928 const modifier: std.lang.CallModifier = blk: {
9929 if (gz.nosuspend_node != .none) {9929 if (gz.nosuspend_node != .none) {
9930 break :blk .no_suspend;9930 break :blk .no_suspend;
9931 }9931 }
...@@ -11801,8 +11801,8 @@ const GenZir = struct {...@@ -11801,8 +11801,8 @@ const GenZir = struct {
11801 return new_index;11801 return new_index;
11802 }11802 }
1180311803
11804 fn addBuiltinValue(gz: *GenZir, src_node: Ast.Node.Index, val: Zir.Inst.BuiltinValue) !Zir.Inst.Ref {11804 fn addStdLangValue(gz: *GenZir, src_node: Ast.Node.Index, val: Zir.Inst.StdLangValue) !Zir.Inst.Ref {
11805 return addExtendedNodeSmall(gz, .builtin_value, src_node, @intFromEnum(val));11805 return addExtendedNodeSmall(gz, .std_lang_value, src_node, @intFromEnum(val));
11806 }11806 }
1180711807
11808 fn addExtendedPayload(gz: *GenZir, opcode: Zir.Inst.Extended, extra: anytype) !Zir.Inst.Ref {11808 fn addExtendedPayload(gz: *GenZir, opcode: Zir.Inst.Extended, extra: anytype) !Zir.Inst.Ref {
...@@ -12350,7 +12350,7 @@ const GenZir = struct {...@@ -12350,7 +12350,7 @@ const GenZir = struct {
12350 fn setStruct(gz: *GenZir, inst: Zir.Inst.Index, args: struct {12350 fn setStruct(gz: *GenZir, inst: Zir.Inst.Index, args: struct {
12351 src_node: Ast.Node.Index,12351 src_node: Ast.Node.Index,
12352 name_strat: Zir.Inst.NameStrategy,12352 name_strat: Zir.Inst.NameStrategy,
12353 layout: std.builtin.Type.ContainerLayout,12353 layout: std.lang.Type.ContainerLayout,
12354 backing_int_type_body_len: ?u32,12354 backing_int_type_body_len: ?u32,
12355 decls_len: u32,12355 decls_len: u32,
12356 fields_len: u32,12356 fields_len: u32,
lib/std/zig/LibCInstallation.zig+2-2
...@@ -708,8 +708,8 @@ pub const CrtBasenames = struct {...@@ -708,8 +708,8 @@ pub const CrtBasenames = struct {
708 pub const GetArgs = struct {708 pub const GetArgs = struct {
709 target: *const std.Target,709 target: *const std.Target,
710 link_libc: bool,710 link_libc: bool,
711 output_mode: std.builtin.OutputMode,711 output_mode: std.lang.OutputMode,
712 link_mode: std.builtin.LinkMode,712 link_mode: std.lang.LinkMode,
713 pie: bool,713 pie: bool,
714 };714 };
715715
lib/std/zig/Zir.zig+15-15
...@@ -2119,10 +2119,10 @@ pub const Inst = struct {...@@ -2119,10 +2119,10 @@ pub const Inst = struct {
2119 /// Guaranteed to not have the `ptr_cast` flag.2119 /// Guaranteed to not have the `ptr_cast` flag.
2120 /// Uses the `pl_node` union field with payload `FieldParentPtr`.2120 /// Uses the `pl_node` union field with payload `FieldParentPtr`.
2121 field_parent_ptr,2121 field_parent_ptr,
2122 /// Get a type or value from `std.builtin`.2122 /// Get a type or value from `std.lang`.
2123 /// `operand` is `src_node: Ast.Node.Offset`.2123 /// `operand` is `src_node: Ast.Node.Offset`.
2124 /// `small` is an `Inst.BuiltinValue`.2124 /// `small` is an `Inst.StdLangValue`.
2125 builtin_value,2125 std_lang_value,
2126 /// Provide a `@branchHint` for the current block.2126 /// Provide a `@branchHint` for the current block.
2127 /// `operand` is payload index to `UnNode`.2127 /// `operand` is payload index to `UnNode`.
2128 /// `small` is unused.2128 /// `small` is unused.
...@@ -2418,7 +2418,7 @@ pub const Inst = struct {...@@ -2418,7 +2418,7 @@ pub const Inst = struct {
2418 has_bit_range: bool,2418 has_bit_range: bool,
2419 _: u1 = 0,2419 _: u1 = 0,
2420 },2420 },
2421 size: std.builtin.Type.Pointer.Size,2421 size: std.lang.Type.Pointer.Size,
2422 /// Index into extra. See `PtrType`.2422 /// Index into extra. See `PtrType`.
2423 payload_index: u32,2423 payload_index: u32,
2424 },2424 },
...@@ -2426,7 +2426,7 @@ pub const Inst = struct {...@@ -2426,7 +2426,7 @@ pub const Inst = struct {
2426 /// Offset from Decl AST node index.2426 /// Offset from Decl AST node index.
2427 /// `Tag` determines which kind of AST node this points to.2427 /// `Tag` determines which kind of AST node this points to.
2428 src_node: Ast.Node.Offset,2428 src_node: Ast.Node.Offset,
2429 signedness: std.builtin.Signedness,2429 signedness: std.lang.Signedness,
2430 bit_count: u16,2430 bit_count: u16,
2431 },2431 },
2432 @"unreachable": struct {2432 @"unreachable": struct {
...@@ -3051,7 +3051,7 @@ pub const Inst = struct {...@@ -3051,7 +3051,7 @@ pub const Inst = struct {
3051 callee: Ref,3051 callee: Ref,
30523052
3053 pub const Flags = packed struct {3053 pub const Flags = packed struct {
3054 /// std.builtin.CallModifier in packed form3054 /// std.lang.CallModifier in packed form
3055 pub const PackedModifier = u3;3055 pub const PackedModifier = u3;
3056 pub const PackedArgsLen = u27;3056 pub const PackedArgsLen = u27;
30573057
...@@ -3063,7 +3063,7 @@ pub const Inst = struct {...@@ -3063,7 +3063,7 @@ pub const Inst = struct {
3063 comptime {3063 comptime {
3064 if (@sizeOf(Flags) != 4 or @bitSizeOf(Flags) != 32)3064 if (@sizeOf(Flags) != 4 or @bitSizeOf(Flags) != 32)
3065 @compileError("Layout of Call.Flags needs to be updated!");3065 @compileError("Layout of Call.Flags needs to be updated!");
3066 if (@bitSizeOf(std.builtin.CallModifier) != @bitSizeOf(PackedModifier))3066 if (@bitSizeOf(std.lang.CallModifier) != @bitSizeOf(PackedModifier))
3067 @compileError("Call.Flags.PackedModifier needs to be updated!");3067 @compileError("Call.Flags.PackedModifier needs to be updated!");
3068 }3068 }
3069 };3069 };
...@@ -3186,7 +3186,7 @@ pub const Inst = struct {...@@ -3186,7 +3186,7 @@ pub const Inst = struct {
31863186
3187 pub const ReifySliceArgInfo = enum(u16) {3187 pub const ReifySliceArgInfo = enum(u16) {
3188 /// Input element type is `type`.3188 /// Input element type is `type`.
3189 /// Output element type is `std.builtin.Type.Fn.Param.Attributes`.3189 /// Output element type is `std.lang.Type.Fn.Param.Attributes`.
3190 type_to_fn_param_attrs,3190 type_to_fn_param_attrs,
3191 /// Input element type is `[]const u8`.3191 /// Input element type is `[]const u8`.
3192 /// Output element type is `type`.3192 /// Output element type is `type`.
...@@ -3194,10 +3194,10 @@ pub const Inst = struct {...@@ -3194,10 +3194,10 @@ pub const Inst = struct {
3194 /// Identical to `string_to_struct_field_type` aside from emitting slightly different error messages.3194 /// Identical to `string_to_struct_field_type` aside from emitting slightly different error messages.
3195 string_to_union_field_type,3195 string_to_union_field_type,
3196 /// Input element type is `[]const u8`.3196 /// Input element type is `[]const u8`.
3197 /// Output element type is `std.builtin.Type.StructField.Attributes`.3197 /// Output element type is `std.lang.Type.StructField.Attributes`.
3198 string_to_struct_field_attrs,3198 string_to_struct_field_attrs,
3199 /// Input element type is `[]const u8`.3199 /// Input element type is `[]const u8`.
3200 /// Output element type is `std.builtin.Type.UnionField.Attributes`.3200 /// Output element type is `std.lang.Type.UnionField.Attributes`.
3201 string_to_union_field_attrs,3201 string_to_union_field_attrs,
3202 };3202 };
32033203
...@@ -3468,7 +3468,7 @@ pub const Inst = struct {...@@ -3468,7 +3468,7 @@ pub const Inst = struct {
3468 has_decls_len: bool,3468 has_decls_len: bool,
3469 has_fields_len: bool,3469 has_fields_len: bool,
3470 name_strategy: NameStrategy,3470 name_strategy: NameStrategy,
3471 layout: std.builtin.Type.ContainerLayout,3471 layout: std.lang.Type.ContainerLayout,
3472 /// Always `false` if `layout != .@"packed"`.3472 /// Always `false` if `layout != .@"packed"`.
3473 has_backing_int_type: bool,3473 has_backing_int_type: bool,
3474 any_field_aligns: bool,3474 any_field_aligns: bool,
...@@ -3564,7 +3564,7 @@ pub const Inst = struct {...@@ -3564,7 +3564,7 @@ pub const Inst = struct {
3564 }3564 }
3565 };3565 };
35663566
3567 pub const BuiltinValue = enum(u16) {3567 pub const StdLangValue = enum(u16) {
3568 // Types3568 // Types
3569 atomic_order,3569 atomic_order,
3570 atomic_rmw_op,3570 atomic_rmw_op,
...@@ -3688,7 +3688,7 @@ pub const Inst = struct {...@@ -3688,7 +3688,7 @@ pub const Inst = struct {
3688 };3688 };
3689 }3689 }
36903690
3691 pub fn layout(k: Kind) std.builtin.Type.ContainerLayout {3691 pub fn layout(k: Kind) std.lang.Type.ContainerLayout {
3692 return switch (k) {3692 return switch (k) {
3693 .auto, .tagged_explicit, .tagged_enum, .tagged_enum_explicit => .auto,3693 .auto, .tagged_explicit, .tagged_enum, .tagged_enum_explicit => .auto,
3694 .@"extern" => .@"extern",3694 .@"extern" => .@"extern",
...@@ -4368,7 +4368,7 @@ fn findTrackableInner(...@@ -4368,7 +4368,7 @@ fn findTrackableInner(
4368 .restore_err_ret_index,4368 .restore_err_ret_index,
4369 .closure_get,4369 .closure_get,
4370 .field_parent_ptr,4370 .field_parent_ptr,
4371 .builtin_value,4371 .std_lang_value,
4372 .branch_hint,4372 .branch_hint,
4373 .inplace_arith_result_ty,4373 .inplace_arith_result_ty,
4374 .tuple_decl,4374 .tuple_decl,
...@@ -5286,7 +5286,7 @@ pub const UnwrappedStructDecl = struct {...@@ -5286,7 +5286,7 @@ pub const UnwrappedStructDecl = struct {
52865286
5287 decls: []const Inst.Index,5287 decls: []const Inst.Index,
52885288
5289 layout: std.builtin.Type.ContainerLayout,5289 layout: std.lang.Type.ContainerLayout,
5290 backing_int_type_body: ?[]const Inst.Index,5290 backing_int_type_body: ?[]const Inst.Index,
52915291
5292 field_names: []const NullTerminatedString,5292 field_names: []const NullTerminatedString,
lib/std/zig/llvm/Builder.zig+1-1
...@@ -1830,7 +1830,7 @@ pub const Visibility = enum(u2) {...@@ -1830,7 +1830,7 @@ pub const Visibility = enum(u2) {
1830 hidden = 1,1830 hidden = 1,
1831 protected = 2,1831 protected = 2,
18321832
1833 pub fn fromSymbolVisibility(sv: std.builtin.SymbolVisibility) Visibility {1833 pub fn fromSymbolVisibility(sv: std.lang.SymbolVisibility) Visibility {
1834 return switch (sv) {1834 return switch (sv) {
1835 .default => .default,1835 .default => .default,
1836 .hidden => .hidden,1836 .hidden => .hidden,
src/Air.zig+15-15
...@@ -1260,17 +1260,17 @@ pub const Inst = struct {...@@ -1260,17 +1260,17 @@ pub const Inst = struct {
1260 },1260 },
1261 atomic_load: struct {1261 atomic_load: struct {
1262 ptr: Ref,1262 ptr: Ref,
1263 order: std.builtin.AtomicOrder,1263 order: std.lang.AtomicOrder,
1264 },1264 },
1265 prefetch: struct {1265 prefetch: struct {
1266 ptr: Ref,1266 ptr: Ref,
1267 rw: std.builtin.PrefetchOptions.Rw,1267 rw: std.lang.PrefetchOptions.Rw,
1268 locality: u2,1268 locality: u2,
1269 cache: std.builtin.PrefetchOptions.Cache,1269 cache: std.lang.PrefetchOptions.Cache,
1270 },1270 },
1271 reduce: struct {1271 reduce: struct {
1272 operand: Ref,1272 operand: Ref,
1273 operation: std.builtin.ReduceOp,1273 operation: std.lang.ReduceOp,
1274 },1274 },
1275 ty_nav: struct {1275 ty_nav: struct {
1276 ty: InternPool.Index,1276 ty: InternPool.Index,
...@@ -1332,8 +1332,8 @@ pub const CondBr = struct {...@@ -1332,8 +1332,8 @@ pub const CondBr = struct {
1332 else_body_len: u32,1332 else_body_len: u32,
1333 branch_hints: BranchHints,1333 branch_hints: BranchHints,
1334 pub const BranchHints = packed struct(u32) {1334 pub const BranchHints = packed struct(u32) {
1335 true: std.builtin.BranchHint = .none,1335 true: std.lang.BranchHint = .none,
1336 false: std.builtin.BranchHint = .none,1336 false: std.lang.BranchHint = .none,
1337 then_cov: CoveragePoint = .none,1337 then_cov: CoveragePoint = .none,
1338 else_cov: CoveragePoint = .none,1338 else_cov: CoveragePoint = .none,
1339 _: u24 = 0,1339 _: u24 = 0,
...@@ -1481,7 +1481,7 @@ pub const Asm = struct {...@@ -1481,7 +1481,7 @@ pub const Asm = struct {
1481 /// Length of the assembly source in bytes.1481 /// Length of the assembly source in bytes.
1482 source_len: u32,1482 source_len: u32,
1483 inputs_len: u32,1483 inputs_len: u32,
1484 /// A comptime `std.builtin.assembly.Clobbers` value for the target architecture.1484 /// A comptime `std.lang.assembly.Clobbers` value for the target architecture.
1485 clobbers: InternPool.Index,1485 clobbers: InternPool.Index,
1486 flags: Flags,1486 flags: Flags,
14871487
...@@ -1499,11 +1499,11 @@ pub const Cmpxchg = struct {...@@ -1499,11 +1499,11 @@ pub const Cmpxchg = struct {
1499 /// 0b00000000000000000000000000XXX000 - failure_order1499 /// 0b00000000000000000000000000XXX000 - failure_order
1500 flags: u32,1500 flags: u32,
15011501
1502 pub fn successOrder(self: Cmpxchg) std.builtin.AtomicOrder {1502 pub fn successOrder(self: Cmpxchg) std.lang.AtomicOrder {
1503 return @enumFromInt(@as(u3, @truncate(self.flags)));1503 return @enumFromInt(@as(u3, @truncate(self.flags)));
1504 }1504 }
15051505
1506 pub fn failureOrder(self: Cmpxchg) std.builtin.AtomicOrder {1506 pub fn failureOrder(self: Cmpxchg) std.lang.AtomicOrder {
1507 return @enumFromInt(@as(u3, @intCast(self.flags >> 3)));1507 return @enumFromInt(@as(u3, @intCast(self.flags >> 3)));
1508 }1508 }
1509};1509};
...@@ -1514,11 +1514,11 @@ pub const AtomicRmw = struct {...@@ -1514,11 +1514,11 @@ pub const AtomicRmw = struct {
1514 /// 0b0000000000000000000000000XXXX000 - op1514 /// 0b0000000000000000000000000XXXX000 - op
1515 flags: u32,1515 flags: u32,
15161516
1517 pub fn ordering(self: AtomicRmw) std.builtin.AtomicOrder {1517 pub fn ordering(self: AtomicRmw) std.lang.AtomicOrder {
1518 return @enumFromInt(@as(u3, @truncate(self.flags)));1518 return @enumFromInt(@as(u3, @truncate(self.flags)));
1519 }1519 }
15201520
1521 pub fn op(self: AtomicRmw) std.builtin.AtomicRmwOp {1521 pub fn op(self: AtomicRmw) std.lang.AtomicRmwOp {
1522 return @enumFromInt(@as(u4, @intCast(self.flags >> 3)));1522 return @enumFromInt(@as(u4, @intCast(self.flags >> 3)));
1523 }1523 }
1524};1524};
...@@ -2077,14 +2077,14 @@ pub const UnwrappedSwitch = struct {...@@ -2077,14 +2077,14 @@ pub const UnwrappedSwitch = struct {
2077 cases_start: u32,2077 cases_start: u32,
20782078
2079 /// Asserts that `case_idx < us.cases_len`.2079 /// Asserts that `case_idx < us.cases_len`.
2080 pub fn getHint(us: UnwrappedSwitch, case_idx: u32) std.builtin.BranchHint {2080 pub fn getHint(us: UnwrappedSwitch, case_idx: u32) std.lang.BranchHint {
2081 assert(case_idx < us.cases_len);2081 assert(case_idx < us.cases_len);
2082 return us.getHintInner(case_idx);2082 return us.getHintInner(case_idx);
2083 }2083 }
2084 pub fn getElseHint(us: UnwrappedSwitch) std.builtin.BranchHint {2084 pub fn getElseHint(us: UnwrappedSwitch) std.lang.BranchHint {
2085 return us.getHintInner(us.cases_len);2085 return us.getHintInner(us.cases_len);
2086 }2086 }
2087 fn getHintInner(us: UnwrappedSwitch, idx: u32) std.builtin.BranchHint {2087 fn getHintInner(us: UnwrappedSwitch, idx: u32) std.lang.BranchHint {
2088 const bag = us.air.extra.items[us.branch_hints_start..][idx / 10];2088 const bag = us.air.extra.items[us.branch_hints_start..][idx / 10];
2089 const bits: u3 = @truncate(bag >> @intCast(3 * (idx % 10)));2089 const bits: u3 = @truncate(bag >> @intCast(3 * (idx % 10)));
2090 return @enumFromInt(bits);2090 return @enumFromInt(bits);
...@@ -2630,7 +2630,7 @@ pub const CompilerRtFunc = enum(u32) {...@@ -2630,7 +2630,7 @@ pub const CompilerRtFunc = enum(u32) {
2630 };2630 };
2631 }2631 }
26322632
2633 pub fn @"callconv"(f: CompilerRtFunc, target: *const std.Target) std.builtin.CallingConvention {2633 pub fn @"callconv"(f: CompilerRtFunc, target: *const std.Target) std.lang.CallingConvention {
2634 const use_gnu_f16_abi = switch (target.cpu.arch) {2634 const use_gnu_f16_abi = switch (target.cpu.arch) {
2635 .wasm32,2635 .wasm32,
2636 .wasm64,2636 .wasm64,
src/Air/Legalize.zig+1-1
...@@ -2644,7 +2644,7 @@ const Block = struct {...@@ -2644,7 +2644,7 @@ const Block = struct {
2644 });2644 });
2645 return;2645 return;
2646 }2646 }
2647 const panic_fn_val = zcu.builtin_decl_values.get(panic_id.toBuiltin());2647 const panic_fn_val = zcu.std_lang_decl_values.get(panic_id.toStdLangDecl());
2648 _ = b.add(l, .{2648 _ = b.add(l, .{
2649 .tag = .call,2649 .tag = .call,
2650 .data = .{ .pl_op = .{2650 .data = .{ .pl_op = .{
src/Air/print.zig+1-1
...@@ -625,7 +625,7 @@ const Writer = struct {...@@ -625,7 +625,7 @@ const Writer = struct {
625 w: *Writer,625 w: *Writer,
626 s: *std.Io.Writer,626 s: *std.Io.Writer,
627 inst: Air.Inst.Index,627 inst: Air.Inst.Index,
628 order: std.builtin.AtomicOrder,628 order: std.lang.AtomicOrder,
629 ) Error!void {629 ) Error!void {
630 const bin_op = w.air.instructions.items(.data)[@intFromEnum(inst)].bin_op;630 const bin_op = w.air.instructions.items(.data)[@intFromEnum(inst)].bin_op;
631 try w.writeOperand(s, inst, 0, bin_op.lhs);631 try w.writeOperand(s, inst, 0, bin_op.lhs);
src/Builtin.zig+15-15
...@@ -1,13 +1,13 @@...@@ -1,13 +1,13 @@
1target: std.Target,1target: std.Target,
2zig_backend: std.builtin.CompilerBackend,2zig_backend: std.lang.CompilerBackend,
3output_mode: std.builtin.OutputMode,3output_mode: std.lang.OutputMode,
4link_mode: std.builtin.LinkMode,4link_mode: std.lang.LinkMode,
5unwind_tables: std.builtin.UnwindTables,5unwind_tables: std.lang.UnwindTables,
6is_test: bool,6is_test: bool,
7single_threaded: bool,7single_threaded: bool,
8link_libc: bool,8link_libc: bool,
9link_libcpp: bool,9link_libcpp: bool,
10optimize_mode: std.builtin.OptimizeMode,10optimize_mode: std.lang.OptimizeMode,
11error_tracing: bool,11error_tracing: bool,
12valgrind: bool,12valgrind: bool,
13sanitize_thread: bool,13sanitize_thread: bool,
...@@ -15,9 +15,9 @@ fuzz: bool,...@@ -15,9 +15,9 @@ fuzz: bool,
15pic: bool,15pic: bool,
16pie: bool,16pie: bool,
17strip: bool,17strip: bool,
18code_model: std.builtin.CodeModel,18code_model: std.lang.CodeModel,
19omit_frame_pointer: bool,19omit_frame_pointer: bool,
20wasi_exec_model: std.builtin.WasiExecModel,20wasi_exec_model: std.lang.WasiExecModel,
2121
22/// Compute an abstract hash representing this `Builtin`. This is *not* a hash22/// Compute an abstract hash representing this `Builtin`. This is *not* a hash
23/// of the resulting file contents.23/// of the resulting file contents.
...@@ -57,11 +57,11 @@ pub fn append(opts: @This(), buffer: *std.array_list.Managed(u8)) Allocator.Erro...@@ -57,11 +57,11 @@ pub fn append(opts: @This(), buffer: *std.array_list.Managed(u8)) Allocator.Erro
57 \\/// feature detection (i.e. with `@hasDecl` or `@hasField`) over version checks.57 \\/// feature detection (i.e. with `@hasDecl` or `@hasField`) over version checks.
58 \\pub const zig_version = std.SemanticVersion.parse(zig_version_string) catch unreachable;58 \\pub const zig_version = std.SemanticVersion.parse(zig_version_string) catch unreachable;
59 \\pub const zig_version_string = "{s}";59 \\pub const zig_version_string = "{s}";
60 \\pub const zig_backend = std.builtin.CompilerBackend.{f};60 \\pub const zig_backend = std.lang.CompilerBackend.{f};
61 \\61 \\
62 \\pub const output_mode: std.builtin.OutputMode = .{f};62 \\pub const output_mode: std.lang.OutputMode = .{f};
63 \\pub const link_mode: std.builtin.LinkMode = .{f};63 \\pub const link_mode: std.lang.LinkMode = .{f};
64 \\pub const unwind_tables: std.builtin.UnwindTables = .{f};64 \\pub const unwind_tables: std.lang.UnwindTables = .{f};
65 \\pub const is_test = {};65 \\pub const is_test = {};
66 \\pub const single_threaded = {};66 \\pub const single_threaded = {};
67 \\pub const abi: std.Target.Abi = .{f};67 \\pub const abi: std.Target.Abi = .{f};
...@@ -239,7 +239,7 @@ pub fn append(opts: @This(), buffer: *std.array_list.Managed(u8)) Allocator.Erro...@@ -239,7 +239,7 @@ pub fn append(opts: @This(), buffer: *std.array_list.Managed(u8)) Allocator.Erro
239239
240 try buffer.print(240 try buffer.print(
241 \\pub const object_format: std.Target.ObjectFormat = .{f};241 \\pub const object_format: std.Target.ObjectFormat = .{f};
242 \\pub const mode: std.builtin.OptimizeMode = .{f};242 \\pub const mode: std.lang.OptimizeMode = .{f};
243 \\pub const link_libc = {};243 \\pub const link_libc = {};
244 \\pub const link_libcpp = {};244 \\pub const link_libcpp = {};
245 \\pub const have_error_return_tracing = {};245 \\pub const have_error_return_tracing = {};
...@@ -249,7 +249,7 @@ pub fn append(opts: @This(), buffer: *std.array_list.Managed(u8)) Allocator.Erro...@@ -249,7 +249,7 @@ pub fn append(opts: @This(), buffer: *std.array_list.Managed(u8)) Allocator.Erro
249 \\pub const position_independent_code = {};249 \\pub const position_independent_code = {};
250 \\pub const position_independent_executable = {};250 \\pub const position_independent_executable = {};
251 \\pub const strip_debug_info = {};251 \\pub const strip_debug_info = {};
252 \\pub const code_model: std.builtin.CodeModel = .{f};252 \\pub const code_model: std.lang.CodeModel = .{f};
253 \\pub const omit_frame_pointer = {};253 \\pub const omit_frame_pointer = {};
254 \\254 \\
255 , .{255 , .{
...@@ -270,14 +270,14 @@ pub fn append(opts: @This(), buffer: *std.array_list.Managed(u8)) Allocator.Erro...@@ -270,14 +270,14 @@ pub fn append(opts: @This(), buffer: *std.array_list.Managed(u8)) Allocator.Erro
270270
271 if (target.os.tag == .wasi) {271 if (target.os.tag == .wasi) {
272 try buffer.print(272 try buffer.print(
273 \\pub const wasi_exec_model: std.builtin.WasiExecModel = .{f};273 \\pub const wasi_exec_model: std.lang.WasiExecModel = .{f};
274 \\274 \\
275 , .{std.zig.fmtIdPU(@tagName(opts.wasi_exec_model))});275 , .{std.zig.fmtIdPU(@tagName(opts.wasi_exec_model))});
276 }276 }
277277
278 if (opts.is_test) {278 if (opts.is_test) {
279 try buffer.appendSlice(279 try buffer.appendSlice(
280 \\pub var test_functions: []const std.builtin.TestFn = &.{}; // overwritten later280 \\pub var test_functions: []const std.lang.TestFn = &.{}; // overwritten later
281 \\281 \\
282 );282 );
283 }283 }
src/Compilation.zig+12-12
...@@ -177,7 +177,7 @@ verbose_link: bool,...@@ -177,7 +177,7 @@ verbose_link: bool,
177link_depfile: ?[]const u8,177link_depfile: ?[]const u8,
178disable_c_depfile: bool,178disable_c_depfile: bool,
179stack_report: bool,179stack_report: bool,
180debug_compiler_runtime_libs: ?std.builtin.OptimizeMode,180debug_compiler_runtime_libs: ?std.lang.OptimizeMode,
181debug_compile_errors: bool,181debug_compile_errors: bool,
182/// Do not check this field directly. Instead, use the `debugIncremental` wrapper function.182/// Do not check this field directly. Instead, use the `debugIncremental` wrapper function.
183debug_incremental: bool,183debug_incremental: bool,
...@@ -1676,7 +1676,7 @@ pub const CreateOptions = struct {...@@ -1676,7 +1676,7 @@ pub const CreateOptions = struct {
1676 verbose_llvm_bc: ?[]const u8 = null,1676 verbose_llvm_bc: ?[]const u8 = null,
1677 link_depfile: ?[]const u8 = null,1677 link_depfile: ?[]const u8 = null,
1678 verbose_llvm_cpu_features: bool = false,1678 verbose_llvm_cpu_features: bool = false,
1679 debug_compiler_runtime_libs: ?std.builtin.OptimizeMode = null,1679 debug_compiler_runtime_libs: ?std.lang.OptimizeMode = null,
1680 debug_compile_errors: bool = false,1680 debug_compile_errors: bool = false,
1681 debug_incremental: bool = false,1681 debug_incremental: bool = false,
1682 /// Normally when you create a `Compilation`, Zig will automatically build1682 /// Normally when you create a `Compilation`, Zig will automatically build
...@@ -4928,8 +4928,8 @@ fn workerDocsWasmFallible(comp: *Compilation, prog_node: std.Progress.Node) SubU...@@ -4928,8 +4928,8 @@ fn workerDocsWasmFallible(comp: *Compilation, prog_node: std.Progress.Node) SubU
4928 defer arena_allocator.deinit();4928 defer arena_allocator.deinit();
4929 const arena = arena_allocator.allocator();4929 const arena = arena_allocator.allocator();
49304930
4931 const optimize_mode = std.builtin.OptimizeMode.ReleaseSmall;4931 const optimize_mode = std.lang.OptimizeMode.ReleaseSmall;
4932 const output_mode = std.builtin.OutputMode.Exe;4932 const output_mode = std.lang.OutputMode.Exe;
4933 const resolved_target: Package.Module.ResolvedTarget = .{4933 const resolved_target: Package.Module.ResolvedTarget = .{
4934 .result = std.zig.system.resolveTargetQuery(io, .{4934 .result = std.zig.system.resolveTargetQuery(io, .{
4935 .cpu_arch = .wasm32,4935 .cpu_arch = .wasm32,
...@@ -5285,8 +5285,8 @@ fn buildRt(...@@ -5285,8 +5285,8 @@ fn buildRt(
5285 comp: *Compilation,5285 comp: *Compilation,
5286 root_source_name: []const u8,5286 root_source_name: []const u8,
5287 root_name: []const u8,5287 root_name: []const u8,
5288 output_mode: std.builtin.OutputMode,5288 output_mode: std.lang.OutputMode,
5289 link_mode: std.builtin.LinkMode,5289 link_mode: std.lang.LinkMode,
5290 misc_task: MiscTask,5290 misc_task: MiscTask,
5291 prog_node: std.Progress.Node,5291 prog_node: std.Progress.Node,
5292 options: RtOptions,5292 options: RtOptions,
...@@ -7260,7 +7260,7 @@ fn dumpArgvWriter(w: *Io.Writer, argv: []const []const u8) Io.Writer.Error!void...@@ -7260,7 +7260,7 @@ fn dumpArgvWriter(w: *Io.Writer, argv: []const []const u8) Io.Writer.Error!void
7260 try w.writeByte('\n');7260 try w.writeByte('\n');
7261}7261}
72627262
7263pub fn getZigBackend(comp: Compilation) std.builtin.CompilerBackend {7263pub fn getZigBackend(comp: Compilation) std.lang.CompilerBackend {
7264 const target = &comp.root_mod.resolved_target.result;7264 const target = &comp.root_mod.resolved_target.result;
7265 return target_util.zigBackend(target, comp.config.use_llvm);7265 return target_util.zigBackend(target, comp.config.use_llvm);
7266}7266}
...@@ -7302,8 +7302,8 @@ fn buildOutputFromZig(...@@ -7302,8 +7302,8 @@ fn buildOutputFromZig(
7302 comp: *Compilation,7302 comp: *Compilation,
7303 src_basename: []const u8,7303 src_basename: []const u8,
7304 root_name: []const u8,7304 root_name: []const u8,
7305 output_mode: std.builtin.OutputMode,7305 output_mode: std.lang.OutputMode,
7306 link_mode: std.builtin.LinkMode,7306 link_mode: std.lang.LinkMode,
7307 misc_task_tag: MiscTask,7307 misc_task_tag: MiscTask,
7308 prog_node: std.Progress.Node,7308 prog_node: std.Progress.Node,
7309 options: RtOptions,7309 options: RtOptions,
...@@ -7433,7 +7433,7 @@ pub const CrtFileOptions = struct {...@@ -7433,7 +7433,7 @@ pub const CrtFileOptions = struct {
7433 function_sections: bool = true,7433 function_sections: bool = true,
7434 data_sections: bool = true,7434 data_sections: bool = true,
7435 omit_frame_pointer: ?bool = null,7435 omit_frame_pointer: ?bool = null,
7436 unwind_tables: ?std.builtin.UnwindTables = null,7436 unwind_tables: ?std.lang.UnwindTables = null,
7437 pic: ?bool = null,7437 pic: ?bool = null,
7438 no_builtin: ?bool = null,7438 no_builtin: ?bool = null,
74397439
...@@ -7443,7 +7443,7 @@ pub const CrtFileOptions = struct {...@@ -7443,7 +7443,7 @@ pub const CrtFileOptions = struct {
7443pub fn build_crt_file(7443pub fn build_crt_file(
7444 comp: *Compilation,7444 comp: *Compilation,
7445 root_name: []const u8,7445 root_name: []const u8,
7446 output_mode: std.builtin.OutputMode,7446 output_mode: std.lang.OutputMode,
7447 misc_task_tag: MiscTask,7447 misc_task_tag: MiscTask,
7448 prog_node: std.Progress.Node,7448 prog_node: std.Progress.Node,
7449 /// These elements have to get mutated to add the owner module after it is7449 /// These elements have to get mutated to add the owner module after it is
...@@ -7657,7 +7657,7 @@ pub fn addLinkLib(comp: *Compilation, lib_name: []const u8) !void {...@@ -7657,7 +7657,7 @@ pub fn addLinkLib(comp: *Compilation, lib_name: []const u8) !void {
76577657
7658/// This decides the optimization mode for all zig-provided libraries, including7658/// This decides the optimization mode for all zig-provided libraries, including
7659/// compiler-rt, libcxx, libc, libunwind, etc.7659/// compiler-rt, libcxx, libc, libunwind, etc.
7660pub fn compilerRtOptMode(comp: Compilation) std.builtin.OptimizeMode {7660pub fn compilerRtOptMode(comp: Compilation) std.lang.OptimizeMode {
7661 if (comp.debug_compiler_runtime_libs) |mode| {7661 if (comp.debug_compiler_runtime_libs) |mode| {
7662 return mode;7662 return mode;
7663 }7663 }
src/Compilation/Config.zig+8-8
...@@ -4,8 +4,8 @@...@@ -4,8 +4,8 @@
4//! order to resolve per-Module defaults.4//! order to resolve per-Module defaults.
55
6have_zcu: bool,6have_zcu: bool,
7output_mode: std.builtin.OutputMode,7output_mode: std.lang.OutputMode,
8link_mode: std.builtin.LinkMode,8link_mode: std.lang.LinkMode,
9link_libc: bool,9link_libc: bool,
10link_libcpp: bool,10link_libcpp: bool,
11link_libunwind: bool,11link_libunwind: bool,
...@@ -53,13 +53,13 @@ lto: std.zig.LtoMode,...@@ -53,13 +53,13 @@ lto: std.zig.LtoMode,
53incremental: bool,53incremental: bool,
54/// WASI-only. Type of WASI execution model ("command" or "reactor").54/// WASI-only. Type of WASI execution model ("command" or "reactor").
55/// Always set to `command` for non-WASI targets.55/// Always set to `command` for non-WASI targets.
56wasi_exec_model: std.builtin.WasiExecModel,56wasi_exec_model: std.lang.WasiExecModel,
57import_memory: bool,57import_memory: bool,
58export_memory: bool,58export_memory: bool,
59shared_memory: bool,59shared_memory: bool,
60is_test: bool,60is_test: bool,
61debug_format: DebugFormat,61debug_format: DebugFormat,
62root_optimize_mode: std.builtin.OptimizeMode,62root_optimize_mode: std.lang.OptimizeMode,
63root_strip: bool,63root_strip: bool,
64root_error_tracing: bool,64root_error_tracing: bool,
65dll_export_fns: bool,65dll_export_fns: bool,
...@@ -75,15 +75,15 @@ pub const DebugFormat = union(enum) {...@@ -75,15 +75,15 @@ pub const DebugFormat = union(enum) {
75};75};
7676
77pub const Options = struct {77pub const Options = struct {
78 output_mode: std.builtin.OutputMode,78 output_mode: std.lang.OutputMode,
79 resolved_target: Module.ResolvedTarget,79 resolved_target: Module.ResolvedTarget,
80 is_test: bool,80 is_test: bool,
81 have_zcu: bool,81 have_zcu: bool,
82 emit_bin: bool,82 emit_bin: bool,
83 root_optimize_mode: ?std.builtin.OptimizeMode = null,83 root_optimize_mode: ?std.lang.OptimizeMode = null,
84 root_strip: ?bool = null,84 root_strip: ?bool = null,
85 root_error_tracing: ?bool = null,85 root_error_tracing: ?bool = null,
86 link_mode: ?std.builtin.LinkMode = null,86 link_mode: ?std.lang.LinkMode = null,
87 ensure_libc_on_non_freestanding: bool = false,87 ensure_libc_on_non_freestanding: bool = false,
88 ensure_libcpp_on_non_freestanding: bool = false,88 ensure_libcpp_on_non_freestanding: bool = false,
89 any_non_single_threaded: bool = false,89 any_non_single_threaded: bool = false,
...@@ -109,7 +109,7 @@ pub const Options = struct {...@@ -109,7 +109,7 @@ pub const Options = struct {
109 lto: ?std.zig.LtoMode = null,109 lto: ?std.zig.LtoMode = null,
110 incremental: bool = false,110 incremental: bool = false,
111 /// WASI-only. Type of WASI execution model ("command" or "reactor").111 /// WASI-only. Type of WASI execution model ("command" or "reactor").
112 wasi_exec_model: ?std.builtin.WasiExecModel = null,112 wasi_exec_model: ?std.lang.WasiExecModel = null,
113 import_memory: ?bool = null,113 import_memory: ?bool = null,
114 export_memory: ?bool = null,114 export_memory: ?bool = null,
115 shared_memory: ?bool = null,115 shared_memory: ?bool = null,
src/InternPool.zig+54-54
...@@ -486,12 +486,12 @@ pub const AnalUnit = packed struct(u64) {...@@ -486,12 +486,12 @@ pub const AnalUnit = packed struct(u64) {
486pub const MemoizedStateStage = enum(u32) {486pub const MemoizedStateStage = enum(u32) {
487 /// Everything other than panics and `VaList`.487 /// Everything other than panics and `VaList`.
488 main,488 main,
489 /// Everything within `std.builtin.Panic`.489 /// Everything within `std.lang.Panic`.
490 /// Since the panic handler is user-provided, this must be able to reference the other memoized state.490 /// Since the panic handler is user-provided, this must be able to reference the other memoized state.
491 panic,491 panic,
492 /// Specifically `std.builtin.VaList`. See `Zcu.BuiltinDecl.stage`.492 /// Specifically `std.lang.VaList`. See `Zcu.StdLangDecl.stage`.
493 va_list,493 va_list,
494 /// Everything within `std.builtin.assembly`. See `Zcu.BuiltinDecl.stage`.494 /// Everything within `std.lang.assembly`. See `Zcu.StdLangDecl.stage`.
495 assembly,495 assembly,
496};496};
497497
...@@ -566,7 +566,7 @@ pub const Nav = struct {...@@ -566,7 +566,7 @@ pub const Nav = struct {
566 type: InternPool.Index,566 type: InternPool.Index,
567 @"align": Alignment,567 @"align": Alignment,
568 @"linksection": OptionalNullTerminatedString,568 @"linksection": OptionalNullTerminatedString,
569 @"addrspace": std.builtin.AddressSpace,569 @"addrspace": std.lang.AddressSpace,
570 @"const": bool,570 @"const": bool,
571 @"threadlocal": bool,571 @"threadlocal": bool,
572 /// This field is whether this `Nav` is a literal `extern` definition.572 /// This field is whether this `Nav` is a literal `extern` definition.
...@@ -678,7 +678,7 @@ pub const Nav = struct {...@@ -678,7 +678,7 @@ pub const Nav = struct {
678678
679 const Bits = packed struct(u16) {679 const Bits = packed struct(u16) {
680 @"align": Alignment,680 @"align": Alignment,
681 @"addrspace": std.builtin.AddressSpace,681 @"addrspace": std.lang.AddressSpace,
682 @"const": bool,682 @"const": bool,
683 @"threadlocal": bool,683 @"threadlocal": bool,
684 is_extern_decl: bool,684 is_extern_decl: bool,
...@@ -1084,7 +1084,7 @@ const Local = struct {...@@ -1084,7 +1084,7 @@ const Local = struct {
1084 }1084 }
1085 }1085 }
1086 fn PtrElem(comptime opts: struct {1086 fn PtrElem(comptime opts: struct {
1087 size: std.builtin.Type.Pointer.Size,1087 size: std.lang.Type.Pointer.Size,
1088 is_const: bool = false,1088 is_const: bool = false,
1089 }) type {1089 }) type {
1090 const elem_info = @typeInfo(Elem).@"struct";1090 const elem_info = @typeInfo(Elem).@"struct";
...@@ -2029,7 +2029,7 @@ pub const Key = union(enum) {...@@ -2029,7 +2029,7 @@ pub const Key = union(enum) {
2029 val: Index,2029 val: Index,
2030 };2030 };
20312031
2032 pub const IntType = std.builtin.Type.Int;2032 pub const IntType = std.lang.Type.Int;
20332033
2034 /// Extern for hashing via memory reinterpretation.2034 /// Extern for hashing via memory reinterpretation.
2035 pub const ErrorUnionType = extern struct {2035 pub const ErrorUnionType = extern struct {
...@@ -2090,8 +2090,8 @@ pub const Key = union(enum) {...@@ -2090,8 +2090,8 @@ pub const Key = union(enum) {
2090 bit_offset: u16,2090 bit_offset: u16,
2091 };2091 };
20922092
2093 pub const Size = std.builtin.Type.Pointer.Size;2093 pub const Size = std.lang.Type.Pointer.Size;
2094 pub const AddressSpace = std.builtin.AddressSpace;2094 pub const AddressSpace = std.lang.AddressSpace;
2095 };2095 };
20962096
2097 /// Extern so that hashing can be done via memory reinterpreting.2097 /// Extern so that hashing can be done via memory reinterpreting.
...@@ -2160,7 +2160,7 @@ pub const Key = union(enum) {...@@ -2160,7 +2160,7 @@ pub const Key = union(enum) {
2160 /// Tells whether a parameter is noalias. See `paramIsNoalias` helper2160 /// Tells whether a parameter is noalias. See `paramIsNoalias` helper
2161 /// method for accessing this.2161 /// method for accessing this.
2162 noalias_bits: u32,2162 noalias_bits: u32,
2163 cc: std.builtin.CallingConvention,2163 cc: std.lang.CallingConvention,
2164 is_var_args: bool,2164 is_var_args: bool,
2165 is_noinline: bool,2165 is_noinline: bool,
21662166
...@@ -2207,15 +2207,15 @@ pub const Key = union(enum) {...@@ -2207,15 +2207,15 @@ pub const Key = union(enum) {
2207 /// For example `extern "c" fn write(...) usize` would have 'c' as library name.2207 /// For example `extern "c" fn write(...) usize` would have 'c' as library name.
2208 /// Index into the string table bytes.2208 /// Index into the string table bytes.
2209 lib_name: OptionalNullTerminatedString,2209 lib_name: OptionalNullTerminatedString,
2210 linkage: std.builtin.GlobalLinkage,2210 linkage: std.lang.GlobalLinkage,
2211 visibility: std.builtin.SymbolVisibility,2211 visibility: std.lang.SymbolVisibility,
2212 is_threadlocal: bool,2212 is_threadlocal: bool,
2213 is_dll_import: bool,2213 is_dll_import: bool,
2214 relocation: std.builtin.ExternOptions.Relocation,2214 relocation: std.lang.ExternOptions.Relocation,
2215 decoration: ?std.builtin.ExternOptions.Decoration,2215 decoration: ?std.lang.ExternOptions.Decoration,
2216 is_const: bool,2216 is_const: bool,
2217 alignment: Alignment,2217 alignment: Alignment,
2218 @"addrspace": std.builtin.AddressSpace,2218 @"addrspace": std.lang.AddressSpace,
2219 /// The ZIR instruction which created this extern; used only for source locations.2219 /// The ZIR instruction which created this extern; used only for source locations.
2220 /// This is a `declaration`.2220 /// This is a `declaration`.
2221 zir_index: TrackedInst.Index,2221 zir_index: TrackedInst.Index,
...@@ -2289,7 +2289,7 @@ pub const Key = union(enum) {...@@ -2289,7 +2289,7 @@ pub const Key = union(enum) {
2289 return @atomicLoad(FuncAnalysis, func.analysisPtr(ip), .unordered);2289 return @atomicLoad(FuncAnalysis, func.analysisPtr(ip), .unordered);
2290 }2290 }
22912291
2292 pub fn setBranchHint(func: Func, ip: *InternPool, io: Io, hint: std.builtin.BranchHint) void {2292 pub fn setBranchHint(func: Func, ip: *InternPool, io: Io, hint: std.lang.BranchHint) void {
2293 const extra_mutex = &ip.getLocal(func.tid).mutate.extra.mutex;2293 const extra_mutex = &ip.getLocal(func.tid).mutate.extra.mutex;
2294 extra_mutex.lockUncancelable(io);2294 extra_mutex.lockUncancelable(io);
2295 defer extra_mutex.unlock(io);2295 defer extra_mutex.unlock(io);
...@@ -3186,7 +3186,7 @@ pub const LoadedStructType = struct {...@@ -3186,7 +3186,7 @@ pub const LoadedStructType = struct {
3186 name_nav: Nav.Index.Optional,3186 name_nav: Nav.Index.Optional,
3187 namespace: NamespaceIndex,3187 namespace: NamespaceIndex,
31883188
3189 layout: std.builtin.Type.ContainerLayout,3189 layout: std.lang.Type.ContainerLayout,
3190 /// May be `undefined` if `layout != .@"packed"`.3190 /// May be `undefined` if `layout != .@"packed"`.
3191 packed_backing_mode: BackingTypeMode,3191 packed_backing_mode: BackingTypeMode,
31923192
...@@ -3369,7 +3369,7 @@ pub const LoadedUnionType = struct {...@@ -3369,7 +3369,7 @@ pub const LoadedUnionType = struct {
3369 name_nav: Nav.Index.Optional,3369 name_nav: Nav.Index.Optional,
3370 namespace: NamespaceIndex,3370 namespace: NamespaceIndex,
33713371
3372 layout: std.builtin.Type.ContainerLayout,3372 layout: std.lang.Type.ContainerLayout,
3373 enum_tag_mode: BackingTypeMode,3373 enum_tag_mode: BackingTypeMode,
3374 /// May be `undefined` if `layout != .@"packed"`.3374 /// May be `undefined` if `layout != .@"packed"`.
3375 packed_backing_mode: BackingTypeMode,3375 packed_backing_mode: BackingTypeMode,
...@@ -5368,10 +5368,10 @@ pub const Tag = enum(u8) {...@@ -5368,10 +5368,10 @@ pub const Tag = enum(u8) {
5368 descriptor_binding: u32,5368 descriptor_binding: u32,
53695369
5370 pub const Flags = packed struct(u32) {5370 pub const Flags = packed struct(u32) {
5371 linkage: std.builtin.GlobalLinkage,5371 linkage: std.lang.GlobalLinkage,
5372 visibility: std.builtin.SymbolVisibility,5372 visibility: std.lang.SymbolVisibility,
5373 is_dll_import: bool,5373 is_dll_import: bool,
5374 relocation: std.builtin.ExternOptions.Relocation,5374 relocation: std.lang.ExternOptions.Relocation,
5375 source: Source,5375 source: Source,
5376 decoration_type: DecorationType,5376 decoration_type: DecorationType,
5377 _: u23 = 0,5377 _: u23 = 0,
...@@ -5380,13 +5380,13 @@ pub const Tag = enum(u8) {...@@ -5380,13 +5380,13 @@ pub const Tag = enum(u8) {
5380 pub const DecorationType = enum(u2) { none, location, descriptor };5380 pub const DecorationType = enum(u2) { none, location, descriptor };
5381 };5381 };
53825382
5383 pub fn decoration(self: Extern) ?std.builtin.ExternOptions.Decoration {5383 pub fn decoration(self: Extern) ?std.lang.ExternOptions.Decoration {
5384 return switch (self.flags.decoration_type) {5384 return switch (self.flags.decoration_type) {
5385 .none => null,5385 .none => null,
5386 .location => std.builtin.ExternOptions.Decoration{5386 .location => std.lang.ExternOptions.Decoration{
5387 .location = self.location_or_descriptor_set,5387 .location = self.location_or_descriptor_set,
5388 },5388 },
5389 .descriptor => std.builtin.ExternOptions.Decoration{ .descriptor = .{ .set = self.location_or_descriptor_set, .binding = self.descriptor_binding } },5389 .descriptor => std.lang.ExternOptions.Decoration{ .descriptor = .{ .set = self.location_or_descriptor_set, .binding = self.descriptor_binding } },
5390 };5390 };
5391 }5391 }
5392 };5392 };
...@@ -5711,7 +5711,7 @@ pub const BackingTypeMode = enum(u1) {...@@ -5711,7 +5711,7 @@ pub const BackingTypeMode = enum(u1) {
5711/// to be part of the type of the function.5711/// to be part of the type of the function.
5712pub const FuncAnalysis = packed struct(u32) {5712pub const FuncAnalysis = packed struct(u32) {
5713 want_runtime_analysis: bool,5713 want_runtime_analysis: bool,
5714 branch_hint: std.builtin.BranchHint,5714 branch_hint: std.lang.BranchHint,
5715 is_noinline: bool,5715 is_noinline: bool,
5716 has_error_trace: bool,5716 has_error_trace: bool,
5717 /// True if this function has an inferred error set.5717 /// True if this function has an inferred error set.
...@@ -7980,7 +7980,7 @@ pub fn getDeclaredStructType(...@@ -7980,7 +7980,7 @@ pub fn getDeclaredStructType(
7980 // InternPool, so that it is possible for their backing storage to be "reallocated" as needed7980 // InternPool, so that it is possible for their backing storage to be "reallocated" as needed
7981 // during type resolution.7981 // during type resolution.
7982 fields_len: u32,7982 fields_len: u32,
7983 layout: std.builtin.Type.ContainerLayout,7983 layout: std.lang.Type.ContainerLayout,
7984 any_comptime_fields: bool,7984 any_comptime_fields: bool,
7985 any_field_defaults: bool,7985 any_field_defaults: bool,
7986 any_field_aligns: bool,7986 any_field_aligns: bool,
...@@ -8124,7 +8124,7 @@ pub fn getReifiedStructType(ip: *InternPool, gpa: Allocator, io: Io, tid: Zcu.Pe...@@ -8124,7 +8124,7 @@ pub fn getReifiedStructType(ip: *InternPool, gpa: Allocator, io: Io, tid: Zcu.Pe
8124 zir_index: TrackedInst.Index,8124 zir_index: TrackedInst.Index,
8125 type_hash: u64,8125 type_hash: u64,
8126 fields_len: u32,8126 fields_len: u32,
8127 layout: std.builtin.Type.ContainerLayout,8127 layout: std.lang.Type.ContainerLayout,
8128 any_comptime_fields: bool,8128 any_comptime_fields: bool,
8129 any_field_defaults: bool,8129 any_field_defaults: bool,
8130 any_field_aligns: bool,8130 any_field_aligns: bool,
...@@ -8300,7 +8300,7 @@ pub fn getDeclaredUnionType(...@@ -8300,7 +8300,7 @@ pub fn getDeclaredUnionType(
8300 // InternPool, so that it is possible for their backing storage to be "reallocated" as needed8300 // InternPool, so that it is possible for their backing storage to be "reallocated" as needed
8301 // during type resolution.8301 // during type resolution.
8302 fields_len: u32,8302 fields_len: u32,
8303 layout: std.builtin.Type.ContainerLayout,8303 layout: std.lang.Type.ContainerLayout,
8304 any_field_aligns: bool,8304 any_field_aligns: bool,
8305 tag_usage: LoadedUnionType.TagUsage,8305 tag_usage: LoadedUnionType.TagUsage,
8306 enum_tag_mode: BackingTypeMode,8306 enum_tag_mode: BackingTypeMode,
...@@ -8421,7 +8421,7 @@ pub fn getReifiedUnionType(ip: *InternPool, gpa: Allocator, io: Io, tid: Zcu.Per...@@ -8421,7 +8421,7 @@ pub fn getReifiedUnionType(ip: *InternPool, gpa: Allocator, io: Io, tid: Zcu.Per
8421 zir_index: TrackedInst.Index,8421 zir_index: TrackedInst.Index,
8422 type_hash: u64,8422 type_hash: u64,
8423 fields_len: u32,8423 fields_len: u32,
8424 layout: std.builtin.Type.ContainerLayout,8424 layout: std.lang.Type.ContainerLayout,
8425 any_field_aligns: bool,8425 any_field_aligns: bool,
8426 tag_usage: LoadedUnionType.TagUsage,8426 tag_usage: LoadedUnionType.TagUsage,
8427 /// Explicitly specified enum tag type. `.none` if `tag_usage != .tagged`.8427 /// Explicitly specified enum tag type. `.none` if `tag_usage != .tagged`.
...@@ -8969,7 +8969,7 @@ pub const GetFuncTypeKey = struct {...@@ -8969,7 +8969,7 @@ pub const GetFuncTypeKey = struct {
8969 comptime_bits: u32 = 0,8969 comptime_bits: u32 = 0,
8970 noalias_bits: u32 = 0,8970 noalias_bits: u32 = 0,
8971 /// `null` means generic.8971 /// `null` means generic.
8972 cc: ?std.builtin.CallingConvention = .auto,8972 cc: ?std.lang.CallingConvention = .auto,
8973 is_var_args: bool = false,8973 is_var_args: bool = false,
8974 is_noinline: bool = false,8974 is_noinline: bool = false,
8975};8975};
...@@ -9117,7 +9117,7 @@ pub const GetFuncDeclKey = struct {...@@ -9117,7 +9117,7 @@ pub const GetFuncDeclKey = struct {
9117 rbrace_line: u32,9117 rbrace_line: u32,
9118 lbrace_column: u32,9118 lbrace_column: u32,
9119 rbrace_column: u32,9119 rbrace_column: u32,
9120 cc: ?std.builtin.CallingConvention,9120 cc: ?std.lang.CallingConvention,
9121 is_noinline: bool,9121 is_noinline: bool,
9122};9122};
91239123
...@@ -9193,7 +9193,7 @@ pub const GetFuncDeclIesKey = struct {...@@ -9193,7 +9193,7 @@ pub const GetFuncDeclIesKey = struct {
9193 comptime_bits: u32,9193 comptime_bits: u32,
9194 bare_return_type: Index,9194 bare_return_type: Index,
9195 /// null means generic.9195 /// null means generic.
9196 cc: ?std.builtin.CallingConvention,9196 cc: ?std.lang.CallingConvention,
9197 is_var_args: bool,9197 is_var_args: bool,
9198 is_noinline: bool,9198 is_noinline: bool,
9199 zir_body_inst: TrackedInst.Index,9199 zir_body_inst: TrackedInst.Index,
...@@ -11763,7 +11763,7 @@ pub fn getBackingAddrTag(ip: *const InternPool, val: Index) ?Key.Ptr.BaseAddr.Ta...@@ -11763,7 +11763,7 @@ pub fn getBackingAddrTag(ip: *const InternPool, val: Index) ?Key.Ptr.BaseAddr.Ta
11763/// This is a particularly hot function, so we operate directly on encodings11763/// This is a particularly hot function, so we operate directly on encodings
11764/// rather than the more straightforward implementation of calling `indexToKey`.11764/// rather than the more straightforward implementation of calling `indexToKey`.
11765/// Asserts `index` is not `.generic_poison_type`.11765/// Asserts `index` is not `.generic_poison_type`.
11766pub fn zigTypeTag(ip: *const InternPool, index: Index) std.builtin.TypeId {11766pub fn zigTypeTag(ip: *const InternPool, index: Index) std.lang.TypeId {
11767 return switch (index) {11767 return switch (index) {
11768 .u0_type,11768 .u0_type,
11769 .u1_type,11769 .u1_type,
...@@ -12407,13 +12407,13 @@ pub fn getErrorValueIfExists(ip: *const InternPool, name: NullTerminatedString)...@@ -12407,13 +12407,13 @@ pub fn getErrorValueIfExists(ip: *const InternPool, name: NullTerminatedString)
12407}12407}
1240812408
12409const PackedCallingConvention = packed struct(u18) {12409const PackedCallingConvention = packed struct(u18) {
12410 tag: std.builtin.CallingConvention.Tag,12410 tag: std.lang.CallingConvention.Tag,
12411 /// May be ignored depending on `tag`.12411 /// May be ignored depending on `tag`.
12412 incoming_stack_alignment: Alignment,12412 incoming_stack_alignment: Alignment,
12413 /// Interpretation depends on `tag`.12413 /// Interpretation depends on `tag`.
12414 extra: u4,12414 extra: u4,
1241512415
12416 fn pack(cc: std.builtin.CallingConvention) PackedCallingConvention {12416 fn pack(cc: std.lang.CallingConvention) PackedCallingConvention {
12417 return switch (cc) {12417 return switch (cc) {
12418 inline else => |pl, tag| switch (@TypeOf(pl)) {12418 inline else => |pl, tag| switch (@TypeOf(pl)) {
12419 void => .{12419 void => .{
...@@ -12421,42 +12421,42 @@ const PackedCallingConvention = packed struct(u18) {...@@ -12421,42 +12421,42 @@ const PackedCallingConvention = packed struct(u18) {
12421 .incoming_stack_alignment = .none, // unused12421 .incoming_stack_alignment = .none, // unused
12422 .extra = 0, // unused12422 .extra = 0, // unused
12423 },12423 },
12424 std.builtin.CallingConvention.CommonOptions => .{12424 std.lang.CallingConvention.CommonOptions => .{
12425 .tag = tag,12425 .tag = tag,
12426 .incoming_stack_alignment = .fromByteUnits(pl.incoming_stack_alignment orelse 0),12426 .incoming_stack_alignment = .fromByteUnits(pl.incoming_stack_alignment orelse 0),
12427 .extra = 0, // unused12427 .extra = 0, // unused
12428 },12428 },
12429 std.builtin.CallingConvention.X86RegparmOptions => .{12429 std.lang.CallingConvention.X86RegparmOptions => .{
12430 .tag = tag,12430 .tag = tag,
12431 .incoming_stack_alignment = .fromByteUnits(pl.incoming_stack_alignment orelse 0),12431 .incoming_stack_alignment = .fromByteUnits(pl.incoming_stack_alignment orelse 0),
12432 .extra = pl.register_params,12432 .extra = pl.register_params,
12433 },12433 },
12434 std.builtin.CallingConvention.ArcInterruptOptions => .{12434 std.lang.CallingConvention.ArcInterruptOptions => .{
12435 .tag = tag,12435 .tag = tag,
12436 .incoming_stack_alignment = .fromByteUnits(pl.incoming_stack_alignment orelse 0),12436 .incoming_stack_alignment = .fromByteUnits(pl.incoming_stack_alignment orelse 0),
12437 .extra = @intFromEnum(pl.type),12437 .extra = @intFromEnum(pl.type),
12438 },12438 },
12439 std.builtin.CallingConvention.ArmInterruptOptions => .{12439 std.lang.CallingConvention.ArmInterruptOptions => .{
12440 .tag = tag,12440 .tag = tag,
12441 .incoming_stack_alignment = .fromByteUnits(pl.incoming_stack_alignment orelse 0),12441 .incoming_stack_alignment = .fromByteUnits(pl.incoming_stack_alignment orelse 0),
12442 .extra = @intFromEnum(pl.type),12442 .extra = @intFromEnum(pl.type),
12443 },12443 },
12444 std.builtin.CallingConvention.MicroblazeInterruptOptions => .{12444 std.lang.CallingConvention.MicroblazeInterruptOptions => .{
12445 .tag = tag,12445 .tag = tag,
12446 .incoming_stack_alignment = .fromByteUnits(pl.incoming_stack_alignment orelse 0),12446 .incoming_stack_alignment = .fromByteUnits(pl.incoming_stack_alignment orelse 0),
12447 .extra = @intFromEnum(pl.type),12447 .extra = @intFromEnum(pl.type),
12448 },12448 },
12449 std.builtin.CallingConvention.MipsInterruptOptions => .{12449 std.lang.CallingConvention.MipsInterruptOptions => .{
12450 .tag = tag,12450 .tag = tag,
12451 .incoming_stack_alignment = .fromByteUnits(pl.incoming_stack_alignment orelse 0),12451 .incoming_stack_alignment = .fromByteUnits(pl.incoming_stack_alignment orelse 0),
12452 .extra = @intFromEnum(pl.mode),12452 .extra = @intFromEnum(pl.mode),
12453 },12453 },
12454 std.builtin.CallingConvention.RiscvInterruptOptions => .{12454 std.lang.CallingConvention.RiscvInterruptOptions => .{
12455 .tag = tag,12455 .tag = tag,
12456 .incoming_stack_alignment = .fromByteUnits(pl.incoming_stack_alignment orelse 0),12456 .incoming_stack_alignment = .fromByteUnits(pl.incoming_stack_alignment orelse 0),
12457 .extra = @intFromEnum(pl.mode),12457 .extra = @intFromEnum(pl.mode),
12458 },12458 },
12459 std.builtin.CallingConvention.ShInterruptOptions => .{12459 std.lang.CallingConvention.ShInterruptOptions => .{
12460 .tag = tag,12460 .tag = tag,
12461 .incoming_stack_alignment = .fromByteUnits(pl.incoming_stack_alignment orelse 0),12461 .incoming_stack_alignment = .fromByteUnits(pl.incoming_stack_alignment orelse 0),
12462 .extra = @intFromEnum(pl.save),12462 .extra = @intFromEnum(pl.save),
...@@ -12466,41 +12466,41 @@ const PackedCallingConvention = packed struct(u18) {...@@ -12466,41 +12466,41 @@ const PackedCallingConvention = packed struct(u18) {
12466 };12466 };
12467 }12467 }
1246812468
12469 fn unpack(cc: PackedCallingConvention) std.builtin.CallingConvention {12469 fn unpack(cc: PackedCallingConvention) std.lang.CallingConvention {
12470 return switch (cc.tag) {12470 return switch (cc.tag) {
12471 inline else => |tag| @unionInit(12471 inline else => |tag| @unionInit(
12472 std.builtin.CallingConvention,12472 std.lang.CallingConvention,
12473 @tagName(tag),12473 @tagName(tag),
12474 switch (@FieldType(std.builtin.CallingConvention, @tagName(tag))) {12474 switch (@FieldType(std.lang.CallingConvention, @tagName(tag))) {
12475 void => {},12475 void => {},
12476 std.builtin.CallingConvention.CommonOptions => .{12476 std.lang.CallingConvention.CommonOptions => .{
12477 .incoming_stack_alignment = cc.incoming_stack_alignment.toByteUnits(),12477 .incoming_stack_alignment = cc.incoming_stack_alignment.toByteUnits(),
12478 },12478 },
12479 std.builtin.CallingConvention.X86RegparmOptions => .{12479 std.lang.CallingConvention.X86RegparmOptions => .{
12480 .incoming_stack_alignment = cc.incoming_stack_alignment.toByteUnits(),12480 .incoming_stack_alignment = cc.incoming_stack_alignment.toByteUnits(),
12481 .register_params = @intCast(cc.extra),12481 .register_params = @intCast(cc.extra),
12482 },12482 },
12483 std.builtin.CallingConvention.ArcInterruptOptions => .{12483 std.lang.CallingConvention.ArcInterruptOptions => .{
12484 .incoming_stack_alignment = cc.incoming_stack_alignment.toByteUnits(),12484 .incoming_stack_alignment = cc.incoming_stack_alignment.toByteUnits(),
12485 .type = @enumFromInt(cc.extra),12485 .type = @enumFromInt(cc.extra),
12486 },12486 },
12487 std.builtin.CallingConvention.ArmInterruptOptions => .{12487 std.lang.CallingConvention.ArmInterruptOptions => .{
12488 .incoming_stack_alignment = cc.incoming_stack_alignment.toByteUnits(),12488 .incoming_stack_alignment = cc.incoming_stack_alignment.toByteUnits(),
12489 .type = @enumFromInt(cc.extra),12489 .type = @enumFromInt(cc.extra),
12490 },12490 },
12491 std.builtin.CallingConvention.MicroblazeInterruptOptions => .{12491 std.lang.CallingConvention.MicroblazeInterruptOptions => .{
12492 .incoming_stack_alignment = cc.incoming_stack_alignment.toByteUnits(),12492 .incoming_stack_alignment = cc.incoming_stack_alignment.toByteUnits(),
12493 .type = @enumFromInt(cc.extra),12493 .type = @enumFromInt(cc.extra),
12494 },12494 },
12495 std.builtin.CallingConvention.MipsInterruptOptions => .{12495 std.lang.CallingConvention.MipsInterruptOptions => .{
12496 .incoming_stack_alignment = cc.incoming_stack_alignment.toByteUnits(),12496 .incoming_stack_alignment = cc.incoming_stack_alignment.toByteUnits(),
12497 .mode = @enumFromInt(cc.extra),12497 .mode = @enumFromInt(cc.extra),
12498 },12498 },
12499 std.builtin.CallingConvention.RiscvInterruptOptions => .{12499 std.lang.CallingConvention.RiscvInterruptOptions => .{
12500 .incoming_stack_alignment = cc.incoming_stack_alignment.toByteUnits(),12500 .incoming_stack_alignment = cc.incoming_stack_alignment.toByteUnits(),
12501 .mode = @enumFromInt(cc.extra),12501 .mode = @enumFromInt(cc.extra),
12502 },12502 },
12503 std.builtin.CallingConvention.ShInterruptOptions => .{12503 std.lang.CallingConvention.ShInterruptOptions => .{
12504 .incoming_stack_alignment = cc.incoming_stack_alignment.toByteUnits(),12504 .incoming_stack_alignment = cc.incoming_stack_alignment.toByteUnits(),
12505 .save = @enumFromInt(cc.extra),12505 .save = @enumFromInt(cc.extra),
12506 },12506 },
src/Package/Module.zig+7-7
...@@ -15,8 +15,8 @@ fully_qualified_name: []const u8,...@@ -15,8 +15,8 @@ fully_qualified_name: []const u8,
15deps: Deps = .{},15deps: Deps = .{},
1616
17resolved_target: ResolvedTarget,17resolved_target: ResolvedTarget,
18optimize_mode: std.builtin.OptimizeMode,18optimize_mode: std.lang.OptimizeMode,
19code_model: std.builtin.CodeModel,19code_model: std.lang.CodeModel,
20single_threaded: bool,20single_threaded: bool,
21error_tracing: bool,21error_tracing: bool,
22valgrind: bool,22valgrind: bool,
...@@ -29,7 +29,7 @@ red_zone: bool,...@@ -29,7 +29,7 @@ red_zone: bool,
29sanitize_c: std.zig.SanitizeC,29sanitize_c: std.zig.SanitizeC,
30sanitize_thread: bool,30sanitize_thread: bool,
31fuzz: bool,31fuzz: bool,
32unwind_tables: std.builtin.UnwindTables,32unwind_tables: std.lang.UnwindTables,
33cc_argv: []const []const u8,33cc_argv: []const []const u8,
34/// (SPIR-V) whether to generate a structured control flow graph or not34/// (SPIR-V) whether to generate a structured control flow graph or not
35structured_cfg: bool,35structured_cfg: bool,
...@@ -61,8 +61,8 @@ pub const CreateOptions = struct {...@@ -61,8 +61,8 @@ pub const CreateOptions = struct {
61 pub const Inherited = struct {61 pub const Inherited = struct {
62 /// If this is null then `parent` must be non-null.62 /// If this is null then `parent` must be non-null.
63 resolved_target: ?ResolvedTarget = null,63 resolved_target: ?ResolvedTarget = null,
64 optimize_mode: ?std.builtin.OptimizeMode = null,64 optimize_mode: ?std.lang.OptimizeMode = null,
65 code_model: ?std.builtin.CodeModel = null,65 code_model: ?std.lang.CodeModel = null,
66 single_threaded: ?bool = null,66 single_threaded: ?bool = null,
67 error_tracing: ?bool = null,67 error_tracing: ?bool = null,
68 valgrind: ?bool = null,68 valgrind: ?bool = null,
...@@ -75,7 +75,7 @@ pub const CreateOptions = struct {...@@ -75,7 +75,7 @@ pub const CreateOptions = struct {
75 /// other number means stack protection with that buffer size.75 /// other number means stack protection with that buffer size.
76 stack_protector: ?u32 = null,76 stack_protector: ?u32 = null,
77 red_zone: ?bool = null,77 red_zone: ?bool = null,
78 unwind_tables: ?std.builtin.UnwindTables = null,78 unwind_tables: ?std.lang.UnwindTables = null,
79 sanitize_c: ?std.zig.SanitizeC = null,79 sanitize_c: ?std.zig.SanitizeC = null,
80 sanitize_thread: ?bool = null,80 sanitize_thread: ?bool = null,
81 fuzz: ?bool = null,81 fuzz: ?bool = null,
...@@ -238,7 +238,7 @@ pub fn create(arena: Allocator, options: CreateOptions) !*Package.Module {...@@ -238,7 +238,7 @@ pub fn create(arena: Allocator, options: CreateOptions) !*Package.Module {
238 break :b false;238 break :b false;
239 };239 };
240240
241 const code_model: std.builtin.CodeModel = b: {241 const code_model: std.lang.CodeModel = b: {
242 if (options.inherited.code_model) |x| break :b x;242 if (options.inherited.code_model) |x| break :b x;
243 if (options.parent) |p| break :b p.code_model;243 if (options.parent) |p| break :b p.code_model;
244 break :b .default;244 break :b .default;
src/Sema.zig+228-228
...@@ -135,7 +135,7 @@ allow_memoize: bool = true,...@@ -135,7 +135,7 @@ allow_memoize: bool = true,
135135
136/// The `BranchHint` for the current branch of runtime control flow.136/// The `BranchHint` for the current branch of runtime control flow.
137/// This state is on `Sema` so that `cold` hints can be propagated up through blocks with less special handling.137/// This state is on `Sema` so that `cold` hints can be propagated up through blocks with less special handling.
138branch_hint: ?std.builtin.BranchHint = null,138branch_hint: ?std.lang.BranchHint = null,
139139
140const RuntimeIndex = enum(u32) {140const RuntimeIndex = enum(u32) {
141 zero = 0,141 zero = 0,
...@@ -383,7 +383,7 @@ pub const Block = struct {...@@ -383,7 +383,7 @@ pub const Block = struct {
383 want_safety: ?bool = null,383 want_safety: ?bool = null,
384384
385 /// What mode to generate float operations in, set by @setFloatMode385 /// What mode to generate float operations in, set by @setFloatMode
386 float_mode: std.builtin.FloatMode = .strict,386 float_mode: std.lang.FloatMode = .strict,
387387
388 /// If not `null`, this boolean is set when a `dbg_var_ptr`, `dbg_var_val`, or `dbg_arg_inline`.388 /// If not `null`, this boolean is set when a `dbg_var_ptr`, `dbg_var_val`, or `dbg_arg_inline`.
389 /// instruction is emitted. It signals that the innermost lexically389 /// instruction is emitted. It signals that the innermost lexically
...@@ -759,7 +759,7 @@ pub const Block = struct {...@@ -759,7 +759,7 @@ pub const Block = struct {
759 });759 });
760 }760 }
761761
762 fn addReduce(block: *Block, operand: Air.Inst.Ref, operation: std.builtin.ReduceOp) !Air.Inst.Ref {762 fn addReduce(block: *Block, operand: Air.Inst.Ref, operation: std.lang.ReduceOp) !Air.Inst.Ref {
763 const sema = block.sema;763 const sema = block.sema;
764 const zcu = sema.pt.zcu;764 const zcu = sema.pt.zcu;
765 const allow_optimized = switch (sema.typeOf(operand).childType(zcu).zigTypeTag(zcu)) {765 const allow_optimized = switch (sema.typeOf(operand).childType(zcu).zigTypeTag(zcu)) {
...@@ -1023,7 +1023,7 @@ pub fn deinit(sema: *Sema) void {...@@ -1023,7 +1023,7 @@ pub fn deinit(sema: *Sema) void {
1023/// control flow happens here, Sema will convert it to runtime control flow by introducing post-hoc1023/// control flow happens here, Sema will convert it to runtime control flow by introducing post-hoc
1024/// blocks where necessary.1024/// blocks where necessary.
1025/// Returns the branch hint for this branch.1025/// Returns the branch hint for this branch.
1026fn analyzeBodyRuntimeBreak(sema: *Sema, block: *Block, body: []const Zir.Inst.Index) !std.builtin.BranchHint {1026fn analyzeBodyRuntimeBreak(sema: *Sema, block: *Block, body: []const Zir.Inst.Index) !std.lang.BranchHint {
1027 const parent_hint = sema.branch_hint;1027 const parent_hint = sema.branch_hint;
1028 defer sema.branch_hint = parent_hint;1028 defer sema.branch_hint = parent_hint;
1029 sema.branch_hint = null;1029 sema.branch_hint = null;
...@@ -1473,7 +1473,7 @@ fn analyzeBodyInner(...@@ -1473,7 +1473,7 @@ fn analyzeBodyInner(
1473 },1473 },
1474 .value_placeholder => unreachable, // never appears in a body1474 .value_placeholder => unreachable, // never appears in a body
1475 .field_parent_ptr => try sema.zirFieldParentPtr(block, extended),1475 .field_parent_ptr => try sema.zirFieldParentPtr(block, extended),
1476 .builtin_value => try sema.zirBuiltinValue(block, extended),1476 .std_lang_value => try sema.zirStdLangValue(block, extended),
1477 .inplace_arith_result_ty => try sema.zirInplaceArithResultTy(extended),1477 .inplace_arith_result_ty => try sema.zirInplaceArithResultTy(extended),
1478 .dbg_empty_stmt => {1478 .dbg_empty_stmt => {
1479 try sema.zirDbgEmptyStmt(block, inst);1479 try sema.zirDbgEmptyStmt(block, inst);
...@@ -2225,7 +2225,7 @@ pub fn setupErrorReturnTrace(sema: *Sema, block: *Block, last_arg_index: usize)...@@ -2225,7 +2225,7 @@ pub fn setupErrorReturnTrace(sema: *Sema, block: *Block, last_arg_index: usize)
2225 const addrs_ptr = try err_trace_block.addTy(.alloc, try pt.singleMutPtrType(addr_arr_ty));2225 const addrs_ptr = try err_trace_block.addTy(.alloc, try pt.singleMutPtrType(addr_arr_ty));
22262226
2227 // var st: StackTrace = undefined;2227 // var st: StackTrace = undefined;
2228 const stack_trace_ty = try sema.getBuiltinType(block.nodeOffset(.zero), .StackTrace);2228 const stack_trace_ty = try sema.getStdLangType(block.nodeOffset(.zero), .StackTrace);
2229 const st_ptr = try err_trace_block.addTy(.alloc, try pt.singleMutPtrType(stack_trace_ty));2229 const st_ptr = try err_trace_block.addTy(.alloc, try pt.singleMutPtrType(stack_trace_ty));
22302230
2231 // st.instruction_addresses = &addrs;2231 // st.instruction_addresses = &addrs;
...@@ -2804,11 +2804,11 @@ fn analyzeValueAsCallconv(...@@ -2804,11 +2804,11 @@ fn analyzeValueAsCallconv(
2804 block: *Block,2804 block: *Block,
2805 src: LazySrcLoc,2805 src: LazySrcLoc,
2806 val: Value,2806 val: Value,
2807) !std.builtin.CallingConvention {2807) !std.lang.CallingConvention {
2808 return interpretBuiltinType(sema, block, src, val, std.builtin.CallingConvention);2808 return interpretStdLangType(sema, block, src, val, std.lang.CallingConvention);
2809}2809}
28102810
2811fn interpretBuiltinType(2811fn interpretStdLangType(
2812 sema: *Sema,2812 sema: *Sema,
2813 block: *Block,2813 block: *Block,
2814 src: LazySrcLoc,2814 src: LazySrcLoc,
...@@ -2818,7 +2818,7 @@ fn interpretBuiltinType(...@@ -2818,7 +2818,7 @@ fn interpretBuiltinType(
2818 return val.interpret(T, sema.pt) catch |err| switch (err) {2818 return val.interpret(T, sema.pt) catch |err| switch (err) {
2819 error.OutOfMemory => |e| return e,2819 error.OutOfMemory => |e| return e,
2820 error.UndefinedValue => return sema.failWithUseOfUndef(block, src, null),2820 error.UndefinedValue => return sema.failWithUseOfUndef(block, src, null),
2821 error.TypeMismatch => @panic("std.builtin is corrupt"),2821 error.TypeMismatch => @panic("std.lang is corrupt"),
2822 };2822 };
2823}2823}
28242824
...@@ -5074,7 +5074,7 @@ fn zirPanic(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!void...@@ -5074,7 +5074,7 @@ fn zirPanic(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!void
5074 }5074 }
50755075
5076 try sema.ensureMemoizedStateResolved(src, .panic);5076 try sema.ensureMemoizedStateResolved(src, .panic);
5077 const panic_fn_index = zcu.builtin_decl_values.get(.@"panic.call");5077 const panic_fn_index = zcu.std_lang_decl_values.get(.@"panic.call");
5078 const opt_usize_ty = try pt.optionalType(.usize_type);5078 const opt_usize_ty = try pt.optionalType(.usize_type);
5079 const null_ret_addr = Air.internedToRef((try pt.intern(.{ .opt = .{5079 const null_ret_addr = Air.internedToRef((try pt.intern(.{ .opt = .{
5080 .ty = opt_usize_ty.toIntern(),5080 .ty = opt_usize_ty.toIntern(),
...@@ -5692,7 +5692,7 @@ fn zirDisableIntrinsics(sema: *Sema) CompileError!void {...@@ -5692,7 +5692,7 @@ fn zirDisableIntrinsics(sema: *Sema) CompileError!void {
5692fn zirSetFloatMode(sema: *Sema, block: *Block, extended: Zir.Inst.Extended.InstData) CompileError!void {5692fn zirSetFloatMode(sema: *Sema, block: *Block, extended: Zir.Inst.Extended.InstData) CompileError!void {
5693 const extra = sema.code.extraData(Zir.Inst.UnNode, extended.operand).data;5693 const extra = sema.code.extraData(Zir.Inst.UnNode, extended.operand).data;
5694 const src = block.builtinCallArgSrc(extra.node, 0);5694 const src = block.builtinCallArgSrc(extra.node, 0);
5695 block.float_mode = try sema.resolveBuiltinEnum(block, src, extra.operand, .FloatMode, .{ .simple = .operand_setFloatMode });5695 block.float_mode = try sema.resolveStdLangEnum(block, src, extra.operand, .FloatMode, .{ .simple = .operand_setFloatMode });
5696}5696}
56975697
5698fn zirSetRuntimeSafety(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!void {5698fn zirSetRuntimeSafety(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!void {
...@@ -6008,10 +6008,10 @@ pub fn analyzeSaveErrRetIndex(sema: *Sema, block: *Block) SemaError!Air.Inst.Ref...@@ -6008,10 +6008,10 @@ pub fn analyzeSaveErrRetIndex(sema: *Sema, block: *Block) SemaError!Air.Inst.Ref
60086008
6009 if (!block.ownerModule().error_tracing) return .none;6009 if (!block.ownerModule().error_tracing) return .none;
60106010
6011 const stack_trace_ty = try sema.getBuiltinType(block.nodeOffset(.zero), .StackTrace);6011 const stack_trace_ty = try sema.getStdLangType(block.nodeOffset(.zero), .StackTrace);
6012 const field_name = try zcu.intern_pool.getOrPutString(gpa, io, pt.tid, "index", .no_embedded_nulls);6012 const field_name = try zcu.intern_pool.getOrPutString(gpa, io, pt.tid, "index", .no_embedded_nulls);
6013 const field_index = sema.structFieldIndex(block, stack_trace_ty, field_name, LazySrcLoc.unneeded) catch |err| switch (err) {6013 const field_index = sema.structFieldIndex(block, stack_trace_ty, field_name, LazySrcLoc.unneeded) catch |err| switch (err) {
6014 error.AnalysisFail => @panic("std.builtin.StackTrace is corrupt"),6014 error.AnalysisFail => @panic("std.lang.StackTrace is corrupt"),
6015 error.ComptimeReturn, error.ComptimeBreak => unreachable,6015 error.ComptimeReturn, error.ComptimeBreak => unreachable,
6016 error.OutOfMemory, error.Canceled => |e| return e,6016 error.OutOfMemory, error.Canceled => |e| return e,
6017 };6017 };
...@@ -6051,7 +6051,7 @@ fn popErrorReturnTrace(...@@ -6051,7 +6051,7 @@ fn popErrorReturnTrace(
6051 // AstGen determined this result does not go to an error-handling expr (try/catch/return etc.), or6051 // AstGen determined this result does not go to an error-handling expr (try/catch/return etc.), or
6052 // the result is comptime-known to be a non-error. Either way, pop unconditionally.6052 // the result is comptime-known to be a non-error. Either way, pop unconditionally.
60536053
6054 const stack_trace_ty = try sema.getBuiltinType(src, .StackTrace);6054 const stack_trace_ty = try sema.getStdLangType(src, .StackTrace);
6055 const ptr_stack_trace_ty = try pt.singleMutPtrType(stack_trace_ty);6055 const ptr_stack_trace_ty = try pt.singleMutPtrType(stack_trace_ty);
6056 const err_return_trace = try block.addTy(.err_return_trace, ptr_stack_trace_ty);6056 const err_return_trace = try block.addTy(.err_return_trace, ptr_stack_trace_ty);
6057 const field_name = try zcu.intern_pool.getOrPutString(gpa, io, pt.tid, "index", .no_embedded_nulls);6057 const field_name = try zcu.intern_pool.getOrPutString(gpa, io, pt.tid, "index", .no_embedded_nulls);
...@@ -6076,7 +6076,7 @@ fn popErrorReturnTrace(...@@ -6076,7 +6076,7 @@ fn popErrorReturnTrace(
6076 defer then_block.instructions.deinit(gpa);6076 defer then_block.instructions.deinit(gpa);
60776077
6078 // If non-error, then pop the error return trace by restoring the index.6078 // If non-error, then pop the error return trace by restoring the index.
6079 const stack_trace_ty = try sema.getBuiltinType(src, .StackTrace);6079 const stack_trace_ty = try sema.getStdLangType(src, .StackTrace);
6080 const ptr_stack_trace_ty = try pt.singleMutPtrType(stack_trace_ty);6080 const ptr_stack_trace_ty = try pt.singleMutPtrType(stack_trace_ty);
6081 const err_return_trace = try then_block.addTy(.err_return_trace, ptr_stack_trace_ty);6081 const err_return_trace = try then_block.addTy(.err_return_trace, ptr_stack_trace_ty);
6082 const field_name = try zcu.intern_pool.getOrPutString(gpa, io, pt.tid, "index", .no_embedded_nulls);6082 const field_name = try zcu.intern_pool.getOrPutString(gpa, io, pt.tid, "index", .no_embedded_nulls);
...@@ -6147,7 +6147,7 @@ fn zirCall(...@@ -6147,7 +6147,7 @@ fn zirCall(
6147 const extra = sema.code.extraData(ExtraType, inst_data.payload_index);6147 const extra = sema.code.extraData(ExtraType, inst_data.payload_index);
6148 const args_len = extra.data.flags.args_len;6148 const args_len = extra.data.flags.args_len;
61496149
6150 const modifier: std.builtin.CallModifier = @enumFromInt(extra.data.flags.packed_modifier);6150 const modifier: std.lang.CallModifier = @enumFromInt(extra.data.flags.packed_modifier);
6151 const ensure_result_used = extra.data.flags.ensure_result_used;6151 const ensure_result_used = extra.data.flags.ensure_result_used;
6152 const pop_error_return_trace = extra.data.flags.pop_error_return_trace;6152 const pop_error_return_trace = extra.data.flags.pop_error_return_trace;
61536153
...@@ -6215,7 +6215,7 @@ fn zirCall(...@@ -6215,7 +6215,7 @@ fn zirCall(
6215 // If any input is an error-type, we might need to pop any trace it generated. Otherwise, we only6215 // If any input is an error-type, we might need to pop any trace it generated. Otherwise, we only
6216 // need to clean-up our own trace if we were passed to a non-error-handling expression.6216 // need to clean-up our own trace if we were passed to a non-error-handling expression.
6217 if (input_is_error or (pop_error_return_trace and return_ty.isError(zcu))) {6217 if (input_is_error or (pop_error_return_trace and return_ty.isError(zcu))) {
6218 const stack_trace_ty = try sema.getBuiltinType(call_src, .StackTrace);6218 const stack_trace_ty = try sema.getStdLangType(call_src, .StackTrace);
6219 const field_name = try zcu.intern_pool.getOrPutString(gpa, io, pt.tid, "index", .no_embedded_nulls);6219 const field_name = try zcu.intern_pool.getOrPutString(gpa, io, pt.tid, "index", .no_embedded_nulls);
6220 const field_index = try sema.structFieldIndex(block, stack_trace_ty, field_name, call_src);6220 const field_index = try sema.structFieldIndex(block, stack_trace_ty, field_name, call_src);
62216221
...@@ -6322,7 +6322,7 @@ fn callBuiltin(...@@ -6322,7 +6322,7 @@ fn callBuiltin(
6322 block: *Block,6322 block: *Block,
6323 call_src: LazySrcLoc,6323 call_src: LazySrcLoc,
6324 builtin_fn: Air.Inst.Ref,6324 builtin_fn: Air.Inst.Ref,
6325 modifier: std.builtin.CallModifier,6325 modifier: std.lang.CallModifier,
6326 args: []const Air.Inst.Ref,6326 args: []const Air.Inst.Ref,
6327 operation: CallOperation,6327 operation: CallOperation,
6328) !void {6328) !void {
...@@ -6543,7 +6543,7 @@ fn analyzeCall(...@@ -6543,7 +6543,7 @@ fn analyzeCall(
6543 func_ty: Type,6543 func_ty: Type,
6544 func_src: LazySrcLoc,6544 func_src: LazySrcLoc,
6545 call_src: LazySrcLoc,6545 call_src: LazySrcLoc,
6546 modifier: std.builtin.CallModifier,6546 modifier: std.lang.CallModifier,
6547 ensure_result_used: bool,6547 ensure_result_used: bool,
6548 args_info: CallArgsInfo,6548 args_info: CallArgsInfo,
6549 call_dbg_node: ?Zir.Inst.Index,6549 call_dbg_node: ?Zir.Inst.Index,
...@@ -8367,7 +8367,7 @@ fn zirFunc(...@@ -8367,7 +8367,7 @@ fn zirFunc(
8367 // If this instruction has a body, then it's a function declaration, and we decide8367 // If this instruction has a body, then it's a function declaration, and we decide
8368 // the callconv based on whether it is exported. Otherwise, the callconv defaults8368 // the callconv based on whether it is exported. Otherwise, the callconv defaults
8369 // to `.auto`.8369 // to `.auto`.
8370 const cc: std.builtin.CallingConvention = if (has_body) cc: {8370 const cc: std.lang.CallingConvention = if (has_body) cc: {
8371 const func_decl_nav = sema.owner.unwrap().nav_val;8371 const func_decl_nav = sema.owner.unwrap().nav_val;
8372 const fn_is_exported = exported: {8372 const fn_is_exported = exported: {
8373 const decl_inst = ip.getNav(func_decl_nav).analysis.?.zir_index.resolve(ip) orelse return error.AnalysisFail;8373 const decl_inst = ip.getNav(func_decl_nav).analysis.?.zir_index.resolve(ip) orelse return error.AnalysisFail;
...@@ -8377,10 +8377,10 @@ fn zirFunc(...@@ -8377,10 +8377,10 @@ fn zirFunc(
8377 if (fn_is_exported) {8377 if (fn_is_exported) {
8378 break :cc target.cCallingConvention() orelse {8378 break :cc target.cCallingConvention() orelse {
8379 // This target has no default C calling convention. We sometimes trigger a similar8379 // This target has no default C calling convention. We sometimes trigger a similar
8380 // error by trying to evaluate `std.builtin.CallingConvention.c`, so for consistency,8380 // error by trying to evaluate `std.lang.CallingConvention.c`, so for consistency,
8381 // let's eval that now and just get the transitive error. (It's guaranteed to error8381 // let's eval that now and just get the transitive error. (It's guaranteed to error
8382 // because it does the exact `cCallingConvention` call we just did.)8382 // because it does the exact `cCallingConvention` call we just did.)
8383 const cc_type = try sema.getBuiltinType(src, .CallingConvention);8383 const cc_type = try sema.getStdLangType(src, .CallingConvention);
8384 _ = try sema.namespaceLookupVal(8384 _ = try sema.namespaceLookupVal(
8385 block,8385 block,
8386 LazySrcLoc.unneeded,8386 LazySrcLoc.unneeded,
...@@ -8388,7 +8388,7 @@ fn zirFunc(...@@ -8388,7 +8388,7 @@ fn zirFunc(
8388 try ip.getOrPutString(gpa, io, pt.tid, "c", .no_embedded_nulls),8388 try ip.getOrPutString(gpa, io, pt.tid, "c", .no_embedded_nulls),
8389 );8389 );
8390 // The above should have errored.8390 // The above should have errored.
8391 @panic("std.builtin is corrupt");8391 @panic("std.lang is corrupt");
8392 };8392 };
8393 } else {8393 } else {
8394 break :cc .auto;8394 break :cc .auto;
...@@ -8509,7 +8509,7 @@ pub fn handleExternLibName(...@@ -8509,7 +8509,7 @@ pub fn handleExternLibName(
8509/// These are calling conventions that are confirmed to work with variadic functions.8509/// These are calling conventions that are confirmed to work with variadic functions.
8510/// Any calling conventions not included here are either not yet verified to work with variadic8510/// Any calling conventions not included here are either not yet verified to work with variadic
8511/// functions or there are no more other calling conventions that support variadic functions.8511/// functions or there are no more other calling conventions that support variadic functions.
8512const calling_conventions_supporting_var_args = [_]std.builtin.CallingConvention.Tag{8512const calling_conventions_supporting_var_args = [_]std.lang.CallingConvention.Tag{
8513 .x86_16_cdecl,8513 .x86_16_cdecl,
8514 .x86_64_sysv,8514 .x86_64_sysv,
8515 .x86_64_x32,8515 .x86_64_x32,
...@@ -8570,12 +8570,12 @@ const calling_conventions_supporting_var_args = [_]std.builtin.CallingConvention...@@ -8570,12 +8570,12 @@ const calling_conventions_supporting_var_args = [_]std.builtin.CallingConvention
8570 .xtensa_call0,8570 .xtensa_call0,
8571 .xtensa_windowed,8571 .xtensa_windowed,
8572};8572};
8573fn callConvSupportsVarArgs(cc: std.builtin.CallingConvention.Tag) bool {8573fn callConvSupportsVarArgs(cc: std.lang.CallingConvention.Tag) bool {
8574 return for (calling_conventions_supporting_var_args) |supported_cc| {8574 return for (calling_conventions_supporting_var_args) |supported_cc| {
8575 if (cc == supported_cc) return true;8575 if (cc == supported_cc) return true;
8576 } else false;8576 } else false;
8577}8577}
8578fn checkCallConvSupportsVarArgs(sema: *Sema, block: *Block, src: LazySrcLoc, cc: std.builtin.CallingConvention.Tag) CompileError!void {8578fn checkCallConvSupportsVarArgs(sema: *Sema, block: *Block, src: LazySrcLoc, cc: std.lang.CallingConvention.Tag) CompileError!void {
8579 const CallingConventionsSupportingVarArgsList = struct {8579 const CallingConventionsSupportingVarArgsList = struct {
8580 arch: std.Target.Cpu.Arch,8580 arch: std.Target.Cpu.Arch,
8581 pub fn format(ctx: @This(), w: *std.Io.Writer) std.Io.Writer.Error!void {8581 pub fn format(ctx: @This(), w: *std.Io.Writer) std.Io.Writer.Error!void {
...@@ -8612,7 +8612,7 @@ fn checkParamType(...@@ -8612,7 +8612,7 @@ fn checkParamType(
8612 param_is_comptime: bool,8612 param_is_comptime: bool,
8613 param_is_noalias: bool,8613 param_is_noalias: bool,
8614 param_src: LazySrcLoc,8614 param_src: LazySrcLoc,
8615 cc: std.builtin.CallingConvention,8615 cc: std.lang.CallingConvention,
8616) CompileError!void {8616) CompileError!void {
8617 const pt = sema.pt;8617 const pt = sema.pt;
8618 const zcu = pt.zcu;8618 const zcu = pt.zcu;
...@@ -8668,7 +8668,7 @@ fn checkReturnTypeAndCallConv(...@@ -8668,7 +8668,7 @@ fn checkReturnTypeAndCallConv(
8668 block: *Block,8668 block: *Block,
8669 bare_ret_ty: Type,8669 bare_ret_ty: Type,
8670 ret_ty_src: LazySrcLoc,8670 ret_ty_src: LazySrcLoc,
8671 @"callconv": std.builtin.CallingConvention,8671 @"callconv": std.lang.CallingConvention,
8672 callconv_src: LazySrcLoc,8672 callconv_src: LazySrcLoc,
8673 /// non-`null` only if the function is varargs.8673 /// non-`null` only if the function is varargs.
8674 opt_varargs_src: ?LazySrcLoc,8674 opt_varargs_src: ?LazySrcLoc,
...@@ -8772,7 +8772,7 @@ fn checkReturnTypeAndCallConv(...@@ -8772,7 +8772,7 @@ fn checkReturnTypeAndCallConv(
8772fn validateResolvedFuncType(8772fn validateResolvedFuncType(
8773 sema: *Sema,8773 sema: *Sema,
8774 block: *Block,8774 block: *Block,
8775 @"callconv": std.builtin.CallingConvention,8775 @"callconv": std.lang.CallingConvention,
8776 param_types: []const InternPool.Index,8776 param_types: []const InternPool.Index,
8777 ret_ty: Type,8777 ret_ty: Type,
8778 src: LazySrcLoc,8778 src: LazySrcLoc,
...@@ -8823,7 +8823,7 @@ fn validateResolvedFuncType(...@@ -8823,7 +8823,7 @@ fn validateResolvedFuncType(
8823 }8823 }
8824}8824}
88258825
8826fn callConvIsCallable(cc: std.builtin.CallingConvention.Tag) bool {8826fn callConvIsCallable(cc: std.lang.CallingConvention.Tag) bool {
8827 return switch (cc) {8827 return switch (cc) {
8828 .naked,8828 .naked,
88298829
...@@ -8898,7 +8898,7 @@ fn funcCommon(...@@ -8898,7 +8898,7 @@ fn funcCommon(
8898 block: *Block,8898 block: *Block,
8899 src_node_offset: std.zig.Ast.Node.Offset,8899 src_node_offset: std.zig.Ast.Node.Offset,
8900 func_inst: Zir.Inst.Index,8900 func_inst: Zir.Inst.Index,
8901 cc: std.builtin.CallingConvention,8901 cc: std.lang.CallingConvention,
8902 /// this might be Type.generic_poison8902 /// this might be Type.generic_poison
8903 bare_return_type: Type,8903 bare_return_type: Type,
8904 var_args: bool,8904 var_args: bool,
...@@ -9896,7 +9896,7 @@ fn zirSwitchBlockErrUnion(sema: *Sema, block: *Block, inst: Zir.Inst.Index) Comp...@@ -9896,7 +9896,7 @@ fn zirSwitchBlockErrUnion(sema: *Sema, block: *Block, inst: Zir.Inst.Index) Comp
9896 else9896 else
9897 try sema.analyzeIsNonErr(block, operand_src, eu_maybe_ptr);9897 try sema.analyzeIsNonErr(block, operand_src, eu_maybe_ptr);
98989898
9899 const non_err_hint: std.builtin.BranchHint = hint: {9899 const non_err_hint: std.lang.BranchHint = hint: {
9900 // don't analyze the non-error body if it's unreachable9900 // don't analyze the non-error body if it's unreachable
9901 if (non_err_cond == .bool_false) {9901 if (non_err_cond == .bool_false) {
9902 break :hint undefined;9902 break :hint undefined;
...@@ -10488,14 +10488,14 @@ fn finishSwitchBr(...@@ -10488,14 +10488,14 @@ fn finishSwitchBr(
10488 const bags_required = std.math.divCeil(u32, hints.count + additional_count, hints_per_bag) catch unreachable;10488 const bags_required = std.math.divCeil(u32, hints.count + additional_count, hints_per_bag) catch unreachable;
10489 return hints.bags.ensureUnusedCapacity(gpa_inner, bags_required);10489 return hints.bags.ensureUnusedCapacity(gpa_inner, bags_required);
10490 }10490 }
10491 fn appendAssumeCapacity(hints: *@This(), hint: std.builtin.BranchHint) void {10491 fn appendAssumeCapacity(hints: *@This(), hint: std.lang.BranchHint) void {
10492 const idx_in_bag = hints.count % hints_per_bag;10492 const idx_in_bag = hints.count % hints_per_bag;
10493 var bag: u32 = if (idx_in_bag > 0) hints.bags.pop().? else 0;10493 var bag: u32 = if (idx_in_bag > 0) hints.bags.pop().? else 0;
10494 bag |= @as(u32, @intFromEnum(hint)) << @intCast(@bitSizeOf(std.builtin.BranchHint) * idx_in_bag);10494 bag |= @as(u32, @intFromEnum(hint)) << @intCast(@bitSizeOf(std.lang.BranchHint) * idx_in_bag);
10495 hints.count += 1;10495 hints.count += 1;
10496 return hints.bags.appendAssumeCapacity(bag);10496 return hints.bags.appendAssumeCapacity(bag);
10497 }10497 }
10498 fn append(hints: *@This(), gpa_inner: Allocator, hint: std.builtin.BranchHint) Allocator.Error!void {10498 fn append(hints: *@This(), gpa_inner: Allocator, hint: std.lang.BranchHint) Allocator.Error!void {
10499 try hints.ensureUnusedCapacity(gpa_inner, 1);10499 try hints.ensureUnusedCapacity(gpa_inner, 1);
10500 return hints.appendAssumeCapacity(hint);10500 return hints.appendAssumeCapacity(hint);
10501 }10501 }
...@@ -10574,7 +10574,7 @@ fn finishSwitchBr(...@@ -10574,7 +10574,7 @@ fn finishSwitchBr(
10574 }10574 }
10575 emit_bb = true;10575 emit_bb = true;
1057610576
10577 const prong_hint: std.builtin.BranchHint = hint: {10577 const prong_hint: std.lang.BranchHint = hint: {
10578 if (analyze_body) break :hint try sema.analyzeSwitchProng(10578 if (analyze_body) break :hint try sema.analyzeSwitchProng(
10579 &case_block,10579 &case_block,
10580 operand,10580 operand,
...@@ -10717,7 +10717,7 @@ fn finishSwitchBr(...@@ -10717,7 +10717,7 @@ fn finishSwitchBr(
10717 case_block.instructions.clearRetainingCapacity();10717 case_block.instructions.clearRetainingCapacity();
10718 case_block.error_return_trace_index = child_block.error_return_trace_index;10718 case_block.error_return_trace_index = child_block.error_return_trace_index;
1071910719
10720 const prong_hint: std.builtin.BranchHint = hint: {10720 const prong_hint: std.lang.BranchHint = hint: {
10721 if (any_analyze_body) break :hint try sema.analyzeSwitchProng(10721 if (any_analyze_body) break :hint try sema.analyzeSwitchProng(
10722 &case_block,10722 &case_block,
10723 operand,10723 operand,
...@@ -10804,7 +10804,7 @@ fn finishSwitchBr(...@@ -10804,7 +10804,7 @@ fn finishSwitchBr(
10804 if (emit_bb) try sema.emitBackwardBranch(block, else_prong_src);10804 if (emit_bb) try sema.emitBackwardBranch(block, else_prong_src);
10805 emit_bb = true;10805 emit_bb = true;
1080610806
10807 const prong_hint: std.builtin.BranchHint = hint: {10807 const prong_hint: std.lang.BranchHint = hint: {
10808 if (analyze_body) break :hint try sema.analyzeSwitchProng(10808 if (analyze_body) break :hint try sema.analyzeSwitchProng(
10809 &case_block,10809 &case_block,
10810 operand,10810 operand,
...@@ -10864,7 +10864,7 @@ fn finishSwitchBr(...@@ -10864,7 +10864,7 @@ fn finishSwitchBr(
1086410864
10865 cases_len += 1;10865 cases_len += 1;
1086610866
10867 const prong_hint: std.builtin.BranchHint = hint: {10867 const prong_hint: std.lang.BranchHint = hint: {
10868 if (!else_case.is_inline) break :hint try sema.analyzeSwitchProng(10868 if (!else_case.is_inline) break :hint try sema.analyzeSwitchProng(
10869 &case_block,10869 &case_block,
10870 operand,10870 operand,
...@@ -11937,7 +11937,7 @@ fn analyzeSwitchProng(...@@ -11937,7 +11937,7 @@ fn analyzeSwitchProng(
11937 else_err_ty: ?Type,11937 else_err_ty: ?Type,
11938 switch_inst: Zir.Inst.Index,11938 switch_inst: Zir.Inst.Index,
11939 zir_switch: *const Zir.UnwrappedSwitchBlock,11939 zir_switch: *const Zir.UnwrappedSwitchBlock,
11940) CompileError!std.builtin.BranchHint {11940) CompileError!std.lang.BranchHint {
11941 const pt = sema.pt;11941 const pt = sema.pt;
11942 const zcu = pt.zcu;11942 const zcu = pt.zcu;
1194311943
...@@ -12328,7 +12328,7 @@ fn analyzeSwitchPayloadCapture(...@@ -12328,7 +12328,7 @@ fn analyzeSwitchPayloadCapture(
1232812328
12329 {12329 {
12330 // All branch hints are `.none`, so just add zero elems.12330 // All branch hints are `.none`, so just add zero elems.
12331 comptime assert(@intFromEnum(std.builtin.BranchHint.none) == 0);12331 comptime assert(@intFromEnum(std.lang.BranchHint.none) == 0);
12332 const need_elems = std.math.divCeil(usize, prong_count + 1, 10) catch unreachable;12332 const need_elems = std.math.divCeil(usize, prong_count + 1, 10) catch unreachable;
12333 try cases_extra.appendNTimes(0, need_elems);12333 try cases_extra.appendNTimes(0, need_elems);
12334 }12334 }
...@@ -12711,7 +12711,7 @@ fn maybeErrorUnwrap(...@@ -12711,7 +12711,7 @@ fn maybeErrorUnwrap(
12711 const inst_data = sema.code.instructions.items(.data)[@intFromEnum(inst)].un_node;12711 const inst_data = sema.code.instructions.items(.data)[@intFromEnum(inst)].un_node;
12712 const msg_inst = sema.resolveInst(inst_data.operand);12712 const msg_inst = sema.resolveInst(inst_data.operand);
1271312713
12714 const panic_fn = try getBuiltin(sema, operand_src, .@"panic.call");12714 const panic_fn = try getStdLangValue(sema, operand_src, .@"panic.call");
12715 const args: [2]Air.Inst.Ref = .{ msg_inst, .null_value };12715 const args: [2]Air.Inst.Ref = .{ msg_inst, .null_value };
12716 try sema.callBuiltin(block, operand_src, Air.internedToRef(panic_fn), .auto, &args, .@"safety check");12716 try sema.callBuiltin(block, operand_src, Air.internedToRef(panic_fn), .auto, &args, .@"safety check");
12717 return true;12717 return true;
...@@ -15319,7 +15319,7 @@ fn zirAsm(...@@ -15319,7 +15319,7 @@ fn zirAsm(
15319 }15319 }
1532015320
15321 const clobbers_src = block.src(.{ .asm_clobbers = src.offset.node_offset.x });15321 const clobbers_src = block.src(.{ .asm_clobbers = src.offset.node_offset.x });
15322 const clobbers_ty = try sema.getBuiltinType(src, .@"assembly.Clobbers");15322 const clobbers_ty = try sema.getStdLangType(src, .@"assembly.Clobbers");
15323 const clobbers = if (extra.data.clobbers == .none) empty: {15323 const clobbers = if (extra.data.clobbers == .none) empty: {
15324 break :empty try sema.structInitEmpty(block, clobbers_ty, src, src);15324 break :empty try sema.structInitEmpty(block, clobbers_ty, src, src);
15325 } else clobbers: {15325 } else clobbers: {
...@@ -15930,7 +15930,7 @@ fn zirBuiltinSrc(...@@ -15930,7 +15930,7 @@ fn zirBuiltinSrc(
15930 } });15930 } });
15931 };15931 };
1593215932
15933 const src_loc_ty = try sema.getBuiltinType(block.nodeOffset(.zero), .SourceLocation);15933 const src_loc_ty = try sema.getStdLangType(block.nodeOffset(.zero), .SourceLocation);
15934 const fields = .{15934 const fields = .{
15935 // module: [:0]const u8,15935 // module: [:0]const u8,
15936 module_name_val,15936 module_name_val,
...@@ -15957,7 +15957,7 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai...@@ -15957,7 +15957,7 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
15957 const inst_data = sema.code.instructions.items(.data)[@intFromEnum(inst)].un_node;15957 const inst_data = sema.code.instructions.items(.data)[@intFromEnum(inst)].un_node;
15958 const src = block.nodeOffset(inst_data.src_node);15958 const src = block.nodeOffset(inst_data.src_node);
15959 const ty = try sema.resolveType(block, src, inst_data.operand);15959 const ty = try sema.resolveType(block, src, inst_data.operand);
15960 const type_info_ty = try sema.getBuiltinType(src, .Type);15960 const type_info_ty = try sema.getStdLangType(src, .Type);
15961 const type_info_tag_ty = type_info_ty.unionTagType(zcu).?;15961 const type_info_tag_ty = type_info_ty.unionTagType(zcu).?;
1596215962
15963 try sema.ensureLayoutResolved(ty, src, .type_info);15963 try sema.ensureLayoutResolved(ty, src, .type_info);
...@@ -15979,15 +15979,15 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai...@@ -15979,15 +15979,15 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
15979 => |type_info_tag| return .fromValue(try pt.unionValue(15979 => |type_info_tag| return .fromValue(try pt.unionValue(
15980 type_info_ty,15980 type_info_ty,
15981 Value.uninterpret(type_info_tag, type_info_tag_ty, pt) catch |err| switch (err) {15981 Value.uninterpret(type_info_tag, type_info_tag_ty, pt) catch |err| switch (err) {
15982 error.TypeMismatch => @panic("std.builtin is corrupt"),15982 error.TypeMismatch => @panic("std.lang is corrupt"),
15983 error.OutOfMemory => |e| return e,15983 error.OutOfMemory => |e| return e,
15984 },15984 },
15985 .void,15985 .void,
15986 )),15986 )),
1598715987
15988 .@"fn" => {15988 .@"fn" => {
15989 const fn_info_ty = try sema.getBuiltinType(src, .@"Type.Fn");15989 const fn_info_ty = try sema.getStdLangType(src, .@"Type.Fn");
15990 const param_info_ty = try sema.getBuiltinType(src, .@"Type.Fn.Param");15990 const param_info_ty = try sema.getStdLangType(src, .@"Type.Fn.Param");
1599115991
15992 const func_ty_info = zcu.typeToFunc(ty).?;15992 const func_ty_info = zcu.typeToFunc(ty).?;
15993 const param_vals = try sema.arena.alloc(InternPool.Index, func_ty_info.param_types.len);15993 const param_vals = try sema.arena.alloc(InternPool.Index, func_ty_info.param_types.len);
...@@ -16068,9 +16068,9 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai...@@ -16068,9 +16068,9 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
16068 .val = if (ret_ty_is_generic) .none else func_ty_info.return_type,16068 .val = if (ret_ty_is_generic) .none else func_ty_info.return_type,
16069 } });16069 } });
1607016070
16071 const callconv_ty = try sema.getBuiltinType(src, .CallingConvention);16071 const callconv_ty = try sema.getStdLangType(src, .CallingConvention);
16072 const callconv_val = Value.uninterpret(func_ty_info.cc, callconv_ty, pt) catch |err| switch (err) {16072 const callconv_val = Value.uninterpret(func_ty_info.cc, callconv_ty, pt) catch |err| switch (err) {
16073 error.TypeMismatch => @panic("std.builtin is corrupt"),16073 error.TypeMismatch => @panic("std.lang is corrupt"),
16074 error.OutOfMemory => |e| return e,16074 error.OutOfMemory => |e| return e,
16075 };16075 };
1607616076
...@@ -16088,13 +16088,13 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai...@@ -16088,13 +16088,13 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
16088 };16088 };
16089 return Air.internedToRef((try pt.internUnion(.{16089 return Air.internedToRef((try pt.internUnion(.{
16090 .ty = type_info_ty.toIntern(),16090 .ty = type_info_ty.toIntern(),
16091 .tag = (try pt.enumValueFieldIndex(type_info_tag_ty, @intFromEnum(std.builtin.TypeId.@"fn"))).toIntern(),16091 .tag = (try pt.enumValueFieldIndex(type_info_tag_ty, @intFromEnum(std.lang.TypeId.@"fn"))).toIntern(),
16092 .val = (try pt.aggregateValue(fn_info_ty, &field_values)).toIntern(),16092 .val = (try pt.aggregateValue(fn_info_ty, &field_values)).toIntern(),
16093 })));16093 })));
16094 },16094 },
16095 .int => {16095 .int => {
16096 const int_info_ty = try sema.getBuiltinType(src, .@"Type.Int");16096 const int_info_ty = try sema.getStdLangType(src, .@"Type.Int");
16097 const signedness_ty = try sema.getBuiltinType(src, .Signedness);16097 const signedness_ty = try sema.getStdLangType(src, .Signedness);
16098 const info = ty.intInfo(zcu);16098 const info = ty.intInfo(zcu);
16099 const field_values = .{16099 const field_values = .{
16100 // signedness: Signedness,16100 // signedness: Signedness,
...@@ -16104,12 +16104,12 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai...@@ -16104,12 +16104,12 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
16104 };16104 };
16105 return Air.internedToRef((try pt.internUnion(.{16105 return Air.internedToRef((try pt.internUnion(.{
16106 .ty = type_info_ty.toIntern(),16106 .ty = type_info_ty.toIntern(),
16107 .tag = (try pt.enumValueFieldIndex(type_info_tag_ty, @intFromEnum(std.builtin.TypeId.int))).toIntern(),16107 .tag = (try pt.enumValueFieldIndex(type_info_tag_ty, @intFromEnum(std.lang.TypeId.int))).toIntern(),
16108 .val = (try pt.aggregateValue(int_info_ty, &field_values)).toIntern(),16108 .val = (try pt.aggregateValue(int_info_ty, &field_values)).toIntern(),
16109 })));16109 })));
16110 },16110 },
16111 .float => {16111 .float => {
16112 const float_info_ty = try sema.getBuiltinType(src, .@"Type.Float");16112 const float_info_ty = try sema.getStdLangType(src, .@"Type.Float");
1611316113
16114 const field_vals = .{16114 const field_vals = .{
16115 // bits: u16,16115 // bits: u16,
...@@ -16117,7 +16117,7 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai...@@ -16117,7 +16117,7 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
16117 };16117 };
16118 return Air.internedToRef((try pt.internUnion(.{16118 return Air.internedToRef((try pt.internUnion(.{
16119 .ty = type_info_ty.toIntern(),16119 .ty = type_info_ty.toIntern(),
16120 .tag = (try pt.enumValueFieldIndex(type_info_tag_ty, @intFromEnum(std.builtin.TypeId.float))).toIntern(),16120 .tag = (try pt.enumValueFieldIndex(type_info_tag_ty, @intFromEnum(std.lang.TypeId.float))).toIntern(),
16121 .val = (try pt.aggregateValue(float_info_ty, &field_vals)).toIntern(),16121 .val = (try pt.aggregateValue(float_info_ty, &field_vals)).toIntern(),
16122 })));16122 })));
16123 },16123 },
...@@ -16135,9 +16135,9 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai...@@ -16135,9 +16135,9 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
16135 } }));16135 } }));
16136 };16136 };
1613716137
16138 const addrspace_ty = try sema.getBuiltinType(src, .AddressSpace);16138 const addrspace_ty = try sema.getStdLangType(src, .AddressSpace);
16139 const pointer_ty = try sema.getBuiltinType(src, .@"Type.Pointer");16139 const pointer_ty = try sema.getStdLangType(src, .@"Type.Pointer");
16140 const ptr_size_ty = try sema.getBuiltinType(src, .@"Type.Pointer.Size");16140 const ptr_size_ty = try sema.getStdLangType(src, .@"Type.Pointer.Size");
1614116141
16142 const field_values = .{16142 const field_values = .{
16143 // size: Size,16143 // size: Size,
...@@ -16162,12 +16162,12 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai...@@ -16162,12 +16162,12 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
16162 };16162 };
16163 return Air.internedToRef((try pt.internUnion(.{16163 return Air.internedToRef((try pt.internUnion(.{
16164 .ty = type_info_ty.toIntern(),16164 .ty = type_info_ty.toIntern(),
16165 .tag = (try pt.enumValueFieldIndex(type_info_tag_ty, @intFromEnum(std.builtin.TypeId.pointer))).toIntern(),16165 .tag = (try pt.enumValueFieldIndex(type_info_tag_ty, @intFromEnum(std.lang.TypeId.pointer))).toIntern(),
16166 .val = (try pt.aggregateValue(pointer_ty, &field_values)).toIntern(),16166 .val = (try pt.aggregateValue(pointer_ty, &field_values)).toIntern(),
16167 })));16167 })));
16168 },16168 },
16169 .array => {16169 .array => {
16170 const array_field_ty = try sema.getBuiltinType(src, .@"Type.Array");16170 const array_field_ty = try sema.getStdLangType(src, .@"Type.Array");
1617116171
16172 const info = ty.arrayInfo(zcu);16172 const info = ty.arrayInfo(zcu);
16173 const field_values = .{16173 const field_values = .{
...@@ -16180,12 +16180,12 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai...@@ -16180,12 +16180,12 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
16180 };16180 };
16181 return Air.internedToRef((try pt.internUnion(.{16181 return Air.internedToRef((try pt.internUnion(.{
16182 .ty = type_info_ty.toIntern(),16182 .ty = type_info_ty.toIntern(),
16183 .tag = (try pt.enumValueFieldIndex(type_info_tag_ty, @intFromEnum(std.builtin.TypeId.array))).toIntern(),16183 .tag = (try pt.enumValueFieldIndex(type_info_tag_ty, @intFromEnum(std.lang.TypeId.array))).toIntern(),
16184 .val = (try pt.aggregateValue(array_field_ty, &field_values)).toIntern(),16184 .val = (try pt.aggregateValue(array_field_ty, &field_values)).toIntern(),
16185 })));16185 })));
16186 },16186 },
16187 .vector => {16187 .vector => {
16188 const vector_field_ty = try sema.getBuiltinType(src, .@"Type.Vector");16188 const vector_field_ty = try sema.getStdLangType(src, .@"Type.Vector");
1618916189
16190 const info = ty.arrayInfo(zcu);16190 const info = ty.arrayInfo(zcu);
16191 const field_values = .{16191 const field_values = .{
...@@ -16196,12 +16196,12 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai...@@ -16196,12 +16196,12 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
16196 };16196 };
16197 return Air.internedToRef((try pt.internUnion(.{16197 return Air.internedToRef((try pt.internUnion(.{
16198 .ty = type_info_ty.toIntern(),16198 .ty = type_info_ty.toIntern(),
16199 .tag = (try pt.enumValueFieldIndex(type_info_tag_ty, @intFromEnum(std.builtin.TypeId.vector))).toIntern(),16199 .tag = (try pt.enumValueFieldIndex(type_info_tag_ty, @intFromEnum(std.lang.TypeId.vector))).toIntern(),
16200 .val = (try pt.aggregateValue(vector_field_ty, &field_values)).toIntern(),16200 .val = (try pt.aggregateValue(vector_field_ty, &field_values)).toIntern(),
16201 })));16201 })));
16202 },16202 },
16203 .optional => {16203 .optional => {
16204 const optional_field_ty = try sema.getBuiltinType(src, .@"Type.Optional");16204 const optional_field_ty = try sema.getStdLangType(src, .@"Type.Optional");
1620516205
16206 const field_values = .{16206 const field_values = .{
16207 // child: type,16207 // child: type,
...@@ -16209,13 +16209,13 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai...@@ -16209,13 +16209,13 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
16209 };16209 };
16210 return Air.internedToRef((try pt.internUnion(.{16210 return Air.internedToRef((try pt.internUnion(.{
16211 .ty = type_info_ty.toIntern(),16211 .ty = type_info_ty.toIntern(),
16212 .tag = (try pt.enumValueFieldIndex(type_info_tag_ty, @intFromEnum(std.builtin.TypeId.optional))).toIntern(),16212 .tag = (try pt.enumValueFieldIndex(type_info_tag_ty, @intFromEnum(std.lang.TypeId.optional))).toIntern(),
16213 .val = (try pt.aggregateValue(optional_field_ty, &field_values)).toIntern(),16213 .val = (try pt.aggregateValue(optional_field_ty, &field_values)).toIntern(),
16214 })));16214 })));
16215 },16215 },
16216 .error_set => {16216 .error_set => {
16217 // Get the Error type16217 // Get the Error type
16218 const error_field_ty = try sema.getBuiltinType(src, .@"Type.Error");16218 const error_field_ty = try sema.getStdLangType(src, .@"Type.Error");
1621916219
16220 // Build our list of Error values16220 // Build our list of Error values
16221 // Optional value is only null if anyerror16221 // Optional value is only null if anyerror
...@@ -16300,12 +16300,12 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai...@@ -16300,12 +16300,12 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
16300 // Construct Type{ .error_set = errors_val }16300 // Construct Type{ .error_set = errors_val }
16301 return Air.internedToRef((try pt.internUnion(.{16301 return Air.internedToRef((try pt.internUnion(.{
16302 .ty = type_info_ty.toIntern(),16302 .ty = type_info_ty.toIntern(),
16303 .tag = (try pt.enumValueFieldIndex(type_info_tag_ty, @intFromEnum(std.builtin.TypeId.error_set))).toIntern(),16303 .tag = (try pt.enumValueFieldIndex(type_info_tag_ty, @intFromEnum(std.lang.TypeId.error_set))).toIntern(),
16304 .val = errors_val,16304 .val = errors_val,
16305 })));16305 })));
16306 },16306 },
16307 .error_union => {16307 .error_union => {
16308 const error_union_field_ty = try sema.getBuiltinType(src, .@"Type.ErrorUnion");16308 const error_union_field_ty = try sema.getStdLangType(src, .@"Type.ErrorUnion");
1630916309
16310 const field_values = .{16310 const field_values = .{
16311 // error_set: type,16311 // error_set: type,
...@@ -16315,7 +16315,7 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai...@@ -16315,7 +16315,7 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
16315 };16315 };
16316 return Air.internedToRef((try pt.internUnion(.{16316 return Air.internedToRef((try pt.internUnion(.{
16317 .ty = type_info_ty.toIntern(),16317 .ty = type_info_ty.toIntern(),
16318 .tag = (try pt.enumValueFieldIndex(type_info_tag_ty, @intFromEnum(std.builtin.TypeId.error_union))).toIntern(),16318 .tag = (try pt.enumValueFieldIndex(type_info_tag_ty, @intFromEnum(std.lang.TypeId.error_union))).toIntern(),
16319 .val = (try pt.aggregateValue(error_union_field_ty, &field_values)).toIntern(),16319 .val = (try pt.aggregateValue(error_union_field_ty, &field_values)).toIntern(),
16320 })));16320 })));
16321 },16321 },
...@@ -16323,7 +16323,7 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai...@@ -16323,7 +16323,7 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
16323 const enum_obj = ip.loadEnumType(ty.toIntern());16323 const enum_obj = ip.loadEnumType(ty.toIntern());
16324 const is_exhaustive: Value = .makeBool(!enum_obj.nonexhaustive);16324 const is_exhaustive: Value = .makeBool(!enum_obj.nonexhaustive);
1632516325
16326 const enum_field_ty = try sema.getBuiltinType(src, .@"Type.EnumField");16326 const enum_field_ty = try sema.getStdLangType(src, .@"Type.EnumField");
1632716327
16328 const enum_field_vals = try sema.arena.alloc(InternPool.Index, enum_obj.field_names.len);16328 const enum_field_vals = try sema.arena.alloc(InternPool.Index, enum_obj.field_names.len);
16329 for (enum_field_vals, 0..) |*field_val, tag_index| {16329 for (enum_field_vals, 0..) |*field_val, tag_index| {
...@@ -16404,7 +16404,7 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai...@@ -16404,7 +16404,7 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
1640416404
16405 const decls_val = try sema.typeInfoDecls(src, ip.loadEnumType(ty.toIntern()).namespace.toOptional());16405 const decls_val = try sema.typeInfoDecls(src, ip.loadEnumType(ty.toIntern()).namespace.toOptional());
1640616406
16407 const type_enum_ty = try sema.getBuiltinType(src, .@"Type.Enum");16407 const type_enum_ty = try sema.getStdLangType(src, .@"Type.Enum");
1640816408
16409 const field_values = .{16409 const field_values = .{
16410 // tag_type: type,16410 // tag_type: type,
...@@ -16418,13 +16418,13 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai...@@ -16418,13 +16418,13 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
16418 };16418 };
16419 return Air.internedToRef((try pt.internUnion(.{16419 return Air.internedToRef((try pt.internUnion(.{
16420 .ty = type_info_ty.toIntern(),16420 .ty = type_info_ty.toIntern(),
16421 .tag = (try pt.enumValueFieldIndex(type_info_tag_ty, @intFromEnum(std.builtin.TypeId.@"enum"))).toIntern(),16421 .tag = (try pt.enumValueFieldIndex(type_info_tag_ty, @intFromEnum(std.lang.TypeId.@"enum"))).toIntern(),
16422 .val = (try pt.aggregateValue(type_enum_ty, &field_values)).toIntern(),16422 .val = (try pt.aggregateValue(type_enum_ty, &field_values)).toIntern(),
16423 })));16423 })));
16424 },16424 },
16425 .@"union" => {16425 .@"union" => {
16426 const type_union_ty = try sema.getBuiltinType(src, .@"Type.Union");16426 const type_union_ty = try sema.getStdLangType(src, .@"Type.Union");
16427 const union_field_ty = try sema.getBuiltinType(src, .@"Type.UnionField");16427 const union_field_ty = try sema.getStdLangType(src, .@"Type.UnionField");
1642816428
16429 const union_obj = ip.loadUnionType(ty.toIntern());16429 const union_obj = ip.loadUnionType(ty.toIntern());
16430 const enum_obj = ip.loadEnumType(union_obj.enum_tag_type);16430 const enum_obj = ip.loadEnumType(union_obj.enum_tag_type);
...@@ -16524,7 +16524,7 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai...@@ -16524,7 +16524,7 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
16524 .val = if (ty.unionTagType(zcu)) |tag_ty| tag_ty.toIntern() else .none,16524 .val = if (ty.unionTagType(zcu)) |tag_ty| tag_ty.toIntern() else .none,
16525 } });16525 } });
1652616526
16527 const container_layout_ty = try sema.getBuiltinType(src, .@"Type.ContainerLayout");16527 const container_layout_ty = try sema.getStdLangType(src, .@"Type.ContainerLayout");
1652816528
16529 const field_values = .{16529 const field_values = .{
16530 // layout: ContainerLayout,16530 // layout: ContainerLayout,
...@@ -16539,13 +16539,13 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai...@@ -16539,13 +16539,13 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
16539 };16539 };
16540 return Air.internedToRef((try pt.internUnion(.{16540 return Air.internedToRef((try pt.internUnion(.{
16541 .ty = type_info_ty.toIntern(),16541 .ty = type_info_ty.toIntern(),
16542 .tag = (try pt.enumValueFieldIndex(type_info_tag_ty, @intFromEnum(std.builtin.TypeId.@"union"))).toIntern(),16542 .tag = (try pt.enumValueFieldIndex(type_info_tag_ty, @intFromEnum(std.lang.TypeId.@"union"))).toIntern(),
16543 .val = (try pt.aggregateValue(type_union_ty, &field_values)).toIntern(),16543 .val = (try pt.aggregateValue(type_union_ty, &field_values)).toIntern(),
16544 })));16544 })));
16545 },16545 },
16546 .@"struct" => {16546 .@"struct" => {
16547 const type_struct_ty = try sema.getBuiltinType(src, .@"Type.Struct");16547 const type_struct_ty = try sema.getStdLangType(src, .@"Type.Struct");
16548 const struct_field_ty = try sema.getBuiltinType(src, .@"Type.StructField");16548 const struct_field_ty = try sema.getStdLangType(src, .@"Type.StructField");
1654916549
16550 var struct_field_vals: []InternPool.Index = &.{};16550 var struct_field_vals: []InternPool.Index = &.{};
16551 defer gpa.free(struct_field_vals);16551 defer gpa.free(struct_field_vals);
...@@ -16713,7 +16713,7 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai...@@ -16713,7 +16713,7 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
16713 } else .none,16713 } else .none,
16714 } });16714 } });
1671516715
16716 const container_layout_ty = try sema.getBuiltinType(src, .@"Type.ContainerLayout");16716 const container_layout_ty = try sema.getStdLangType(src, .@"Type.ContainerLayout");
1671716717
16718 const layout = ty.containerLayout(zcu);16718 const layout = ty.containerLayout(zcu);
1671916719
...@@ -16731,12 +16731,12 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai...@@ -16731,12 +16731,12 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
16731 };16731 };
16732 return Air.internedToRef((try pt.internUnion(.{16732 return Air.internedToRef((try pt.internUnion(.{
16733 .ty = type_info_ty.toIntern(),16733 .ty = type_info_ty.toIntern(),
16734 .tag = (try pt.enumValueFieldIndex(type_info_tag_ty, @intFromEnum(std.builtin.TypeId.@"struct"))).toIntern(),16734 .tag = (try pt.enumValueFieldIndex(type_info_tag_ty, @intFromEnum(std.lang.TypeId.@"struct"))).toIntern(),
16735 .val = (try pt.aggregateValue(type_struct_ty, &field_values)).toIntern(),16735 .val = (try pt.aggregateValue(type_struct_ty, &field_values)).toIntern(),
16736 })));16736 })));
16737 },16737 },
16738 .@"opaque" => {16738 .@"opaque" => {
16739 const type_opaque_ty = try sema.getBuiltinType(src, .@"Type.Opaque");16739 const type_opaque_ty = try sema.getStdLangType(src, .@"Type.Opaque");
1674016740
16741 const decls_val = try sema.typeInfoDecls(src, ty.getNamespace(zcu));16741 const decls_val = try sema.typeInfoDecls(src, ty.getNamespace(zcu));
1674216742
...@@ -16746,7 +16746,7 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai...@@ -16746,7 +16746,7 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
16746 };16746 };
16747 return Air.internedToRef((try pt.internUnion(.{16747 return Air.internedToRef((try pt.internUnion(.{
16748 .ty = type_info_ty.toIntern(),16748 .ty = type_info_ty.toIntern(),
16749 .tag = (try pt.enumValueFieldIndex(type_info_tag_ty, @intFromEnum(std.builtin.TypeId.@"opaque"))).toIntern(),16749 .tag = (try pt.enumValueFieldIndex(type_info_tag_ty, @intFromEnum(std.lang.TypeId.@"opaque"))).toIntern(),
16750 .val = (try pt.aggregateValue(type_opaque_ty, &field_values)).toIntern(),16750 .val = (try pt.aggregateValue(type_opaque_ty, &field_values)).toIntern(),
16751 })));16751 })));
16752 },16752 },
...@@ -16764,7 +16764,7 @@ fn typeInfoDecls(...@@ -16764,7 +16764,7 @@ fn typeInfoDecls(
16764 const zcu = pt.zcu;16764 const zcu = pt.zcu;
16765 const gpa = sema.gpa;16765 const gpa = sema.gpa;
1676616766
16767 const declaration_ty = try sema.getBuiltinType(src, .@"Type.Declaration");16767 const declaration_ty = try sema.getStdLangType(src, .@"Type.Declaration");
1676816768
16769 var decl_vals = std.array_list.Managed(InternPool.Index).init(gpa);16769 var decl_vals = std.array_list.Managed(InternPool.Index).init(gpa);
16770 defer decl_vals.deinit();16770 defer decl_vals.deinit();
...@@ -17323,7 +17323,7 @@ fn zirCondbr(...@@ -17323,7 +17323,7 @@ fn zirCondbr(
17323 // Reset, this may have been updated by the then block analysis17323 // Reset, this may have been updated by the then block analysis
17324 sub_block.error_return_trace_index = parent_block.error_return_trace_index;17324 sub_block.error_return_trace_index = parent_block.error_return_trace_index;
1732517325
17326 const false_hint: std.builtin.BranchHint = if (err_cond != null and17326 const false_hint: std.lang.BranchHint = if (err_cond != null and
17327 try sema.maybeErrorUnwrap(&sub_block, else_body, err_cond.?, cond_src, false))17327 try sema.maybeErrorUnwrap(&sub_block, else_body, err_cond.?, cond_src, false))
17328 h: {17328 h: {
17329 // nothing to do here. weight against error branch17329 // nothing to do here. weight against error branch
...@@ -17714,7 +17714,7 @@ fn maybePushErrorTrace(...@@ -17714,7 +17714,7 @@ fn maybePushErrorTrace(
17714 assert(pt.zcu.intern_pool.funcAnalysisUnordered(sema.owner.unwrap().func).has_error_trace);17714 assert(pt.zcu.intern_pool.funcAnalysisUnordered(sema.owner.unwrap().func).has_error_trace);
1771517715
17716 const gpa = sema.gpa;17716 const gpa = sema.gpa;
17717 const return_err_fn = Air.internedToRef(try sema.getBuiltin(src, .returnError));17717 const return_err_fn = Air.internedToRef(try sema.getStdLangValue(src, .returnError));
1771817718
17719 if (!need_check) {17719 if (!need_check) {
17720 try sema.callBuiltin(parent_block, src, return_err_fn, .never_tail, &.{}, .@"error return");17720 try sema.callBuiltin(parent_block, src, return_err_fn, .never_tail, &.{}, .@"error return");
...@@ -18040,7 +18040,7 @@ fn zirPtrType(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Air...@@ -18040,7 +18040,7 @@ fn zirPtrType(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Air
18040 break :blk try sema.validateAlign(block, align_src, align_bytes);18040 break :blk try sema.validateAlign(block, align_src, align_bytes);
18041 } else .none;18041 } else .none;
1804218042
18043 const address_space: std.builtin.AddressSpace = if (inst_data.flags.has_addrspace) blk: {18043 const address_space: std.lang.AddressSpace = if (inst_data.flags.has_addrspace) blk: {
18044 const ref: Zir.Inst.Ref = @enumFromInt(sema.code.extra[extra_i]);18044 const ref: Zir.Inst.Ref = @enumFromInt(sema.code.extra[extra_i]);
18045 extra_i += 1;18045 extra_i += 1;
18046 break :blk try sema.resolveAddressSpace(block, addrspace_src, ref, .pointer);18046 break :blk try sema.resolveAddressSpace(block, addrspace_src, ref, .pointer);
...@@ -19179,7 +19179,7 @@ fn getErrorReturnTrace(sema: *Sema, block: *Block) CompileError!Air.Inst.Ref {...@@ -19179,7 +19179,7 @@ fn getErrorReturnTrace(sema: *Sema, block: *Block) CompileError!Air.Inst.Ref {
19179 const pt = sema.pt;19179 const pt = sema.pt;
19180 const zcu = pt.zcu;19180 const zcu = pt.zcu;
19181 const ip = &zcu.intern_pool;19181 const ip = &zcu.intern_pool;
19182 const stack_trace_ty = try sema.getBuiltinType(block.nodeOffset(.zero), .StackTrace);19182 const stack_trace_ty = try sema.getStdLangType(block.nodeOffset(.zero), .StackTrace);
19183 const ptr_stack_trace_ty = try pt.singleMutPtrType(stack_trace_ty);19183 const ptr_stack_trace_ty = try pt.singleMutPtrType(stack_trace_ty);
19184 const opt_ptr_stack_trace_ty = try pt.optionalType(ptr_stack_trace_ty.toIntern());19184 const opt_ptr_stack_trace_ty = try pt.optionalType(ptr_stack_trace_ty.toIntern());
1918519185
...@@ -19446,7 +19446,7 @@ fn zirReifyInt(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai...@@ -19446,7 +19446,7 @@ fn zirReifyInt(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
19446 const signedness_src = block.builtinCallArgSrc(inst_data.src_node, 0);19446 const signedness_src = block.builtinCallArgSrc(inst_data.src_node, 0);
19447 const bits_src = block.builtinCallArgSrc(inst_data.src_node, 1);19447 const bits_src = block.builtinCallArgSrc(inst_data.src_node, 1);
19448 const extra = sema.code.extraData(Zir.Inst.Bin, inst_data.payload_index).data;19448 const extra = sema.code.extraData(Zir.Inst.Bin, inst_data.payload_index).data;
19449 const signedness = try sema.resolveBuiltinEnum(block, signedness_src, extra.lhs, .Signedness, .{ .simple = .int_signedness });19449 const signedness = try sema.resolveStdLangEnum(block, signedness_src, extra.lhs, .Signedness, .{ .simple = .int_signedness });
19450 const bits: u16 = @intCast(try sema.resolveInt(block, bits_src, extra.rhs, .u16, .{ .simple = .int_bit_width }));19450 const bits: u16 = @intCast(try sema.resolveInt(block, bits_src, extra.rhs, .u16, .{ .simple = .int_bit_width }));
19451 if (bits == 0 and signedness == .signed) {19451 if (bits == 0 and signedness == .signed) {
19452 return sema.fail(block, bits_src, "signed integer cannot have bit width 0", .{});19452 return sema.fail(block, bits_src, "signed integer cannot have bit width 0", .{});
...@@ -19469,11 +19469,11 @@ fn zirReifySliceArgTy(...@@ -19469,11 +19469,11 @@ fn zirReifySliceArgTy(
1946919469
19470 const comptime_reason: std.zig.SimpleComptimeReason, const in_scalar_ty: Type, const out_scalar_ty: Type = switch (info) {19470 const comptime_reason: std.zig.SimpleComptimeReason, const in_scalar_ty: Type, const out_scalar_ty: Type = switch (info) {
19471 // zig fmt: off19471 // zig fmt: off
19472 .type_to_fn_param_attrs => .{ .fn_param_attrs, .type, try sema.getBuiltinType(src, .@"Type.Fn.Param.Attributes") },19472 .type_to_fn_param_attrs => .{ .fn_param_attrs, .type, try sema.getStdLangType(src, .@"Type.Fn.Param.Attributes") },
19473 .string_to_struct_field_type => .{ .struct_field_types, .slice_const_u8, .type },19473 .string_to_struct_field_type => .{ .struct_field_types, .slice_const_u8, .type },
19474 .string_to_union_field_type => .{ .union_field_types, .slice_const_u8, .type },19474 .string_to_union_field_type => .{ .union_field_types, .slice_const_u8, .type },
19475 .string_to_struct_field_attrs => .{ .struct_field_attrs, .slice_const_u8, try sema.getBuiltinType(src, .@"Type.StructField.Attributes") },19475 .string_to_struct_field_attrs => .{ .struct_field_attrs, .slice_const_u8, try sema.getStdLangType(src, .@"Type.StructField.Attributes") },
19476 .string_to_union_field_attrs => .{ .union_field_attrs, .slice_const_u8, try sema.getBuiltinType(src, .@"Type.UnionField.Attributes") },19476 .string_to_union_field_attrs => .{ .union_field_attrs, .slice_const_u8, try sema.getStdLangType(src, .@"Type.UnionField.Attributes") },
19477 // zig fmt: on19477 // zig fmt: on
19478 };19478 };
1947919479
...@@ -19599,18 +19599,18 @@ fn zirReifyPointer(...@@ -19599,18 +19599,18 @@ fn zirReifyPointer(
19599 const elem_ty_src = block.builtinCallArgSrc(extra.node, 2);19599 const elem_ty_src = block.builtinCallArgSrc(extra.node, 2);
19600 const sentinel_src = block.builtinCallArgSrc(extra.node, 3);19600 const sentinel_src = block.builtinCallArgSrc(extra.node, 3);
1960119601
19602 const size_ty = try sema.getBuiltinType(size_src, .@"Type.Pointer.Size");19602 const size_ty = try sema.getStdLangType(size_src, .@"Type.Pointer.Size");
19603 const attrs_ty = try sema.getBuiltinType(attrs_src, .@"Type.Pointer.Attributes");19603 const attrs_ty = try sema.getStdLangType(attrs_src, .@"Type.Pointer.Attributes");
1960419604
19605 const size_uncoerced = sema.resolveInst(extra.size);19605 const size_uncoerced = sema.resolveInst(extra.size);
19606 const size_coerced = try sema.coerce(block, size_ty, size_uncoerced, size_src);19606 const size_coerced = try sema.coerce(block, size_ty, size_uncoerced, size_src);
19607 const size_val = try sema.resolveConstDefinedValue(block, size_src, size_coerced, .{ .simple = .pointer_size });19607 const size_val = try sema.resolveConstDefinedValue(block, size_src, size_coerced, .{ .simple = .pointer_size });
19608 const size = try sema.interpretBuiltinType(block, size_src, size_val, std.builtin.Type.Pointer.Size);19608 const size = try sema.interpretStdLangType(block, size_src, size_val, std.lang.Type.Pointer.Size);
1960919609
19610 const attrs_uncoerced = sema.resolveInst(extra.attrs);19610 const attrs_uncoerced = sema.resolveInst(extra.attrs);
19611 const attrs_coerced = try sema.coerce(block, attrs_ty, attrs_uncoerced, attrs_src);19611 const attrs_coerced = try sema.coerce(block, attrs_ty, attrs_uncoerced, attrs_src);
19612 const attrs_val = try sema.resolveConstDefinedValue(block, attrs_src, attrs_coerced, .{ .simple = .pointer_attrs });19612 const attrs_val = try sema.resolveConstDefinedValue(block, attrs_src, attrs_coerced, .{ .simple = .pointer_attrs });
19613 const attrs = try sema.interpretBuiltinType(block, attrs_src, attrs_val, std.builtin.Type.Pointer.Attributes);19613 const attrs = try sema.interpretStdLangType(block, attrs_src, attrs_val, std.lang.Type.Pointer.Attributes);
1961419614
19615 const @"align": Alignment = if (attrs.@"align") |bytes| a: {19615 const @"align": Alignment = if (attrs.@"align") |bytes| a: {
19616 break :a try sema.validateAlign(block, attrs_src, bytes);19616 break :a try sema.validateAlign(block, attrs_src, bytes);
...@@ -19687,8 +19687,8 @@ fn zirReifyFn(...@@ -19687,8 +19687,8 @@ fn zirReifyFn(
19687 const ret_ty_src = block.builtinCallArgSrc(extra.node, 2);19687 const ret_ty_src = block.builtinCallArgSrc(extra.node, 2);
19688 const fn_attrs_src = block.builtinCallArgSrc(extra.node, 3);19688 const fn_attrs_src = block.builtinCallArgSrc(extra.node, 3);
1968919689
19690 const single_param_attrs_ty = try sema.getBuiltinType(param_attrs_src, .@"Type.Fn.Param.Attributes");19690 const single_param_attrs_ty = try sema.getStdLangType(param_attrs_src, .@"Type.Fn.Param.Attributes");
19691 const fn_attrs_ty = try sema.getBuiltinType(fn_attrs_src, .@"Type.Fn.Attributes");19691 const fn_attrs_ty = try sema.getStdLangType(fn_attrs_src, .@"Type.Fn.Attributes");
1969219692
19693 const param_types_uncoerced = sema.resolveInst(extra.param_types);19693 const param_types_uncoerced = sema.resolveInst(extra.param_types);
19694 const param_types_coerced = try sema.coerce(block, .slice_const_type, param_types_uncoerced, param_types_src);19694 const param_types_coerced = try sema.coerce(block, .slice_const_type, param_types_uncoerced, param_types_src);
...@@ -19711,17 +19711,17 @@ fn zirReifyFn(...@@ -19711,17 +19711,17 @@ fn zirReifyFn(
19711 const fn_attrs_uncoerced = sema.resolveInst(extra.fn_attrs);19711 const fn_attrs_uncoerced = sema.resolveInst(extra.fn_attrs);
19712 const fn_attrs_coerced = try sema.coerce(block, fn_attrs_ty, fn_attrs_uncoerced, fn_attrs_src);19712 const fn_attrs_coerced = try sema.coerce(block, fn_attrs_ty, fn_attrs_uncoerced, fn_attrs_src);
19713 const fn_attrs_val = try sema.resolveConstDefinedValue(block, fn_attrs_src, fn_attrs_coerced, .{ .simple = .fn_attrs });19713 const fn_attrs_val = try sema.resolveConstDefinedValue(block, fn_attrs_src, fn_attrs_coerced, .{ .simple = .fn_attrs });
19714 const fn_attrs = try sema.interpretBuiltinType(block, fn_attrs_src, fn_attrs_val, std.builtin.Type.Fn.Attributes);19714 const fn_attrs = try sema.interpretStdLangType(block, fn_attrs_src, fn_attrs_val, std.lang.Type.Fn.Attributes);
1971519715
19716 var noalias_bits: u32 = 0;19716 var noalias_bits: u32 = 0;
19717 const param_types_ip = try sema.arena.alloc(InternPool.Index, @intCast(params_len));19717 const param_types_ip = try sema.arena.alloc(InternPool.Index, @intCast(params_len));
19718 for (param_types_ip, 0..@intCast(params_len)) |*param_ty_ip, param_idx| {19718 for (param_types_ip, 0..@intCast(params_len)) |*param_ty_ip, param_idx| {
19719 const param_ty: Type = (try param_types_arr.elemValue(pt, param_idx)).toType();19719 const param_ty: Type = (try param_types_arr.elemValue(pt, param_idx)).toType();
19720 const param_attrs = try sema.interpretBuiltinType(19720 const param_attrs = try sema.interpretStdLangType(
19721 block,19721 block,
19722 param_attrs_src,19722 param_attrs_src,
19723 try param_attrs_arr.elemValue(pt, param_idx),19723 try param_attrs_arr.elemValue(pt, param_idx),
19724 std.builtin.Type.Fn.Param.Attributes,19724 std.lang.Type.Fn.Param.Attributes,
19725 );19725 );
19726 try sema.checkParamType(19726 try sema.checkParamType(
19727 block,19727 block,
...@@ -19825,13 +19825,13 @@ fn zirReifyStruct(...@@ -19825,13 +19825,13 @@ fn zirReifyStruct(
19825 } },19825 } },
19826 };19826 };
1982719827
19828 const container_layout_ty = try sema.getBuiltinType(layout_src, .@"Type.ContainerLayout");19828 const container_layout_ty = try sema.getStdLangType(layout_src, .@"Type.ContainerLayout");
19829 const single_field_attrs_ty = try sema.getBuiltinType(field_attrs_src, .@"Type.StructField.Attributes");19829 const single_field_attrs_ty = try sema.getStdLangType(field_attrs_src, .@"Type.StructField.Attributes");
1983019830
19831 const layout_uncoerced = sema.resolveInst(extra.layout);19831 const layout_uncoerced = sema.resolveInst(extra.layout);
19832 const layout_coerced = try sema.coerce(block, container_layout_ty, layout_uncoerced, layout_src);19832 const layout_coerced = try sema.coerce(block, container_layout_ty, layout_uncoerced, layout_src);
19833 const layout_val = try sema.resolveConstDefinedValue(block, layout_src, layout_coerced, .{ .simple = .struct_layout });19833 const layout_val = try sema.resolveConstDefinedValue(block, layout_src, layout_coerced, .{ .simple = .struct_layout });
19834 const layout = try sema.interpretBuiltinType(block, layout_src, layout_val, std.builtin.Type.ContainerLayout);19834 const layout = try sema.interpretStdLangType(block, layout_src, layout_val, std.lang.Type.ContainerLayout);
1983519835
19836 const backing_int_ty_uncoerced = sema.resolveInst(extra.backing_ty);19836 const backing_int_ty_uncoerced = sema.resolveInst(extra.backing_ty);
19837 const backing_int_ty_coerced = try sema.coerce(block, .optional_type, backing_int_ty_uncoerced, backing_ty_src);19837 const backing_int_ty_coerced = try sema.coerce(block, .optional_type, backing_int_ty_uncoerced, backing_ty_src);
...@@ -19912,15 +19912,15 @@ fn zirReifyStruct(...@@ -19912,15 +19912,15 @@ fn zirReifyStruct(
19912 const field_name = try sema.sliceToIpString(block, field_names_src, field_name_val, .{ .simple = .struct_field_names });19912 const field_name = try sema.sliceToIpString(block, field_names_src, field_name_val, .{ .simple = .struct_field_names });
1991319913
19914 const field_attr_comptime = try field_attrs_val.fieldValue(pt, std.meta.fieldIndex(19914 const field_attr_comptime = try field_attrs_val.fieldValue(pt, std.meta.fieldIndex(
19915 std.builtin.Type.StructField.Attributes,19915 std.lang.Type.StructField.Attributes,
19916 "comptime",19916 "comptime",
19917 ).?);19917 ).?);
19918 const field_attr_align = try field_attrs_val.fieldValue(pt, std.meta.fieldIndex(19918 const field_attr_align = try field_attrs_val.fieldValue(pt, std.meta.fieldIndex(
19919 std.builtin.Type.StructField.Attributes,19919 std.lang.Type.StructField.Attributes,
19920 "align",19920 "align",
19921 ).?);19921 ).?);
19922 const field_attr_default_value_ptr = try field_attrs_val.fieldValue(pt, std.meta.fieldIndex(19922 const field_attr_default_value_ptr = try field_attrs_val.fieldValue(pt, std.meta.fieldIndex(
19923 std.builtin.Type.StructField.Attributes,19923 std.lang.Type.StructField.Attributes,
19924 "default_value_ptr",19924 "default_value_ptr",
19925 ).?);19925 ).?);
1992619926
...@@ -19997,15 +19997,15 @@ fn zirReifyStruct(...@@ -19997,15 +19997,15 @@ fn zirReifyStruct(
19997 wip.field_types.get(ip)[field_idx] = field_ty.toIntern();19997 wip.field_types.get(ip)[field_idx] = field_ty.toIntern();
1999819998
19999 const field_attr_comptime = try field_attrs_val.fieldValue(pt, std.meta.fieldIndex(19999 const field_attr_comptime = try field_attrs_val.fieldValue(pt, std.meta.fieldIndex(
20000 std.builtin.Type.StructField.Attributes,20000 std.lang.Type.StructField.Attributes,
20001 "comptime",20001 "comptime",
20002 ).?);20002 ).?);
20003 const field_attr_align = try field_attrs_val.fieldValue(pt, std.meta.fieldIndex(20003 const field_attr_align = try field_attrs_val.fieldValue(pt, std.meta.fieldIndex(
20004 std.builtin.Type.StructField.Attributes,20004 std.lang.Type.StructField.Attributes,
20005 "align",20005 "align",
20006 ).?);20006 ).?);
20007 const field_attr_default_value_ptr = try field_attrs_val.fieldValue(pt, std.meta.fieldIndex(20007 const field_attr_default_value_ptr = try field_attrs_val.fieldValue(pt, std.meta.fieldIndex(
20008 std.builtin.Type.StructField.Attributes,20008 std.lang.Type.StructField.Attributes,
20009 "default_value_ptr",20009 "default_value_ptr",
20010 ).?);20010 ).?);
2001120011
...@@ -20105,13 +20105,13 @@ fn zirReifyUnion(...@@ -20105,13 +20105,13 @@ fn zirReifyUnion(
20105 } },20105 } },
20106 };20106 };
2010720107
20108 const container_layout_ty = try sema.getBuiltinType(layout_src, .@"Type.ContainerLayout");20108 const container_layout_ty = try sema.getStdLangType(layout_src, .@"Type.ContainerLayout");
20109 const single_field_attrs_ty = try sema.getBuiltinType(field_attrs_src, .@"Type.UnionField.Attributes");20109 const single_field_attrs_ty = try sema.getStdLangType(field_attrs_src, .@"Type.UnionField.Attributes");
2011020110
20111 const layout_uncoerced = sema.resolveInst(extra.layout);20111 const layout_uncoerced = sema.resolveInst(extra.layout);
20112 const layout_coerced = try sema.coerce(block, container_layout_ty, layout_uncoerced, layout_src);20112 const layout_coerced = try sema.coerce(block, container_layout_ty, layout_uncoerced, layout_src);
20113 const layout_val = try sema.resolveConstDefinedValue(block, layout_src, layout_coerced, .{ .simple = .union_layout });20113 const layout_val = try sema.resolveConstDefinedValue(block, layout_src, layout_coerced, .{ .simple = .union_layout });
20114 const layout = try sema.interpretBuiltinType(block, layout_src, layout_val, std.builtin.Type.ContainerLayout);20114 const layout = try sema.interpretStdLangType(block, layout_src, layout_val, std.lang.Type.ContainerLayout);
2011520115
20116 const arg_ty_uncoerced = sema.resolveInst(extra.arg_ty);20116 const arg_ty_uncoerced = sema.resolveInst(extra.arg_ty);
20117 const arg_ty_coerced = try sema.coerce(block, .optional_type, arg_ty_uncoerced, arg_ty_src);20117 const arg_ty_coerced = try sema.coerce(block, .optional_type, arg_ty_uncoerced, arg_ty_src);
...@@ -20191,11 +20191,11 @@ fn zirReifyUnion(...@@ -20191,11 +20191,11 @@ fn zirReifyUnion(
20191 const field_name = try sema.sliceToIpString(block, field_names_src, field_name_val, .{ .simple = .union_field_names });20191 const field_name = try sema.sliceToIpString(block, field_names_src, field_name_val, .{ .simple = .union_field_names });
20192 std.hash.autoHash(&hasher, field_name);20192 std.hash.autoHash(&hasher, field_name);
2019320193
20194 const field_attrs = try sema.interpretBuiltinType(20194 const field_attrs = try sema.interpretStdLangType(
20195 block,20195 block,
20196 field_attrs_src,20196 field_attrs_src,
20197 try field_attrs_arr.elemValue(pt, field_idx),20197 try field_attrs_arr.elemValue(pt, field_idx),
20198 std.builtin.Type.UnionField.Attributes,20198 std.lang.Type.UnionField.Attributes,
20199 );20199 );
20200 if (field_attrs.@"align") |bytes| {20200 if (field_attrs.@"align") |bytes| {
20201 if (layout == .@"packed") {20201 if (layout == .@"packed") {
...@@ -20240,11 +20240,11 @@ fn zirReifyUnion(...@@ -20240,11 +20240,11 @@ fn zirReifyUnion(
20240 wip.field_types.get(ip)[field_idx] = field_ty.toIntern();20240 wip.field_types.get(ip)[field_idx] = field_ty.toIntern();
2024120241
20242 // No source location; first loop checked this is valid.20242 // No source location; first loop checked this is valid.
20243 const field_attrs = try sema.interpretBuiltinType(20243 const field_attrs = try sema.interpretStdLangType(
20244 block,20244 block,
20245 .unneeded,20245 .unneeded,
20246 try field_attrs_arr.elemValue(pt, field_idx),20246 try field_attrs_arr.elemValue(pt, field_idx),
20247 std.builtin.Type.UnionField.Attributes,20247 std.lang.Type.UnionField.Attributes,
20248 );20248 );
20249 if (field_attrs.@"align") |bytes| {20249 if (field_attrs.@"align") |bytes| {
20250 // No source location; first loop checked this is valid.20250 // No source location; first loop checked this is valid.
...@@ -20319,7 +20319,7 @@ fn zirReifyEnum(...@@ -20319,7 +20319,7 @@ fn zirReifyEnum(
20319 } },20319 } },
20320 };20320 };
2032120321
20322 const enum_mode_ty = try sema.getBuiltinType(mode_src, .@"Type.Enum.Mode");20322 const enum_mode_ty = try sema.getStdLangType(mode_src, .@"Type.Enum.Mode");
2032320323
20324 const tag_ty_uncoerced = sema.resolveInst(extra.tag_ty);20324 const tag_ty_uncoerced = sema.resolveInst(extra.tag_ty);
20325 const tag_ty_coerced = try sema.coerce(block, .type, tag_ty_uncoerced, tag_ty_src);20325 const tag_ty_coerced = try sema.coerce(block, .type, tag_ty_uncoerced, tag_ty_src);
...@@ -20329,7 +20329,7 @@ fn zirReifyEnum(...@@ -20329,7 +20329,7 @@ fn zirReifyEnum(
20329 const mode_uncoerced = sema.resolveInst(extra.mode);20329 const mode_uncoerced = sema.resolveInst(extra.mode);
20330 const mode_coerced = try sema.coerce(block, enum_mode_ty, mode_uncoerced, mode_src);20330 const mode_coerced = try sema.coerce(block, enum_mode_ty, mode_uncoerced, mode_src);
20331 const mode_val = try sema.resolveConstDefinedValue(block, mode_src, mode_coerced, .{ .simple = .type });20331 const mode_val = try sema.resolveConstDefinedValue(block, mode_src, mode_coerced, .{ .simple = .type });
20332 const nonexhaustive = switch (try sema.interpretBuiltinType(block, mode_src, mode_val, std.builtin.Type.Enum.Mode)) {20332 const nonexhaustive = switch (try sema.interpretStdLangType(block, mode_src, mode_val, std.lang.Type.Enum.Mode)) {
20333 .exhaustive => false,20333 .exhaustive => false,
20334 .nonexhaustive => true,20334 .nonexhaustive => true,
20335 };20335 };
...@@ -20423,7 +20423,7 @@ fn zirReifyEnum(...@@ -20423,7 +20423,7 @@ fn zirReifyEnum(
2042320423
20424fn resolveVaListRef(sema: *Sema, block: *Block, src: LazySrcLoc, zir_ref: Zir.Inst.Ref) CompileError!Air.Inst.Ref {20424fn resolveVaListRef(sema: *Sema, block: *Block, src: LazySrcLoc, zir_ref: Zir.Inst.Ref) CompileError!Air.Inst.Ref {
20425 const pt = sema.pt;20425 const pt = sema.pt;
20426 const va_list_ty = try sema.getBuiltinType(src, .VaList);20426 const va_list_ty = try sema.getStdLangType(src, .VaList);
20427 const va_list_ptr = try pt.singleMutPtrType(va_list_ty);20427 const va_list_ptr = try pt.singleMutPtrType(va_list_ty);
2042820428
20429 const inst = sema.resolveInst(zir_ref);20429 const inst = sema.resolveInst(zir_ref);
...@@ -20462,7 +20462,7 @@ fn zirCVaCopy(sema: *Sema, block: *Block, extended: Zir.Inst.Extended.InstData)...@@ -20462,7 +20462,7 @@ fn zirCVaCopy(sema: *Sema, block: *Block, extended: Zir.Inst.Extended.InstData)
20462 const va_list_src = block.builtinCallArgSrc(extra.node, 0);20462 const va_list_src = block.builtinCallArgSrc(extra.node, 0);
2046320463
20464 const va_list_ref = try sema.resolveVaListRef(block, va_list_src, extra.operand);20464 const va_list_ref = try sema.resolveVaListRef(block, va_list_src, extra.operand);
20465 const va_list_ty = try sema.getBuiltinType(src, .VaList);20465 const va_list_ty = try sema.getStdLangType(src, .VaList);
2046620466
20467 try sema.requireRuntimeBlock(block, src, null);20467 try sema.requireRuntimeBlock(block, src, null);
20468 return block.addTyOp(.c_va_copy, va_list_ty, va_list_ref);20468 return block.addTyOp(.c_va_copy, va_list_ty, va_list_ref);
...@@ -20484,7 +20484,7 @@ fn zirCVaStart(sema: *Sema, block: *Block, extended: Zir.Inst.Extended.InstData)...@@ -20484,7 +20484,7 @@ fn zirCVaStart(sema: *Sema, block: *Block, extended: Zir.Inst.Extended.InstData)
20484 const src_node: std.zig.Ast.Node.Offset = @enumFromInt(@as(i32, @bitCast(extended.operand)));20484 const src_node: std.zig.Ast.Node.Offset = @enumFromInt(@as(i32, @bitCast(extended.operand)));
20485 const src = block.nodeOffset(src_node);20485 const src = block.nodeOffset(src_node);
2048620486
20487 const va_list_ty = try sema.getBuiltinType(src, .VaList);20487 const va_list_ty = try sema.getStdLangType(src, .VaList);
20488 try sema.requireRuntimeBlock(block, src, null);20488 try sema.requireRuntimeBlock(block, src, null);
20489 return block.addInst(.{20489 return block.addInst(.{
20490 .tag = .c_va_start,20490 .tag = .c_va_start,
...@@ -21962,9 +21962,9 @@ fn checkArithmeticOp(...@@ -21962,9 +21962,9 @@ fn checkArithmeticOp(
21962 sema: *Sema,21962 sema: *Sema,
21963 block: *Block,21963 block: *Block,
21964 src: LazySrcLoc,21964 src: LazySrcLoc,
21965 scalar_tag: std.builtin.TypeId,21965 scalar_tag: std.lang.TypeId,
21966 lhs_zig_ty_tag: std.builtin.TypeId,21966 lhs_zig_ty_tag: std.lang.TypeId,
21967 rhs_zig_ty_tag: std.builtin.TypeId,21967 rhs_zig_ty_tag: std.lang.TypeId,
21968 zir_tag: Zir.Inst.Tag,21968 zir_tag: Zir.Inst.Tag,
21969) CompileError!void {21969) CompileError!void {
21970 const is_int = scalar_tag == .int or scalar_tag == .comptime_int;21970 const is_int = scalar_tag == .int or scalar_tag == .comptime_int;
...@@ -22373,7 +22373,7 @@ fn resolveExportOptions(...@@ -22373,7 +22373,7 @@ fn resolveExportOptions(
22373 const io = comp.io;22373 const io = comp.io;
22374 const ip = &zcu.intern_pool;22374 const ip = &zcu.intern_pool;
2237522375
22376 const export_options_ty = try sema.getBuiltinType(src, .ExportOptions);22376 const export_options_ty = try sema.getStdLangType(src, .ExportOptions);
22377 const air_ref = sema.resolveInst(zir_ref);22377 const air_ref = sema.resolveInst(zir_ref);
22378 const options = try sema.coerce(block, export_options_ty, air_ref, src);22378 const options = try sema.coerce(block, export_options_ty, air_ref, src);
2237922379
...@@ -22387,7 +22387,7 @@ fn resolveExportOptions(...@@ -22387,7 +22387,7 @@ fn resolveExportOptions(
2238722387
22388 const linkage_operand = try sema.fieldVal(block, src, options, try ip.getOrPutString(gpa, io, pt.tid, "linkage", .no_embedded_nulls), linkage_src);22388 const linkage_operand = try sema.fieldVal(block, src, options, try ip.getOrPutString(gpa, io, pt.tid, "linkage", .no_embedded_nulls), linkage_src);
22389 const linkage_val = try sema.resolveConstDefinedValue(block, linkage_src, linkage_operand, .{ .simple = .export_options });22389 const linkage_val = try sema.resolveConstDefinedValue(block, linkage_src, linkage_operand, .{ .simple = .export_options });
22390 const linkage = try sema.interpretBuiltinType(block, linkage_src, linkage_val, std.builtin.GlobalLinkage);22390 const linkage = try sema.interpretStdLangType(block, linkage_src, linkage_val, std.lang.GlobalLinkage);
2239122391
22392 const section_operand = try sema.fieldVal(block, src, options, try ip.getOrPutString(gpa, io, pt.tid, "section", .no_embedded_nulls), section_src);22392 const section_operand = try sema.fieldVal(block, src, options, try ip.getOrPutString(gpa, io, pt.tid, "section", .no_embedded_nulls), section_src);
22393 const section_opt_val = try sema.resolveConstDefinedValue(block, section_src, section_operand, .{ .simple = .export_options });22393 const section_opt_val = try sema.resolveConstDefinedValue(block, section_src, section_operand, .{ .simple = .export_options });
...@@ -22398,7 +22398,7 @@ fn resolveExportOptions(...@@ -22398,7 +22398,7 @@ fn resolveExportOptions(
2239822398
22399 const visibility_operand = try sema.fieldVal(block, src, options, try ip.getOrPutString(gpa, io, pt.tid, "visibility", .no_embedded_nulls), visibility_src);22399 const visibility_operand = try sema.fieldVal(block, src, options, try ip.getOrPutString(gpa, io, pt.tid, "visibility", .no_embedded_nulls), visibility_src);
22400 const visibility_val = try sema.resolveConstDefinedValue(block, visibility_src, visibility_operand, .{ .simple = .export_options });22400 const visibility_val = try sema.resolveConstDefinedValue(block, visibility_src, visibility_operand, .{ .simple = .export_options });
22401 const visibility = try sema.interpretBuiltinType(block, visibility_src, visibility_val, std.builtin.SymbolVisibility);22401 const visibility = try sema.interpretStdLangType(block, visibility_src, visibility_val, std.lang.SymbolVisibility);
2240222402
22403 if (name.len < 1) {22403 if (name.len < 1) {
22404 return sema.fail(block, name_src, "exported symbol name cannot be empty", .{});22404 return sema.fail(block, name_src, "exported symbol name cannot be empty", .{});
...@@ -22418,19 +22418,19 @@ fn resolveExportOptions(...@@ -22418,19 +22418,19 @@ fn resolveExportOptions(
22418 };22418 };
22419}22419}
2242022420
22421fn resolveBuiltinEnum(22421fn resolveStdLangEnum(
22422 sema: *Sema,22422 sema: *Sema,
22423 block: *Block,22423 block: *Block,
22424 src: LazySrcLoc,22424 src: LazySrcLoc,
22425 zir_ref: Zir.Inst.Ref,22425 zir_ref: Zir.Inst.Ref,
22426 comptime name: Zcu.BuiltinDecl,22426 comptime name: Zcu.StdLangDecl,
22427 reason: ComptimeReason,22427 reason: ComptimeReason,
22428) CompileError!@field(std.builtin, @tagName(name)) {22428) CompileError!@field(std.lang, @tagName(name)) {
22429 const ty = try sema.getBuiltinType(src, name);22429 const ty = try sema.getStdLangType(src, name);
22430 const air_ref = sema.resolveInst(zir_ref);22430 const air_ref = sema.resolveInst(zir_ref);
22431 const coerced = try sema.coerce(block, ty, air_ref, src);22431 const coerced = try sema.coerce(block, ty, air_ref, src);
22432 const val = try sema.resolveConstDefinedValue(block, src, coerced, reason);22432 const val = try sema.resolveConstDefinedValue(block, src, coerced, reason);
22433 return sema.interpretBuiltinType(block, src, val, @field(std.builtin, @tagName(name)));22433 return sema.interpretStdLangType(block, src, val, @field(std.lang, @tagName(name)));
22434}22434}
2243522435
22436fn resolveAtomicOrder(22436fn resolveAtomicOrder(
...@@ -22439,8 +22439,8 @@ fn resolveAtomicOrder(...@@ -22439,8 +22439,8 @@ fn resolveAtomicOrder(
22439 src: LazySrcLoc,22439 src: LazySrcLoc,
22440 zir_ref: Zir.Inst.Ref,22440 zir_ref: Zir.Inst.Ref,
22441 reason: ComptimeReason,22441 reason: ComptimeReason,
22442) CompileError!std.builtin.AtomicOrder {22442) CompileError!std.lang.AtomicOrder {
22443 return sema.resolveBuiltinEnum(block, src, zir_ref, .AtomicOrder, reason);22443 return sema.resolveStdLangEnum(block, src, zir_ref, .AtomicOrder, reason);
22444}22444}
2244522445
22446fn resolveAtomicRmwOp(22446fn resolveAtomicRmwOp(
...@@ -22448,8 +22448,8 @@ fn resolveAtomicRmwOp(...@@ -22448,8 +22448,8 @@ fn resolveAtomicRmwOp(
22448 block: *Block,22448 block: *Block,
22449 src: LazySrcLoc,22449 src: LazySrcLoc,
22450 zir_ref: Zir.Inst.Ref,22450 zir_ref: Zir.Inst.Ref,
22451) CompileError!std.builtin.AtomicRmwOp {22451) CompileError!std.lang.AtomicRmwOp {
22452 return sema.resolveBuiltinEnum(block, src, zir_ref, .AtomicRmwOp, .{ .simple = .operand_atomicRmw_operation });22452 return sema.resolveStdLangEnum(block, src, zir_ref, .AtomicRmwOp, .{ .simple = .operand_atomicRmw_operation });
22453}22453}
2245422454
22455fn zirCmpxchg(22455fn zirCmpxchg(
...@@ -22490,10 +22490,10 @@ fn zirCmpxchg(...@@ -22490,10 +22490,10 @@ fn zirCmpxchg(
22490 const success_order = try sema.resolveAtomicOrder(block, success_order_src, extra.success_order, .{ .simple = .atomic_order });22490 const success_order = try sema.resolveAtomicOrder(block, success_order_src, extra.success_order, .{ .simple = .atomic_order });
22491 const failure_order = try sema.resolveAtomicOrder(block, failure_order_src, extra.failure_order, .{ .simple = .atomic_order });22491 const failure_order = try sema.resolveAtomicOrder(block, failure_order_src, extra.failure_order, .{ .simple = .atomic_order });
2249222492
22493 if (@intFromEnum(success_order) < @intFromEnum(std.builtin.AtomicOrder.monotonic)) {22493 if (@intFromEnum(success_order) < @intFromEnum(std.lang.AtomicOrder.monotonic)) {
22494 return sema.fail(block, success_order_src, "success atomic ordering must be monotonic or stricter", .{});22494 return sema.fail(block, success_order_src, "success atomic ordering must be monotonic or stricter", .{});
22495 }22495 }
22496 if (@intFromEnum(failure_order) < @intFromEnum(std.builtin.AtomicOrder.monotonic)) {22496 if (@intFromEnum(failure_order) < @intFromEnum(std.lang.AtomicOrder.monotonic)) {
22497 return sema.fail(block, failure_order_src, "failure atomic ordering must be monotonic or stricter", .{});22497 return sema.fail(block, failure_order_src, "failure atomic ordering must be monotonic or stricter", .{});
22498 }22498 }
22499 if (@intFromEnum(failure_order) > @intFromEnum(success_order)) {22499 if (@intFromEnum(failure_order) > @intFromEnum(success_order)) {
...@@ -22609,7 +22609,7 @@ fn zirReduce(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Air....@@ -22609,7 +22609,7 @@ fn zirReduce(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Air.
22609 const extra = sema.code.extraData(Zir.Inst.Bin, inst_data.payload_index).data;22609 const extra = sema.code.extraData(Zir.Inst.Bin, inst_data.payload_index).data;
22610 const op_src = block.builtinCallArgSrc(inst_data.src_node, 0);22610 const op_src = block.builtinCallArgSrc(inst_data.src_node, 0);
22611 const operand_src = block.builtinCallArgSrc(inst_data.src_node, 1);22611 const operand_src = block.builtinCallArgSrc(inst_data.src_node, 1);
22612 const operation = try sema.resolveBuiltinEnum(block, op_src, extra.lhs, .ReduceOp, .{ .simple = .operand_reduce_operation });22612 const operation = try sema.resolveStdLangEnum(block, op_src, extra.lhs, .ReduceOp, .{ .simple = .operand_reduce_operation });
22613 const operand = sema.resolveInst(extra.rhs);22613 const operand = sema.resolveInst(extra.rhs);
22614 const operand_ty = sema.typeOf(operand);22614 const operand_ty = sema.typeOf(operand);
22615 const pt = sema.pt;22615 const pt = sema.pt;
...@@ -23196,11 +23196,11 @@ fn zirBuiltinCall(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError...@@ -23196,11 +23196,11 @@ fn zirBuiltinCall(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError
23196 const extra = sema.code.extraData(Zir.Inst.BuiltinCall, inst_data.payload_index).data;23196 const extra = sema.code.extraData(Zir.Inst.BuiltinCall, inst_data.payload_index).data;
23197 const func = sema.resolveInst(extra.callee);23197 const func = sema.resolveInst(extra.callee);
2319823198
23199 const modifier_ty = try sema.getBuiltinType(call_src, .CallModifier);23199 const modifier_ty = try sema.getStdLangType(call_src, .CallModifier);
23200 const air_ref = sema.resolveInst(extra.modifier);23200 const air_ref = sema.resolveInst(extra.modifier);
23201 const modifier_ref = try sema.coerce(block, modifier_ty, air_ref, modifier_src);23201 const modifier_ref = try sema.coerce(block, modifier_ty, air_ref, modifier_src);
23202 const modifier_val = try sema.resolveConstDefinedValue(block, modifier_src, modifier_ref, .{ .simple = .call_modifier });23202 const modifier_val = try sema.resolveConstDefinedValue(block, modifier_src, modifier_ref, .{ .simple = .call_modifier });
23203 var modifier = try sema.interpretBuiltinType(block, modifier_src, modifier_val, std.builtin.CallModifier);23203 var modifier = try sema.interpretStdLangType(block, modifier_src, modifier_val, std.lang.CallModifier);
23204 switch (modifier) {23204 switch (modifier) {
23205 // These can be upgraded to comptime or nosuspend calls.23205 // These can be upgraded to comptime or nosuspend calls.
23206 .auto, .never_tail, .no_suspend => {23206 .auto, .never_tail, .no_suspend => {
...@@ -24250,19 +24250,19 @@ fn zirFuncFancy(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!A...@@ -24250,19 +24250,19 @@ fn zirFuncFancy(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!A
2425024250
24251 var extra_index: usize = extra.end;24251 var extra_index: usize = extra.end;
2425224252
24253 const cc: std.builtin.CallingConvention = if (extra.data.bits.has_cc_body) blk: {24253 const cc: std.lang.CallingConvention = if (extra.data.bits.has_cc_body) blk: {
24254 const body_len = sema.code.extra[extra_index];24254 const body_len = sema.code.extra[extra_index];
24255 extra_index += 1;24255 extra_index += 1;
24256 const body = sema.code.bodySlice(extra_index, body_len);24256 const body = sema.code.bodySlice(extra_index, body_len);
24257 extra_index += body.len;24257 extra_index += body.len;
2425824258
24259 const cc_ty = try sema.getBuiltinType(cc_src, .CallingConvention);24259 const cc_ty = try sema.getStdLangType(cc_src, .CallingConvention);
24260 const val = try sema.resolveGenericBody(block, cc_src, body, inst, cc_ty, .{ .simple = .@"callconv" });24260 const val = try sema.resolveGenericBody(block, cc_src, body, inst, cc_ty, .{ .simple = .@"callconv" });
24261 break :blk try sema.analyzeValueAsCallconv(block, cc_src, val);24261 break :blk try sema.analyzeValueAsCallconv(block, cc_src, val);
24262 } else if (extra.data.bits.has_cc_ref) blk: {24262 } else if (extra.data.bits.has_cc_ref) blk: {
24263 const cc_ref: Zir.Inst.Ref = @enumFromInt(sema.code.extra[extra_index]);24263 const cc_ref: Zir.Inst.Ref = @enumFromInt(sema.code.extra[extra_index]);
24264 extra_index += 1;24264 extra_index += 1;
24265 const cc_ty = try sema.getBuiltinType(cc_src, .CallingConvention);24265 const cc_ty = try sema.getStdLangType(cc_src, .CallingConvention);
24266 const uncoerced_cc = sema.resolveInst(cc_ref);24266 const uncoerced_cc = sema.resolveInst(cc_ref);
24267 const coerced_cc = try sema.coerce(block, cc_ty, uncoerced_cc, cc_src);24267 const coerced_cc = try sema.coerce(block, cc_ty, uncoerced_cc, cc_src);
24268 const cc_val = try sema.resolveConstDefinedValue(block, cc_src, coerced_cc, .{ .simple = .@"callconv" });24268 const cc_val = try sema.resolveConstDefinedValue(block, cc_src, coerced_cc, .{ .simple = .@"callconv" });
...@@ -24275,10 +24275,10 @@ fn zirFuncFancy(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!A...@@ -24275,10 +24275,10 @@ fn zirFuncFancy(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!A
24275 if (zir_decl.linkage == .@"export") {24275 if (zir_decl.linkage == .@"export") {
24276 break :cc target.cCallingConvention() orelse {24276 break :cc target.cCallingConvention() orelse {
24277 // This target has no default C calling convention. We sometimes trigger a similar24277 // This target has no default C calling convention. We sometimes trigger a similar
24278 // error by trying to evaluate `std.builtin.CallingConvention.c`, so for consistency,24278 // error by trying to evaluate `std.lang.CallingConvention.c`, so for consistency,
24279 // let's eval that now and just get the transitive error. (It's guaranteed to error24279 // let's eval that now and just get the transitive error. (It's guaranteed to error
24280 // because it does the exact `cCallingConvention` call we just did.)24280 // because it does the exact `cCallingConvention` call we just did.)
24281 const cc_type = try sema.getBuiltinType(cc_src, .CallingConvention);24281 const cc_type = try sema.getStdLangType(cc_src, .CallingConvention);
24282 _ = try sema.namespaceLookupVal(24282 _ = try sema.namespaceLookupVal(
24283 block,24283 block,
24284 LazySrcLoc.unneeded,24284 LazySrcLoc.unneeded,
...@@ -24286,7 +24286,7 @@ fn zirFuncFancy(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!A...@@ -24286,7 +24286,7 @@ fn zirFuncFancy(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!A
24286 try ip.getOrPutString(gpa, io, pt.tid, "c", .no_embedded_nulls),24286 try ip.getOrPutString(gpa, io, pt.tid, "c", .no_embedded_nulls),
24287 );24287 );
24288 // The above should have errored.24288 // The above should have errored.
24289 @panic("std.builtin is corrupt");24289 @panic("std.lang is corrupt");
24290 };24290 };
24291 }24291 }
24292 }24292 }
...@@ -24398,7 +24398,7 @@ fn resolvePrefetchOptions(...@@ -24398,7 +24398,7 @@ fn resolvePrefetchOptions(
24398 block: *Block,24398 block: *Block,
24399 src: LazySrcLoc,24399 src: LazySrcLoc,
24400 zir_ref: Zir.Inst.Ref,24400 zir_ref: Zir.Inst.Ref,
24401) CompileError!std.builtin.PrefetchOptions {24401) CompileError!std.lang.PrefetchOptions {
24402 const pt = sema.pt;24402 const pt = sema.pt;
24403 const zcu = pt.zcu;24403 const zcu = pt.zcu;
24404 const comp = zcu.comp;24404 const comp = zcu.comp;
...@@ -24406,7 +24406,7 @@ fn resolvePrefetchOptions(...@@ -24406,7 +24406,7 @@ fn resolvePrefetchOptions(
24406 const io = comp.io;24406 const io = comp.io;
24407 const ip = &zcu.intern_pool;24407 const ip = &zcu.intern_pool;
2440824408
24409 const options_ty = try sema.getBuiltinType(src, .PrefetchOptions);24409 const options_ty = try sema.getStdLangType(src, .PrefetchOptions);
24410 const options = try sema.coerce(block, options_ty, sema.resolveInst(zir_ref), src);24410 const options = try sema.coerce(block, options_ty, sema.resolveInst(zir_ref), src);
2441124411
24412 const rw_src = block.src(.{ .init_field_rw = src.offset.node_offset_builtin_call_arg.builtin_call_node });24412 const rw_src = block.src(.{ .init_field_rw = src.offset.node_offset_builtin_call_arg.builtin_call_node });
...@@ -24422,10 +24422,10 @@ fn resolvePrefetchOptions(...@@ -24422,10 +24422,10 @@ fn resolvePrefetchOptions(
24422 const cache = try sema.fieldVal(block, src, options, try ip.getOrPutString(gpa, io, pt.tid, "cache", .no_embedded_nulls), cache_src);24422 const cache = try sema.fieldVal(block, src, options, try ip.getOrPutString(gpa, io, pt.tid, "cache", .no_embedded_nulls), cache_src);
24423 const cache_val = try sema.resolveConstDefinedValue(block, cache_src, cache, .{ .simple = .prefetch_options });24423 const cache_val = try sema.resolveConstDefinedValue(block, cache_src, cache, .{ .simple = .prefetch_options });
2442424424
24425 return std.builtin.PrefetchOptions{24425 return std.lang.PrefetchOptions{
24426 .rw = try sema.interpretBuiltinType(block, rw_src, rw_val, std.builtin.PrefetchOptions.Rw),24426 .rw = try sema.interpretStdLangType(block, rw_src, rw_val, std.lang.PrefetchOptions.Rw),
24427 .locality = @intCast(locality_val.toUnsignedInt(zcu)),24427 .locality = @intCast(locality_val.toUnsignedInt(zcu)),
24428 .cache = try sema.interpretBuiltinType(block, cache_src, cache_val, std.builtin.PrefetchOptions.Cache),24428 .cache = try sema.interpretStdLangType(block, cache_src, cache_val, std.lang.PrefetchOptions.Cache),
24429 };24429 };
24430}24430}
2443124431
...@@ -24465,12 +24465,12 @@ fn resolveExternOptions(...@@ -24465,12 +24465,12 @@ fn resolveExternOptions(
24465) CompileError!struct {24465) CompileError!struct {
24466 name: InternPool.NullTerminatedString,24466 name: InternPool.NullTerminatedString,
24467 library_name: InternPool.OptionalNullTerminatedString,24467 library_name: InternPool.OptionalNullTerminatedString,
24468 linkage: std.builtin.GlobalLinkage,24468 linkage: std.lang.GlobalLinkage,
24469 visibility: std.builtin.SymbolVisibility,24469 visibility: std.lang.SymbolVisibility,
24470 is_thread_local: bool,24470 is_thread_local: bool,
24471 is_dll_import: bool,24471 is_dll_import: bool,
24472 relocation: std.builtin.ExternOptions.Relocation,24472 relocation: std.lang.ExternOptions.Relocation,
24473 decoration: ?std.builtin.ExternOptions.Decoration,24473 decoration: ?std.lang.ExternOptions.Decoration,
24474} {24474} {
24475 const pt = sema.pt;24475 const pt = sema.pt;
24476 const zcu = pt.zcu;24476 const zcu = pt.zcu;
...@@ -24480,7 +24480,7 @@ fn resolveExternOptions(...@@ -24480,7 +24480,7 @@ fn resolveExternOptions(
24480 const ip = &zcu.intern_pool;24480 const ip = &zcu.intern_pool;
2448124481
24482 const options_inst = sema.resolveInst(zir_ref);24482 const options_inst = sema.resolveInst(zir_ref);
24483 const extern_options_ty = try sema.getBuiltinType(src, .ExternOptions);24483 const extern_options_ty = try sema.getStdLangType(src, .ExternOptions);
24484 const options = try sema.coerce(block, extern_options_ty, options_inst, src);24484 const options = try sema.coerce(block, extern_options_ty, options_inst, src);
2448524485
24486 const name_src = block.src(.{ .init_field_name = src.offset.node_offset_builtin_call_arg.builtin_call_node });24486 const name_src = block.src(.{ .init_field_name = src.offset.node_offset_builtin_call_arg.builtin_call_node });
...@@ -24500,11 +24500,11 @@ fn resolveExternOptions(...@@ -24500,11 +24500,11 @@ fn resolveExternOptions(
2450024500
24501 const linkage_ref = try sema.fieldVal(block, src, options, try ip.getOrPutString(gpa, io, pt.tid, "linkage", .no_embedded_nulls), linkage_src);24501 const linkage_ref = try sema.fieldVal(block, src, options, try ip.getOrPutString(gpa, io, pt.tid, "linkage", .no_embedded_nulls), linkage_src);
24502 const linkage_val = try sema.resolveConstDefinedValue(block, linkage_src, linkage_ref, .{ .simple = .extern_options });24502 const linkage_val = try sema.resolveConstDefinedValue(block, linkage_src, linkage_ref, .{ .simple = .extern_options });
24503 const linkage = try sema.interpretBuiltinType(block, linkage_src, linkage_val, std.builtin.GlobalLinkage);24503 const linkage = try sema.interpretStdLangType(block, linkage_src, linkage_val, std.lang.GlobalLinkage);
2450424504
24505 const visibility_ref = try sema.fieldVal(block, src, options, try ip.getOrPutString(gpa, io, pt.tid, "visibility", .no_embedded_nulls), visibility_src);24505 const visibility_ref = try sema.fieldVal(block, src, options, try ip.getOrPutString(gpa, io, pt.tid, "visibility", .no_embedded_nulls), visibility_src);
24506 const visibility_val = try sema.resolveConstDefinedValue(block, visibility_src, visibility_ref, .{ .simple = .extern_options });24506 const visibility_val = try sema.resolveConstDefinedValue(block, visibility_src, visibility_ref, .{ .simple = .extern_options });
24507 const visibility = try sema.interpretBuiltinType(block, visibility_src, visibility_val, std.builtin.SymbolVisibility);24507 const visibility = try sema.interpretStdLangType(block, visibility_src, visibility_val, std.lang.SymbolVisibility);
2450824508
24509 const is_thread_local = try sema.fieldVal(block, src, options, try ip.getOrPutString(gpa, io, pt.tid, "is_thread_local", .no_embedded_nulls), thread_local_src);24509 const is_thread_local = try sema.fieldVal(block, src, options, try ip.getOrPutString(gpa, io, pt.tid, "is_thread_local", .no_embedded_nulls), thread_local_src);
24510 const is_thread_local_val = try sema.resolveConstDefinedValue(block, thread_local_src, is_thread_local, .{ .simple = .extern_options });24510 const is_thread_local_val = try sema.resolveConstDefinedValue(block, thread_local_src, is_thread_local, .{ .simple = .extern_options });
...@@ -24523,11 +24523,11 @@ fn resolveExternOptions(...@@ -24523,11 +24523,11 @@ fn resolveExternOptions(
2452324523
24524 const relocation_ref = try sema.fieldVal(block, src, options, try ip.getOrPutString(gpa, io, pt.tid, "relocation", .no_embedded_nulls), relocation_src);24524 const relocation_ref = try sema.fieldVal(block, src, options, try ip.getOrPutString(gpa, io, pt.tid, "relocation", .no_embedded_nulls), relocation_src);
24525 const relocation_val = try sema.resolveConstDefinedValue(block, relocation_src, relocation_ref, .{ .simple = .extern_options });24525 const relocation_val = try sema.resolveConstDefinedValue(block, relocation_src, relocation_ref, .{ .simple = .extern_options });
24526 const relocation = try sema.interpretBuiltinType(block, relocation_src, relocation_val, std.builtin.ExternOptions.Relocation);24526 const relocation = try sema.interpretStdLangType(block, relocation_src, relocation_val, std.lang.ExternOptions.Relocation);
2452724527
24528 const decoration_ref = try sema.fieldVal(block, src, options, try ip.getOrPutString(gpa, io, pt.tid, "decoration", .no_embedded_nulls), decoration_src);24528 const decoration_ref = try sema.fieldVal(block, src, options, try ip.getOrPutString(gpa, io, pt.tid, "decoration", .no_embedded_nulls), decoration_src);
24529 const decoration_val = try sema.resolveConstDefinedValue(block, decoration_src, decoration_ref, .{ .simple = .extern_options });24529 const decoration_val = try sema.resolveConstDefinedValue(block, decoration_src, decoration_ref, .{ .simple = .extern_options });
24530 const decoration = try sema.interpretBuiltinType(block, decoration_src, decoration_val, ?std.builtin.ExternOptions.Decoration);24530 const decoration = try sema.interpretStdLangType(block, decoration_src, decoration_val, ?std.lang.ExternOptions.Decoration);
2453124531
24532 if (name.len == 0) {24532 if (name.len == 0) {
24533 return sema.fail(block, name_src, "extern symbol name cannot be empty", .{});24533 return sema.fail(block, name_src, "extern symbol name cannot be empty", .{});
...@@ -24696,7 +24696,7 @@ fn zirInComptime(...@@ -24696,7 +24696,7 @@ fn zirInComptime(
24696 return if (block.isComptime()) .bool_true else .bool_false;24696 return if (block.isComptime()) .bool_true else .bool_false;
24697}24697}
2469824698
24699fn zirBuiltinValue(sema: *Sema, block: *Block, extended: Zir.Inst.Extended.InstData) CompileError!Air.Inst.Ref {24699fn zirStdLangValue(sema: *Sema, block: *Block, extended: Zir.Inst.Extended.InstData) CompileError!Air.Inst.Ref {
24700 const pt = sema.pt;24700 const pt = sema.pt;
24701 const zcu = pt.zcu;24701 const zcu = pt.zcu;
24702 const comp = zcu.comp;24702 const comp = zcu.comp;
...@@ -24706,9 +24706,9 @@ fn zirBuiltinValue(sema: *Sema, block: *Block, extended: Zir.Inst.Extended.InstD...@@ -24706,9 +24706,9 @@ fn zirBuiltinValue(sema: *Sema, block: *Block, extended: Zir.Inst.Extended.InstD
2470624706
24707 const src_node: std.zig.Ast.Node.Offset = @enumFromInt(@as(i32, @bitCast(extended.operand)));24707 const src_node: std.zig.Ast.Node.Offset = @enumFromInt(@as(i32, @bitCast(extended.operand)));
24708 const src = block.nodeOffset(src_node);24708 const src = block.nodeOffset(src_node);
24709 const value: Zir.Inst.BuiltinValue = @enumFromInt(extended.small);24709 const value: Zir.Inst.StdLangValue = @enumFromInt(extended.small);
2471024710
24711 const builtin_type: Zcu.BuiltinDecl = switch (value) {24711 const std_lang_type: Zcu.StdLangDecl = switch (value) {
24712 // zig fmt: off24712 // zig fmt: off
24713 .atomic_order => .AtomicOrder,24713 .atomic_order => .AtomicOrder,
24714 .atomic_rmw_op => .AtomicRmwOp,24714 .atomic_rmw_op => .AtomicRmwOp,
...@@ -24732,28 +24732,28 @@ fn zirBuiltinValue(sema: *Sema, block: *Block, extended: Zir.Inst.Extended.InstD...@@ -24732,28 +24732,28 @@ fn zirBuiltinValue(sema: *Sema, block: *Block, extended: Zir.Inst.Extended.InstD
2473224732
24733 // Values are handled here.24733 // Values are handled here.
24734 .calling_convention_c => {24734 .calling_convention_c => {
24735 const callconv_ty = try sema.getBuiltinType(src, .CallingConvention);24735 const callconv_ty = try sema.getStdLangType(src, .CallingConvention);
24736 // Cannot use `Value.uninterpret` because `c` is a *declaration* whose value depends on the target.24736 // Cannot use `Value.uninterpret` because `c` is a *declaration* whose value depends on the target.
24737 return try sema.namespaceLookupVal(24737 return try sema.namespaceLookupVal(
24738 block,24738 block,
24739 src,24739 src,
24740 callconv_ty.getNamespaceIndex(zcu),24740 callconv_ty.getNamespaceIndex(zcu),
24741 try ip.getOrPutString(gpa, io, pt.tid, "c", .no_embedded_nulls),24741 try ip.getOrPutString(gpa, io, pt.tid, "c", .no_embedded_nulls),
24742 ) orelse @panic("std.builtin is corrupt");24742 ) orelse @panic("std.lang is corrupt");
24743 },24743 },
24744 .calling_convention_inline => {24744 .calling_convention_inline => {
24745 const callconv_ty = try sema.getBuiltinType(src, .CallingConvention);24745 const callconv_ty = try sema.getStdLangType(src, .CallingConvention);
24746 return .fromValue(Value.uninterpret(24746 return .fromValue(Value.uninterpret(
24747 @as(std.builtin.CallingConvention, .@"inline"),24747 @as(std.lang.CallingConvention, .@"inline"),
24748 callconv_ty,24748 callconv_ty,
24749 pt,24749 pt,
24750 ) catch |err| switch (err) {24750 ) catch |err| switch (err) {
24751 error.TypeMismatch => @panic("std.builtin is corrupt"),24751 error.TypeMismatch => @panic("std.lang is corrupt"),
24752 error.OutOfMemory => |e| return e,24752 error.OutOfMemory => |e| return e,
24753 });24753 });
24754 },24754 },
24755 };24755 };
24756 return .fromType(try sema.getBuiltinType(src, builtin_type));24756 return .fromType(try sema.getStdLangType(src, std_lang_type));
24757}24757}
2475824758
24759fn zirInplaceArithResultTy(sema: *Sema, extended: Zir.Inst.Extended.InstData) CompileError!Air.Inst.Ref {24759fn zirInplaceArithResultTy(sema: *Sema, extended: Zir.Inst.Extended.InstData) CompileError!Air.Inst.Ref {
...@@ -24788,14 +24788,14 @@ fn zirBranchHint(sema: *Sema, block: *Block, extended: Zir.Inst.Extended.InstDat...@@ -24788,14 +24788,14 @@ fn zirBranchHint(sema: *Sema, block: *Block, extended: Zir.Inst.Extended.InstDat
24788 const uncoerced_hint = sema.resolveInst(extra.operand);24788 const uncoerced_hint = sema.resolveInst(extra.operand);
24789 const operand_src = block.builtinCallArgSrc(extra.node, 0);24789 const operand_src = block.builtinCallArgSrc(extra.node, 0);
2479024790
24791 const hint_ty = try sema.getBuiltinType(operand_src, .BranchHint);24791 const hint_ty = try sema.getStdLangType(operand_src, .BranchHint);
24792 const coerced_hint = try sema.coerce(block, hint_ty, uncoerced_hint, operand_src);24792 const coerced_hint = try sema.coerce(block, hint_ty, uncoerced_hint, operand_src);
24793 const hint_val = try sema.resolveConstDefinedValue(block, operand_src, coerced_hint, .{ .simple = .operand_branchHint });24793 const hint_val = try sema.resolveConstDefinedValue(block, operand_src, coerced_hint, .{ .simple = .operand_branchHint });
2479424794
24795 // We only apply the first hint in a branch.24795 // We only apply the first hint in a branch.
24796 // This allows user-provided hints to override implicit cold hints.24796 // This allows user-provided hints to override implicit cold hints.
24797 if (sema.branch_hint == null) {24797 if (sema.branch_hint == null) {
24798 sema.branch_hint = try sema.interpretBuiltinType(block, operand_src, hint_val, std.builtin.BranchHint);24798 sema.branch_hint = try sema.interpretStdLangType(block, operand_src, hint_val, std.lang.BranchHint);
24799 }24799 }
24800}24800}
2480124801
...@@ -25148,7 +25148,7 @@ fn getPanicIdFunc(sema: *Sema, src: LazySrcLoc, panic_id: Zcu.SimplePanicId) !In...@@ -25148,7 +25148,7 @@ fn getPanicIdFunc(sema: *Sema, src: LazySrcLoc, panic_id: Zcu.SimplePanicId) !In
25148 const zcu = sema.pt.zcu;25148 const zcu = sema.pt.zcu;
25149 const io = zcu.comp.io;25149 const io = zcu.comp.io;
25150 try sema.ensureMemoizedStateResolved(src, .panic);25150 try sema.ensureMemoizedStateResolved(src, .panic);
25151 const panic_fn_index = zcu.builtin_decl_values.get(panic_id.toBuiltin());25151 const panic_fn_index = zcu.std_lang_decl_values.get(panic_id.toStdLangDecl());
25152 switch (sema.owner.unwrap()) {25152 switch (sema.owner.unwrap()) {
25153 .@"comptime",25153 .@"comptime",
25154 .nav_ty,25154 .nav_ty,
...@@ -25292,7 +25292,7 @@ fn safetyPanicUnwrapError(sema: *Sema, block: *Block, src: LazySrcLoc, err: Air....@@ -25292,7 +25292,7 @@ fn safetyPanicUnwrapError(sema: *Sema, block: *Block, src: LazySrcLoc, err: Air.
25292 if (!zcu.backendSupportsFeature(.panic_fn)) {25292 if (!zcu.backendSupportsFeature(.panic_fn)) {
25293 _ = try block.addNoOp(.trap);25293 _ = try block.addNoOp(.trap);
25294 } else {25294 } else {
25295 const panic_fn = try getBuiltin(sema, src, .@"panic.unwrapError");25295 const panic_fn = try getStdLangValue(sema, src, .@"panic.unwrapError");
25296 try sema.callBuiltin(block, src, Air.internedToRef(panic_fn), .auto, &.{err}, .@"safety check");25296 try sema.callBuiltin(block, src, Air.internedToRef(panic_fn), .auto, &.{err}, .@"safety check");
25297 }25297 }
25298}25298}
...@@ -25382,7 +25382,7 @@ fn addSafetyCheckCall(...@@ -25382,7 +25382,7 @@ fn addSafetyCheckCall(
25382 parent_block: *Block,25382 parent_block: *Block,
25383 src: LazySrcLoc,25383 src: LazySrcLoc,
25384 ok: Air.Inst.Ref,25384 ok: Air.Inst.Ref,
25385 comptime func_decl: Zcu.BuiltinDecl,25385 comptime func_decl: Zcu.StdLangDecl,
25386 args: []const Air.Inst.Ref,25386 args: []const Air.Inst.Ref,
25387) !void {25387) !void {
25388 assert(!parent_block.isComptime());25388 assert(!parent_block.isComptime());
...@@ -25406,7 +25406,7 @@ fn addSafetyCheckCall(...@@ -25406,7 +25406,7 @@ fn addSafetyCheckCall(
25406 if (!zcu.backendSupportsFeature(.panic_fn)) {25406 if (!zcu.backendSupportsFeature(.panic_fn)) {
25407 _ = try fail_block.addNoOp(.trap);25407 _ = try fail_block.addNoOp(.trap);
25408 } else {25408 } else {
25409 const panic_fn = try getBuiltin(sema, src, func_decl);25409 const panic_fn = try getStdLangValue(sema, src, func_decl);
25410 try sema.callBuiltin(&fail_block, src, Air.internedToRef(panic_fn), .auto, args, .@"safety check");25410 try sema.callBuiltin(&fail_block, src, Air.internedToRef(panic_fn), .auto, args, .@"safety check");
25411 }25411 }
2541225412
...@@ -27911,8 +27911,8 @@ const InMemoryCoercionResult = union(enum) {...@@ -27911,8 +27911,8 @@ const InMemoryCoercionResult = union(enum) {
27911 };27911 };
2791227912
27913 const Int = struct {27913 const Int = struct {
27914 actual_signedness: std.builtin.Signedness,27914 actual_signedness: std.lang.Signedness,
27915 wanted_signedness: std.builtin.Signedness,27915 wanted_signedness: std.lang.Signedness,
27916 actual_bits: u16,27916 actual_bits: u16,
27917 wanted_bits: u16,27917 wanted_bits: u16,
27918 };27918 };
...@@ -27928,18 +27928,18 @@ const InMemoryCoercionResult = union(enum) {...@@ -27928,18 +27928,18 @@ const InMemoryCoercionResult = union(enum) {
27928 };27928 };
2792927929
27930 const Size = struct {27930 const Size = struct {
27931 actual: std.builtin.Type.Pointer.Size,27931 actual: std.lang.Type.Pointer.Size,
27932 wanted: std.builtin.Type.Pointer.Size,27932 wanted: std.lang.Type.Pointer.Size,
27933 };27933 };
2793427934
27935 const AddressSpace = struct {27935 const AddressSpace = struct {
27936 actual: std.builtin.AddressSpace,27936 actual: std.lang.AddressSpace,
27937 wanted: std.builtin.AddressSpace,27937 wanted: std.lang.AddressSpace,
27938 };27938 };
2793927939
27940 const CC = struct {27940 const CC = struct {
27941 actual: std.builtin.CallingConvention,27941 actual: std.lang.CallingConvention,
27942 wanted: std.builtin.CallingConvention,27942 wanted: std.lang.CallingConvention,
27943 };27943 };
2794427944
27945 const BitRange = struct {27945 const BitRange = struct {
...@@ -28209,7 +28209,7 @@ const InMemoryCoercionResult = union(enum) {...@@ -28209,7 +28209,7 @@ const InMemoryCoercionResult = union(enum) {
28209 }28209 }
28210};28210};
2821128211
28212fn pointerSizeString(size: std.builtin.Type.Pointer.Size) []const u8 {28212fn pointerSizeString(size: std.lang.Type.Pointer.Size) []const u8 {
28213 return switch (size) {28213 return switch (size) {
28214 .one => "single pointer",28214 .one => "single pointer",
28215 .many => "many pointer",28215 .many => "many pointer",
...@@ -28635,10 +28635,10 @@ fn coerceInMemoryAllowedFns(...@@ -28635,10 +28635,10 @@ fn coerceInMemoryAllowedFns(
2863528635
28636fn callconvCoerceAllowed(28636fn callconvCoerceAllowed(
28637 target: *const std.Target,28637 target: *const std.Target,
28638 src_cc: std.builtin.CallingConvention,28638 src_cc: std.lang.CallingConvention,
28639 dest_cc: std.builtin.CallingConvention,28639 dest_cc: std.lang.CallingConvention,
28640) bool {28640) bool {
28641 const Tag = std.builtin.CallingConvention.Tag;28641 const Tag = std.lang.CallingConvention.Tag;
28642 if (@as(Tag, src_cc) != @as(Tag, dest_cc)) return false;28642 if (@as(Tag, src_cc) != @as(Tag, dest_cc)) return false;
2864328643
28644 switch (src_cc) {28644 switch (src_cc) {
...@@ -28651,26 +28651,26 @@ fn callconvCoerceAllowed(...@@ -28651,26 +28651,26 @@ fn callconvCoerceAllowed(
28651 if (dest_stack_align < src_stack_align) return false;28651 if (dest_stack_align < src_stack_align) return false;
28652 }28652 }
28653 switch (@TypeOf(src_data)) {28653 switch (@TypeOf(src_data)) {
28654 void, std.builtin.CallingConvention.CommonOptions => {},28654 void, std.lang.CallingConvention.CommonOptions => {},
28655 std.builtin.CallingConvention.X86RegparmOptions => {28655 std.lang.CallingConvention.X86RegparmOptions => {
28656 if (src_data.register_params != dest_data.register_params) return false;28656 if (src_data.register_params != dest_data.register_params) return false;
28657 },28657 },
28658 std.builtin.CallingConvention.ArcInterruptOptions => {28658 std.lang.CallingConvention.ArcInterruptOptions => {
28659 if (src_data.type != dest_data.type) return false;28659 if (src_data.type != dest_data.type) return false;
28660 },28660 },
28661 std.builtin.CallingConvention.ArmInterruptOptions => {28661 std.lang.CallingConvention.ArmInterruptOptions => {
28662 if (src_data.type != dest_data.type) return false;28662 if (src_data.type != dest_data.type) return false;
28663 },28663 },
28664 std.builtin.CallingConvention.MicroblazeInterruptOptions => {28664 std.lang.CallingConvention.MicroblazeInterruptOptions => {
28665 if (src_data.type != dest_data.type) return false;28665 if (src_data.type != dest_data.type) return false;
28666 },28666 },
28667 std.builtin.CallingConvention.MipsInterruptOptions => {28667 std.lang.CallingConvention.MipsInterruptOptions => {
28668 if (src_data.mode != dest_data.mode) return false;28668 if (src_data.mode != dest_data.mode) return false;
28669 },28669 },
28670 std.builtin.CallingConvention.RiscvInterruptOptions => {28670 std.lang.CallingConvention.RiscvInterruptOptions => {
28671 if (src_data.mode != dest_data.mode) return false;28671 if (src_data.mode != dest_data.mode) return false;
28672 },28672 },
28673 std.builtin.CallingConvention.ShInterruptOptions => {28673 std.lang.CallingConvention.ShInterruptOptions => {
28674 if (src_data.save != dest_data.save) return false;28674 if (src_data.save != dest_data.save) return false;
28675 },28675 },
28676 else => comptime unreachable,28676 else => comptime unreachable,
...@@ -31115,7 +31115,7 @@ fn cmpNumeric(...@@ -31115,7 +31115,7 @@ fn cmpNumeric(
31115 const dest_ty = if (dest_float_type) |ft| ft else blk: {31115 const dest_ty = if (dest_float_type) |ft| ft else blk: {
31116 const max_bits = @max(lhs_bits, rhs_bits);31116 const max_bits = @max(lhs_bits, rhs_bits);
31117 const casted_bits = std.math.cast(u16, max_bits) orelse return sema.fail(block, src, "{d} exceeds maximum integer bit count", .{max_bits});31117 const casted_bits = std.math.cast(u16, max_bits) orelse return sema.fail(block, src, "{d} exceeds maximum integer bit count", .{max_bits});
31118 const signedness: std.builtin.Signedness = if (dest_int_is_signed) .signed else .unsigned;31118 const signedness: std.lang.Signedness = if (dest_int_is_signed) .signed else .unsigned;
31119 break :blk try pt.intType(signedness, casted_bits);31119 break :blk try pt.intType(signedness, casted_bits);
31120 };31120 };
31121 const casted_lhs = try sema.coerce(block, dest_ty, lhs, lhs_src);31121 const casted_lhs = try sema.coerce(block, dest_ty, lhs, lhs_src);
...@@ -33101,7 +33101,7 @@ fn resolveAddressSpace(...@@ -33101,7 +33101,7 @@ fn resolveAddressSpace(
33101 src: LazySrcLoc,33101 src: LazySrcLoc,
33102 zir_ref: Zir.Inst.Ref,33102 zir_ref: Zir.Inst.Ref,
33103 ctx: std.Target.AddressSpaceContext,33103 ctx: std.Target.AddressSpaceContext,
33104) !std.builtin.AddressSpace {33104) !std.lang.AddressSpace {
33105 const air_ref = sema.resolveInst(zir_ref);33105 const air_ref = sema.resolveInst(zir_ref);
33106 return sema.analyzeAsAddressSpace(block, src, air_ref, ctx);33106 return sema.analyzeAsAddressSpace(block, src, air_ref, ctx);
33107}33107}
...@@ -33112,12 +33112,12 @@ pub fn analyzeAsAddressSpace(...@@ -33112,12 +33112,12 @@ pub fn analyzeAsAddressSpace(
33112 src: LazySrcLoc,33112 src: LazySrcLoc,
33113 air_ref: Air.Inst.Ref,33113 air_ref: Air.Inst.Ref,
33114 ctx: std.Target.AddressSpaceContext,33114 ctx: std.Target.AddressSpaceContext,
33115) !std.builtin.AddressSpace {33115) !std.lang.AddressSpace {
33116 const pt = sema.pt;33116 const pt = sema.pt;
33117 const addrspace_ty = try sema.getBuiltinType(src, .AddressSpace);33117 const addrspace_ty = try sema.getStdLangType(src, .AddressSpace);
33118 const coerced = try sema.coerce(block, addrspace_ty, air_ref, src);33118 const coerced = try sema.coerce(block, addrspace_ty, air_ref, src);
33119 const addrspace_val = try sema.resolveConstDefinedValue(block, src, coerced, .{ .simple = .@"addrspace" });33119 const addrspace_val = try sema.resolveConstDefinedValue(block, src, coerced, .{ .simple = .@"addrspace" });
33120 const address_space = try sema.interpretBuiltinType(block, src, addrspace_val, std.builtin.AddressSpace);33120 const address_space = try sema.interpretStdLangType(block, src, addrspace_val, std.lang.AddressSpace);
33121 const target = pt.zcu.getTarget();33121 const target = pt.zcu.getTarget();
3312233122
33123 if (!target.supportsAddressSpace(address_space, ctx)) {33123 if (!target.supportsAddressSpace(address_space, ctx)) {
...@@ -33819,21 +33819,21 @@ pub const type_resolution = @import("Sema/type_resolution.zig");...@@ -33819,21 +33819,21 @@ pub const type_resolution = @import("Sema/type_resolution.zig");
33819pub const ensureLayoutResolved = type_resolution.ensureLayoutResolved;33819pub const ensureLayoutResolved = type_resolution.ensureLayoutResolved;
33820pub const ensureStructDefaultsResolved = type_resolution.ensureStructDefaultsResolved;33820pub const ensureStructDefaultsResolved = type_resolution.ensureStructDefaultsResolved;
3382133821
33822pub fn getBuiltinType(sema: *Sema, src: LazySrcLoc, decl: Zcu.BuiltinDecl) SemaError!Type {33822pub fn getStdLangType(sema: *Sema, src: LazySrcLoc, decl: Zcu.StdLangDecl) SemaError!Type {
33823 assert(decl.kind() == .type);33823 assert(decl.kind() == .type);
33824 try sema.ensureMemoizedStateResolved(src, decl.stage());33824 try sema.ensureMemoizedStateResolved(src, decl.stage());
33825 return .fromInterned(sema.pt.zcu.builtin_decl_values.get(decl));33825 return .fromInterned(sema.pt.zcu.std_lang_decl_values.get(decl));
33826}33826}
33827pub fn getBuiltin(sema: *Sema, src: LazySrcLoc, decl: Zcu.BuiltinDecl) SemaError!InternPool.Index {33827pub fn getStdLangValue(sema: *Sema, src: LazySrcLoc, decl: Zcu.StdLangDecl) SemaError!InternPool.Index {
33828 assert(decl.kind() != .type);33828 assert(decl.kind() != .type);
33829 try sema.ensureMemoizedStateResolved(src, decl.stage());33829 try sema.ensureMemoizedStateResolved(src, decl.stage());
33830 return sema.pt.zcu.builtin_decl_values.get(decl);33830 return sema.pt.zcu.std_lang_decl_values.get(decl);
33831}33831}
3383233832
33833pub const NavPtrModifiers = struct {33833pub const NavPtrModifiers = struct {
33834 @"align": Alignment,33834 @"align": Alignment,
33835 @"linksection": InternPool.OptionalNullTerminatedString,33835 @"linksection": InternPool.OptionalNullTerminatedString,
33836 @"addrspace": std.builtin.AddressSpace,33836 @"addrspace": std.lang.AddressSpace,
33837};33837};
3383833838
33839pub fn resolveNavPtrModifiers(33839pub fn resolveNavPtrModifiers(
...@@ -33872,7 +33872,7 @@ pub fn resolveNavPtrModifiers(...@@ -33872,7 +33872,7 @@ pub fn resolveNavPtrModifiers(
33872 break :ls try ip.getOrPutStringOpt(gpa, io, pt.tid, bytes, .no_embedded_nulls);33872 break :ls try ip.getOrPutStringOpt(gpa, io, pt.tid, bytes, .no_embedded_nulls);
33873 };33873 };
3387433874
33875 const @"addrspace": std.builtin.AddressSpace = as: {33875 const @"addrspace": std.lang.AddressSpace = as: {
33876 const addrspace_ctx: std.Target.AddressSpaceContext = switch (zir_decl.kind) {33876 const addrspace_ctx: std.Target.AddressSpaceContext = switch (zir_decl.kind) {
33877 .@"var" => .variable,33877 .@"var" => .variable,
33878 else => switch (nav_ty.zigTypeTag(zcu)) {33878 else => switch (nav_ty.zigTypeTag(zcu)) {
...@@ -33928,30 +33928,30 @@ pub fn analyzeMemoizedState(sema: *Sema, stage: InternPool.MemoizedStateStage) C...@@ -33928,30 +33928,30 @@ pub fn analyzeMemoizedState(sema: *Sema, stage: InternPool.MemoizedStateStage) C
33928 };33928 };
33929 defer block.instructions.deinit(gpa);33929 defer block.instructions.deinit(gpa);
3393033930
33931 const std_builtin_ty: Type = ty: {33931 const std_lang_ty: Type = ty: {
33932 const std_src = block.nodeOffset(.zero);33932 const std_src = block.nodeOffset(.zero);
33933 const decl_name = try ip.getOrPutString(gpa, io, pt.tid, "builtin", .no_embedded_nulls);33933 const decl_name = try ip.getOrPutString(gpa, io, pt.tid, "lang", .no_embedded_nulls);
33934 const nav = try sema.namespaceLookup(&block, std_src, block.namespace, decl_name) orelse {33934 const nav = try sema.namespaceLookup(&block, std_src, block.namespace, decl_name) orelse {
33935 return sema.fail(&block, std_src, "'std' missing 'builtin'", .{});33935 return sema.fail(&block, std_src, "'std' missing 'lang'", .{});
33936 };33936 };
33937 const uncoerced_val = try sema.analyzeNavVal(&block, std_src, nav);33937 const uncoerced_val = try sema.analyzeNavVal(&block, std_src, nav);
33938 const decl_src: LazySrcLoc = .{33938 const decl_src: LazySrcLoc = .{
33939 .base_node_inst = ip.getNav(nav).srcInst(ip),33939 .base_node_inst = ip.getNav(nav).srcInst(ip),
33940 .offset = .nodeOffset(.zero),33940 .offset = .nodeOffset(.zero),
33941 };33941 };
33942 break :ty try sema.analyzeAsType(&block, decl_src, .std_builtin_decl, uncoerced_val);33942 break :ty try sema.analyzeAsType(&block, decl_src, .std_lang_decl, uncoerced_val);
33943 };33943 };
3394433944
33945 var any_changed = false;33945 var any_changed = false;
3394633946
33947 inline for (comptime std.enums.values(Zcu.BuiltinDecl)) |builtin_decl| {33947 inline for (comptime std.enums.values(Zcu.StdLangDecl)) |std_lang_decl| {
33948 if (stage == comptime builtin_decl.stage()) {33948 if (stage == comptime std_lang_decl.stage()) {
33949 const parent_ns_ty: Type, const parent_name: []const u8, const name: []const u8 = switch (comptime builtin_decl.access()) {33949 const parent_ns_ty: Type, const parent_name: []const u8, const name: []const u8 = switch (comptime std_lang_decl.access()) {
33950 .direct => |name| .{ std_builtin_ty, "std.builtin", name },33950 .direct => |name| .{ std_lang_ty, "std.lang", name },
33951 .nested => |nested| access: {33951 .nested => |nested| access: {
33952 const parent_decl, const name = nested;33952 const parent_decl, const name = nested;
33953 const parent_ty: Type = .fromInterned(zcu.builtin_decl_values.get(parent_decl));33953 const parent_ty: Type = .fromInterned(zcu.std_lang_decl_values.get(parent_decl));
33954 break :access .{ parent_ty, "std.builtin." ++ @tagName(parent_decl), name };33954 break :access .{ parent_ty, "std.lang." ++ @tagName(parent_decl), name };
33955 },33955 },
33956 };33956 };
3395733957
...@@ -33970,25 +33970,25 @@ pub fn analyzeMemoizedState(sema: *Sema, stage: InternPool.MemoizedStateStage) C...@@ -33970,25 +33970,25 @@ pub fn analyzeMemoizedState(sema: *Sema, stage: InternPool.MemoizedStateStage) C
33970 .offset = .nodeOffset(.zero),33970 .offset = .nodeOffset(.zero),
33971 };33971 };
3397233972
33973 const val: Value = switch (builtin_decl.kind()) {33973 const val: Value = switch (std_lang_decl.kind()) {
33974 .type => val: {33974 .type => val: {
33975 const ty = try sema.analyzeAsType(&block, decl_src, .std_builtin_decl, uncoerced_val);33975 const ty = try sema.analyzeAsType(&block, decl_src, .std_lang_decl, uncoerced_val);
33976 try sema.ensureLayoutResolved(ty, decl_src, .builtin_type);33976 try sema.ensureLayoutResolved(ty, decl_src, .std_lang_type);
33977 break :val ty.toValue();33977 break :val ty.toValue();
33978 },33978 },
33979 .func => val: {33979 .func => val: {
33980 const func_ty = try sema.getExpectedBuiltinFnType(builtin_decl);33980 const func_ty = try sema.getExpectedBuiltinFnType(std_lang_decl);
33981 const coerced = try sema.coerce(&block, func_ty, uncoerced_val, decl_src);33981 const coerced = try sema.coerce(&block, func_ty, uncoerced_val, decl_src);
33982 break :val try sema.resolveConstDefinedValue(&block, decl_src, coerced, .{ .simple = .std_builtin_decl });33982 break :val try sema.resolveConstDefinedValue(&block, decl_src, coerced, .{ .simple = .std_lang_decl });
33983 },33983 },
33984 .string => val: {33984 .string => val: {
33985 const coerced = try sema.coerce(&block, .slice_const_u8, uncoerced_val, decl_src);33985 const coerced = try sema.coerce(&block, .slice_const_u8, uncoerced_val, decl_src);
33986 break :val try sema.resolveConstDefinedValue(&block, decl_src, coerced, .{ .simple = .std_builtin_decl });33986 break :val try sema.resolveConstDefinedValue(&block, decl_src, coerced, .{ .simple = .std_lang_decl });
33987 },33987 },
33988 };33988 };
3398933989
33990 if (zcu.builtin_decl_values.get(builtin_decl) != val.toIntern()) {33990 if (zcu.std_lang_decl_values.get(std_lang_decl) != val.toIntern()) {
33991 zcu.builtin_decl_values.set(builtin_decl, val.toIntern());33991 zcu.std_lang_decl_values.set(std_lang_decl, val.toIntern());
33992 any_changed = true;33992 any_changed = true;
33993 }33993 }
33994 }33994 }
...@@ -33998,7 +33998,7 @@ pub fn analyzeMemoizedState(sema: *Sema, stage: InternPool.MemoizedStateStage) C...@@ -33998,7 +33998,7 @@ pub fn analyzeMemoizedState(sema: *Sema, stage: InternPool.MemoizedStateStage) C
33998}33998}
3399933999
34000/// Given that `decl.kind() == .func`, get the type expected of the function.34000/// Given that `decl.kind() == .func`, get the type expected of the function.
34001fn getExpectedBuiltinFnType(sema: *Sema, decl: Zcu.BuiltinDecl) CompileError!Type {34001fn getExpectedBuiltinFnType(sema: *Sema, decl: Zcu.StdLangDecl) CompileError!Type {
34002 const pt = sema.pt;34002 const pt = sema.pt;
34003 return switch (decl) {34003 return switch (decl) {
34004 // `noinline fn () void`34004 // `noinline fn () void`
src/Sema/arith.zig+2-2
...@@ -1191,7 +1191,7 @@ pub fn truncate(...@@ -1191,7 +1191,7 @@ pub fn truncate(
1191 val: Value,1191 val: Value,
1192 ty: Type,1192 ty: Type,
1193 dest_ty: Type,1193 dest_ty: Type,
1194 dest_signedness: std.builtin.Signedness,1194 dest_signedness: std.lang.Signedness,
1195 dest_bits: u16,1195 dest_bits: u16,
1196) CompileError!Value {1196) CompileError!Value {
1197 const pt = sema.pt;1197 const pt = sema.pt;
...@@ -1808,7 +1808,7 @@ fn intTruncate(...@@ -1808,7 +1808,7 @@ fn intTruncate(
1808 sema: *Sema,1808 sema: *Sema,
1809 val: Value,1809 val: Value,
1810 dest_ty: Type,1810 dest_ty: Type,
1811 dest_signedness: std.builtin.Signedness,1811 dest_signedness: std.lang.Signedness,
1812 dest_bits: u16,1812 dest_bits: u16,
1813) !Value {1813) !Value {
1814 const pt = sema.pt;1814 const pt = sema.pt;
src/Sema/type_resolution.zig+2-2
...@@ -35,7 +35,7 @@ pub const LayoutResolveReason = enum {...@@ -35,7 +35,7 @@ pub const LayoutResolveReason = enum {
35 @"export",35 @"export",
36 @"extern",36 @"extern",
37 asm_out_type,37 asm_out_type,
38 builtin_type,38 std_lang_type,
3939
40 /// Written after string: "while resolving type 'T' "40 /// Written after string: "while resolving type 'T' "
41 /// e.g. "while resolving type 'MyStruct' for variable declared here"41 /// e.g. "while resolving type 'MyStruct' for variable declared here"
...@@ -62,7 +62,7 @@ pub const LayoutResolveReason = enum {...@@ -62,7 +62,7 @@ pub const LayoutResolveReason = enum {
62 .@"export" => "for export here",62 .@"export" => "for export here",
63 .@"extern" => "for extern declaration here",63 .@"extern" => "for extern declaration here",
64 .asm_out_type => "for inline assembly output type declared here",64 .asm_out_type => "for inline assembly output type declared here",
65 .builtin_type => "from 'std.builtin'",65 .std_lang_type => "from 'std.lang'",
66 // zig fmt: on66 // zig fmt: on
67 };67 };
68 }68 }
src/Type.zig+8-8
...@@ -19,7 +19,7 @@ const Type = @This();...@@ -19,7 +19,7 @@ const Type = @This();
1919
20ip_index: InternPool.Index,20ip_index: InternPool.Index,
2121
22pub fn zigTypeTag(ty: Type, zcu: *const Zcu) std.builtin.TypeId {22pub fn zigTypeTag(ty: Type, zcu: *const Zcu) std.lang.TypeId {
23 return zcu.intern_pool.zigTypeTag(ty.toIntern());23 return zcu.intern_pool.zigTypeTag(ty.toIntern());
24}24}
2525
...@@ -903,7 +903,7 @@ pub fn ptrAlignment(ptr_ty: Type, zcu: *Zcu) Alignment {...@@ -903,7 +903,7 @@ pub fn ptrAlignment(ptr_ty: Type, zcu: *Zcu) Alignment {
903 return Type.fromInterned(ptr_key.child).abiAlignment(zcu);903 return Type.fromInterned(ptr_key.child).abiAlignment(zcu);
904}904}
905905
906pub fn ptrAddressSpace(ty: Type, zcu: *const Zcu) std.builtin.AddressSpace {906pub fn ptrAddressSpace(ty: Type, zcu: *const Zcu) std.lang.AddressSpace {
907 return switch (zcu.intern_pool.indexToKey(ty.toIntern())) {907 return switch (zcu.intern_pool.indexToKey(ty.toIntern())) {
908 .ptr_type => |ptr_type| ptr_type.flags.address_space,908 .ptr_type => |ptr_type| ptr_type.flags.address_space,
909 .opt_type => |child| zcu.intern_pool.indexToKey(child).ptr_type.flags.address_space,909 .opt_type => |child| zcu.intern_pool.indexToKey(child).ptr_type.flags.address_space,
...@@ -1337,12 +1337,12 @@ pub fn isSinglePointer(ty: Type, zcu: *const Zcu) bool {...@@ -1337,12 +1337,12 @@ pub fn isSinglePointer(ty: Type, zcu: *const Zcu) bool {
1337}1337}
13381338
1339/// Asserts `ty` is a pointer.1339/// Asserts `ty` is a pointer.
1340pub fn ptrSize(ty: Type, zcu: *const Zcu) std.builtin.Type.Pointer.Size {1340pub fn ptrSize(ty: Type, zcu: *const Zcu) std.lang.Type.Pointer.Size {
1341 return ty.ptrSizeOrNull(zcu).?;1341 return ty.ptrSizeOrNull(zcu).?;
1342}1342}
13431343
1344/// Returns `null` if `ty` is not a pointer.1344/// Returns `null` if `ty` is not a pointer.
1345pub fn ptrSizeOrNull(ty: Type, zcu: *const Zcu) ?std.builtin.Type.Pointer.Size {1345pub fn ptrSizeOrNull(ty: Type, zcu: *const Zcu) ?std.lang.Type.Pointer.Size {
1346 return switch (zcu.intern_pool.indexToKey(ty.toIntern())) {1346 return switch (zcu.intern_pool.indexToKey(ty.toIntern())) {
1347 .ptr_type => |ptr_info| ptr_info.flags.size,1347 .ptr_type => |ptr_info| ptr_info.flags.size,
1348 else => null,1348 else => null,
...@@ -1627,7 +1627,7 @@ pub fn unionGetLayout(ty: Type, zcu: *const Zcu) Zcu.UnionLayout {...@@ -1627,7 +1627,7 @@ pub fn unionGetLayout(ty: Type, zcu: *const Zcu) Zcu.UnionLayout {
1627 return Type.getUnionLayout(union_obj, zcu);1627 return Type.getUnionLayout(union_obj, zcu);
1628}1628}
16291629
1630pub fn containerLayout(ty: Type, zcu: *const Zcu) std.builtin.Type.ContainerLayout {1630pub fn containerLayout(ty: Type, zcu: *const Zcu) std.lang.Type.ContainerLayout {
1631 const ip = &zcu.intern_pool;1631 const ip = &zcu.intern_pool;
1632 return switch (ip.indexToKey(ty.toIntern())) {1632 return switch (ip.indexToKey(ty.toIntern())) {
1633 .tuple_type => .auto,1633 .tuple_type => .auto,
...@@ -1949,7 +1949,7 @@ pub fn fnReturnType(ty: Type, zcu: *const Zcu) Type {...@@ -1949,7 +1949,7 @@ pub fn fnReturnType(ty: Type, zcu: *const Zcu) Type {
1949}1949}
19501950
1951/// Asserts the type is a function.1951/// Asserts the type is a function.
1952pub fn fnCallingConvention(ty: Type, zcu: *const Zcu) std.builtin.CallingConvention {1952pub fn fnCallingConvention(ty: Type, zcu: *const Zcu) std.lang.CallingConvention {
1953 return zcu.intern_pool.indexToKey(ty.toIntern()).func_type.cc;1953 return zcu.intern_pool.indexToKey(ty.toIntern()).func_type.cc;
1954}1954}
19551955
...@@ -2477,7 +2477,7 @@ pub fn explicitFieldAlignment(ty: Type, index: usize, zcu: *const Zcu) Alignment...@@ -2477,7 +2477,7 @@ pub fn explicitFieldAlignment(ty: Type, index: usize, zcu: *const Zcu) Alignment
2477/// Asserts that the layout of `field_ty` is resolved. Asserts that `layout` is not `.@"packed"`.2477/// Asserts that the layout of `field_ty` is resolved. Asserts that `layout` is not `.@"packed"`.
2478pub fn defaultStructFieldAlignment(2478pub fn defaultStructFieldAlignment(
2479 field_ty: Type,2479 field_ty: Type,
2480 layout: std.builtin.Type.ContainerLayout,2480 layout: std.lang.Type.ContainerLayout,
2481 zcu: *const Zcu,2481 zcu: *const Zcu,
2482) Alignment {2482) Alignment {
2483 const overalign_big_int = switch (layout) {2483 const overalign_big_int = switch (layout) {
...@@ -3227,7 +3227,7 @@ pub fn validateExtern(ty: Type, position: ExternPosition, zcu: *const Zcu) bool...@@ -3227,7 +3227,7 @@ pub fn validateExtern(ty: Type, position: ExternPosition, zcu: *const Zcu) bool
3227 .optional => ty.isPtrLikeOptional(zcu),3227 .optional => ty.isPtrLikeOptional(zcu),
3228 };3228 };
3229}3229}
3230fn validateExternCallconv(cc: std.builtin.CallingConvention) bool {3230fn validateExternCallconv(cc: std.lang.CallingConvention) bool {
3231 return switch (cc) {3231 return switch (cc) {
3232 // For now we want to authorize PTX kernel to use zig objects, even if we end up exposing the ABI.3232 // For now we want to authorize PTX kernel to use zig objects, even if we end up exposing the ABI.
3233 // The goal is to experiment with more integrated CPU/GPU code.3233 // The goal is to experiment with more integrated CPU/GPU code.
src/Value.zig+6-6
...@@ -1845,7 +1845,7 @@ pub fn ptrElem(orig_parent_ptr: Value, field_idx: u64, pt: Zcu.PerThread) !Value...@@ -1845,7 +1845,7 @@ pub fn ptrElem(orig_parent_ptr: Value, field_idx: u64, pt: Zcu.PerThread) !Value
1845 } }));1845 } }));
1846}1846}
18471847
1848fn canonicalizeBasePtr(base_ptr: Value, want_size: std.builtin.Type.Pointer.Size, want_child: Type, pt: Zcu.PerThread) !Value {1848fn canonicalizeBasePtr(base_ptr: Value, want_size: std.lang.Type.Pointer.Size, want_child: Type, pt: Zcu.PerThread) !Value {
1849 const ptr_ty = base_ptr.typeOf(pt.zcu);1849 const ptr_ty = base_ptr.typeOf(pt.zcu);
1850 const ptr_info = ptr_ty.ptrInfo(pt.zcu);1850 const ptr_info = ptr_ty.ptrInfo(pt.zcu);
18511851
...@@ -2199,19 +2199,19 @@ pub fn pointerDerivation(ptr_val: Value, arena: Allocator, pt: Zcu.PerThread, op...@@ -2199,19 +2199,19 @@ pub fn pointerDerivation(ptr_val: Value, arena: Allocator, pt: Zcu.PerThread, op
2199const InterpretMode = enum {2199const InterpretMode = enum {
2200 /// In this mode, types are assumed to match what the compiler was built with in terms of field2200 /// In this mode, types are assumed to match what the compiler was built with in terms of field
2201 /// order, field types, etc. This improves compiler performance. However, it means that certain2201 /// order, field types, etc. This improves compiler performance. However, it means that certain
2202 /// modifications to `std.builtin` will result in compiler crashes.2202 /// modifications to `std.lang` will result in compiler crashes.
2203 direct,2203 direct,
2204 /// In this mode, various details of the type are allowed to differ from what the compiler was built2204 /// In this mode, various details of the type are allowed to differ from what the compiler was built
2205 /// with. Fields are matched by name rather than index; added struct fields are ignored, and removed2205 /// with. Fields are matched by name rather than index; added struct fields are ignored, and removed
2206 /// struct fields use their default value if one exists. This is slower than `.direct`, but permits2206 /// struct fields use their default value if one exists. This is slower than `.direct`, but permits
2207 /// making certain changes to `std.builtin` (in particular reordering/adding/removing fields), so it2207 /// making certain changes to `std.lang` (in particular reordering/adding/removing fields), so it is
2208 /// is useful when applying breaking changes.2208 /// useful when applying breaking changes.
2209 by_name,2209 by_name,
2210};2210};
2211const interpret_mode: InterpretMode = @field(InterpretMode, @tagName(build_options.value_interpret_mode));2211const interpret_mode: InterpretMode = @field(InterpretMode, @tagName(build_options.value_interpret_mode));
22122212
2213/// Given a `Value` representing a comptime-known value of type `T`, unwrap it into an actual `T` known to the compiler.2213/// Given a `Value` representing a comptime-known value of type `T`, unwrap it into an actual `T` known to the compiler.
2214/// This is useful for accessing `std.builtin` structures received from comptime logic.2214/// This is useful for accessing `std.lang` structures received from comptime logic.
2215pub fn interpret(val: Value, comptime T: type, pt: Zcu.PerThread) error{ OutOfMemory, UndefinedValue, TypeMismatch }!T {2215pub fn interpret(val: Value, comptime T: type, pt: Zcu.PerThread) error{ OutOfMemory, UndefinedValue, TypeMismatch }!T {
2216 const zcu = pt.zcu;2216 const zcu = pt.zcu;
2217 const io = zcu.comp.io;2217 const io = zcu.comp.io;
...@@ -2313,7 +2313,7 @@ pub fn interpret(val: Value, comptime T: type, pt: Zcu.PerThread) error{ OutOfMe...@@ -2313,7 +2313,7 @@ pub fn interpret(val: Value, comptime T: type, pt: Zcu.PerThread) error{ OutOfMe
2313}2313}
23142314
2315/// Given any `val` and a `Type` corresponding `@TypeOf(val)`, construct a `Value` representing it which can be used2315/// Given any `val` and a `Type` corresponding `@TypeOf(val)`, construct a `Value` representing it which can be used
2316/// within the compilation. This is useful for passing `std.builtin` structures in the compiler back to the compilation.2316/// within the compilation. This is useful for passing `std.lang` structures in the compiler back to the compilation.
2317/// This is the inverse of `interpret`.2317/// This is the inverse of `interpret`.
2318pub fn uninterpret(val: anytype, ty: Type, pt: Zcu.PerThread) error{ OutOfMemory, TypeMismatch }!Value {2318pub fn uninterpret(val: anytype, ty: Type, pt: Zcu.PerThread) error{ OutOfMemory, TypeMismatch }!Value {
2319 const T = @TypeOf(val);2319 const T = @TypeOf(val);
src/Zcu.zig+21-21
...@@ -333,7 +333,7 @@ all_type_references: std.ArrayList(TypeReference) = .empty,...@@ -333,7 +333,7 @@ all_type_references: std.ArrayList(TypeReference) = .empty,
333free_type_references: std.ArrayList(u32) = .empty,333free_type_references: std.ArrayList(u32) = .empty,
334334
335/// Populated by analysis of `AnalUnit.wrap(.{ .memoized_state = s })`, where `s` depends on the element.335/// Populated by analysis of `AnalUnit.wrap(.{ .memoized_state = s })`, where `s` depends on the element.
336builtin_decl_values: BuiltinDecl.Memoized = .initFill(.none),336std_lang_decl_values: StdLangDecl.Memoized = .initFill(.none),
337337
338incremental_debug_state: if (build_options.enable_debug_extensions) IncrementalDebugState else void =338incremental_debug_state: if (build_options.enable_debug_extensions) IncrementalDebugState else void =
339 if (build_options.enable_debug_extensions) .init else {},339 if (build_options.enable_debug_extensions) .init else {},
...@@ -425,11 +425,11 @@ pub const EmbedTableAdapter = struct {...@@ -425,11 +425,11 @@ pub const EmbedTableAdapter = struct {
425 }425 }
426};426};
427427
428/// Names of declarations in `std.builtin` whose values are memoized in a `BuiltinDecl.Memoized`.428/// Names of declarations in `std.lang` whose values are memoized in a `StdLangDecl.Memoized`.
429/// The name must exactly match the declaration name, as comptime logic is used to compute the namespace accesses.429/// The name must exactly match the declaration name, as comptime logic is used to compute the namespace accesses.
430/// Parent namespaces must be before their children in this enum. For instance, `.Type` must be before `.@"Type.Fn"`.430/// Parent namespaces must be before their children in this enum. For instance, `.Type` must be before `.@"Type.Fn"`.
431/// Additionally, parent namespaces must be resolved in the same stage as their children; see `BuiltinDecl.stage`.431/// Additionally, parent namespaces must be resolved in the same stage as their children; see `StdLangDecl.stage`.
432pub const BuiltinDecl = enum {432pub const StdLangDecl = enum {
433 Signedness,433 Signedness,
434 AddressSpace,434 AddressSpace,
435 CallingConvention,435 CallingConvention,
...@@ -508,7 +508,7 @@ pub const BuiltinDecl = enum {...@@ -508,7 +508,7 @@ pub const BuiltinDecl = enum {
508 @"assembly.Clobbers",508 @"assembly.Clobbers",
509509
510 /// Determines what kind of validation will be done to the decl's value.510 /// Determines what kind of validation will be done to the decl's value.
511 pub fn kind(decl: BuiltinDecl) enum { type, func, string } {511 pub fn kind(decl: StdLangDecl) enum { type, func, string } {
512 return switch (decl) {512 return switch (decl) {
513 .returnError => .func,513 .returnError => .func,
514514
...@@ -593,7 +593,7 @@ pub const BuiltinDecl = enum {...@@ -593,7 +593,7 @@ pub const BuiltinDecl = enum {
593 }593 }
594594
595 /// Resolution of these values is done in three distinct stages:595 /// Resolution of these values is done in three distinct stages:
596 /// * Resolution of `std.builtin.Panic` and everything under it596 /// * Resolution of `std.lang.Panic` and everything under it
597 /// * Resolution of `VaList`597 /// * Resolution of `VaList`
598 /// * Resolution of `assembly`598 /// * Resolution of `assembly`
599 /// * Everything else599 /// * Everything else
...@@ -606,12 +606,12 @@ pub const BuiltinDecl = enum {...@@ -606,12 +606,12 @@ pub const BuiltinDecl = enum {
606 /// by itself.606 /// by itself.
607 ///607 ///
608 /// `assembly` is separate because its value depends on the target.608 /// `assembly` is separate because its value depends on the target.
609 pub fn stage(decl: BuiltinDecl) InternPool.MemoizedStateStage {609 pub fn stage(decl: StdLangDecl) InternPool.MemoizedStateStage {
610 return switch (decl) {610 return switch (decl) {
611 .VaList => .va_list,611 .VaList => .va_list,
612 .assembly, .@"assembly.Clobbers" => .assembly,612 .assembly, .@"assembly.Clobbers" => .assembly,
613 else => {613 else => {
614 if (@intFromEnum(decl) <= @intFromEnum(BuiltinDecl.@"Type.Declaration")) {614 if (@intFromEnum(decl) <= @intFromEnum(StdLangDecl.@"Type.Declaration")) {
615 return .main;615 return .main;
616 } else {616 } else {
617 return .panic;617 return .panic;
...@@ -621,24 +621,24 @@ pub const BuiltinDecl = enum {...@@ -621,24 +621,24 @@ pub const BuiltinDecl = enum {
621 }621 }
622622
623 /// Based on the tag name, determines how to access this decl; either as a direct child of the623 /// Based on the tag name, determines how to access this decl; either as a direct child of the
624 /// `std.builtin` namespace, or as a child of some preceding `BuiltinDecl` value.624 /// `std.lang` namespace, or as a child of some preceding `StdLangDecl` value.
625 pub fn access(decl: BuiltinDecl) union(enum) {625 pub fn access(decl: StdLangDecl) union(enum) {
626 direct: []const u8,626 direct: []const u8,
627 nested: struct { BuiltinDecl, []const u8 },627 nested: struct { StdLangDecl, []const u8 },
628 } {628 } {
629 @setEvalBranchQuota(2000);629 @setEvalBranchQuota(2000);
630 return switch (decl) {630 return switch (decl) {
631 inline else => |tag| {631 inline else => |tag| {
632 const name = @tagName(tag);632 const name = @tagName(tag);
633 const split = (comptime std.mem.lastIndexOfScalar(u8, name, '.')) orelse return .{ .direct = name };633 const split = (comptime std.mem.lastIndexOfScalar(u8, name, '.')) orelse return .{ .direct = name };
634 const parent = @field(BuiltinDecl, name[0..split]);634 const parent = @field(StdLangDecl, name[0..split]);
635 comptime assert(@intFromEnum(parent) < @intFromEnum(tag)); // dependencies ordered correctly635 comptime assert(@intFromEnum(parent) < @intFromEnum(tag)); // dependencies ordered correctly
636 return .{ .nested = .{ parent, name[split + 1 ..] } };636 return .{ .nested = .{ parent, name[split + 1 ..] } };
637 },637 },
638 };638 };
639 }639 }
640640
641 const Memoized = std.enums.EnumArray(BuiltinDecl, InternPool.Index);641 const Memoized = std.enums.EnumArray(StdLangDecl, InternPool.Index);
642};642};
643643
644pub const SimplePanicId = enum {644pub const SimplePanicId = enum {
...@@ -662,7 +662,7 @@ pub const SimplePanicId = enum {...@@ -662,7 +662,7 @@ pub const SimplePanicId = enum {
662 memcpy_alias,662 memcpy_alias,
663 noreturn_returned,663 noreturn_returned,
664664
665 pub fn toBuiltin(id: SimplePanicId) BuiltinDecl {665 pub fn toStdLangDecl(id: SimplePanicId) StdLangDecl {
666 return switch (id) {666 return switch (id) {
667 // zig fmt: off667 // zig fmt: off
668 .reached_unreachable => .@"panic.reachedUnreachable",668 .reached_unreachable => .@"panic.reachedUnreachable",
...@@ -744,9 +744,9 @@ pub const Export = struct {...@@ -744,9 +744,9 @@ pub const Export = struct {
744744
745 pub const Options = struct {745 pub const Options = struct {
746 name: InternPool.NullTerminatedString,746 name: InternPool.NullTerminatedString,
747 linkage: std.builtin.GlobalLinkage = .strong,747 linkage: std.lang.GlobalLinkage = .strong,
748 section: InternPool.OptionalNullTerminatedString = .none,748 section: InternPool.OptionalNullTerminatedString = .none,
749 visibility: std.builtin.SymbolVisibility = .default,749 visibility: std.lang.SymbolVisibility = .default,
750 };750 };
751751
752 /// Index into `all_exports`.752 /// Index into `all_exports`.
...@@ -3941,7 +3941,7 @@ pub fn addGlobalAssembly(zcu: *Zcu, unit: AnalUnit, source: []const u8) !void {...@@ -3941,7 +3941,7 @@ pub fn addGlobalAssembly(zcu: *Zcu, unit: AnalUnit, source: []const u8) !void {
39413941
3942pub const Feature = enum {3942pub const Feature = enum {
3943 /// When this feature is enabled, Sema will emit calls to3943 /// When this feature is enabled, Sema will emit calls to
3944 /// `std.builtin.panic` functions for things like safety checks and3944 /// `std.lang.panic` functions for things like safety checks and
3945 /// unreachables. Otherwise traps will be emitted.3945 /// unreachables. Otherwise traps will be emitted.
3946 panic_fn,3946 panic_fn,
3947 /// When this feature is enabled, Sema will insert tracer functions for gathering a stack3947 /// When this feature is enabled, Sema will insert tracer functions for gathering a stack
...@@ -4524,10 +4524,10 @@ fn formatDependee(data: FormatDependee, writer: *Io.Writer) Io.Writer.Error!void...@@ -4524,10 +4524,10 @@ fn formatDependee(data: FormatDependee, writer: *Io.Writer) Io.Writer.Error!void
4524 }4524 }
4525}4525}
45264526
4527pub fn callconvSupported(zcu: *Zcu, cc: std.builtin.CallingConvention) union(enum) {4527pub fn callconvSupported(zcu: *Zcu, cc: std.lang.CallingConvention) union(enum) {
4528 ok,4528 ok,
4529 bad_arch: []const std.Target.Cpu.Arch, // value is allowed archs for cc4529 bad_arch: []const std.Target.Cpu.Arch, // value is allowed archs for cc
4530 bad_backend: std.builtin.CompilerBackend, // value is current backend4530 bad_backend: std.lang.CompilerBackend, // value is current backend
4531} {4531} {
4532 const target = zcu.getTarget();4532 const target = zcu.getTarget();
4533 const backend = target_util.zigBackend(target, zcu.comp.config.use_llvm);4533 const backend = target_util.zigBackend(target, zcu.comp.config.use_llvm);
...@@ -4995,7 +4995,7 @@ fn addDependencyLoopErrorLine(...@@ -4995,7 +4995,7 @@ fn addDependencyLoopErrorLine(
4995 }),4995 }),
4996 .memoized_state => |stage| switch (stage) {4996 .memoized_state => |stage| switch (stage) {
4997 .panic => try eb.printString("{f} requires panic handler for call here", .{fmt_source}),4997 .panic => try eb.printString("{f} requires panic handler for call here", .{fmt_source}),
4998 else => try eb.printString("{f} requires 'std.builtin' declarations here", .{fmt_source}),4998 else => try eb.printString("{f} requires 'std.lang' declarations here", .{fmt_source}),
4999 },4999 },
5000 .func => |func| try eb.printString("{f} uses inferred error set of function '{f}' here", .{5000 .func => |func| try eb.printString("{f} uses inferred error set of function '{f}' here", .{
5001 fmt_source, ip.getNav(zcu.funcInfo(func).owner_nav).fqn.fmt(ip),5001 fmt_source, ip.getNav(zcu.funcInfo(func).owner_nav).fqn.fmt(ip),
...@@ -5046,7 +5046,7 @@ fn formatDependencyLoopSourceUnit(data: FormatAnalUnit, w: *Io.Writer) Io.Writer...@@ -5046,7 +5046,7 @@ fn formatDependencyLoopSourceUnit(data: FormatAnalUnit, w: *Io.Writer) Io.Writer
5046 .nav_ty => |nav| try w.print("type of declaration '{f}'", .{ip.getNav(nav).fqn.fmt(ip)}),5046 .nav_ty => |nav| try w.print("type of declaration '{f}'", .{ip.getNav(nav).fqn.fmt(ip)}),
5047 .memoized_state => |stage| switch (stage) {5047 .memoized_state => |stage| switch (stage) {
5048 .panic => try w.writeAll("panic handler"),5048 .panic => try w.writeAll("panic handler"),
5049 else => try w.writeAll("'std.builtin' declarations"),5049 else => try w.writeAll("'std.lang' declarations"),
5050 },5050 },
5051 .type_layout => |ty| try w.print("type '{f}'", .{5051 .type_layout => |ty| try w.print("type '{f}'", .{
5052 Type.fromInterned(ty).containerTypeName(ip).fmt(ip),5052 Type.fromInterned(ty).containerTypeName(ip).fmt(ip),
src/Zcu/PerThread.zig+4-4
...@@ -1083,13 +1083,13 @@ pub fn ensureMemoizedStateUpToDate(...@@ -1083,13 +1083,13 @@ pub fn ensureMemoizedStateUpToDate(
1083 } else {1083 } else {
1084 if (prev_failed) return error.AnalysisFail;1084 if (prev_failed) return error.AnalysisFail;
1085 // We use an arbitrary element to check if the state has been resolved yet.1085 // We use an arbitrary element to check if the state has been resolved yet.
1086 const to_check: Zcu.BuiltinDecl = switch (stage) {1086 const to_check: Zcu.StdLangDecl = switch (stage) {
1087 .main => .Type,1087 .main => .Type,
1088 .panic => .panic,1088 .panic => .panic,
1089 .va_list => .VaList,1089 .va_list => .VaList,
1090 .assembly => .assembly,1090 .assembly => .assembly,
1091 };1091 };
1092 if (zcu.builtin_decl_values.get(to_check) != .none) return;1092 if (zcu.std_lang_decl_values.get(to_check) != .none) return;
1093 }1093 }
10941094
1095 if (zcu.comp.debugIncremental()) {1095 if (zcu.comp.debugIncremental()) {
...@@ -3751,7 +3751,7 @@ pub fn populateTestFunctions(pt: Zcu.PerThread) Allocator.Error!void {...@@ -3751,7 +3751,7 @@ pub fn populateTestFunctions(pt: Zcu.PerThread) Allocator.Error!void {
37513751
3752 // Our job is to correctly set the value of the `test_functions` declaration if it has been3752 // Our job is to correctly set the value of the `test_functions` declaration if it has been
3753 // analyzed and sent to codegen, It usually will have been, because the test runner will3753 // analyzed and sent to codegen, It usually will have been, because the test runner will
3754 // reference it, and `std.builtin` shouldn't have type errors. However, if it hasn't been3754 // reference it, and `std.lang` shouldn't have type errors. However, if it hasn't been
3755 // analyzed, we will just terminate early, since clearly the test runner hasn't referenced3755 // analyzed, we will just terminate early, since clearly the test runner hasn't referenced
3756 // `test_functions` so there's no point populating it. More to the the point, we potentially3756 // `test_functions` so there's no point populating it. More to the the point, we potentially
3757 // *can't* populate it without doing some type resolution, and... let's try to leave Sema in3757 // *can't* populate it without doing some type resolution, and... let's try to leave Sema in
...@@ -3965,7 +3965,7 @@ pub fn getCoerced(pt: Zcu.PerThread, val: Value, new_ty: Type) Allocator.Error!V...@@ -3965,7 +3965,7 @@ pub fn getCoerced(pt: Zcu.PerThread, val: Value, new_ty: Type) Allocator.Error!V
3965 return .fromInterned(try ip.getCoerced(gpa, io, pt.tid, val.toIntern(), new_ty.toIntern()));3965 return .fromInterned(try ip.getCoerced(gpa, io, pt.tid, val.toIntern(), new_ty.toIntern()));
3966}3966}
39673967
3968pub fn intType(pt: Zcu.PerThread, signedness: std.builtin.Signedness, bits: u16) Allocator.Error!Type {3968pub fn intType(pt: Zcu.PerThread, signedness: std.lang.Signedness, bits: u16) Allocator.Error!Type {
3969 return Type.fromInterned(try pt.intern(.{ .int_type = .{3969 return Type.fromInterned(try pt.intern(.{ .int_type = .{
3970 .signedness = signedness,3970 .signedness = signedness,
3971 .bits = bits,3971 .bits = bits,
src/codegen.zig+3-3
...@@ -29,7 +29,7 @@ pub const CodeGenError = GenerateSymbolError || error{...@@ -29,7 +29,7 @@ pub const CodeGenError = GenerateSymbolError || error{
29 CodegenFail,29 CodegenFail,
30};30};
3131
32fn devFeatureForBackend(backend: std.builtin.CompilerBackend) dev.Feature {32fn devFeatureForBackend(backend: std.lang.CompilerBackend) dev.Feature {
33 return switch (backend) {33 return switch (backend) {
34 .other, .stage1 => unreachable,34 .other, .stage1 => unreachable,
35 .stage2_aarch64 => .aarch64_backend,35 .stage2_aarch64 => .aarch64_backend,
...@@ -47,7 +47,7 @@ fn devFeatureForBackend(backend: std.builtin.CompilerBackend) dev.Feature {...@@ -47,7 +47,7 @@ fn devFeatureForBackend(backend: std.builtin.CompilerBackend) dev.Feature {
47 };47 };
48}48}
4949
50fn importBackend(comptime backend: std.builtin.CompilerBackend) type {50fn importBackend(comptime backend: std.lang.CompilerBackend) type {
51 return switch (backend) {51 return switch (backend) {
52 .other, .stage1 => unreachable,52 .other, .stage1 => unreachable,
53 .stage2_aarch64 => aarch64,53 .stage2_aarch64 => aarch64,
...@@ -105,7 +105,7 @@ pub const AnyMir = union {...@@ -105,7 +105,7 @@ pub const AnyMir = union {
105 wasm: if (dev.env.supports(.wasm_backend)) @import("codegen/wasm/Mir.zig") else noreturn,105 wasm: if (dev.env.supports(.wasm_backend)) @import("codegen/wasm/Mir.zig") else noreturn,
106 c: if (dev.env.supports(.c_backend)) @import("codegen/c.zig").Mir else noreturn,106 c: if (dev.env.supports(.c_backend)) @import("codegen/c.zig").Mir else noreturn,
107107
108 pub inline fn tag(comptime backend: std.builtin.CompilerBackend) []const u8 {108 pub inline fn tag(comptime backend: std.lang.CompilerBackend) []const u8 {
109 return switch (backend) {109 return switch (backend) {
110 .stage2_aarch64 => "aarch64",110 .stage2_aarch64 => "aarch64",
111 .stage2_riscv64 => "riscv64",111 .stage2_riscv64 => "riscv64",
src/codegen/aarch64/Assemble.zig+1-1
...@@ -307,7 +307,7 @@ const SymbolSpec = union(enum) {...@@ -307,7 +307,7 @@ const SymbolSpec = union(enum) {
307 },307 },
308 systemreg,308 systemreg,
309 imm: struct {309 imm: struct {
310 type: std.builtin.Type.Int,310 type: std.lang.Type.Int,
311 multiple_of: ?comptime_int = null,311 multiple_of: ?comptime_int = null,
312 min_valid: ?comptime_int = null,312 min_valid: ?comptime_int = null,
313 max_valid: ?comptime_int = null,313 max_valid: ?comptime_int = null,
src/codegen/aarch64/Select.zig+17-17
...@@ -2887,7 +2887,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,...@@ -2887,7 +2887,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,
28872887
2888 const bin_op = air.data(air.inst_index).bin_op;2888 const bin_op = air.data(air.inst_index).bin_op;
2889 const ty = isel.air.typeOf(bin_op.lhs, ip);2889 const ty = isel.air.typeOf(bin_op.lhs, ip);
2890 const int_info: std.builtin.Type.Int = if (ty.toIntern() == .bool_type)2890 const int_info: std.lang.Type.Int = if (ty.toIntern() == .bool_type)
2891 .{ .signedness = .unsigned, .bits = 1 }2891 .{ .signedness = .unsigned, .bits = 1 }
2892 else if (ty.isAbiInt(zcu))2892 else if (ty.isAbiInt(zcu))
2893 ty.intInfo(zcu)2893 ty.intInfo(zcu)
...@@ -3144,7 +3144,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,...@@ -3144,7 +3144,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,
31443144
3145 const ty_op = air.data(air.inst_index).ty_op;3145 const ty_op = air.data(air.inst_index).ty_op;
3146 const ty = ty_op.ty.toType();3146 const ty = ty_op.ty.toType();
3147 const int_info: std.builtin.Type.Int = int_info: {3147 const int_info: std.lang.Type.Int = int_info: {
3148 if (ty_op.ty == .bool_type) break :int_info .{ .signedness = .unsigned, .bits = 1 };3148 if (ty_op.ty == .bool_type) break :int_info .{ .signedness = .unsigned, .bits = 1 };
3149 if (!ty.isAbiInt(zcu)) return isel.fail("bad {t} {f}", .{ air_tag, isel.fmtType(ty) });3149 if (!ty.isAbiInt(zcu)) return isel.fail("bad {t} {f}", .{ air_tag, isel.fmtType(ty) });
3150 break :int_info ty.intInfo(zcu);3150 break :int_info ty.intInfo(zcu);
...@@ -3199,7 +3199,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,...@@ -3199,7 +3199,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,
3199 const src_tag = src_ty.zigTypeTag(zcu);3199 const src_tag = src_ty.zigTypeTag(zcu);
3200 if (dst_ty.isAbiInt(zcu) and (src_tag == .bool or src_ty.isAbiInt(zcu))) {3200 if (dst_ty.isAbiInt(zcu) and (src_tag == .bool or src_ty.isAbiInt(zcu))) {
3201 const dst_int_info = dst_ty.intInfo(zcu);3201 const dst_int_info = dst_ty.intInfo(zcu);
3202 const src_int_info: std.builtin.Type.Int = if (src_tag == .bool) .{ .signedness = undefined, .bits = 1 } else src_ty.intInfo(zcu);3202 const src_int_info: std.lang.Type.Int = if (src_tag == .bool) .{ .signedness = undefined, .bits = 1 } else src_ty.intInfo(zcu);
3203 assert(dst_int_info.bits == src_int_info.bits);3203 assert(dst_int_info.bits == src_int_info.bits);
3204 if (dst_tag != .@"struct" and src_tag != .@"struct" and src_tag != .bool and dst_int_info.signedness == src_int_info.signedness) {3204 if (dst_tag != .@"struct" and src_tag != .@"struct" and src_tag != .bool and dst_int_info.signedness == src_int_info.signedness) {
3205 try dst_vi.value.move(isel, ty_op.operand);3205 try dst_vi.value.move(isel, ty_op.operand);
...@@ -4517,7 +4517,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,...@@ -4517,7 +4517,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,
4517 .switch_br => {4517 .switch_br => {
4518 const switch_br = isel.air.unwrapSwitch(air.inst_index);4518 const switch_br = isel.air.unwrapSwitch(air.inst_index);
4519 const cond_ty = isel.air.typeOf(switch_br.operand, ip);4519 const cond_ty = isel.air.typeOf(switch_br.operand, ip);
4520 const cond_int_info: std.builtin.Type.Int = if (cond_ty.toIntern() == .bool_type)4520 const cond_int_info: std.lang.Type.Int = if (cond_ty.toIntern() == .bool_type)
4521 .{ .signedness = .unsigned, .bits = 1 }4521 .{ .signedness = .unsigned, .bits = 1 }
4522 else if (cond_ty.isAbiInt(zcu))4522 else if (cond_ty.isAbiInt(zcu))
4523 cond_ty.intInfo(zcu)4523 cond_ty.intInfo(zcu)
...@@ -7981,7 +7981,7 @@ fn emit(isel: *Select, instruction: codegen.aarch64.encoding.Instruction) !void...@@ -7981,7 +7981,7 @@ fn emit(isel: *Select, instruction: codegen.aarch64.encoding.Instruction) !void
7981fn emitPanic(isel: *Select, panic_id: Zcu.SimplePanicId) !void {7981fn emitPanic(isel: *Select, panic_id: Zcu.SimplePanicId) !void {
7982 const zcu = isel.pt.zcu;7982 const zcu = isel.pt.zcu;
7983 try isel.nav_relocs.append(zcu.gpa, .{7983 try isel.nav_relocs.append(zcu.gpa, .{
7984 .nav = switch (zcu.intern_pool.indexToKey(zcu.builtin_decl_values.get(panic_id.toBuiltin()))) {7984 .nav = switch (zcu.intern_pool.indexToKey(zcu.std_lang_decl_values.get(panic_id.toStdLangDecl()))) {
7985 else => unreachable,7985 else => unreachable,
7986 inline .@"extern", .func => |func| func.owner_nav,7986 inline .@"extern", .func => |func| func.owner_nav,
7987 },7987 },
...@@ -8229,7 +8229,7 @@ fn elemPtr(...@@ -8229,7 +8229,7 @@ fn elemPtr(
8229fn clzLimb(8229fn clzLimb(
8230 isel: *Select,8230 isel: *Select,
8231 res_ra: Register.Alias,8231 res_ra: Register.Alias,
8232 src_int_info: std.builtin.Type.Int,8232 src_int_info: std.lang.Type.Int,
8233 src_ra: Register.Alias,8233 src_ra: Register.Alias,
8234) !void {8234) !void {
8235 switch (src_int_info.bits) {8235 switch (src_int_info.bits) {
...@@ -8274,7 +8274,7 @@ fn clzLimb(...@@ -8274,7 +8274,7 @@ fn clzLimb(
8274fn ctzLimb(8274fn ctzLimb(
8275 isel: *Select,8275 isel: *Select,
8276 res_ra: Register.Alias,8276 res_ra: Register.Alias,
8277 src_int_info: std.builtin.Type.Int,8277 src_int_info: std.lang.Type.Int,
8278 src_ra: Register.Alias,8278 src_ra: Register.Alias,
8279) !void {8279) !void {
8280 switch (src_int_info.bits) {8280 switch (src_int_info.bits) {
...@@ -8319,7 +8319,7 @@ fn cmp(...@@ -8319,7 +8319,7 @@ fn cmp(
8319 var lhs_vi = orig_lhs_vi;8319 var lhs_vi = orig_lhs_vi;
8320 var rhs_vi = orig_rhs_vi;8320 var rhs_vi = orig_rhs_vi;
8321 if (!ty.isRuntimeFloat()) {8321 if (!ty.isRuntimeFloat()) {
8322 const int_info: std.builtin.Type.Int = if (ty.toIntern() == .bool_type)8322 const int_info: std.lang.Type.Int = if (ty.toIntern() == .bool_type)
8323 .{ .signedness = .unsigned, .bits = 1 }8323 .{ .signedness = .unsigned, .bits = 1 }
8324 else if (ty.isAbiInt(isel.pt.zcu))8324 else if (ty.isAbiInt(isel.pt.zcu))
8325 ty.intInfo(isel.pt.zcu)8325 ty.intInfo(isel.pt.zcu)
...@@ -8523,7 +8523,7 @@ fn loadReg(...@@ -8523,7 +8523,7 @@ fn loadReg(
8523 isel: *Select,8523 isel: *Select,
8524 ra: Register.Alias,8524 ra: Register.Alias,
8525 size: u64,8525 size: u64,
8526 signedness: std.builtin.Signedness,8526 signedness: std.lang.Signedness,
8527 base_ra: Register.Alias,8527 base_ra: Register.Alias,
8528 offset: i65,8528 offset: i65,
8529) !void {8529) !void {
...@@ -8908,7 +8908,7 @@ pub const Value = struct {...@@ -8908,7 +8908,7 @@ pub const Value = struct {
8908 },8908 },
8909 small: struct {8909 small: struct {
8910 size: u5,8910 size: u5,
8911 signedness: std.builtin.Signedness,8911 signedness: std.lang.Signedness,
8912 is_vector: bool,8912 is_vector: bool,
8913 hint: Register.Alias,8913 hint: Register.Alias,
8914 register: Register.Alias,8914 register: Register.Alias,
...@@ -9037,13 +9037,13 @@ pub const Value = struct {...@@ -9037,13 +9037,13 @@ pub const Value = struct {
9037 };9037 };
9038 }9038 }
90399039
9040 fn setSignedness(vi: Value.Index, isel: *Select, new_signedness: std.builtin.Signedness) void {9040 fn setSignedness(vi: Value.Index, isel: *Select, new_signedness: std.lang.Signedness) void {
9041 const value = vi.get(isel);9041 const value = vi.get(isel);
9042 assert(value.location_payload.small.size <= 2);9042 assert(value.location_payload.small.size <= 2);
9043 value.location_payload.small.signedness = new_signedness;9043 value.location_payload.small.signedness = new_signedness;
9044 }9044 }
90459045
9046 pub fn signedness(vi: Value.Index, isel: *Select) std.builtin.Signedness {9046 pub fn signedness(vi: Value.Index, isel: *Select) std.lang.Signedness {
9047 const value = vi.get(isel);9047 const value = vi.get(isel);
9048 return switch (value.flags.location_tag) {9048 return switch (value.flags.location_tag) {
9049 .large => .unsigned,9049 .large => .unsigned,
...@@ -9505,7 +9505,7 @@ pub const Value = struct {...@@ -9505,7 +9505,7 @@ pub const Value = struct {
9505 offset: u64 = 0,9505 offset: u64 = 0,
9506 @"volatile": bool = false,9506 @"volatile": bool = false,
9507 split: bool = true,9507 split: bool = true,
9508 wrap: ?std.builtin.Type.Int = null,9508 wrap: ?std.lang.Type.Int = null,
9509 expected_live_registers: *const LiveRegisters = &.initFill(.free),9509 expected_live_registers: *const LiveRegisters = &.initFill(.free),
9510 };9510 };
95119511
...@@ -9717,7 +9717,7 @@ pub const Value = struct {...@@ -9717,7 +9717,7 @@ pub const Value = struct {
9717 root_ty: ZigType,9717 root_ty: ZigType,
9718 opts: struct {9718 opts: struct {
9719 root_vi: Value.Index = .free,9719 root_vi: Value.Index = .free,
9720 wrap: ?std.builtin.Type.Int = null,9720 wrap: ?std.lang.Type.Int = null,
9721 expected_live_registers: *const LiveRegisters = &.initFill(.free),9721 expected_live_registers: *const LiveRegisters = &.initFill(.free),
9722 },9722 },
9723 ) !?void {9723 ) !?void {
...@@ -10289,7 +10289,7 @@ pub const Value = struct {...@@ -10289,7 +10289,7 @@ pub const Value = struct {
10289 const payload_ty: ZigType = .fromInterned(error_union_type.payload_type);10289 const payload_ty: ZigType = .fromInterned(error_union_type.payload_type);
10290 const error_set_offset = codegen.errUnionErrorOffset(payload_ty, zcu);10290 const error_set_offset = codegen.errUnionErrorOffset(payload_ty, zcu);
10291 const payload_offset = codegen.errUnionPayloadOffset(payload_ty, zcu);10291 const payload_offset = codegen.errUnionPayloadOffset(payload_ty, zcu);
10292 const Part = struct { offset: u64, size: u64, signedness: ?std.builtin.Signedness, is_vector: bool };10292 const Part = struct { offset: u64, size: u64, signedness: ?std.lang.Signedness, is_vector: bool };
10293 var parts: [2]Part = undefined;10293 var parts: [2]Part = undefined;
10294 var parts_len: Value.PartsLen = 0;10294 var parts_len: Value.PartsLen = 0;
10295 var field_end: u64 = 0;10295 var field_end: u64 = 0;
...@@ -10393,7 +10393,7 @@ pub const Value = struct {...@@ -10393,7 +10393,7 @@ pub const Value = struct {
10393 (std.math.divCeil(u64, size, @as(u64, 1) << min_part_log2_stride) catch unreachable) > Value.max_parts)10393 (std.math.divCeil(u64, size, @as(u64, 1) << min_part_log2_stride) catch unreachable) > Value.max_parts)
10394 return isel.fail("Value.FieldPartIterator.next({f})", .{isel.fmtType(ty)});10394 return isel.fail("Value.FieldPartIterator.next({f})", .{isel.fmtType(ty)});
10395 const alignment = vi.alignment(isel);10395 const alignment = vi.alignment(isel);
10396 const Part = struct { offset: u64, size: u64, signedness: ?std.builtin.Signedness, is_vector: bool };10396 const Part = struct { offset: u64, size: u64, signedness: ?std.lang.Signedness, is_vector: bool };
10397 var parts: [Value.max_parts]Part = undefined;10397 var parts: [Value.max_parts]Part = undefined;
10398 var parts_len: Value.PartsLen = 0;10398 var parts_len: Value.PartsLen = 0;
10399 var field_end: u64 = 0;10399 var field_end: u64 = 0;
...@@ -10512,7 +10512,7 @@ pub const Value = struct {...@@ -10512,7 +10512,7 @@ pub const Value = struct {
10512 const alignment = vi.alignment(isel);10512 const alignment = vi.alignment(isel);
10513 const tag_offset = union_layout.tagOffset();10513 const tag_offset = union_layout.tagOffset();
10514 const payload_offset = union_layout.payloadOffset();10514 const payload_offset = union_layout.payloadOffset();
10515 const Part = struct { offset: u64, size: u64, signedness: ?std.builtin.Signedness };10515 const Part = struct { offset: u64, size: u64, signedness: ?std.lang.Signedness };
10516 var parts: [2]Part = undefined;10516 var parts: [2]Part = undefined;
10517 var parts_len: Value.PartsLen = 0;10517 var parts_len: Value.PartsLen = 0;
10518 var field_end: u64 = 0;10518 var field_end: u64 = 0;
src/codegen/aarch64/encoding.zig+154-154
...@@ -6755,7 +6755,7 @@ pub const Instruction = packed union {...@@ -6755,7 +6755,7 @@ pub const Instruction = packed union {
6755 o0: AddSubtractOp = .add,6755 o0: AddSubtractOp = .add,
6756 Rm: Register.Encoded,6756 Rm: Register.Encoded,
6757 op21: u2 = 0b01,6757 op21: u2 = 0b01,
6758 U: std.builtin.Signedness = .signed,6758 U: std.lang.Signedness = .signed,
6759 decoded24: u5 = 0b11011,6759 decoded24: u5 = 0b11011,
6760 op54: u2 = 0b00,6760 op54: u2 = 0b00,
6761 sf: Register.GeneralSize = .doubleword,6761 sf: Register.GeneralSize = .doubleword,
...@@ -6769,7 +6769,7 @@ pub const Instruction = packed union {...@@ -6769,7 +6769,7 @@ pub const Instruction = packed union {
6769 o0: AddSubtractOp = .sub,6769 o0: AddSubtractOp = .sub,
6770 Rm: Register.Encoded,6770 Rm: Register.Encoded,
6771 op21: u2 = 0b01,6771 op21: u2 = 0b01,
6772 U: std.builtin.Signedness = .signed,6772 U: std.lang.Signedness = .signed,
6773 decoded24: u5 = 0b11011,6773 decoded24: u5 = 0b11011,
6774 op54: u2 = 0b00,6774 op54: u2 = 0b00,
6775 sf: Register.GeneralSize = .doubleword,6775 sf: Register.GeneralSize = .doubleword,
...@@ -6783,7 +6783,7 @@ pub const Instruction = packed union {...@@ -6783,7 +6783,7 @@ pub const Instruction = packed union {
6783 o0: AddSubtractOp = .add,6783 o0: AddSubtractOp = .add,
6784 Rm: Register.Encoded,6784 Rm: Register.Encoded,
6785 op21: u2 = 0b10,6785 op21: u2 = 0b10,
6786 U: std.builtin.Signedness = .signed,6786 U: std.lang.Signedness = .signed,
6787 decoded24: u5 = 0b11011,6787 decoded24: u5 = 0b11011,
6788 op54: u2 = 0b00,6788 op54: u2 = 0b00,
6789 sf: Register.GeneralSize = .doubleword,6789 sf: Register.GeneralSize = .doubleword,
...@@ -6797,7 +6797,7 @@ pub const Instruction = packed union {...@@ -6797,7 +6797,7 @@ pub const Instruction = packed union {
6797 o0: AddSubtractOp = .add,6797 o0: AddSubtractOp = .add,
6798 Rm: Register.Encoded,6798 Rm: Register.Encoded,
6799 op21: u2 = 0b01,6799 op21: u2 = 0b01,
6800 U: std.builtin.Signedness = .unsigned,6800 U: std.lang.Signedness = .unsigned,
6801 decoded24: u5 = 0b11011,6801 decoded24: u5 = 0b11011,
6802 op54: u2 = 0b00,6802 op54: u2 = 0b00,
6803 sf: Register.GeneralSize = .doubleword,6803 sf: Register.GeneralSize = .doubleword,
...@@ -6811,7 +6811,7 @@ pub const Instruction = packed union {...@@ -6811,7 +6811,7 @@ pub const Instruction = packed union {
6811 o0: AddSubtractOp = .sub,6811 o0: AddSubtractOp = .sub,
6812 Rm: Register.Encoded,6812 Rm: Register.Encoded,
6813 op21: u2 = 0b01,6813 op21: u2 = 0b01,
6814 U: std.builtin.Signedness = .unsigned,6814 U: std.lang.Signedness = .unsigned,
6815 decoded24: u5 = 0b11011,6815 decoded24: u5 = 0b11011,
6816 op54: u2 = 0b00,6816 op54: u2 = 0b00,
6817 sf: Register.GeneralSize = .doubleword,6817 sf: Register.GeneralSize = .doubleword,
...@@ -6825,7 +6825,7 @@ pub const Instruction = packed union {...@@ -6825,7 +6825,7 @@ pub const Instruction = packed union {
6825 o0: AddSubtractOp = .add,6825 o0: AddSubtractOp = .add,
6826 Rm: Register.Encoded,6826 Rm: Register.Encoded,
6827 op21: u2 = 0b10,6827 op21: u2 = 0b10,
6828 U: std.builtin.Signedness = .unsigned,6828 U: std.lang.Signedness = .unsigned,
6829 decoded24: u5 = 0b11011,6829 decoded24: u5 = 0b11011,
6830 op54: u2 = 0b00,6830 op54: u2 = 0b00,
6831 sf: Register.GeneralSize = .doubleword,6831 sf: Register.GeneralSize = .doubleword,
...@@ -7052,7 +7052,7 @@ pub const Instruction = packed union {...@@ -7052,7 +7052,7 @@ pub const Instruction = packed union {
7052 decoded17: u6 = 0b111100,7052 decoded17: u6 = 0b111100,
7053 a: u1,7053 a: u1,
7054 decoded24: u5 = 0b11110,7054 decoded24: u5 = 0b11110,
7055 U: std.builtin.Signedness,7055 U: std.lang.Signedness,
7056 decoded30: u2 = 0b01,7056 decoded30: u2 = 0b01,
7057 };7057 };
70587058
...@@ -7065,7 +7065,7 @@ pub const Instruction = packed union {...@@ -7065,7 +7065,7 @@ pub const Instruction = packed union {
7065 decoded17: u6 = 0b111100,7065 decoded17: u6 = 0b111100,
7066 o2: u1 = 0b0,7066 o2: u1 = 0b0,
7067 decoded24: u5 = 0b11110,7067 decoded24: u5 = 0b11110,
7068 U: std.builtin.Signedness = .signed,7068 U: std.lang.Signedness = .signed,
7069 decoded30: u2 = 0b01,7069 decoded30: u2 = 0b01,
7070 };7070 };
70717071
...@@ -7078,7 +7078,7 @@ pub const Instruction = packed union {...@@ -7078,7 +7078,7 @@ pub const Instruction = packed union {
7078 decoded17: u6 = 0b111100,7078 decoded17: u6 = 0b111100,
7079 o2: u1 = 0b0,7079 o2: u1 = 0b0,
7080 decoded24: u5 = 0b11110,7080 decoded24: u5 = 0b11110,
7081 U: std.builtin.Signedness = .signed,7081 U: std.lang.Signedness = .signed,
7082 decoded30: u2 = 0b01,7082 decoded30: u2 = 0b01,
7083 };7083 };
70847084
...@@ -7091,7 +7091,7 @@ pub const Instruction = packed union {...@@ -7091,7 +7091,7 @@ pub const Instruction = packed union {
7091 decoded17: u6 = 0b111100,7091 decoded17: u6 = 0b111100,
7092 o2: u1 = 0b0,7092 o2: u1 = 0b0,
7093 decoded24: u5 = 0b11110,7093 decoded24: u5 = 0b11110,
7094 U: std.builtin.Signedness = .signed,7094 U: std.lang.Signedness = .signed,
7095 decoded30: u2 = 0b01,7095 decoded30: u2 = 0b01,
7096 };7096 };
70977097
...@@ -7104,7 +7104,7 @@ pub const Instruction = packed union {...@@ -7104,7 +7104,7 @@ pub const Instruction = packed union {
7104 decoded17: u6 = 0b111100,7104 decoded17: u6 = 0b111100,
7105 o2: u1 = 0b0,7105 o2: u1 = 0b0,
7106 decoded24: u5 = 0b11110,7106 decoded24: u5 = 0b11110,
7107 U: std.builtin.Signedness = .signed,7107 U: std.lang.Signedness = .signed,
7108 decoded30: u2 = 0b01,7108 decoded30: u2 = 0b01,
7109 };7109 };
71107110
...@@ -7117,7 +7117,7 @@ pub const Instruction = packed union {...@@ -7117,7 +7117,7 @@ pub const Instruction = packed union {
7117 decoded17: u6 = 0b111100,7117 decoded17: u6 = 0b111100,
7118 o2: u1 = 0b1,7118 o2: u1 = 0b1,
7119 decoded24: u5 = 0b11110,7119 decoded24: u5 = 0b11110,
7120 U: std.builtin.Signedness = .signed,7120 U: std.lang.Signedness = .signed,
7121 decoded30: u2 = 0b01,7121 decoded30: u2 = 0b01,
7122 };7122 };
71237123
...@@ -7130,7 +7130,7 @@ pub const Instruction = packed union {...@@ -7130,7 +7130,7 @@ pub const Instruction = packed union {
7130 decoded17: u6 = 0b111100,7130 decoded17: u6 = 0b111100,
7131 o2: u1 = 0b1,7131 o2: u1 = 0b1,
7132 decoded24: u5 = 0b11110,7132 decoded24: u5 = 0b11110,
7133 U: std.builtin.Signedness = .signed,7133 U: std.lang.Signedness = .signed,
7134 decoded30: u2 = 0b01,7134 decoded30: u2 = 0b01,
7135 };7135 };
71367136
...@@ -7143,7 +7143,7 @@ pub const Instruction = packed union {...@@ -7143,7 +7143,7 @@ pub const Instruction = packed union {
7143 decoded17: u6 = 0b111100,7143 decoded17: u6 = 0b111100,
7144 o2: u1 = 0b1,7144 o2: u1 = 0b1,
7145 decoded24: u5 = 0b11110,7145 decoded24: u5 = 0b11110,
7146 U: std.builtin.Signedness = .signed,7146 U: std.lang.Signedness = .signed,
7147 decoded30: u2 = 0b01,7147 decoded30: u2 = 0b01,
7148 };7148 };
71497149
...@@ -7156,7 +7156,7 @@ pub const Instruction = packed union {...@@ -7156,7 +7156,7 @@ pub const Instruction = packed union {
7156 decoded17: u6 = 0b111100,7156 decoded17: u6 = 0b111100,
7157 o2: u1 = 0b1,7157 o2: u1 = 0b1,
7158 decoded24: u5 = 0b11110,7158 decoded24: u5 = 0b11110,
7159 U: std.builtin.Signedness = .signed,7159 U: std.lang.Signedness = .signed,
7160 decoded30: u2 = 0b01,7160 decoded30: u2 = 0b01,
7161 };7161 };
71627162
...@@ -7169,7 +7169,7 @@ pub const Instruction = packed union {...@@ -7169,7 +7169,7 @@ pub const Instruction = packed union {
7169 decoded17: u6 = 0b111100,7169 decoded17: u6 = 0b111100,
7170 o2: u1 = 0b1,7170 o2: u1 = 0b1,
7171 decoded24: u5 = 0b11110,7171 decoded24: u5 = 0b11110,
7172 U: std.builtin.Signedness = .signed,7172 U: std.lang.Signedness = .signed,
7173 decoded30: u2 = 0b01,7173 decoded30: u2 = 0b01,
7174 };7174 };
71757175
...@@ -7182,7 +7182,7 @@ pub const Instruction = packed union {...@@ -7182,7 +7182,7 @@ pub const Instruction = packed union {
7182 decoded17: u6 = 0b111100,7182 decoded17: u6 = 0b111100,
7183 o2: u1 = 0b1,7183 o2: u1 = 0b1,
7184 decoded24: u5 = 0b11110,7184 decoded24: u5 = 0b11110,
7185 U: std.builtin.Signedness = .signed,7185 U: std.lang.Signedness = .signed,
7186 decoded30: u2 = 0b01,7186 decoded30: u2 = 0b01,
7187 };7187 };
71887188
...@@ -7195,7 +7195,7 @@ pub const Instruction = packed union {...@@ -7195,7 +7195,7 @@ pub const Instruction = packed union {
7195 decoded17: u6 = 0b111100,7195 decoded17: u6 = 0b111100,
7196 o2: u1 = 0b1,7196 o2: u1 = 0b1,
7197 decoded24: u5 = 0b11110,7197 decoded24: u5 = 0b11110,
7198 U: std.builtin.Signedness = .signed,7198 U: std.lang.Signedness = .signed,
7199 decoded30: u2 = 0b01,7199 decoded30: u2 = 0b01,
7200 };7200 };
72017201
...@@ -7208,7 +7208,7 @@ pub const Instruction = packed union {...@@ -7208,7 +7208,7 @@ pub const Instruction = packed union {
7208 decoded17: u6 = 0b111100,7208 decoded17: u6 = 0b111100,
7209 o2: u1 = 0b0,7209 o2: u1 = 0b0,
7210 decoded24: u5 = 0b11110,7210 decoded24: u5 = 0b11110,
7211 U: std.builtin.Signedness = .unsigned,7211 U: std.lang.Signedness = .unsigned,
7212 decoded30: u2 = 0b01,7212 decoded30: u2 = 0b01,
7213 };7213 };
72147214
...@@ -7221,7 +7221,7 @@ pub const Instruction = packed union {...@@ -7221,7 +7221,7 @@ pub const Instruction = packed union {
7221 decoded17: u6 = 0b111100,7221 decoded17: u6 = 0b111100,
7222 o2: u1 = 0b0,7222 o2: u1 = 0b0,
7223 decoded24: u5 = 0b11110,7223 decoded24: u5 = 0b11110,
7224 U: std.builtin.Signedness = .unsigned,7224 U: std.lang.Signedness = .unsigned,
7225 decoded30: u2 = 0b01,7225 decoded30: u2 = 0b01,
7226 };7226 };
72277227
...@@ -7234,7 +7234,7 @@ pub const Instruction = packed union {...@@ -7234,7 +7234,7 @@ pub const Instruction = packed union {
7234 decoded17: u6 = 0b111100,7234 decoded17: u6 = 0b111100,
7235 o2: u1 = 0b0,7235 o2: u1 = 0b0,
7236 decoded24: u5 = 0b11110,7236 decoded24: u5 = 0b11110,
7237 U: std.builtin.Signedness = .unsigned,7237 U: std.lang.Signedness = .unsigned,
7238 decoded30: u2 = 0b01,7238 decoded30: u2 = 0b01,
7239 };7239 };
72407240
...@@ -7247,7 +7247,7 @@ pub const Instruction = packed union {...@@ -7247,7 +7247,7 @@ pub const Instruction = packed union {
7247 decoded17: u6 = 0b111100,7247 decoded17: u6 = 0b111100,
7248 o2: u1 = 0b0,7248 o2: u1 = 0b0,
7249 decoded24: u5 = 0b11110,7249 decoded24: u5 = 0b11110,
7250 U: std.builtin.Signedness = .unsigned,7250 U: std.lang.Signedness = .unsigned,
7251 decoded30: u2 = 0b01,7251 decoded30: u2 = 0b01,
7252 };7252 };
72537253
...@@ -7260,7 +7260,7 @@ pub const Instruction = packed union {...@@ -7260,7 +7260,7 @@ pub const Instruction = packed union {
7260 decoded17: u6 = 0b111100,7260 decoded17: u6 = 0b111100,
7261 o2: u1 = 0b1,7261 o2: u1 = 0b1,
7262 decoded24: u5 = 0b11110,7262 decoded24: u5 = 0b11110,
7263 U: std.builtin.Signedness = .unsigned,7263 U: std.lang.Signedness = .unsigned,
7264 decoded30: u2 = 0b01,7264 decoded30: u2 = 0b01,
7265 };7265 };
72667266
...@@ -7273,7 +7273,7 @@ pub const Instruction = packed union {...@@ -7273,7 +7273,7 @@ pub const Instruction = packed union {
7273 decoded17: u6 = 0b111100,7273 decoded17: u6 = 0b111100,
7274 o2: u1 = 0b1,7274 o2: u1 = 0b1,
7275 decoded24: u5 = 0b11110,7275 decoded24: u5 = 0b11110,
7276 U: std.builtin.Signedness = .unsigned,7276 U: std.lang.Signedness = .unsigned,
7277 decoded30: u2 = 0b01,7277 decoded30: u2 = 0b01,
7278 };7278 };
72797279
...@@ -7286,7 +7286,7 @@ pub const Instruction = packed union {...@@ -7286,7 +7286,7 @@ pub const Instruction = packed union {
7286 decoded17: u6 = 0b111100,7286 decoded17: u6 = 0b111100,
7287 o2: u1 = 0b1,7287 o2: u1 = 0b1,
7288 decoded24: u5 = 0b11110,7288 decoded24: u5 = 0b11110,
7289 U: std.builtin.Signedness = .unsigned,7289 U: std.lang.Signedness = .unsigned,
7290 decoded30: u2 = 0b01,7290 decoded30: u2 = 0b01,
7291 };7291 };
72927292
...@@ -7299,7 +7299,7 @@ pub const Instruction = packed union {...@@ -7299,7 +7299,7 @@ pub const Instruction = packed union {
7299 decoded17: u6 = 0b111100,7299 decoded17: u6 = 0b111100,
7300 o2: u1 = 0b1,7300 o2: u1 = 0b1,
7301 decoded24: u5 = 0b11110,7301 decoded24: u5 = 0b11110,
7302 U: std.builtin.Signedness = .unsigned,7302 U: std.lang.Signedness = .unsigned,
7303 decoded30: u2 = 0b01,7303 decoded30: u2 = 0b01,
7304 };7304 };
73057305
...@@ -7312,7 +7312,7 @@ pub const Instruction = packed union {...@@ -7312,7 +7312,7 @@ pub const Instruction = packed union {
7312 decoded17: u6 = 0b111100,7312 decoded17: u6 = 0b111100,
7313 o2: u1 = 0b1,7313 o2: u1 = 0b1,
7314 decoded24: u5 = 0b11110,7314 decoded24: u5 = 0b11110,
7315 U: std.builtin.Signedness = .unsigned,7315 U: std.lang.Signedness = .unsigned,
7316 decoded30: u2 = 0b01,7316 decoded30: u2 = 0b01,
7317 };7317 };
73187318
...@@ -7428,7 +7428,7 @@ pub const Instruction = packed union {...@@ -7428,7 +7428,7 @@ pub const Instruction = packed union {
7428 decoded17: u5 = 0b10000,7428 decoded17: u5 = 0b10000,
7429 size: Size,7429 size: Size,
7430 decoded24: u5 = 0b11110,7430 decoded24: u5 = 0b11110,
7431 U: std.builtin.Signedness,7431 U: std.lang.Signedness,
7432 decoded30: u2 = 0b01,7432 decoded30: u2 = 0b01,
7433 };7433 };
74347434
...@@ -7441,7 +7441,7 @@ pub const Instruction = packed union {...@@ -7441,7 +7441,7 @@ pub const Instruction = packed union {
7441 decoded17: u5 = 0b10000,7441 decoded17: u5 = 0b10000,
7442 size: Size,7442 size: Size,
7443 decoded24: u5 = 0b11110,7443 decoded24: u5 = 0b11110,
7444 U: std.builtin.Signedness = .signed,7444 U: std.lang.Signedness = .signed,
7445 decoded30: u2 = 0b01,7445 decoded30: u2 = 0b01,
7446 };7446 };
74477447
...@@ -7454,7 +7454,7 @@ pub const Instruction = packed union {...@@ -7454,7 +7454,7 @@ pub const Instruction = packed union {
7454 decoded17: u5 = 0b10000,7454 decoded17: u5 = 0b10000,
7455 size: Size,7455 size: Size,
7456 decoded24: u5 = 0b11110,7456 decoded24: u5 = 0b11110,
7457 U: std.builtin.Signedness = .signed,7457 U: std.lang.Signedness = .signed,
7458 decoded30: u2 = 0b01,7458 decoded30: u2 = 0b01,
7459 };7459 };
74607460
...@@ -7467,7 +7467,7 @@ pub const Instruction = packed union {...@@ -7467,7 +7467,7 @@ pub const Instruction = packed union {
7467 decoded17: u5 = 0b10000,7467 decoded17: u5 = 0b10000,
7468 size: Size,7468 size: Size,
7469 decoded24: u5 = 0b11110,7469 decoded24: u5 = 0b11110,
7470 U: std.builtin.Signedness = .signed,7470 U: std.lang.Signedness = .signed,
7471 decoded30: u2 = 0b01,7471 decoded30: u2 = 0b01,
7472 };7472 };
74737473
...@@ -7480,7 +7480,7 @@ pub const Instruction = packed union {...@@ -7480,7 +7480,7 @@ pub const Instruction = packed union {
7480 decoded17: u5 = 0b10000,7480 decoded17: u5 = 0b10000,
7481 size: Size,7481 size: Size,
7482 decoded24: u5 = 0b11110,7482 decoded24: u5 = 0b11110,
7483 U: std.builtin.Signedness = .signed,7483 U: std.lang.Signedness = .signed,
7484 decoded30: u2 = 0b01,7484 decoded30: u2 = 0b01,
7485 };7485 };
74867486
...@@ -7493,7 +7493,7 @@ pub const Instruction = packed union {...@@ -7493,7 +7493,7 @@ pub const Instruction = packed union {
7493 decoded17: u5 = 0b10000,7493 decoded17: u5 = 0b10000,
7494 size: Size,7494 size: Size,
7495 decoded24: u5 = 0b11110,7495 decoded24: u5 = 0b11110,
7496 U: std.builtin.Signedness = .signed,7496 U: std.lang.Signedness = .signed,
7497 decoded30: u2 = 0b01,7497 decoded30: u2 = 0b01,
7498 };7498 };
74997499
...@@ -7506,7 +7506,7 @@ pub const Instruction = packed union {...@@ -7506,7 +7506,7 @@ pub const Instruction = packed union {
7506 decoded17: u5 = 0b10000,7506 decoded17: u5 = 0b10000,
7507 size: Size,7507 size: Size,
7508 decoded24: u5 = 0b11110,7508 decoded24: u5 = 0b11110,
7509 U: std.builtin.Signedness = .signed,7509 U: std.lang.Signedness = .signed,
7510 decoded30: u2 = 0b01,7510 decoded30: u2 = 0b01,
7511 };7511 };
75127512
...@@ -7519,7 +7519,7 @@ pub const Instruction = packed union {...@@ -7519,7 +7519,7 @@ pub const Instruction = packed union {
7519 decoded17: u5 = 0b10000,7519 decoded17: u5 = 0b10000,
7520 size: Size,7520 size: Size,
7521 decoded24: u5 = 0b11110,7521 decoded24: u5 = 0b11110,
7522 U: std.builtin.Signedness = .signed,7522 U: std.lang.Signedness = .signed,
7523 decoded30: u2 = 0b01,7523 decoded30: u2 = 0b01,
7524 };7524 };
75257525
...@@ -7533,7 +7533,7 @@ pub const Instruction = packed union {...@@ -7533,7 +7533,7 @@ pub const Instruction = packed union {
7533 sz: Sz,7533 sz: Sz,
7534 o2: u1 = 0b0,7534 o2: u1 = 0b0,
7535 decoded24: u5 = 0b11110,7535 decoded24: u5 = 0b11110,
7536 U: std.builtin.Signedness = .signed,7536 U: std.lang.Signedness = .signed,
7537 decoded30: u2 = 0b01,7537 decoded30: u2 = 0b01,
7538 };7538 };
75397539
...@@ -7547,7 +7547,7 @@ pub const Instruction = packed union {...@@ -7547,7 +7547,7 @@ pub const Instruction = packed union {
7547 sz: Sz,7547 sz: Sz,
7548 o2: u1 = 0b0,7548 o2: u1 = 0b0,
7549 decoded24: u5 = 0b11110,7549 decoded24: u5 = 0b11110,
7550 U: std.builtin.Signedness = .signed,7550 U: std.lang.Signedness = .signed,
7551 decoded30: u2 = 0b01,7551 decoded30: u2 = 0b01,
7552 };7552 };
75537553
...@@ -7561,7 +7561,7 @@ pub const Instruction = packed union {...@@ -7561,7 +7561,7 @@ pub const Instruction = packed union {
7561 sz: Sz,7561 sz: Sz,
7562 o2: u1 = 0b0,7562 o2: u1 = 0b0,
7563 decoded24: u5 = 0b11110,7563 decoded24: u5 = 0b11110,
7564 U: std.builtin.Signedness = .signed,7564 U: std.lang.Signedness = .signed,
7565 decoded30: u2 = 0b01,7565 decoded30: u2 = 0b01,
7566 };7566 };
75677567
...@@ -7575,7 +7575,7 @@ pub const Instruction = packed union {...@@ -7575,7 +7575,7 @@ pub const Instruction = packed union {
7575 sz: Sz,7575 sz: Sz,
7576 o2: u1 = 0b0,7576 o2: u1 = 0b0,
7577 decoded24: u5 = 0b11110,7577 decoded24: u5 = 0b11110,
7578 U: std.builtin.Signedness = .signed,7578 U: std.lang.Signedness = .signed,
7579 decoded30: u2 = 0b01,7579 decoded30: u2 = 0b01,
7580 };7580 };
75817581
...@@ -7589,7 +7589,7 @@ pub const Instruction = packed union {...@@ -7589,7 +7589,7 @@ pub const Instruction = packed union {
7589 sz: Sz,7589 sz: Sz,
7590 o2: u1 = 0b1,7590 o2: u1 = 0b1,
7591 decoded24: u5 = 0b11110,7591 decoded24: u5 = 0b11110,
7592 U: std.builtin.Signedness = .signed,7592 U: std.lang.Signedness = .signed,
7593 decoded30: u2 = 0b01,7593 decoded30: u2 = 0b01,
7594 };7594 };
75957595
...@@ -7603,7 +7603,7 @@ pub const Instruction = packed union {...@@ -7603,7 +7603,7 @@ pub const Instruction = packed union {
7603 sz: Sz,7603 sz: Sz,
7604 o2: u1 = 0b1,7604 o2: u1 = 0b1,
7605 decoded24: u5 = 0b11110,7605 decoded24: u5 = 0b11110,
7606 U: std.builtin.Signedness = .signed,7606 U: std.lang.Signedness = .signed,
7607 decoded30: u2 = 0b01,7607 decoded30: u2 = 0b01,
7608 };7608 };
76097609
...@@ -7617,7 +7617,7 @@ pub const Instruction = packed union {...@@ -7617,7 +7617,7 @@ pub const Instruction = packed union {
7617 sz: Sz,7617 sz: Sz,
7618 o2: u1 = 0b1,7618 o2: u1 = 0b1,
7619 decoded24: u5 = 0b11110,7619 decoded24: u5 = 0b11110,
7620 U: std.builtin.Signedness = .signed,7620 U: std.lang.Signedness = .signed,
7621 decoded30: u2 = 0b01,7621 decoded30: u2 = 0b01,
7622 };7622 };
76237623
...@@ -7631,7 +7631,7 @@ pub const Instruction = packed union {...@@ -7631,7 +7631,7 @@ pub const Instruction = packed union {
7631 sz: Sz,7631 sz: Sz,
7632 o2: u1 = 0b1,7632 o2: u1 = 0b1,
7633 decoded24: u5 = 0b11110,7633 decoded24: u5 = 0b11110,
7634 U: std.builtin.Signedness = .signed,7634 U: std.lang.Signedness = .signed,
7635 decoded30: u2 = 0b01,7635 decoded30: u2 = 0b01,
7636 };7636 };
76377637
...@@ -7645,7 +7645,7 @@ pub const Instruction = packed union {...@@ -7645,7 +7645,7 @@ pub const Instruction = packed union {
7645 sz: Sz,7645 sz: Sz,
7646 o2: u1 = 0b1,7646 o2: u1 = 0b1,
7647 decoded24: u5 = 0b11110,7647 decoded24: u5 = 0b11110,
7648 U: std.builtin.Signedness = .signed,7648 U: std.lang.Signedness = .signed,
7649 decoded30: u2 = 0b01,7649 decoded30: u2 = 0b01,
7650 };7650 };
76517651
...@@ -7659,7 +7659,7 @@ pub const Instruction = packed union {...@@ -7659,7 +7659,7 @@ pub const Instruction = packed union {
7659 sz: Sz,7659 sz: Sz,
7660 o2: u1 = 0b1,7660 o2: u1 = 0b1,
7661 decoded24: u5 = 0b11110,7661 decoded24: u5 = 0b11110,
7662 U: std.builtin.Signedness = .signed,7662 U: std.lang.Signedness = .signed,
7663 decoded30: u2 = 0b01,7663 decoded30: u2 = 0b01,
7664 };7664 };
76657665
...@@ -7673,7 +7673,7 @@ pub const Instruction = packed union {...@@ -7673,7 +7673,7 @@ pub const Instruction = packed union {
7673 sz: Sz,7673 sz: Sz,
7674 o2: u1 = 0b1,7674 o2: u1 = 0b1,
7675 decoded24: u5 = 0b11110,7675 decoded24: u5 = 0b11110,
7676 U: std.builtin.Signedness = .signed,7676 U: std.lang.Signedness = .signed,
7677 decoded30: u2 = 0b01,7677 decoded30: u2 = 0b01,
7678 };7678 };
76797679
...@@ -7686,7 +7686,7 @@ pub const Instruction = packed union {...@@ -7686,7 +7686,7 @@ pub const Instruction = packed union {
7686 decoded17: u5 = 0b10000,7686 decoded17: u5 = 0b10000,
7687 size: Size,7687 size: Size,
7688 decoded24: u5 = 0b11110,7688 decoded24: u5 = 0b11110,
7689 U: std.builtin.Signedness = .unsigned,7689 U: std.lang.Signedness = .unsigned,
7690 decoded30: u2 = 0b01,7690 decoded30: u2 = 0b01,
7691 };7691 };
76927692
...@@ -7699,7 +7699,7 @@ pub const Instruction = packed union {...@@ -7699,7 +7699,7 @@ pub const Instruction = packed union {
7699 decoded17: u5 = 0b10000,7699 decoded17: u5 = 0b10000,
7700 size: Size,7700 size: Size,
7701 decoded24: u5 = 0b11110,7701 decoded24: u5 = 0b11110,
7702 U: std.builtin.Signedness = .unsigned,7702 U: std.lang.Signedness = .unsigned,
7703 decoded30: u2 = 0b01,7703 decoded30: u2 = 0b01,
7704 };7704 };
77057705
...@@ -7712,7 +7712,7 @@ pub const Instruction = packed union {...@@ -7712,7 +7712,7 @@ pub const Instruction = packed union {
7712 decoded17: u5 = 0b10000,7712 decoded17: u5 = 0b10000,
7713 size: Size,7713 size: Size,
7714 decoded24: u5 = 0b11110,7714 decoded24: u5 = 0b11110,
7715 U: std.builtin.Signedness = .unsigned,7715 U: std.lang.Signedness = .unsigned,
7716 decoded30: u2 = 0b01,7716 decoded30: u2 = 0b01,
7717 };7717 };
77187718
...@@ -7725,7 +7725,7 @@ pub const Instruction = packed union {...@@ -7725,7 +7725,7 @@ pub const Instruction = packed union {
7725 decoded17: u5 = 0b10000,7725 decoded17: u5 = 0b10000,
7726 size: Size,7726 size: Size,
7727 decoded24: u5 = 0b11110,7727 decoded24: u5 = 0b11110,
7728 U: std.builtin.Signedness = .unsigned,7728 U: std.lang.Signedness = .unsigned,
7729 decoded30: u2 = 0b01,7729 decoded30: u2 = 0b01,
7730 };7730 };
77317731
...@@ -7738,7 +7738,7 @@ pub const Instruction = packed union {...@@ -7738,7 +7738,7 @@ pub const Instruction = packed union {
7738 decoded17: u5 = 0b10000,7738 decoded17: u5 = 0b10000,
7739 size: Size,7739 size: Size,
7740 decoded24: u5 = 0b11110,7740 decoded24: u5 = 0b11110,
7741 U: std.builtin.Signedness = .unsigned,7741 U: std.lang.Signedness = .unsigned,
7742 decoded30: u2 = 0b01,7742 decoded30: u2 = 0b01,
7743 };7743 };
77447744
...@@ -7751,7 +7751,7 @@ pub const Instruction = packed union {...@@ -7751,7 +7751,7 @@ pub const Instruction = packed union {
7751 decoded17: u5 = 0b10000,7751 decoded17: u5 = 0b10000,
7752 size: Size,7752 size: Size,
7753 decoded24: u5 = 0b11110,7753 decoded24: u5 = 0b11110,
7754 U: std.builtin.Signedness = .unsigned,7754 U: std.lang.Signedness = .unsigned,
7755 decoded30: u2 = 0b01,7755 decoded30: u2 = 0b01,
7756 };7756 };
77577757
...@@ -7764,7 +7764,7 @@ pub const Instruction = packed union {...@@ -7764,7 +7764,7 @@ pub const Instruction = packed union {
7764 decoded17: u5 = 0b10000,7764 decoded17: u5 = 0b10000,
7765 size: Size,7765 size: Size,
7766 decoded24: u5 = 0b11110,7766 decoded24: u5 = 0b11110,
7767 U: std.builtin.Signedness = .unsigned,7767 U: std.lang.Signedness = .unsigned,
7768 decoded30: u2 = 0b01,7768 decoded30: u2 = 0b01,
7769 };7769 };
77707770
...@@ -7778,7 +7778,7 @@ pub const Instruction = packed union {...@@ -7778,7 +7778,7 @@ pub const Instruction = packed union {
7778 sz: Sz,7778 sz: Sz,
7779 o2: u1 = 0b0,7779 o2: u1 = 0b0,
7780 decoded24: u5 = 0b11110,7780 decoded24: u5 = 0b11110,
7781 U: std.builtin.Signedness = .unsigned,7781 U: std.lang.Signedness = .unsigned,
7782 decoded30: u2 = 0b01,7782 decoded30: u2 = 0b01,
7783 };7783 };
77847784
...@@ -7792,7 +7792,7 @@ pub const Instruction = packed union {...@@ -7792,7 +7792,7 @@ pub const Instruction = packed union {
7792 sz: Sz,7792 sz: Sz,
7793 o2: u1 = 0b0,7793 o2: u1 = 0b0,
7794 decoded24: u5 = 0b11110,7794 decoded24: u5 = 0b11110,
7795 U: std.builtin.Signedness = .unsigned,7795 U: std.lang.Signedness = .unsigned,
7796 decoded30: u2 = 0b01,7796 decoded30: u2 = 0b01,
7797 };7797 };
77987798
...@@ -7806,7 +7806,7 @@ pub const Instruction = packed union {...@@ -7806,7 +7806,7 @@ pub const Instruction = packed union {
7806 sz: Sz,7806 sz: Sz,
7807 o2: u1 = 0b0,7807 o2: u1 = 0b0,
7808 decoded24: u5 = 0b11110,7808 decoded24: u5 = 0b11110,
7809 U: std.builtin.Signedness = .unsigned,7809 U: std.lang.Signedness = .unsigned,
7810 decoded30: u2 = 0b01,7810 decoded30: u2 = 0b01,
7811 };7811 };
78127812
...@@ -7820,7 +7820,7 @@ pub const Instruction = packed union {...@@ -7820,7 +7820,7 @@ pub const Instruction = packed union {
7820 sz: Sz,7820 sz: Sz,
7821 o2: u1 = 0b0,7821 o2: u1 = 0b0,
7822 decoded24: u5 = 0b11110,7822 decoded24: u5 = 0b11110,
7823 U: std.builtin.Signedness = .unsigned,7823 U: std.lang.Signedness = .unsigned,
7824 decoded30: u2 = 0b01,7824 decoded30: u2 = 0b01,
7825 };7825 };
78267826
...@@ -7834,7 +7834,7 @@ pub const Instruction = packed union {...@@ -7834,7 +7834,7 @@ pub const Instruction = packed union {
7834 sz: Sz,7834 sz: Sz,
7835 o2: u1 = 0b0,7835 o2: u1 = 0b0,
7836 decoded24: u5 = 0b11110,7836 decoded24: u5 = 0b11110,
7837 U: std.builtin.Signedness = .unsigned,7837 U: std.lang.Signedness = .unsigned,
7838 decoded30: u2 = 0b01,7838 decoded30: u2 = 0b01,
7839 };7839 };
78407840
...@@ -7848,7 +7848,7 @@ pub const Instruction = packed union {...@@ -7848,7 +7848,7 @@ pub const Instruction = packed union {
7848 sz: Sz,7848 sz: Sz,
7849 o2: u1 = 0b1,7849 o2: u1 = 0b1,
7850 decoded24: u5 = 0b11110,7850 decoded24: u5 = 0b11110,
7851 U: std.builtin.Signedness = .unsigned,7851 U: std.lang.Signedness = .unsigned,
7852 decoded30: u2 = 0b01,7852 decoded30: u2 = 0b01,
7853 };7853 };
78547854
...@@ -7862,7 +7862,7 @@ pub const Instruction = packed union {...@@ -7862,7 +7862,7 @@ pub const Instruction = packed union {
7862 sz: Sz,7862 sz: Sz,
7863 o2: u1 = 0b1,7863 o2: u1 = 0b1,
7864 decoded24: u5 = 0b11110,7864 decoded24: u5 = 0b11110,
7865 U: std.builtin.Signedness = .unsigned,7865 U: std.lang.Signedness = .unsigned,
7866 decoded30: u2 = 0b01,7866 decoded30: u2 = 0b01,
7867 };7867 };
78687868
...@@ -7876,7 +7876,7 @@ pub const Instruction = packed union {...@@ -7876,7 +7876,7 @@ pub const Instruction = packed union {
7876 sz: Sz,7876 sz: Sz,
7877 o2: u1 = 0b1,7877 o2: u1 = 0b1,
7878 decoded24: u5 = 0b11110,7878 decoded24: u5 = 0b11110,
7879 U: std.builtin.Signedness = .unsigned,7879 U: std.lang.Signedness = .unsigned,
7880 decoded30: u2 = 0b01,7880 decoded30: u2 = 0b01,
7881 };7881 };
78827882
...@@ -7890,7 +7890,7 @@ pub const Instruction = packed union {...@@ -7890,7 +7890,7 @@ pub const Instruction = packed union {
7890 sz: Sz,7890 sz: Sz,
7891 o2: u1 = 0b1,7891 o2: u1 = 0b1,
7892 decoded24: u5 = 0b11110,7892 decoded24: u5 = 0b11110,
7893 U: std.builtin.Signedness = .unsigned,7893 U: std.lang.Signedness = .unsigned,
7894 decoded30: u2 = 0b01,7894 decoded30: u2 = 0b01,
7895 };7895 };
78967896
...@@ -7904,7 +7904,7 @@ pub const Instruction = packed union {...@@ -7904,7 +7904,7 @@ pub const Instruction = packed union {
7904 sz: Sz,7904 sz: Sz,
7905 o2: u1 = 0b1,7905 o2: u1 = 0b1,
7906 decoded24: u5 = 0b11110,7906 decoded24: u5 = 0b11110,
7907 U: std.builtin.Signedness = .unsigned,7907 U: std.lang.Signedness = .unsigned,
7908 decoded30: u2 = 0b01,7908 decoded30: u2 = 0b01,
7909 };7909 };
79107910
...@@ -8045,7 +8045,7 @@ pub const Instruction = packed union {...@@ -8045,7 +8045,7 @@ pub const Instruction = packed union {
8045 decoded17: u5 = 0b11000,8045 decoded17: u5 = 0b11000,
8046 size: Size,8046 size: Size,
8047 decoded24: u5 = 0b11110,8047 decoded24: u5 = 0b11110,
8048 U: std.builtin.Signedness,8048 U: std.lang.Signedness,
8049 decoded30: u2 = 0b01,8049 decoded30: u2 = 0b01,
8050 };8050 };
80518051
...@@ -8058,7 +8058,7 @@ pub const Instruction = packed union {...@@ -8058,7 +8058,7 @@ pub const Instruction = packed union {
8058 decoded17: u5 = 0b11000,8058 decoded17: u5 = 0b11000,
8059 size: Size,8059 size: Size,
8060 decoded24: u5 = 0b11110,8060 decoded24: u5 = 0b11110,
8061 U: std.builtin.Signedness = .signed,8061 U: std.lang.Signedness = .signed,
8062 decoded30: u2 = 0b01,8062 decoded30: u2 = 0b01,
8063 };8063 };
80648064
...@@ -8262,7 +8262,7 @@ pub const Instruction = packed union {...@@ -8262,7 +8262,7 @@ pub const Instruction = packed union {
8262 decoded17: u6 = 0b111100,8262 decoded17: u6 = 0b111100,
8263 a: u1,8263 a: u1,
8264 decoded24: u5 = 0b01110,8264 decoded24: u5 = 0b01110,
8265 U: std.builtin.Signedness,8265 U: std.lang.Signedness,
8266 Q: Q,8266 Q: Q,
8267 decoded31: u1 = 0b0,8267 decoded31: u1 = 0b0,
8268 };8268 };
...@@ -8276,7 +8276,7 @@ pub const Instruction = packed union {...@@ -8276,7 +8276,7 @@ pub const Instruction = packed union {
8276 decoded17: u6 = 0b111100,8276 decoded17: u6 = 0b111100,
8277 o2: u1 = 0b0,8277 o2: u1 = 0b0,
8278 decoded24: u5 = 0b01110,8278 decoded24: u5 = 0b01110,
8279 U: std.builtin.Signedness = .signed,8279 U: std.lang.Signedness = .signed,
8280 Q: Q,8280 Q: Q,
8281 decoded31: u1 = 0b0,8281 decoded31: u1 = 0b0,
8282 };8282 };
...@@ -8290,7 +8290,7 @@ pub const Instruction = packed union {...@@ -8290,7 +8290,7 @@ pub const Instruction = packed union {
8290 decoded17: u6 = 0b111100,8290 decoded17: u6 = 0b111100,
8291 o2: u1 = 0b0,8291 o2: u1 = 0b0,
8292 decoded24: u5 = 0b01110,8292 decoded24: u5 = 0b01110,
8293 U: std.builtin.Signedness = .signed,8293 U: std.lang.Signedness = .signed,
8294 Q: Q,8294 Q: Q,
8295 decoded31: u1 = 0b0,8295 decoded31: u1 = 0b0,
8296 };8296 };
...@@ -8304,7 +8304,7 @@ pub const Instruction = packed union {...@@ -8304,7 +8304,7 @@ pub const Instruction = packed union {
8304 decoded17: u6 = 0b111100,8304 decoded17: u6 = 0b111100,
8305 o2: u1 = 0b0,8305 o2: u1 = 0b0,
8306 decoded24: u5 = 0b01110,8306 decoded24: u5 = 0b01110,
8307 U: std.builtin.Signedness = .signed,8307 U: std.lang.Signedness = .signed,
8308 Q: Q,8308 Q: Q,
8309 decoded31: u1 = 0b0,8309 decoded31: u1 = 0b0,
8310 };8310 };
...@@ -8318,7 +8318,7 @@ pub const Instruction = packed union {...@@ -8318,7 +8318,7 @@ pub const Instruction = packed union {
8318 decoded17: u6 = 0b111100,8318 decoded17: u6 = 0b111100,
8319 o2: u1 = 0b0,8319 o2: u1 = 0b0,
8320 decoded24: u5 = 0b01110,8320 decoded24: u5 = 0b01110,
8321 U: std.builtin.Signedness = .signed,8321 U: std.lang.Signedness = .signed,
8322 Q: Q,8322 Q: Q,
8323 decoded31: u1 = 0b0,8323 decoded31: u1 = 0b0,
8324 };8324 };
...@@ -8332,7 +8332,7 @@ pub const Instruction = packed union {...@@ -8332,7 +8332,7 @@ pub const Instruction = packed union {
8332 decoded17: u6 = 0b111100,8332 decoded17: u6 = 0b111100,
8333 o2: u1 = 0b0,8333 o2: u1 = 0b0,
8334 decoded24: u5 = 0b01110,8334 decoded24: u5 = 0b01110,
8335 U: std.builtin.Signedness = .signed,8335 U: std.lang.Signedness = .signed,
8336 Q: Q,8336 Q: Q,
8337 decoded31: u1 = 0b0,8337 decoded31: u1 = 0b0,
8338 };8338 };
...@@ -8346,7 +8346,7 @@ pub const Instruction = packed union {...@@ -8346,7 +8346,7 @@ pub const Instruction = packed union {
8346 decoded17: u6 = 0b111100,8346 decoded17: u6 = 0b111100,
8347 o2: u1 = 0b0,8347 o2: u1 = 0b0,
8348 decoded24: u5 = 0b01110,8348 decoded24: u5 = 0b01110,
8349 U: std.builtin.Signedness = .signed,8349 U: std.lang.Signedness = .signed,
8350 Q: Q,8350 Q: Q,
8351 decoded31: u1 = 0b0,8351 decoded31: u1 = 0b0,
8352 };8352 };
...@@ -8360,7 +8360,7 @@ pub const Instruction = packed union {...@@ -8360,7 +8360,7 @@ pub const Instruction = packed union {
8360 decoded17: u6 = 0b111100,8360 decoded17: u6 = 0b111100,
8361 o2: u1 = 0b1,8361 o2: u1 = 0b1,
8362 decoded24: u5 = 0b01110,8362 decoded24: u5 = 0b01110,
8363 U: std.builtin.Signedness = .signed,8363 U: std.lang.Signedness = .signed,
8364 Q: Q,8364 Q: Q,
8365 decoded31: u1 = 0b0,8365 decoded31: u1 = 0b0,
8366 };8366 };
...@@ -8374,7 +8374,7 @@ pub const Instruction = packed union {...@@ -8374,7 +8374,7 @@ pub const Instruction = packed union {
8374 decoded17: u6 = 0b111100,8374 decoded17: u6 = 0b111100,
8375 o2: u1 = 0b1,8375 o2: u1 = 0b1,
8376 decoded24: u5 = 0b01110,8376 decoded24: u5 = 0b01110,
8377 U: std.builtin.Signedness = .signed,8377 U: std.lang.Signedness = .signed,
8378 Q: Q,8378 Q: Q,
8379 decoded31: u1 = 0b0,8379 decoded31: u1 = 0b0,
8380 };8380 };
...@@ -8388,7 +8388,7 @@ pub const Instruction = packed union {...@@ -8388,7 +8388,7 @@ pub const Instruction = packed union {
8388 decoded17: u6 = 0b111100,8388 decoded17: u6 = 0b111100,
8389 o2: u1 = 0b1,8389 o2: u1 = 0b1,
8390 decoded24: u5 = 0b01110,8390 decoded24: u5 = 0b01110,
8391 U: std.builtin.Signedness = .signed,8391 U: std.lang.Signedness = .signed,
8392 Q: Q,8392 Q: Q,
8393 decoded31: u1 = 0b0,8393 decoded31: u1 = 0b0,
8394 };8394 };
...@@ -8402,7 +8402,7 @@ pub const Instruction = packed union {...@@ -8402,7 +8402,7 @@ pub const Instruction = packed union {
8402 decoded17: u6 = 0b111100,8402 decoded17: u6 = 0b111100,
8403 o2: u1 = 0b1,8403 o2: u1 = 0b1,
8404 decoded24: u5 = 0b01110,8404 decoded24: u5 = 0b01110,
8405 U: std.builtin.Signedness = .signed,8405 U: std.lang.Signedness = .signed,
8406 Q: Q,8406 Q: Q,
8407 decoded31: u1 = 0b0,8407 decoded31: u1 = 0b0,
8408 };8408 };
...@@ -8416,7 +8416,7 @@ pub const Instruction = packed union {...@@ -8416,7 +8416,7 @@ pub const Instruction = packed union {
8416 decoded17: u6 = 0b111100,8416 decoded17: u6 = 0b111100,
8417 o2: u1 = 0b1,8417 o2: u1 = 0b1,
8418 decoded24: u5 = 0b01110,8418 decoded24: u5 = 0b01110,
8419 U: std.builtin.Signedness = .signed,8419 U: std.lang.Signedness = .signed,
8420 Q: Q,8420 Q: Q,
8421 decoded31: u1 = 0b0,8421 decoded31: u1 = 0b0,
8422 };8422 };
...@@ -8430,7 +8430,7 @@ pub const Instruction = packed union {...@@ -8430,7 +8430,7 @@ pub const Instruction = packed union {
8430 decoded17: u6 = 0b111100,8430 decoded17: u6 = 0b111100,
8431 o2: u1 = 0b1,8431 o2: u1 = 0b1,
8432 decoded24: u5 = 0b01110,8432 decoded24: u5 = 0b01110,
8433 U: std.builtin.Signedness = .signed,8433 U: std.lang.Signedness = .signed,
8434 Q: Q,8434 Q: Q,
8435 decoded31: u1 = 0b0,8435 decoded31: u1 = 0b0,
8436 };8436 };
...@@ -8444,7 +8444,7 @@ pub const Instruction = packed union {...@@ -8444,7 +8444,7 @@ pub const Instruction = packed union {
8444 decoded17: u6 = 0b111100,8444 decoded17: u6 = 0b111100,
8445 o2: u1 = 0b1,8445 o2: u1 = 0b1,
8446 decoded24: u5 = 0b01110,8446 decoded24: u5 = 0b01110,
8447 U: std.builtin.Signedness = .signed,8447 U: std.lang.Signedness = .signed,
8448 Q: Q,8448 Q: Q,
8449 decoded31: u1 = 0b0,8449 decoded31: u1 = 0b0,
8450 };8450 };
...@@ -8458,7 +8458,7 @@ pub const Instruction = packed union {...@@ -8458,7 +8458,7 @@ pub const Instruction = packed union {
8458 decoded17: u6 = 0b111100,8458 decoded17: u6 = 0b111100,
8459 o2: u1 = 0b1,8459 o2: u1 = 0b1,
8460 decoded24: u5 = 0b01110,8460 decoded24: u5 = 0b01110,
8461 U: std.builtin.Signedness = .signed,8461 U: std.lang.Signedness = .signed,
8462 Q: Q,8462 Q: Q,
8463 decoded31: u1 = 0b0,8463 decoded31: u1 = 0b0,
8464 };8464 };
...@@ -8472,7 +8472,7 @@ pub const Instruction = packed union {...@@ -8472,7 +8472,7 @@ pub const Instruction = packed union {
8472 decoded17: u6 = 0b111100,8472 decoded17: u6 = 0b111100,
8473 o2: u1 = 0b1,8473 o2: u1 = 0b1,
8474 decoded24: u5 = 0b01110,8474 decoded24: u5 = 0b01110,
8475 U: std.builtin.Signedness = .signed,8475 U: std.lang.Signedness = .signed,
8476 Q: Q,8476 Q: Q,
8477 decoded31: u1 = 0b0,8477 decoded31: u1 = 0b0,
8478 };8478 };
...@@ -8486,7 +8486,7 @@ pub const Instruction = packed union {...@@ -8486,7 +8486,7 @@ pub const Instruction = packed union {
8486 decoded17: u6 = 0b111100,8486 decoded17: u6 = 0b111100,
8487 o2: u1 = 0b0,8487 o2: u1 = 0b0,
8488 decoded24: u5 = 0b01110,8488 decoded24: u5 = 0b01110,
8489 U: std.builtin.Signedness = .unsigned,8489 U: std.lang.Signedness = .unsigned,
8490 Q: Q,8490 Q: Q,
8491 decoded31: u1 = 0b0,8491 decoded31: u1 = 0b0,
8492 };8492 };
...@@ -8500,7 +8500,7 @@ pub const Instruction = packed union {...@@ -8500,7 +8500,7 @@ pub const Instruction = packed union {
8500 decoded17: u6 = 0b111100,8500 decoded17: u6 = 0b111100,
8501 o2: u1 = 0b0,8501 o2: u1 = 0b0,
8502 decoded24: u5 = 0b01110,8502 decoded24: u5 = 0b01110,
8503 U: std.builtin.Signedness = .unsigned,8503 U: std.lang.Signedness = .unsigned,
8504 Q: Q,8504 Q: Q,
8505 decoded31: u1 = 0b0,8505 decoded31: u1 = 0b0,
8506 };8506 };
...@@ -8514,7 +8514,7 @@ pub const Instruction = packed union {...@@ -8514,7 +8514,7 @@ pub const Instruction = packed union {
8514 decoded17: u6 = 0b111100,8514 decoded17: u6 = 0b111100,
8515 o2: u1 = 0b0,8515 o2: u1 = 0b0,
8516 decoded24: u5 = 0b01110,8516 decoded24: u5 = 0b01110,
8517 U: std.builtin.Signedness = .unsigned,8517 U: std.lang.Signedness = .unsigned,
8518 Q: Q,8518 Q: Q,
8519 decoded31: u1 = 0b0,8519 decoded31: u1 = 0b0,
8520 };8520 };
...@@ -8528,7 +8528,7 @@ pub const Instruction = packed union {...@@ -8528,7 +8528,7 @@ pub const Instruction = packed union {
8528 decoded17: u6 = 0b111100,8528 decoded17: u6 = 0b111100,
8529 o2: u1 = 0b0,8529 o2: u1 = 0b0,
8530 decoded24: u5 = 0b01110,8530 decoded24: u5 = 0b01110,
8531 U: std.builtin.Signedness = .unsigned,8531 U: std.lang.Signedness = .unsigned,
8532 Q: Q,8532 Q: Q,
8533 decoded31: u1 = 0b0,8533 decoded31: u1 = 0b0,
8534 };8534 };
...@@ -8542,7 +8542,7 @@ pub const Instruction = packed union {...@@ -8542,7 +8542,7 @@ pub const Instruction = packed union {
8542 decoded17: u6 = 0b111100,8542 decoded17: u6 = 0b111100,
8543 o2: u1 = 0b0,8543 o2: u1 = 0b0,
8544 decoded24: u5 = 0b01110,8544 decoded24: u5 = 0b01110,
8545 U: std.builtin.Signedness = .unsigned,8545 U: std.lang.Signedness = .unsigned,
8546 Q: Q,8546 Q: Q,
8547 decoded31: u1 = 0b0,8547 decoded31: u1 = 0b0,
8548 };8548 };
...@@ -8556,7 +8556,7 @@ pub const Instruction = packed union {...@@ -8556,7 +8556,7 @@ pub const Instruction = packed union {
8556 decoded17: u6 = 0b111100,8556 decoded17: u6 = 0b111100,
8557 o2: u1 = 0b0,8557 o2: u1 = 0b0,
8558 decoded24: u5 = 0b01110,8558 decoded24: u5 = 0b01110,
8559 U: std.builtin.Signedness = .unsigned,8559 U: std.lang.Signedness = .unsigned,
8560 Q: Q,8560 Q: Q,
8561 decoded31: u1 = 0b0,8561 decoded31: u1 = 0b0,
8562 };8562 };
...@@ -8570,7 +8570,7 @@ pub const Instruction = packed union {...@@ -8570,7 +8570,7 @@ pub const Instruction = packed union {
8570 decoded17: u6 = 0b111100,8570 decoded17: u6 = 0b111100,
8571 o2: u1 = 0b1,8571 o2: u1 = 0b1,
8572 decoded24: u5 = 0b01110,8572 decoded24: u5 = 0b01110,
8573 U: std.builtin.Signedness = .unsigned,8573 U: std.lang.Signedness = .unsigned,
8574 Q: Q,8574 Q: Q,
8575 decoded31: u1 = 0b0,8575 decoded31: u1 = 0b0,
8576 };8576 };
...@@ -8584,7 +8584,7 @@ pub const Instruction = packed union {...@@ -8584,7 +8584,7 @@ pub const Instruction = packed union {
8584 decoded17: u6 = 0b111100,8584 decoded17: u6 = 0b111100,
8585 o2: u1 = 0b1,8585 o2: u1 = 0b1,
8586 decoded24: u5 = 0b01110,8586 decoded24: u5 = 0b01110,
8587 U: std.builtin.Signedness = .unsigned,8587 U: std.lang.Signedness = .unsigned,
8588 Q: Q,8588 Q: Q,
8589 decoded31: u1 = 0b0,8589 decoded31: u1 = 0b0,
8590 };8590 };
...@@ -8598,7 +8598,7 @@ pub const Instruction = packed union {...@@ -8598,7 +8598,7 @@ pub const Instruction = packed union {
8598 decoded17: u6 = 0b111100,8598 decoded17: u6 = 0b111100,
8599 o2: u1 = 0b1,8599 o2: u1 = 0b1,
8600 decoded24: u5 = 0b01110,8600 decoded24: u5 = 0b01110,
8601 U: std.builtin.Signedness = .unsigned,8601 U: std.lang.Signedness = .unsigned,
8602 Q: Q,8602 Q: Q,
8603 decoded31: u1 = 0b0,8603 decoded31: u1 = 0b0,
8604 };8604 };
...@@ -8612,7 +8612,7 @@ pub const Instruction = packed union {...@@ -8612,7 +8612,7 @@ pub const Instruction = packed union {
8612 decoded17: u6 = 0b111100,8612 decoded17: u6 = 0b111100,
8613 o2: u1 = 0b1,8613 o2: u1 = 0b1,
8614 decoded24: u5 = 0b01110,8614 decoded24: u5 = 0b01110,
8615 U: std.builtin.Signedness = .unsigned,8615 U: std.lang.Signedness = .unsigned,
8616 Q: Q,8616 Q: Q,
8617 decoded31: u1 = 0b0,8617 decoded31: u1 = 0b0,
8618 };8618 };
...@@ -8626,7 +8626,7 @@ pub const Instruction = packed union {...@@ -8626,7 +8626,7 @@ pub const Instruction = packed union {
8626 decoded17: u6 = 0b111100,8626 decoded17: u6 = 0b111100,
8627 o2: u1 = 0b1,8627 o2: u1 = 0b1,
8628 decoded24: u5 = 0b01110,8628 decoded24: u5 = 0b01110,
8629 U: std.builtin.Signedness = .unsigned,8629 U: std.lang.Signedness = .unsigned,
8630 Q: Q,8630 Q: Q,
8631 decoded31: u1 = 0b0,8631 decoded31: u1 = 0b0,
8632 };8632 };
...@@ -8640,7 +8640,7 @@ pub const Instruction = packed union {...@@ -8640,7 +8640,7 @@ pub const Instruction = packed union {
8640 decoded17: u6 = 0b111100,8640 decoded17: u6 = 0b111100,
8641 o2: u1 = 0b1,8641 o2: u1 = 0b1,
8642 decoded24: u5 = 0b01110,8642 decoded24: u5 = 0b01110,
8643 U: std.builtin.Signedness = .unsigned,8643 U: std.lang.Signedness = .unsigned,
8644 Q: Q,8644 Q: Q,
8645 decoded31: u1 = 0b0,8645 decoded31: u1 = 0b0,
8646 };8646 };
...@@ -8654,7 +8654,7 @@ pub const Instruction = packed union {...@@ -8654,7 +8654,7 @@ pub const Instruction = packed union {
8654 decoded17: u6 = 0b111100,8654 decoded17: u6 = 0b111100,
8655 o2: u1 = 0b1,8655 o2: u1 = 0b1,
8656 decoded24: u5 = 0b01110,8656 decoded24: u5 = 0b01110,
8657 U: std.builtin.Signedness = .unsigned,8657 U: std.lang.Signedness = .unsigned,
8658 Q: Q,8658 Q: Q,
8659 decoded31: u1 = 0b0,8659 decoded31: u1 = 0b0,
8660 };8660 };
...@@ -8668,7 +8668,7 @@ pub const Instruction = packed union {...@@ -8668,7 +8668,7 @@ pub const Instruction = packed union {
8668 decoded17: u6 = 0b111100,8668 decoded17: u6 = 0b111100,
8669 o2: u1 = 0b1,8669 o2: u1 = 0b1,
8670 decoded24: u5 = 0b01110,8670 decoded24: u5 = 0b01110,
8671 U: std.builtin.Signedness = .unsigned,8671 U: std.lang.Signedness = .unsigned,
8672 Q: Q,8672 Q: Q,
8673 decoded31: u1 = 0b0,8673 decoded31: u1 = 0b0,
8674 };8674 };
...@@ -8814,7 +8814,7 @@ pub const Instruction = packed union {...@@ -8814,7 +8814,7 @@ pub const Instruction = packed union {
8814 decoded17: u5 = 0b10000,8814 decoded17: u5 = 0b10000,
8815 size: Size,8815 size: Size,
8816 decoded24: u5 = 0b01110,8816 decoded24: u5 = 0b01110,
8817 U: std.builtin.Signedness,8817 U: std.lang.Signedness,
8818 Q: Q,8818 Q: Q,
8819 decoded31: u1 = 0b0,8819 decoded31: u1 = 0b0,
8820 };8820 };
...@@ -8828,7 +8828,7 @@ pub const Instruction = packed union {...@@ -8828,7 +8828,7 @@ pub const Instruction = packed union {
8828 decoded17: u5 = 0b10000,8828 decoded17: u5 = 0b10000,
8829 size: Size,8829 size: Size,
8830 decoded24: u5 = 0b01110,8830 decoded24: u5 = 0b01110,
8831 U: std.builtin.Signedness = .signed,8831 U: std.lang.Signedness = .signed,
8832 Q: Q,8832 Q: Q,
8833 decoded31: u1 = 0b0,8833 decoded31: u1 = 0b0,
8834 };8834 };
...@@ -8842,7 +8842,7 @@ pub const Instruction = packed union {...@@ -8842,7 +8842,7 @@ pub const Instruction = packed union {
8842 decoded17: u5 = 0b10000,8842 decoded17: u5 = 0b10000,
8843 size: Size,8843 size: Size,
8844 decoded24: u5 = 0b01110,8844 decoded24: u5 = 0b01110,
8845 U: std.builtin.Signedness = .signed,8845 U: std.lang.Signedness = .signed,
8846 Q: Q,8846 Q: Q,
8847 decoded31: u1 = 0b0,8847 decoded31: u1 = 0b0,
8848 };8848 };
...@@ -8856,7 +8856,7 @@ pub const Instruction = packed union {...@@ -8856,7 +8856,7 @@ pub const Instruction = packed union {
8856 decoded17: u5 = 0b10000,8856 decoded17: u5 = 0b10000,
8857 size: Size,8857 size: Size,
8858 decoded24: u5 = 0b01110,8858 decoded24: u5 = 0b01110,
8859 U: std.builtin.Signedness = .signed,8859 U: std.lang.Signedness = .signed,
8860 Q: Q,8860 Q: Q,
8861 decoded31: u1 = 0b0,8861 decoded31: u1 = 0b0,
8862 };8862 };
...@@ -8870,7 +8870,7 @@ pub const Instruction = packed union {...@@ -8870,7 +8870,7 @@ pub const Instruction = packed union {
8870 decoded17: u5 = 0b10000,8870 decoded17: u5 = 0b10000,
8871 size: Size,8871 size: Size,
8872 decoded24: u5 = 0b01110,8872 decoded24: u5 = 0b01110,
8873 U: std.builtin.Signedness = .signed,8873 U: std.lang.Signedness = .signed,
8874 Q: Q,8874 Q: Q,
8875 decoded31: u1 = 0b0,8875 decoded31: u1 = 0b0,
8876 };8876 };
...@@ -8884,7 +8884,7 @@ pub const Instruction = packed union {...@@ -8884,7 +8884,7 @@ pub const Instruction = packed union {
8884 decoded17: u5 = 0b10000,8884 decoded17: u5 = 0b10000,
8885 size: Size,8885 size: Size,
8886 decoded24: u5 = 0b01110,8886 decoded24: u5 = 0b01110,
8887 U: std.builtin.Signedness = .signed,8887 U: std.lang.Signedness = .signed,
8888 Q: Q,8888 Q: Q,
8889 decoded31: u1 = 0b0,8889 decoded31: u1 = 0b0,
8890 };8890 };
...@@ -8898,7 +8898,7 @@ pub const Instruction = packed union {...@@ -8898,7 +8898,7 @@ pub const Instruction = packed union {
8898 decoded17: u5 = 0b10000,8898 decoded17: u5 = 0b10000,
8899 size: Size,8899 size: Size,
8900 decoded24: u5 = 0b01110,8900 decoded24: u5 = 0b01110,
8901 U: std.builtin.Signedness = .signed,8901 U: std.lang.Signedness = .signed,
8902 Q: Q,8902 Q: Q,
8903 decoded31: u1 = 0b0,8903 decoded31: u1 = 0b0,
8904 };8904 };
...@@ -8912,7 +8912,7 @@ pub const Instruction = packed union {...@@ -8912,7 +8912,7 @@ pub const Instruction = packed union {
8912 decoded17: u5 = 0b10000,8912 decoded17: u5 = 0b10000,
8913 size: Size,8913 size: Size,
8914 decoded24: u5 = 0b01110,8914 decoded24: u5 = 0b01110,
8915 U: std.builtin.Signedness = .signed,8915 U: std.lang.Signedness = .signed,
8916 Q: Q,8916 Q: Q,
8917 decoded31: u1 = 0b0,8917 decoded31: u1 = 0b0,
8918 };8918 };
...@@ -8926,7 +8926,7 @@ pub const Instruction = packed union {...@@ -8926,7 +8926,7 @@ pub const Instruction = packed union {
8926 decoded17: u5 = 0b10000,8926 decoded17: u5 = 0b10000,
8927 size: Size,8927 size: Size,
8928 decoded24: u5 = 0b01110,8928 decoded24: u5 = 0b01110,
8929 U: std.builtin.Signedness = .signed,8929 U: std.lang.Signedness = .signed,
8930 Q: Q,8930 Q: Q,
8931 decoded31: u1 = 0b0,8931 decoded31: u1 = 0b0,
8932 };8932 };
...@@ -8941,7 +8941,7 @@ pub const Instruction = packed union {...@@ -8941,7 +8941,7 @@ pub const Instruction = packed union {
8941 sz: Sz,8941 sz: Sz,
8942 o2: u1 = 0b0,8942 o2: u1 = 0b0,
8943 decoded24: u5 = 0b01110,8943 decoded24: u5 = 0b01110,
8944 U: std.builtin.Signedness = .signed,8944 U: std.lang.Signedness = .signed,
8945 Q: Q,8945 Q: Q,
8946 decoded31: u1 = 0b0,8946 decoded31: u1 = 0b0,
8947 };8947 };
...@@ -8956,7 +8956,7 @@ pub const Instruction = packed union {...@@ -8956,7 +8956,7 @@ pub const Instruction = packed union {
8956 sz: Sz,8956 sz: Sz,
8957 o2: u1 = 0b0,8957 o2: u1 = 0b0,
8958 decoded24: u5 = 0b01110,8958 decoded24: u5 = 0b01110,
8959 U: std.builtin.Signedness = .signed,8959 U: std.lang.Signedness = .signed,
8960 Q: Q,8960 Q: Q,
8961 decoded31: u1 = 0b0,8961 decoded31: u1 = 0b0,
8962 };8962 };
...@@ -8971,7 +8971,7 @@ pub const Instruction = packed union {...@@ -8971,7 +8971,7 @@ pub const Instruction = packed union {
8971 sz: Sz,8971 sz: Sz,
8972 o2: u1 = 0b0,8972 o2: u1 = 0b0,
8973 decoded24: u5 = 0b01110,8973 decoded24: u5 = 0b01110,
8974 U: std.builtin.Signedness = .signed,8974 U: std.lang.Signedness = .signed,
8975 Q: Q,8975 Q: Q,
8976 decoded31: u1 = 0b0,8976 decoded31: u1 = 0b0,
8977 };8977 };
...@@ -8986,7 +8986,7 @@ pub const Instruction = packed union {...@@ -8986,7 +8986,7 @@ pub const Instruction = packed union {
8986 sz: Sz,8986 sz: Sz,
8987 o2: u1 = 0b0,8987 o2: u1 = 0b0,
8988 decoded24: u5 = 0b01110,8988 decoded24: u5 = 0b01110,
8989 U: std.builtin.Signedness = .signed,8989 U: std.lang.Signedness = .signed,
8990 Q: Q,8990 Q: Q,
8991 decoded31: u1 = 0b0,8991 decoded31: u1 = 0b0,
8992 };8992 };
...@@ -9001,7 +9001,7 @@ pub const Instruction = packed union {...@@ -9001,7 +9001,7 @@ pub const Instruction = packed union {
9001 sz: Sz,9001 sz: Sz,
9002 o2: u1 = 0b0,9002 o2: u1 = 0b0,
9003 decoded24: u5 = 0b01110,9003 decoded24: u5 = 0b01110,
9004 U: std.builtin.Signedness = .signed,9004 U: std.lang.Signedness = .signed,
9005 Q: Q,9005 Q: Q,
9006 decoded31: u1 = 0b0,9006 decoded31: u1 = 0b0,
9007 };9007 };
...@@ -9016,7 +9016,7 @@ pub const Instruction = packed union {...@@ -9016,7 +9016,7 @@ pub const Instruction = packed union {
9016 sz: Sz,9016 sz: Sz,
9017 o2: u1 = 0b0,9017 o2: u1 = 0b0,
9018 decoded24: u5 = 0b01110,9018 decoded24: u5 = 0b01110,
9019 U: std.builtin.Signedness = .signed,9019 U: std.lang.Signedness = .signed,
9020 Q: Q,9020 Q: Q,
9021 decoded31: u1 = 0b0,9021 decoded31: u1 = 0b0,
9022 };9022 };
...@@ -9031,7 +9031,7 @@ pub const Instruction = packed union {...@@ -9031,7 +9031,7 @@ pub const Instruction = packed union {
9031 sz: Sz,9031 sz: Sz,
9032 o2: u1 = 0b1,9032 o2: u1 = 0b1,
9033 decoded24: u5 = 0b01110,9033 decoded24: u5 = 0b01110,
9034 U: std.builtin.Signedness = .signed,9034 U: std.lang.Signedness = .signed,
9035 Q: Q,9035 Q: Q,
9036 decoded31: u1 = 0b0,9036 decoded31: u1 = 0b0,
9037 };9037 };
...@@ -9046,7 +9046,7 @@ pub const Instruction = packed union {...@@ -9046,7 +9046,7 @@ pub const Instruction = packed union {
9046 sz: Sz,9046 sz: Sz,
9047 o2: u1 = 0b1,9047 o2: u1 = 0b1,
9048 decoded24: u5 = 0b01110,9048 decoded24: u5 = 0b01110,
9049 U: std.builtin.Signedness = .signed,9049 U: std.lang.Signedness = .signed,
9050 Q: Q,9050 Q: Q,
9051 decoded31: u1 = 0b0,9051 decoded31: u1 = 0b0,
9052 };9052 };
...@@ -9061,7 +9061,7 @@ pub const Instruction = packed union {...@@ -9061,7 +9061,7 @@ pub const Instruction = packed union {
9061 sz: Sz,9061 sz: Sz,
9062 o2: u1 = 0b1,9062 o2: u1 = 0b1,
9063 decoded24: u5 = 0b01110,9063 decoded24: u5 = 0b01110,
9064 U: std.builtin.Signedness = .signed,9064 U: std.lang.Signedness = .signed,
9065 Q: Q,9065 Q: Q,
9066 decoded31: u1 = 0b0,9066 decoded31: u1 = 0b0,
9067 };9067 };
...@@ -9076,7 +9076,7 @@ pub const Instruction = packed union {...@@ -9076,7 +9076,7 @@ pub const Instruction = packed union {
9076 sz: Sz,9076 sz: Sz,
9077 o2: u1 = 0b1,9077 o2: u1 = 0b1,
9078 decoded24: u5 = 0b01110,9078 decoded24: u5 = 0b01110,
9079 U: std.builtin.Signedness = .signed,9079 U: std.lang.Signedness = .signed,
9080 Q: Q,9080 Q: Q,
9081 decoded31: u1 = 0b0,9081 decoded31: u1 = 0b0,
9082 };9082 };
...@@ -9091,7 +9091,7 @@ pub const Instruction = packed union {...@@ -9091,7 +9091,7 @@ pub const Instruction = packed union {
9091 sz: Sz,9091 sz: Sz,
9092 o2: u1 = 0b1,9092 o2: u1 = 0b1,
9093 decoded24: u5 = 0b01110,9093 decoded24: u5 = 0b01110,
9094 U: std.builtin.Signedness = .signed,9094 U: std.lang.Signedness = .signed,
9095 Q: Q,9095 Q: Q,
9096 decoded31: u1 = 0b0,9096 decoded31: u1 = 0b0,
9097 };9097 };
...@@ -9106,7 +9106,7 @@ pub const Instruction = packed union {...@@ -9106,7 +9106,7 @@ pub const Instruction = packed union {
9106 sz: Sz,9106 sz: Sz,
9107 o2: u1 = 0b1,9107 o2: u1 = 0b1,
9108 decoded24: u5 = 0b01110,9108 decoded24: u5 = 0b01110,
9109 U: std.builtin.Signedness = .signed,9109 U: std.lang.Signedness = .signed,
9110 Q: Q,9110 Q: Q,
9111 decoded31: u1 = 0b0,9111 decoded31: u1 = 0b0,
9112 };9112 };
...@@ -9121,7 +9121,7 @@ pub const Instruction = packed union {...@@ -9121,7 +9121,7 @@ pub const Instruction = packed union {
9121 sz: Sz,9121 sz: Sz,
9122 o2: u1 = 0b1,9122 o2: u1 = 0b1,
9123 decoded24: u5 = 0b01110,9123 decoded24: u5 = 0b01110,
9124 U: std.builtin.Signedness = .signed,9124 U: std.lang.Signedness = .signed,
9125 Q: Q,9125 Q: Q,
9126 decoded31: u1 = 0b0,9126 decoded31: u1 = 0b0,
9127 };9127 };
...@@ -9136,7 +9136,7 @@ pub const Instruction = packed union {...@@ -9136,7 +9136,7 @@ pub const Instruction = packed union {
9136 sz: Sz,9136 sz: Sz,
9137 o2: u1 = 0b1,9137 o2: u1 = 0b1,
9138 decoded24: u5 = 0b01110,9138 decoded24: u5 = 0b01110,
9139 U: std.builtin.Signedness = .signed,9139 U: std.lang.Signedness = .signed,
9140 Q: Q,9140 Q: Q,
9141 decoded31: u1 = 0b0,9141 decoded31: u1 = 0b0,
9142 };9142 };
...@@ -9151,7 +9151,7 @@ pub const Instruction = packed union {...@@ -9151,7 +9151,7 @@ pub const Instruction = packed union {
9151 sz: Sz,9151 sz: Sz,
9152 o2: u1 = 0b1,9152 o2: u1 = 0b1,
9153 decoded24: u5 = 0b01110,9153 decoded24: u5 = 0b01110,
9154 U: std.builtin.Signedness = .signed,9154 U: std.lang.Signedness = .signed,
9155 Q: Q,9155 Q: Q,
9156 decoded31: u1 = 0b0,9156 decoded31: u1 = 0b0,
9157 };9157 };
...@@ -9165,7 +9165,7 @@ pub const Instruction = packed union {...@@ -9165,7 +9165,7 @@ pub const Instruction = packed union {
9165 decoded17: u5 = 0b10000,9165 decoded17: u5 = 0b10000,
9166 size: Size,9166 size: Size,
9167 decoded24: u5 = 0b01110,9167 decoded24: u5 = 0b01110,
9168 U: std.builtin.Signedness = .unsigned,9168 U: std.lang.Signedness = .unsigned,
9169 Q: Q,9169 Q: Q,
9170 decoded31: u1 = 0b0,9170 decoded31: u1 = 0b0,
9171 };9171 };
...@@ -9179,7 +9179,7 @@ pub const Instruction = packed union {...@@ -9179,7 +9179,7 @@ pub const Instruction = packed union {
9179 decoded17: u5 = 0b10000,9179 decoded17: u5 = 0b10000,
9180 size: Size,9180 size: Size,
9181 decoded24: u5 = 0b01110,9181 decoded24: u5 = 0b01110,
9182 U: std.builtin.Signedness = .unsigned,9182 U: std.lang.Signedness = .unsigned,
9183 Q: Q,9183 Q: Q,
9184 decoded31: u1 = 0b0,9184 decoded31: u1 = 0b0,
9185 };9185 };
...@@ -9193,7 +9193,7 @@ pub const Instruction = packed union {...@@ -9193,7 +9193,7 @@ pub const Instruction = packed union {
9193 decoded17: u5 = 0b10000,9193 decoded17: u5 = 0b10000,
9194 size: Size,9194 size: Size,
9195 decoded24: u5 = 0b01110,9195 decoded24: u5 = 0b01110,
9196 U: std.builtin.Signedness = .unsigned,9196 U: std.lang.Signedness = .unsigned,
9197 Q: Q,9197 Q: Q,
9198 decoded31: u1 = 0b0,9198 decoded31: u1 = 0b0,
9199 };9199 };
...@@ -9207,7 +9207,7 @@ pub const Instruction = packed union {...@@ -9207,7 +9207,7 @@ pub const Instruction = packed union {
9207 decoded17: u5 = 0b10000,9207 decoded17: u5 = 0b10000,
9208 size: Size,9208 size: Size,
9209 decoded24: u5 = 0b01110,9209 decoded24: u5 = 0b01110,
9210 U: std.builtin.Signedness = .unsigned,9210 U: std.lang.Signedness = .unsigned,
9211 Q: Q,9211 Q: Q,
9212 decoded31: u1 = 0b0,9212 decoded31: u1 = 0b0,
9213 };9213 };
...@@ -9221,7 +9221,7 @@ pub const Instruction = packed union {...@@ -9221,7 +9221,7 @@ pub const Instruction = packed union {
9221 decoded17: u5 = 0b10000,9221 decoded17: u5 = 0b10000,
9222 size: Size,9222 size: Size,
9223 decoded24: u5 = 0b01110,9223 decoded24: u5 = 0b01110,
9224 U: std.builtin.Signedness = .unsigned,9224 U: std.lang.Signedness = .unsigned,
9225 Q: Q,9225 Q: Q,
9226 decoded31: u1 = 0b0,9226 decoded31: u1 = 0b0,
9227 };9227 };
...@@ -9235,7 +9235,7 @@ pub const Instruction = packed union {...@@ -9235,7 +9235,7 @@ pub const Instruction = packed union {
9235 decoded17: u5 = 0b10000,9235 decoded17: u5 = 0b10000,
9236 size: Size,9236 size: Size,
9237 decoded24: u5 = 0b01110,9237 decoded24: u5 = 0b01110,
9238 U: std.builtin.Signedness = .unsigned,9238 U: std.lang.Signedness = .unsigned,
9239 Q: Q,9239 Q: Q,
9240 decoded31: u1 = 0b0,9240 decoded31: u1 = 0b0,
9241 };9241 };
...@@ -9249,7 +9249,7 @@ pub const Instruction = packed union {...@@ -9249,7 +9249,7 @@ pub const Instruction = packed union {
9249 decoded17: u5 = 0b10000,9249 decoded17: u5 = 0b10000,
9250 size: Size,9250 size: Size,
9251 decoded24: u5 = 0b01110,9251 decoded24: u5 = 0b01110,
9252 U: std.builtin.Signedness = .unsigned,9252 U: std.lang.Signedness = .unsigned,
9253 Q: Q,9253 Q: Q,
9254 decoded31: u1 = 0b0,9254 decoded31: u1 = 0b0,
9255 };9255 };
...@@ -9264,7 +9264,7 @@ pub const Instruction = packed union {...@@ -9264,7 +9264,7 @@ pub const Instruction = packed union {
9264 sz: Sz,9264 sz: Sz,
9265 o2: u1 = 0b0,9265 o2: u1 = 0b0,
9266 decoded24: u5 = 0b01110,9266 decoded24: u5 = 0b01110,
9267 U: std.builtin.Signedness = .unsigned,9267 U: std.lang.Signedness = .unsigned,
9268 Q: Q,9268 Q: Q,
9269 decoded31: u1 = 0b0,9269 decoded31: u1 = 0b0,
9270 };9270 };
...@@ -9279,7 +9279,7 @@ pub const Instruction = packed union {...@@ -9279,7 +9279,7 @@ pub const Instruction = packed union {
9279 sz: Sz,9279 sz: Sz,
9280 o2: u1 = 0b0,9280 o2: u1 = 0b0,
9281 decoded24: u5 = 0b01110,9281 decoded24: u5 = 0b01110,
9282 U: std.builtin.Signedness = .unsigned,9282 U: std.lang.Signedness = .unsigned,
9283 Q: Q,9283 Q: Q,
9284 decoded31: u1 = 0b0,9284 decoded31: u1 = 0b0,
9285 };9285 };
...@@ -9294,7 +9294,7 @@ pub const Instruction = packed union {...@@ -9294,7 +9294,7 @@ pub const Instruction = packed union {
9294 sz: Sz,9294 sz: Sz,
9295 o2: u1 = 0b0,9295 o2: u1 = 0b0,
9296 decoded24: u5 = 0b01110,9296 decoded24: u5 = 0b01110,
9297 U: std.builtin.Signedness = .unsigned,9297 U: std.lang.Signedness = .unsigned,
9298 Q: Q,9298 Q: Q,
9299 decoded31: u1 = 0b0,9299 decoded31: u1 = 0b0,
9300 };9300 };
...@@ -9309,7 +9309,7 @@ pub const Instruction = packed union {...@@ -9309,7 +9309,7 @@ pub const Instruction = packed union {
9309 sz: Sz,9309 sz: Sz,
9310 o2: u1 = 0b0,9310 o2: u1 = 0b0,
9311 decoded24: u5 = 0b01110,9311 decoded24: u5 = 0b01110,
9312 U: std.builtin.Signedness = .unsigned,9312 U: std.lang.Signedness = .unsigned,
9313 Q: Q,9313 Q: Q,
9314 decoded31: u1 = 0b0,9314 decoded31: u1 = 0b0,
9315 };9315 };
...@@ -9324,7 +9324,7 @@ pub const Instruction = packed union {...@@ -9324,7 +9324,7 @@ pub const Instruction = packed union {
9324 sz: Sz,9324 sz: Sz,
9325 o2: u1 = 0b0,9325 o2: u1 = 0b0,
9326 decoded24: u5 = 0b01110,9326 decoded24: u5 = 0b01110,
9327 U: std.builtin.Signedness = .unsigned,9327 U: std.lang.Signedness = .unsigned,
9328 Q: Q,9328 Q: Q,
9329 decoded31: u1 = 0b0,9329 decoded31: u1 = 0b0,
9330 };9330 };
...@@ -9339,7 +9339,7 @@ pub const Instruction = packed union {...@@ -9339,7 +9339,7 @@ pub const Instruction = packed union {
9339 sz: Sz,9339 sz: Sz,
9340 o2: u1 = 0b0,9340 o2: u1 = 0b0,
9341 decoded24: u5 = 0b01110,9341 decoded24: u5 = 0b01110,
9342 U: std.builtin.Signedness = .unsigned,9342 U: std.lang.Signedness = .unsigned,
9343 Q: Q,9343 Q: Q,
9344 decoded31: u1 = 0b0,9344 decoded31: u1 = 0b0,
9345 };9345 };
...@@ -9354,7 +9354,7 @@ pub const Instruction = packed union {...@@ -9354,7 +9354,7 @@ pub const Instruction = packed union {
9354 sz: Sz,9354 sz: Sz,
9355 o2: u1 = 0b0,9355 o2: u1 = 0b0,
9356 decoded24: u5 = 0b01110,9356 decoded24: u5 = 0b01110,
9357 U: std.builtin.Signedness = .unsigned,9357 U: std.lang.Signedness = .unsigned,
9358 Q: Q,9358 Q: Q,
9359 decoded31: u1 = 0b0,9359 decoded31: u1 = 0b0,
9360 };9360 };
...@@ -9368,7 +9368,7 @@ pub const Instruction = packed union {...@@ -9368,7 +9368,7 @@ pub const Instruction = packed union {
9368 decoded17: u5 = 0b10000,9368 decoded17: u5 = 0b10000,
9369 size: Size = .byte,9369 size: Size = .byte,
9370 decoded24: u5 = 0b01110,9370 decoded24: u5 = 0b01110,
9371 U: std.builtin.Signedness = .unsigned,9371 U: std.lang.Signedness = .unsigned,
9372 Q: Q,9372 Q: Q,
9373 decoded31: u1 = 0b0,9373 decoded31: u1 = 0b0,
9374 };9374 };
...@@ -9383,7 +9383,7 @@ pub const Instruction = packed union {...@@ -9383,7 +9383,7 @@ pub const Instruction = packed union {
9383 sz: Sz,9383 sz: Sz,
9384 o2: u1 = 0b1,9384 o2: u1 = 0b1,
9385 decoded24: u5 = 0b01110,9385 decoded24: u5 = 0b01110,
9386 U: std.builtin.Signedness = .unsigned,9386 U: std.lang.Signedness = .unsigned,
9387 Q: Q,9387 Q: Q,
9388 decoded31: u1 = 0b0,9388 decoded31: u1 = 0b0,
9389 };9389 };
...@@ -9398,7 +9398,7 @@ pub const Instruction = packed union {...@@ -9398,7 +9398,7 @@ pub const Instruction = packed union {
9398 sz: Sz,9398 sz: Sz,
9399 o2: u1 = 0b1,9399 o2: u1 = 0b1,
9400 decoded24: u5 = 0b01110,9400 decoded24: u5 = 0b01110,
9401 U: std.builtin.Signedness = .unsigned,9401 U: std.lang.Signedness = .unsigned,
9402 Q: Q,9402 Q: Q,
9403 decoded31: u1 = 0b0,9403 decoded31: u1 = 0b0,
9404 };9404 };
...@@ -9413,7 +9413,7 @@ pub const Instruction = packed union {...@@ -9413,7 +9413,7 @@ pub const Instruction = packed union {
9413 sz: Sz,9413 sz: Sz,
9414 o2: u1 = 0b1,9414 o2: u1 = 0b1,
9415 decoded24: u5 = 0b01110,9415 decoded24: u5 = 0b01110,
9416 U: std.builtin.Signedness = .unsigned,9416 U: std.lang.Signedness = .unsigned,
9417 Q: Q,9417 Q: Q,
9418 decoded31: u1 = 0b0,9418 decoded31: u1 = 0b0,
9419 };9419 };
...@@ -9428,7 +9428,7 @@ pub const Instruction = packed union {...@@ -9428,7 +9428,7 @@ pub const Instruction = packed union {
9428 sz: Sz,9428 sz: Sz,
9429 o2: u1 = 0b1,9429 o2: u1 = 0b1,
9430 decoded24: u5 = 0b01110,9430 decoded24: u5 = 0b01110,
9431 U: std.builtin.Signedness = .unsigned,9431 U: std.lang.Signedness = .unsigned,
9432 Q: Q,9432 Q: Q,
9433 decoded31: u1 = 0b0,9433 decoded31: u1 = 0b0,
9434 };9434 };
...@@ -9443,7 +9443,7 @@ pub const Instruction = packed union {...@@ -9443,7 +9443,7 @@ pub const Instruction = packed union {
9443 sz: Sz,9443 sz: Sz,
9444 o2: u1 = 0b1,9444 o2: u1 = 0b1,
9445 decoded24: u5 = 0b01110,9445 decoded24: u5 = 0b01110,
9446 U: std.builtin.Signedness = .unsigned,9446 U: std.lang.Signedness = .unsigned,
9447 Q: Q,9447 Q: Q,
9448 decoded31: u1 = 0b0,9448 decoded31: u1 = 0b0,
9449 };9449 };
...@@ -9458,7 +9458,7 @@ pub const Instruction = packed union {...@@ -9458,7 +9458,7 @@ pub const Instruction = packed union {
9458 sz: Sz,9458 sz: Sz,
9459 o2: u1 = 0b1,9459 o2: u1 = 0b1,
9460 decoded24: u5 = 0b01110,9460 decoded24: u5 = 0b01110,
9461 U: std.builtin.Signedness = .unsigned,9461 U: std.lang.Signedness = .unsigned,
9462 Q: Q,9462 Q: Q,
9463 decoded31: u1 = 0b0,9463 decoded31: u1 = 0b0,
9464 };9464 };
...@@ -9473,7 +9473,7 @@ pub const Instruction = packed union {...@@ -9473,7 +9473,7 @@ pub const Instruction = packed union {
9473 sz: Sz,9473 sz: Sz,
9474 o2: u1 = 0b1,9474 o2: u1 = 0b1,
9475 decoded24: u5 = 0b01110,9475 decoded24: u5 = 0b01110,
9476 U: std.builtin.Signedness = .unsigned,9476 U: std.lang.Signedness = .unsigned,
9477 Q: Q,9477 Q: Q,
9478 decoded31: u1 = 0b0,9478 decoded31: u1 = 0b0,
9479 };9479 };
...@@ -9488,7 +9488,7 @@ pub const Instruction = packed union {...@@ -9488,7 +9488,7 @@ pub const Instruction = packed union {
9488 sz: Sz,9488 sz: Sz,
9489 o2: u1 = 0b1,9489 o2: u1 = 0b1,
9490 decoded24: u5 = 0b01110,9490 decoded24: u5 = 0b01110,
9491 U: std.builtin.Signedness = .unsigned,9491 U: std.lang.Signedness = .unsigned,
9492 Q: Q,9492 Q: Q,
9493 decoded31: u1 = 0b0,9493 decoded31: u1 = 0b0,
9494 };9494 };
...@@ -9670,7 +9670,7 @@ pub const Instruction = packed union {...@@ -9670,7 +9670,7 @@ pub const Instruction = packed union {
9670 decoded17: u5 = 0b11000,9670 decoded17: u5 = 0b11000,
9671 size: Size,9671 size: Size,
9672 decoded24: u5 = 0b01110,9672 decoded24: u5 = 0b01110,
9673 U: std.builtin.Signedness,9673 U: std.lang.Signedness,
9674 Q: Q,9674 Q: Q,
9675 decoded31: u1 = 0b0,9675 decoded31: u1 = 0b0,
9676 };9676 };
...@@ -9684,7 +9684,7 @@ pub const Instruction = packed union {...@@ -9684,7 +9684,7 @@ pub const Instruction = packed union {
9684 decoded17: u5 = 0b11000,9684 decoded17: u5 = 0b11000,
9685 size: Size,9685 size: Size,
9686 decoded24: u5 = 0b01110,9686 decoded24: u5 = 0b01110,
9687 U: std.builtin.Signedness = .signed,9687 U: std.lang.Signedness = .signed,
9688 Q: Q,9688 Q: Q,
9689 decoded31: u1 = 0b0,9689 decoded31: u1 = 0b0,
9690 };9690 };
...@@ -9726,7 +9726,7 @@ pub const Instruction = packed union {...@@ -9726,7 +9726,7 @@ pub const Instruction = packed union {
9726 decoded21: u1 = 0b1,9726 decoded21: u1 = 0b1,
9727 size: Size,9727 size: Size,
9728 decoded24: u5 = 0b01110,9728 decoded24: u5 = 0b01110,
9729 U: std.builtin.Signedness,9729 U: std.lang.Signedness,
9730 Q: Q,9730 Q: Q,
9731 decoded31: u1 = 0b0,9731 decoded31: u1 = 0b0,
9732 };9732 };
...@@ -9741,7 +9741,7 @@ pub const Instruction = packed union {...@@ -9741,7 +9741,7 @@ pub const Instruction = packed union {
9741 decoded21: u1 = 0b1,9741 decoded21: u1 = 0b1,
9742 size: Size,9742 size: Size,
9743 decoded24: u5 = 0b01110,9743 decoded24: u5 = 0b01110,
9744 U: std.builtin.Signedness = .signed,9744 U: std.lang.Signedness = .signed,
9745 Q: Q,9745 Q: Q,
9746 decoded31: u1 = 0b0,9746 decoded31: u1 = 0b0,
9747 };9747 };
...@@ -9756,7 +9756,7 @@ pub const Instruction = packed union {...@@ -9756,7 +9756,7 @@ pub const Instruction = packed union {
9756 decoded21: u1 = 0b1,9756 decoded21: u1 = 0b1,
9757 size: Size = .byte,9757 size: Size = .byte,
9758 decoded24: u5 = 0b01110,9758 decoded24: u5 = 0b01110,
9759 U: std.builtin.Signedness = .signed,9759 U: std.lang.Signedness = .signed,
9760 Q: Q,9760 Q: Q,
9761 decoded31: u1 = 0b0,9761 decoded31: u1 = 0b0,
9762 };9762 };
...@@ -9771,7 +9771,7 @@ pub const Instruction = packed union {...@@ -9771,7 +9771,7 @@ pub const Instruction = packed union {
9771 decoded21: u1 = 0b1,9771 decoded21: u1 = 0b1,
9772 size: Size = .half,9772 size: Size = .half,
9773 decoded24: u5 = 0b01110,9773 decoded24: u5 = 0b01110,
9774 U: std.builtin.Signedness = .signed,9774 U: std.lang.Signedness = .signed,
9775 Q: Q,9775 Q: Q,
9776 decoded31: u1 = 0b0,9776 decoded31: u1 = 0b0,
9777 };9777 };
...@@ -9786,7 +9786,7 @@ pub const Instruction = packed union {...@@ -9786,7 +9786,7 @@ pub const Instruction = packed union {
9786 decoded21: u1 = 0b1,9786 decoded21: u1 = 0b1,
9787 size: Size = .single,9787 size: Size = .single,
9788 decoded24: u5 = 0b01110,9788 decoded24: u5 = 0b01110,
9789 U: std.builtin.Signedness = .signed,9789 U: std.lang.Signedness = .signed,
9790 Q: Q,9790 Q: Q,
9791 decoded31: u1 = 0b0,9791 decoded31: u1 = 0b0,
9792 };9792 };
...@@ -9801,7 +9801,7 @@ pub const Instruction = packed union {...@@ -9801,7 +9801,7 @@ pub const Instruction = packed union {
9801 decoded21: u1 = 0b1,9801 decoded21: u1 = 0b1,
9802 size: Size = .double,9802 size: Size = .double,
9803 decoded24: u5 = 0b01110,9803 decoded24: u5 = 0b01110,
9804 U: std.builtin.Signedness = .signed,9804 U: std.lang.Signedness = .signed,
9805 Q: Q,9805 Q: Q,
9806 decoded31: u1 = 0b0,9806 decoded31: u1 = 0b0,
9807 };9807 };
...@@ -9816,7 +9816,7 @@ pub const Instruction = packed union {...@@ -9816,7 +9816,7 @@ pub const Instruction = packed union {
9816 decoded21: u1 = 0b1,9816 decoded21: u1 = 0b1,
9817 size: Size = .byte,9817 size: Size = .byte,
9818 decoded24: u5 = 0b01110,9818 decoded24: u5 = 0b01110,
9819 U: std.builtin.Signedness = .unsigned,9819 U: std.lang.Signedness = .unsigned,
9820 Q: Q,9820 Q: Q,
9821 decoded31: u1 = 0b0,9821 decoded31: u1 = 0b0,
9822 };9822 };
...@@ -9831,7 +9831,7 @@ pub const Instruction = packed union {...@@ -9831,7 +9831,7 @@ pub const Instruction = packed union {
9831 decoded21: u1 = 0b1,9831 decoded21: u1 = 0b1,
9832 size: Size = .half,9832 size: Size = .half,
9833 decoded24: u5 = 0b01110,9833 decoded24: u5 = 0b01110,
9834 U: std.builtin.Signedness = .unsigned,9834 U: std.lang.Signedness = .unsigned,
9835 Q: Q,9835 Q: Q,
9836 decoded31: u1 = 0b0,9836 decoded31: u1 = 0b0,
9837 };9837 };
...@@ -9846,7 +9846,7 @@ pub const Instruction = packed union {...@@ -9846,7 +9846,7 @@ pub const Instruction = packed union {
9846 decoded21: u1 = 0b1,9846 decoded21: u1 = 0b1,
9847 size: Size = .single,9847 size: Size = .single,
9848 decoded24: u5 = 0b01110,9848 decoded24: u5 = 0b01110,
9849 U: std.builtin.Signedness = .unsigned,9849 U: std.lang.Signedness = .unsigned,
9850 Q: Q,9850 Q: Q,
9851 decoded31: u1 = 0b0,9851 decoded31: u1 = 0b0,
9852 };9852 };
...@@ -9861,7 +9861,7 @@ pub const Instruction = packed union {...@@ -9861,7 +9861,7 @@ pub const Instruction = packed union {
9861 decoded21: u1 = 0b1,9861 decoded21: u1 = 0b1,
9862 size: Size = .double,9862 size: Size = .double,
9863 decoded24: u5 = 0b01110,9863 decoded24: u5 = 0b01110,
9864 U: std.builtin.Signedness = .unsigned,9864 U: std.lang.Signedness = .unsigned,
9865 Q: Q,9865 Q: Q,
9866 decoded31: u1 = 0b0,9866 decoded31: u1 = 0b0,
9867 };9867 };
src/codegen/c.zig+7-7
...@@ -1997,7 +1997,7 @@ pub const DeclGen = struct {...@@ -1997,7 +1997,7 @@ pub const DeclGen = struct {
1997 .bits => {},1997 .bits => {},
1998 }1998 }
19991999
2000 const int_info: std.builtin.Type.Int = if (ty.isAbiInt(zcu)) ty.intInfo(zcu) else .{2000 const int_info: std.lang.Type.Int = if (ty.isAbiInt(zcu)) ty.intInfo(zcu) else .{
2001 .signedness = .unsigned,2001 .signedness = .unsigned,
2002 .bits = @intCast(ty.bitSize(zcu)),2002 .bits = @intCast(ty.bitSize(zcu)),
2003 };2003 };
...@@ -3878,7 +3878,7 @@ fn airSlice(f: *Function, inst: Air.Inst.Index) !CValue {...@@ -3878,7 +3878,7 @@ fn airSlice(f: *Function, inst: Air.Inst.Index) !CValue {
3878fn airCall(3878fn airCall(
3879 f: *Function,3879 f: *Function,
3880 inst: Air.Inst.Index,3880 inst: Air.Inst.Index,
3881 modifier: std.builtin.CallModifier,3881 modifier: std.lang.CallModifier,
3882) !CValue {3882) !CValue {
3883 const pt = f.dg.pt;3883 const pt = f.dg.pt;
3884 const zcu = pt.zcu;3884 const zcu = pt.zcu;
...@@ -6911,7 +6911,7 @@ fn airCVaCopy(f: *Function, inst: Air.Inst.Index) !CValue {...@@ -6911,7 +6911,7 @@ fn airCVaCopy(f: *Function, inst: Air.Inst.Index) !CValue {
6911 return local;6911 return local;
6912}6912}
69136913
6914fn toMemoryOrder(order: std.builtin.AtomicOrder) [:0]const u8 {6914fn toMemoryOrder(order: std.lang.AtomicOrder) [:0]const u8 {
6915 return switch (order) {6915 return switch (order) {
6916 // Note: unordered is actually even less atomic than relaxed6916 // Note: unordered is actually even less atomic than relaxed
6917 .unordered, .monotonic => "zig_memory_order_relaxed",6917 .unordered, .monotonic => "zig_memory_order_relaxed",
...@@ -6922,11 +6922,11 @@ fn toMemoryOrder(order: std.builtin.AtomicOrder) [:0]const u8 {...@@ -6922,11 +6922,11 @@ fn toMemoryOrder(order: std.builtin.AtomicOrder) [:0]const u8 {
6922 };6922 };
6923}6923}
69246924
6925fn writeMemoryOrder(w: *Writer, order: std.builtin.AtomicOrder) !void {6925fn writeMemoryOrder(w: *Writer, order: std.lang.AtomicOrder) !void {
6926 return w.writeAll(toMemoryOrder(order));6926 return w.writeAll(toMemoryOrder(order));
6927}6927}
69286928
6929fn toCallingConvention(cc: std.builtin.CallingConvention, zcu: *Zcu) ?[]const u8 {6929fn toCallingConvention(cc: std.lang.CallingConvention, zcu: *Zcu) ?[]const u8 {
6930 if (zcu.getTarget().cCallingConvention()) |ccc| {6930 if (zcu.getTarget().cCallingConvention()) |ccc| {
6931 if (cc.eql(ccc)) {6931 if (cc.eql(ccc)) {
6932 return null;6932 return null;
...@@ -7021,7 +7021,7 @@ fn toCallingConvention(cc: std.builtin.CallingConvention, zcu: *Zcu) ?[]const u8...@@ -7021,7 +7021,7 @@ fn toCallingConvention(cc: std.builtin.CallingConvention, zcu: *Zcu) ?[]const u8
7021 };7021 };
7022}7022}
70237023
7024fn toAtomicRmwSuffix(order: std.builtin.AtomicRmwOp) []const u8 {7024fn toAtomicRmwSuffix(order: std.lang.AtomicRmwOp) []const u8 {
7025 return switch (order) {7025 return switch (order) {
7026 .Xchg => "xchg",7026 .Xchg => "xchg",
7027 .Add => "add",7027 .Add => "add",
...@@ -7044,7 +7044,7 @@ fn toCIntBits(zig_bits: u32) ?u32 {...@@ -7044,7 +7044,7 @@ fn toCIntBits(zig_bits: u32) ?u32 {
7044 return null;7044 return null;
7045}7045}
70467046
7047fn signAbbrev(signedness: std.builtin.Signedness) u8 {7047fn signAbbrev(signedness: std.lang.Signedness) u8 {
7048 return switch (signedness) {7048 return switch (signedness) {
7049 .signed => 'i',7049 .signed => 'i',
7050 .unsigned => 'u',7050 .unsigned => 'u',
src/codegen/c/type.zig+1-1
...@@ -512,7 +512,7 @@ pub const CType = union(enum) {...@@ -512,7 +512,7 @@ pub const CType = union(enum) {
512 },512 },
513 }513 }
514 }514 }
515 fn classifyBitInt(signedness: std.builtin.Signedness, bits: u16, zcu: *const Zcu) IntClass {515 fn classifyBitInt(signedness: std.lang.Signedness, bits: u16, zcu: *const Zcu) IntClass {
516 const is_ez80 = zcu.getTarget().cpu.arch == .ez80;516 const is_ez80 = zcu.getTarget().cpu.arch == .ez80;
517 return switch (bits) {517 return switch (bits) {
518 0 => .void,518 0 => .void,
src/codegen/llvm.zig+19-19
...@@ -500,7 +500,7 @@ const CodeModel = enum {...@@ -500,7 +500,7 @@ const CodeModel = enum {
500 large,500 large,
501};501};
502502
503fn codeModel(model: std.builtin.CodeModel, target: *const std.Target) CodeModel {503fn codeModel(model: std.lang.CodeModel, target: *const std.Target) CodeModel {
504 // Roughly match Clang's mapping of GCC code models to LLVM code models.504 // Roughly match Clang's mapping of GCC code models to LLVM code models.
505 return switch (model) {505 return switch (model) {
506 .default => .default,506 .default => .default,
...@@ -556,7 +556,7 @@ pub const Object = struct {...@@ -556,7 +556,7 @@ pub const Object = struct {
556 /// Same as `nav_map` but for UAVs (which are always global constants).556 /// Same as `nav_map` but for UAVs (which are always global constants).
557 uav_map: std.AutoHashMapUnmanaged(struct {557 uav_map: std.AutoHashMapUnmanaged(struct {
558 val: InternPool.Index,558 val: InternPool.Index,
559 @"addrspace": std.builtin.AddressSpace,559 @"addrspace": std.lang.AddressSpace,
560 }, Builder.Variable.Index),560 }, Builder.Variable.Index),
561 /// Maps enum types to their corresponding LLVM functions for implementing the `tag_name` instruction.561 /// Maps enum types to their corresponding LLVM functions for implementing the `tag_name` instruction.
562 enum_tag_name_map: std.AutoHashMapUnmanaged(InternPool.Index, Builder.Function.Index),562 enum_tag_name_map: std.AutoHashMapUnmanaged(InternPool.Index, Builder.Function.Index),
...@@ -1755,7 +1755,7 @@ pub const Object = struct {...@@ -1755,7 +1755,7 @@ pub const Object = struct {
1755 }1755 }
17561756
1757 // If the first export specifies a linksection, set the exported variable's section to that1757 // If the first export specifies a linksection, set the exported variable's section to that
1758 // one. This is kind of a hack because `std.builtin.ExportOptions.section` doesn't actually1758 // one. This is kind of a hack because `std.lang.ExportOptions.section` doesn't actually
1759 // make much sense: the linksection should be associated with the declaration itself rather1759 // make much sense: the linksection should be associated with the declaration itself rather
1760 // than some particular symbol it is exported as!1760 // than some particular symbol it is exported as!
1761 if (export_indices[0].ptr(zcu).opts.section.toSlice(ip)) |section_slice| {1761 if (export_indices[0].ptr(zcu).opts.section.toSlice(ip)) |section_slice| {
...@@ -3378,7 +3378,7 @@ pub const Object = struct {...@@ -3378,7 +3378,7 @@ pub const Object = struct {
3378 }3378 }
33793379
3380 if (fn_info.cc == .auto and zcu.comp.config.any_error_tracing) {3380 if (fn_info.cc == .auto and zcu.comp.config.any_error_tracing) {
3381 // First parameter is a pointer to `std.builtin.StackTrace`.3381 // First parameter is a pointer to `std.lang.StackTrace`.
3382 const llvm_ptr_ty = try o.builder.ptrType(toLlvmAddressSpace(.generic, target));3382 const llvm_ptr_ty = try o.builder.ptrType(toLlvmAddressSpace(.generic, target));
3383 try llvm_params.append(o.gpa, llvm_ptr_ty);3383 try llvm_params.append(o.gpa, llvm_ptr_ty);
3384 }3384 }
...@@ -3986,7 +3986,7 @@ pub const Object = struct {...@@ -3986,7 +3986,7 @@ pub const Object = struct {
3986 o: *Object,3986 o: *Object,
3987 /// Must not be `.none`.3987 /// Must not be `.none`.
3988 @"align": InternPool.Alignment,3988 @"align": InternPool.Alignment,
3989 @"addrspace": std.builtin.AddressSpace,3989 @"addrspace": std.lang.AddressSpace,
3990 ) Allocator.Error!Builder.Constant {3990 ) Allocator.Error!Builder.Constant {
3991 const addr: u64 = @"align".toByteUnits().?;3991 const addr: u64 = @"align".toByteUnits().?;
3992 const llvm_usize = try o.lowerType(.usize);3992 const llvm_usize = try o.lowerType(.usize);
...@@ -4000,7 +4000,7 @@ pub const Object = struct {...@@ -4000,7 +4000,7 @@ pub const Object = struct {
4000 uav_val: InternPool.Index,4000 uav_val: InternPool.Index,
4001 /// Must not be `.none`.4001 /// Must not be `.none`.
4002 @"align": InternPool.Alignment,4002 @"align": InternPool.Alignment,
4003 @"addrspace": std.builtin.AddressSpace,4003 @"addrspace": std.lang.AddressSpace,
4004 ) Allocator.Error!Builder.Constant {4004 ) Allocator.Error!Builder.Constant {
4005 assert(@"align" != .none);4005 assert(@"align" != .none);
40064006
...@@ -4383,20 +4383,20 @@ const CallingConventionInfo = struct {...@@ -4383,20 +4383,20 @@ const CallingConventionInfo = struct {
4383 inreg_param_count: u2 = 0,4383 inreg_param_count: u2 = 0,
4384};4384};
43854385
4386pub fn toLlvmCallConv(cc: std.builtin.CallingConvention, target: *const std.Target) ?CallingConventionInfo {4386pub fn toLlvmCallConv(cc: std.lang.CallingConvention, target: *const std.Target) ?CallingConventionInfo {
4387 const llvm_cc = toLlvmCallConvTag(cc, target) orelse return null;4387 const llvm_cc = toLlvmCallConvTag(cc, target) orelse return null;
4388 const incoming_stack_alignment: ?u64, const register_params: u2 = switch (cc) {4388 const incoming_stack_alignment: ?u64, const register_params: u2 = switch (cc) {
4389 inline else => |pl| switch (@TypeOf(pl)) {4389 inline else => |pl| switch (@TypeOf(pl)) {
4390 void => .{ null, 0 },4390 void => .{ null, 0 },
4391 std.builtin.CallingConvention.ArcInterruptOptions,4391 std.lang.CallingConvention.ArcInterruptOptions,
4392 std.builtin.CallingConvention.ArmInterruptOptions,4392 std.lang.CallingConvention.ArmInterruptOptions,
4393 std.builtin.CallingConvention.RiscvInterruptOptions,4393 std.lang.CallingConvention.RiscvInterruptOptions,
4394 std.builtin.CallingConvention.ShInterruptOptions,4394 std.lang.CallingConvention.ShInterruptOptions,
4395 std.builtin.CallingConvention.MicroblazeInterruptOptions,4395 std.lang.CallingConvention.MicroblazeInterruptOptions,
4396 std.builtin.CallingConvention.MipsInterruptOptions,4396 std.lang.CallingConvention.MipsInterruptOptions,
4397 std.builtin.CallingConvention.CommonOptions,4397 std.lang.CallingConvention.CommonOptions,
4398 => .{ pl.incoming_stack_alignment, 0 },4398 => .{ pl.incoming_stack_alignment, 0 },
4399 std.builtin.CallingConvention.X86RegparmOptions => .{ pl.incoming_stack_alignment, pl.register_params },4399 std.lang.CallingConvention.X86RegparmOptions => .{ pl.incoming_stack_alignment, pl.register_params },
4400 else => @compileError("TODO: toLlvmCallConv" ++ @tagName(pl)),4400 else => @compileError("TODO: toLlvmCallConv" ++ @tagName(pl)),
4401 },4401 },
4402 };4402 };
...@@ -4410,7 +4410,7 @@ pub fn toLlvmCallConv(cc: std.builtin.CallingConvention, target: *const std.Targ...@@ -4410,7 +4410,7 @@ pub fn toLlvmCallConv(cc: std.builtin.CallingConvention, target: *const std.Targ
4410 .inreg_param_count = register_params,4410 .inreg_param_count = register_params,
4411 };4411 };
4412}4412}
4413pub fn toLlvmCallConvTag(cc_tag: std.builtin.CallingConvention.Tag, target: *const std.Target) ?Builder.CallConv {4413pub fn toLlvmCallConvTag(cc_tag: std.lang.CallingConvention.Tag, target: *const std.Target) ?Builder.CallConv {
4414 if (target.cCallingConvention()) |default_c| {4414 if (target.cCallingConvention()) |default_c| {
4415 if (cc_tag == default_c) {4415 if (cc_tag == default_c) {
4416 return .ccc;4416 return .ccc;
...@@ -4543,13 +4543,13 @@ pub fn toLlvmCallConvTag(cc_tag: std.builtin.CallingConvention.Tag, target: *con...@@ -4543,13 +4543,13 @@ pub fn toLlvmCallConvTag(cc_tag: std.builtin.CallingConvention.Tag, target: *con
4543}4543}
45444544
4545/// Convert a zig-address space to an llvm address space.4545/// Convert a zig-address space to an llvm address space.
4546pub fn toLlvmAddressSpace(address_space: std.builtin.AddressSpace, target: *const std.Target) Builder.AddrSpace {4546pub fn toLlvmAddressSpace(address_space: std.lang.AddressSpace, target: *const std.Target) Builder.AddrSpace {
4547 for (llvmAddrSpaceInfo(target)) |info| if (info.zig == address_space) return info.llvm;4547 for (llvmAddrSpaceInfo(target)) |info| if (info.zig == address_space) return info.llvm;
4548 unreachable;4548 unreachable;
4549}4549}
45504550
4551const AddrSpaceInfo = struct {4551const AddrSpaceInfo = struct {
4552 zig: ?std.builtin.AddressSpace,4552 zig: ?std.lang.AddressSpace,
4553 llvm: Builder.AddrSpace,4553 llvm: Builder.AddrSpace,
4554 non_integral: bool = false,4554 non_integral: bool = false,
4555 size: ?u16 = null,4555 size: ?u16 = null,
...@@ -4643,7 +4643,7 @@ fn llvmDefaultGlobalAddressSpace(target: *const std.Target) Builder.AddrSpace {...@@ -4643,7 +4643,7 @@ fn llvmDefaultGlobalAddressSpace(target: *const std.Target) Builder.AddrSpace {
46434643
4644/// Return the actual address space that a value should be stored in if its a global address space.4644/// Return the actual address space that a value should be stored in if its a global address space.
4645/// When a value is placed in the resulting address space, it needs to be cast back into wanted_address_space.4645/// When a value is placed in the resulting address space, it needs to be cast back into wanted_address_space.
4646fn toLlvmGlobalAddressSpace(wanted_address_space: std.builtin.AddressSpace, target: *const std.Target) Builder.AddrSpace {4646fn toLlvmGlobalAddressSpace(wanted_address_space: std.lang.AddressSpace, target: *const std.Target) Builder.AddrSpace {
4647 return switch (wanted_address_space) {4647 return switch (wanted_address_space) {
4648 .generic => llvmDefaultGlobalAddressSpace(target),4648 .generic => llvmDefaultGlobalAddressSpace(target),
4649 else => |as| toLlvmAddressSpace(as, target),4649 else => |as| toLlvmAddressSpace(as, target),
src/codegen/llvm/FuncGen.zig+9-9
...@@ -567,7 +567,7 @@ const CallAttr = enum {...@@ -567,7 +567,7 @@ const CallAttr = enum {
567 AlwaysInline,567 AlwaysInline,
568};568};
569569
570fn airCall(self: *FuncGen, inst: Air.Inst.Index, modifier: std.builtin.CallModifier) Allocator.Error!Builder.Value {570fn airCall(self: *FuncGen, inst: Air.Inst.Index, modifier: std.lang.CallModifier) Allocator.Error!Builder.Value {
571 const air_call = self.air.unwrapCall(inst);571 const air_call = self.air.unwrapCall(inst);
572 const args = air_call.args;572 const args = air_call.args;
573 const o = self.object;573 const o = self.object;
...@@ -891,7 +891,7 @@ fn buildSimplePanic(fg: *FuncGen, panic_id: Zcu.SimplePanicId) Allocator.Error!v...@@ -891,7 +891,7 @@ fn buildSimplePanic(fg: *FuncGen, panic_id: Zcu.SimplePanicId) Allocator.Error!v
891 const o = fg.object;891 const o = fg.object;
892 const zcu = o.zcu;892 const zcu = o.zcu;
893 const target = zcu.getTarget();893 const target = zcu.getTarget();
894 const panic_func = zcu.funcInfo(zcu.builtin_decl_values.get(panic_id.toBuiltin()));894 const panic_func = zcu.funcInfo(zcu.std_lang_decl_values.get(panic_id.toStdLangDecl()));
895 const fn_info = zcu.typeToFunc(.fromInterned(panic_func.ty)).?;895 const fn_info = zcu.typeToFunc(.fromInterned(panic_func.ty)).?;
896 const llvm_panic_fn_ty = try o.lowerType(.fromInterned(panic_func.ty));896 const llvm_panic_fn_ty = try o.lowerType(.fromInterned(panic_func.ty));
897897
...@@ -6017,14 +6017,14 @@ fn airPrefetch(self: *FuncGen, inst: Air.Inst.Index) Allocator.Error!Builder.Val...@@ -6017,14 +6017,14 @@ fn airPrefetch(self: *FuncGen, inst: Air.Inst.Index) Allocator.Error!Builder.Val
6017 const o = self.object;6017 const o = self.object;
6018 const prefetch = self.air.instructions.items(.data)[@intFromEnum(inst)].prefetch;6018 const prefetch = self.air.instructions.items(.data)[@intFromEnum(inst)].prefetch;
60196019
6020 comptime assert(@intFromEnum(std.builtin.PrefetchOptions.Rw.read) == 0);6020 comptime assert(@intFromEnum(std.lang.PrefetchOptions.Rw.read) == 0);
6021 comptime assert(@intFromEnum(std.builtin.PrefetchOptions.Rw.write) == 1);6021 comptime assert(@intFromEnum(std.lang.PrefetchOptions.Rw.write) == 1);
60226022
6023 comptime assert(prefetch.locality >= 0);6023 comptime assert(prefetch.locality >= 0);
6024 comptime assert(prefetch.locality <= 3);6024 comptime assert(prefetch.locality <= 3);
60256025
6026 comptime assert(@intFromEnum(std.builtin.PrefetchOptions.Cache.instruction) == 0);6026 comptime assert(@intFromEnum(std.lang.PrefetchOptions.Cache.instruction) == 0);
6027 comptime assert(@intFromEnum(std.builtin.PrefetchOptions.Cache.data) == 1);6027 comptime assert(@intFromEnum(std.lang.PrefetchOptions.Cache.data) == 1);
60286028
6029 // LLVM fails during codegen of instruction cache prefetchs for these architectures.6029 // LLVM fails during codegen of instruction cache prefetchs for these architectures.
6030 // This is an LLVM bug as the prefetch intrinsic should be a noop if not supported6030 // This is an LLVM bug as the prefetch intrinsic should be a noop if not supported
...@@ -7106,7 +7106,7 @@ fn lowerSystemVFnRetTy(o: *Object, fn_info: InternPool.Key.FuncType) Allocator.E...@@ -7106,7 +7106,7 @@ fn lowerSystemVFnRetTy(o: *Object, fn_info: InternPool.Key.FuncType) Allocator.E
7106/// has different ABI than regular integer types, and there is no currently no7106/// has different ABI than regular integer types, and there is no currently no
7107/// way to determine whether a Zig integer type is meant to represent e.g. `int`7107/// way to determine whether a Zig integer type is meant to represent e.g. `int`
7108/// or `_BitInt(32)`.7108/// or `_BitInt(32)`.
7109pub fn ccAbiPromoteInt(cc: std.builtin.CallingConvention, zcu: *Zcu, ty: Type) ?std.builtin.Signedness {7109pub fn ccAbiPromoteInt(cc: std.lang.CallingConvention, zcu: *Zcu, ty: Type) ?std.lang.Signedness {
7110 switch (cc) {7110 switch (cc) {
7111 .auto, .@"inline", .async => return null,7111 .auto, .@"inline", .async => return null,
7112 else => {},7112 else => {},
...@@ -7379,7 +7379,7 @@ fn intrinsicsAllowed(scalar_ty: Type, target: *const std.Target) bool {...@@ -7379,7 +7379,7 @@ fn intrinsicsAllowed(scalar_ty: Type, target: *const std.Target) bool {
7379 };7379 };
7380}7380}
73817381
7382fn toLlvmAtomicOrdering(atomic_order: std.builtin.AtomicOrder) Builder.AtomicOrdering {7382fn toLlvmAtomicOrdering(atomic_order: std.lang.AtomicOrder) Builder.AtomicOrdering {
7383 return switch (atomic_order) {7383 return switch (atomic_order) {
7384 .unordered => .unordered,7384 .unordered => .unordered,
7385 .monotonic => .monotonic,7385 .monotonic => .monotonic,
...@@ -7391,7 +7391,7 @@ fn toLlvmAtomicOrdering(atomic_order: std.builtin.AtomicOrder) Builder.AtomicOrd...@@ -7391,7 +7391,7 @@ fn toLlvmAtomicOrdering(atomic_order: std.builtin.AtomicOrder) Builder.AtomicOrd
7391}7391}
73927392
7393fn toLlvmAtomicRmwBinOp(7393fn toLlvmAtomicRmwBinOp(
7394 op: std.builtin.AtomicRmwOp,7394 op: std.lang.AtomicRmwOp,
7395 is_signed: bool,7395 is_signed: bool,
7396 is_float: bool,7396 is_float: bool,
7397) Builder.Function.Instruction.AtomicRmw.Operation {7397) Builder.Function.Instruction.AtomicRmw.Operation {
src/codegen/riscv64/CodeGen.zig+4-4
...@@ -1901,7 +1901,7 @@ fn splitType(func: *Func, ty: Type) ![2]Type {...@@ -1901,7 +1901,7 @@ fn splitType(func: *Func, ty: Type) ![2]Type {
1901fn truncateRegister(func: *Func, ty: Type, reg: Register) !void {1901fn truncateRegister(func: *Func, ty: Type, reg: Register) !void {
1902 const pt = func.pt;1902 const pt = func.pt;
1903 const zcu = pt.zcu;1903 const zcu = pt.zcu;
1904 const int_info = if (ty.isAbiInt(zcu)) ty.intInfo(zcu) else std.builtin.Type.Int{1904 const int_info = if (ty.isAbiInt(zcu)) ty.intInfo(zcu) else std.lang.Type.Int{
1905 .signedness = .unsigned,1905 .signedness = .unsigned,
1906 .bits = @intCast(ty.bitSize(zcu)),1906 .bits = @intCast(ty.bitSize(zcu)),
1907 };1907 };
...@@ -4788,7 +4788,7 @@ fn airFrameAddress(func: *Func, inst: Air.Inst.Index) !void {...@@ -4788,7 +4788,7 @@ fn airFrameAddress(func: *Func, inst: Air.Inst.Index) !void {
4788 return func.finishAir(inst, dst_mcv, .{ .none, .none, .none });4788 return func.finishAir(inst, dst_mcv, .{ .none, .none, .none });
4789}4789}
47904790
4791fn airCall(func: *Func, inst: Air.Inst.Index, modifier: std.builtin.CallModifier) !void {4791fn airCall(func: *Func, inst: Air.Inst.Index, modifier: std.lang.CallModifier) !void {
4792 if (modifier == .always_tail) return func.fail("TODO implement tail calls for riscv64", .{});4792 if (modifier == .always_tail) return func.fail("TODO implement tail calls for riscv64", .{});
4793 const call = func.air.unwrapCall(inst);4793 const call = func.air.unwrapCall(inst);
4794 const arg_refs = call.args;4794 const arg_refs = call.args;
...@@ -7691,7 +7691,7 @@ fn airAtomicLoad(func: *Func, inst: Air.Inst.Index) !void {...@@ -7691,7 +7691,7 @@ fn airAtomicLoad(func: *Func, inst: Air.Inst.Index) !void {
7691 const pt = func.pt;7691 const pt = func.pt;
7692 const zcu = pt.zcu;7692 const zcu = pt.zcu;
7693 const atomic_load = func.air.instructions.items(.data)[@intFromEnum(inst)].atomic_load;7693 const atomic_load = func.air.instructions.items(.data)[@intFromEnum(inst)].atomic_load;
7694 const order: std.builtin.AtomicOrder = atomic_load.order;7694 const order: std.lang.AtomicOrder = atomic_load.order;
76957695
7696 const ptr_ty = func.typeOf(atomic_load.ptr);7696 const ptr_ty = func.typeOf(atomic_load.ptr);
7697 const elem_ty = ptr_ty.childType(zcu);7697 const elem_ty = ptr_ty.childType(zcu);
...@@ -7737,7 +7737,7 @@ fn airAtomicLoad(func: *Func, inst: Air.Inst.Index) !void {...@@ -7737,7 +7737,7 @@ fn airAtomicLoad(func: *Func, inst: Air.Inst.Index) !void {
7737 return func.finishAir(inst, result_mcv, .{ atomic_load.ptr, .none, .none });7737 return func.finishAir(inst, result_mcv, .{ atomic_load.ptr, .none, .none });
7738}7738}
77397739
7740fn airAtomicStore(func: *Func, inst: Air.Inst.Index, order: std.builtin.AtomicOrder) !void {7740fn airAtomicStore(func: *Func, inst: Air.Inst.Index, order: std.lang.AtomicOrder) !void {
7741 const bin_op = func.air.instructions.items(.data)[@intFromEnum(inst)].bin_op;7741 const bin_op = func.air.instructions.items(.data)[@intFromEnum(inst)].bin_op;
77427742
7743 const ptr_ty = func.typeOf(bin_op.lhs);7743 const ptr_ty = func.typeOf(bin_op.lhs);
src/codegen/riscv64/Lower.zig+3-3
...@@ -1,12 +1,12 @@...@@ -1,12 +1,12 @@
1//! This file contains the functionality for lowering RISC-V MIR to Instructions1//! This file contains the functionality for lowering RISC-V MIR to Instructions
22
3pt: Zcu.PerThread,3pt: Zcu.PerThread,
4output_mode: std.builtin.OutputMode,4output_mode: std.lang.OutputMode,
5link_mode: std.builtin.LinkMode,5link_mode: std.lang.LinkMode,
6pic: bool,6pic: bool,
7allocator: Allocator,7allocator: Allocator,
8mir: Mir,8mir: Mir,
9cc: std.builtin.CallingConvention,9cc: std.lang.CallingConvention,
10err_msg: ?*ErrorMsg = null,10err_msg: ?*ErrorMsg = null,
11src_loc: Zcu.LazySrcLoc,11src_loc: Zcu.LazySrcLoc,
12result_insts_len: u8 = undefined,12result_insts_len: u8 = undefined,
src/codegen/sparc64/CodeGen.zig+3-3
...@@ -20,7 +20,7 @@ const Mir = @import("Mir.zig");...@@ -20,7 +20,7 @@ const Mir = @import("Mir.zig");
20const Emit = @import("Emit.zig");20const Emit = @import("Emit.zig");
21const Type = @import("../../Type.zig");21const Type = @import("../../Type.zig");
22const CodeGenError = codegen.CodeGenError;22const CodeGenError = codegen.CodeGenError;
23const Endian = std.builtin.Endian;23const Endian = std.lang.Endian;
24const Alignment = InternPool.Alignment;24const Alignment = InternPool.Alignment;
2525
26const build_options = @import("build_options");26const build_options = @import("build_options");
...@@ -1255,7 +1255,7 @@ fn airByteSwap(self: *Self, inst: Air.Inst.Index) !void {...@@ -1255,7 +1255,7 @@ fn airByteSwap(self: *Self, inst: Air.Inst.Index) !void {
1255 return self.finishAir(inst, result, .{ ty_op.operand, .none, .none });1255 return self.finishAir(inst, result, .{ ty_op.operand, .none, .none });
1256}1256}
12571257
1258fn airCall(self: *Self, inst: Air.Inst.Index, modifier: std.builtin.CallModifier) !void {1258fn airCall(self: *Self, inst: Air.Inst.Index, modifier: std.lang.CallModifier) !void {
1259 if (modifier == .always_tail) return self.fail("TODO implement tail calls for {}", .{self.target.cpu.arch});1259 if (modifier == .always_tail) return self.fail("TODO implement tail calls for {}", .{self.target.cpu.arch});
12601260
1261 const call = self.air.unwrapCall(inst);1261 const call = self.air.unwrapCall(inst);
...@@ -4702,7 +4702,7 @@ fn truncRegister(...@@ -4702,7 +4702,7 @@ fn truncRegister(
4702 self: *Self,4702 self: *Self,
4703 operand_reg: Register,4703 operand_reg: Register,
4704 dest_reg: Register,4704 dest_reg: Register,
4705 int_signedness: std.builtin.Signedness,4705 int_signedness: std.lang.Signedness,
4706 int_bits: u16,4706 int_bits: u16,
4707) !void {4707) !void {
4708 switch (int_bits) {4708 switch (int_bits) {
src/codegen/sparc64/Emit.zig+1-1
...@@ -2,7 +2,7 @@...@@ -2,7 +2,7 @@
2//! machine code2//! machine code
33
4const std = @import("std");4const std = @import("std");
5const Endian = std.builtin.Endian;5const Endian = std.lang.Endian;
6const assert = std.debug.assert;6const assert = std.debug.assert;
7const link = @import("../../link.zig");7const link = @import("../../link.zig");
8const Zcu = @import("../../Zcu.zig");8const Zcu = @import("../../Zcu.zig");
src/codegen/spirv/Assembler.zig+2-2
...@@ -212,7 +212,7 @@ fn processTypeInstruction(ass: *Assembler) !AsmValue {...@@ -212,7 +212,7 @@ fn processTypeInstruction(ass: *Assembler) !AsmValue {
212 .OpTypeVoid => try module.voidType(),212 .OpTypeVoid => try module.voidType(),
213 .OpTypeBool => try module.boolType(),213 .OpTypeBool => try module.boolType(),
214 .OpTypeInt => blk: {214 .OpTypeInt => blk: {
215 const signedness: std.builtin.Signedness = switch (operands[2].literal32) {215 const signedness: std.lang.Signedness = switch (operands[2].literal32) {
216 0 => .unsigned,216 0 => .unsigned,
217 1 => .signed,217 1 => .signed,
218 else => {218 else => {
...@@ -766,7 +766,7 @@ fn parseContextDependentNumber(ass: *Assembler) !void {...@@ -766,7 +766,7 @@ fn parseContextDependentNumber(ass: *Assembler) !void {
766 return ass.fail(tok.start, "cannot parse literal constant", .{});766 return ass.fail(tok.start, "cannot parse literal constant", .{});
767}767}
768768
769fn parseContextDependentInt(ass: *Assembler, signedness: std.builtin.Signedness, width: u32) !void {769fn parseContextDependentInt(ass: *Assembler, signedness: std.lang.Signedness, width: u32) !void {
770 const gpa = ass.cg.module.gpa;770 const gpa = ass.cg.module.gpa;
771771
772 const tok = ass.currentToken();772 const tok = ass.currentToken();
src/codegen/spirv/CodeGen.zig+5-5
...@@ -1,7 +1,7 @@...@@ -1,7 +1,7 @@
1const std = @import("std");1const std = @import("std");
2const Allocator = std.mem.Allocator;2const Allocator = std.mem.Allocator;
3const Target = std.Target;3const Target = std.Target;
4const Signedness = std.builtin.Signedness;4const Signedness = std.lang.Signedness;
5const assert = std.debug.assert;5const assert = std.debug.assert;
6const log = std.log.scoped(.codegen);6const log = std.log.scoped(.codegen);
77
...@@ -569,7 +569,7 @@ const ArithmeticTypeInfo = struct {...@@ -569,7 +569,7 @@ const ArithmeticTypeInfo = struct {
569 /// Null if this type is a scalar, or the length of the vector otherwise.569 /// Null if this type is a scalar, or the length of the vector otherwise.
570 vector_len: ?u32,570 vector_len: ?u32,
571 /// Whether the inner type is signed. Only relevant for integers.571 /// Whether the inner type is signed. Only relevant for integers.
572 signedness: std.builtin.Signedness,572 signedness: std.lang.Signedness,
573};573};
574574
575fn arithmeticTypeInfo(cg: *CodeGen, ty: Type) ArithmeticTypeInfo {575fn arithmeticTypeInfo(cg: *CodeGen, ty: Type) ArithmeticTypeInfo {
...@@ -2251,7 +2251,7 @@ fn buildBinary(cg: *CodeGen, opcode: Opcode, lhs: Temporary, rhs: Temporary) !Te...@@ -2251,7 +2251,7 @@ fn buildBinary(cg: *CodeGen, opcode: Opcode, lhs: Temporary, rhs: Temporary) !Te
2251/// or OpIMul and s_mul_hi or u_mul_hi on OpenCL.2251/// or OpIMul and s_mul_hi or u_mul_hi on OpenCL.
2252fn buildWideMul(2252fn buildWideMul(
2253 cg: *CodeGen,2253 cg: *CodeGen,
2254 signedness: std.builtin.Signedness,2254 signedness: std.lang.Signedness,
2255 lhs: Temporary,2255 lhs: Temporary,
2256 rhs: Temporary,2256 rhs: Temporary,
2257) !struct { Temporary, Temporary } {2257) !struct { Temporary, Temporary } {
...@@ -2358,7 +2358,7 @@ fn buildWideMul(...@@ -2358,7 +2358,7 @@ fn buildWideMul(
2358/// The SPIR-V backend is not yet advanced enough to support the std testing infrastructure.2358/// The SPIR-V backend is not yet advanced enough to support the std testing infrastructure.
2359/// In order to be able to run tests, we "temporarily" lower test kernels into separate entry-2359/// In order to be able to run tests, we "temporarily" lower test kernels into separate entry-
2360/// points. The test executor will then be able to invoke these to run the tests.2360/// points. The test executor will then be able to invoke these to run the tests.
2361/// Note that tests are lowered according to std.builtin.TestFn, which is `fn () anyerror!void`.2361/// Note that tests are lowered according to std.lang.TestFn, which is `fn () anyerror!void`.
2362/// (anyerror!void has the same layout as anyerror).2362/// (anyerror!void has the same layout as anyerror).
2363/// Each test declaration generates a function like.2363/// Each test declaration generates a function like.
2364/// %anyerror = OpTypeInt 0 162364/// %anyerror = OpTypeInt 0 16
...@@ -5976,7 +5976,7 @@ fn airAssembly(cg: *CodeGen, inst: Air.Inst.Index) !?Id {...@@ -5976,7 +5976,7 @@ fn airAssembly(cg: *CodeGen, inst: Air.Inst.Index) !?Id {
5976 return null;5976 return null;
5977}5977}
59785978
5979fn airCall(cg: *CodeGen, inst: Air.Inst.Index, modifier: std.builtin.CallModifier) !?Id {5979fn airCall(cg: *CodeGen, inst: Air.Inst.Index, modifier: std.lang.CallModifier) !?Id {
5980 _ = modifier;5980 _ = modifier;
59815981
5982 const gpa = cg.module.gpa;5982 const gpa = cg.module.gpa;
src/codegen/spirv/Module.zig+4-4
...@@ -54,8 +54,8 @@ cache: struct {...@@ -54,8 +54,8 @@ cache: struct {
54 bool_type: ?Id = null,54 bool_type: ?Id = null,
55 void_type: ?Id = null,55 void_type: ?Id = null,
56 opaque_types: std.StringHashMapUnmanaged(Id) = .empty,56 opaque_types: std.StringHashMapUnmanaged(Id) = .empty,
57 int_types: std.AutoHashMapUnmanaged(std.builtin.Type.Int, Id) = .empty,57 int_types: std.AutoHashMapUnmanaged(std.lang.Type.Int, Id) = .empty,
58 float_types: std.AutoHashMapUnmanaged(std.builtin.Type.Float, Id) = .empty,58 float_types: std.AutoHashMapUnmanaged(std.lang.Type.Float, Id) = .empty,
59 vector_types: std.AutoHashMapUnmanaged(struct { Id, u32 }, Id) = .empty,59 vector_types: std.AutoHashMapUnmanaged(struct { Id, u32 }, Id) = .empty,
60 array_types: std.AutoHashMapUnmanaged(struct { Id, Id }, Id) = .empty,60 array_types: std.AutoHashMapUnmanaged(struct { Id, Id }, Id) = .empty,
61 struct_types: std.ArrayHashMapUnmanaged(StructType, Id, StructType.HashContext, true) = .empty,61 struct_types: std.ArrayHashMapUnmanaged(StructType, Id, StructType.HashContext, true) = .empty,
...@@ -582,7 +582,7 @@ pub fn backingIntBits(module: *Module, bits: u16) struct { u16, bool } {...@@ -582,7 +582,7 @@ pub fn backingIntBits(module: *Module, bits: u16) struct { u16, bool } {
582 return .{ std.mem.alignForward(u16, bits, big_int_bits), true };582 return .{ std.mem.alignForward(u16, bits, big_int_bits), true };
583}583}
584584
585pub fn intType(module: *Module, signedness: std.builtin.Signedness, bits: u16) !Id {585pub fn intType(module: *Module, signedness: std.lang.Signedness, bits: u16) !Id {
586 assert(bits > 0);586 assert(bits > 0);
587587
588 const target = module.zcu.getTarget();588 const target = module.zcu.getTarget();
...@@ -918,7 +918,7 @@ pub fn debugString(module: *Module, string: []const u8) !Id {...@@ -918,7 +918,7 @@ pub fn debugString(module: *Module, string: []const u8) !Id {
918 return entry.value_ptr.*;918 return entry.value_ptr.*;
919}919}
920920
921pub fn storageClass(module: *Module, as: std.builtin.AddressSpace) spec.StorageClass {921pub fn storageClass(module: *Module, as: std.lang.AddressSpace) spec.StorageClass {
922 const target = module.zcu.getTarget();922 const target = module.zcu.getTarget();
923 return switch (as) {923 return switch (as) {
924 .generic => .function,924 .generic => .function,
src/codegen/wasm/CodeGen.zig+5-5
...@@ -586,7 +586,7 @@ fn addExtraAssumeCapacity(cg: *CodeGen, extra: anytype) error{OutOfMemory}!u32 {...@@ -586,7 +586,7 @@ fn addExtraAssumeCapacity(cg: *CodeGen, extra: anytype) error{OutOfMemory}!u32 {
586 return result;586 return result;
587}587}
588588
589/// For `std.builtin.CallingConvention.auto`.589/// For `std.lang.CallingConvention.auto`.
590pub fn typeToValtype(ty: Type, zcu: *const Zcu, target: *const std.Target) std.wasm.Valtype {590pub fn typeToValtype(ty: Type, zcu: *const Zcu, target: *const std.Target) std.wasm.Valtype {
591 return switch (ty.zigTypeTag(zcu)) {591 return switch (ty.zigTypeTag(zcu)) {
592 .float => switch (ty.floatBits(target)) {592 .float => switch (ty.floatBits(target)) {
...@@ -951,7 +951,7 @@ fn resolveCallingConventionValues(...@@ -951,7 +951,7 @@ fn resolveCallingConventionValues(
951}951}
952952
953pub fn firstParamSRet(953pub fn firstParamSRet(
954 cc: std.builtin.CallingConvention,954 cc: std.lang.CallingConvention,
955 return_type: Type,955 return_type: Type,
956 zcu: *const Zcu,956 zcu: *const Zcu,
957 target: *const std.Target,957 target: *const std.Target,
...@@ -970,7 +970,7 @@ pub fn firstParamSRet(...@@ -970,7 +970,7 @@ pub fn firstParamSRet(
970970
971/// Lowers a Zig type and its value based on a given calling convention to ensure971/// Lowers a Zig type and its value based on a given calling convention to ensure
972/// it matches the ABI.972/// it matches the ABI.
973fn lowerArg(cg: *CodeGen, cc: std.builtin.CallingConvention, ty: Type, value: WValue) !void {973fn lowerArg(cg: *CodeGen, cc: std.lang.CallingConvention, ty: Type, value: WValue) !void {
974 if (cc != .wasm_mvp) {974 if (cc != .wasm_mvp) {
975 return cg.lowerToStack(value);975 return cg.lowerToStack(value);
976 }976 }
...@@ -1989,7 +1989,7 @@ fn airRetLoad(cg: *CodeGen, inst: Air.Inst.Index) InnerError!void {...@@ -1989,7 +1989,7 @@ fn airRetLoad(cg: *CodeGen, inst: Air.Inst.Index) InnerError!void {
1989 return cg.finishAir(inst, .none, &.{un_op});1989 return cg.finishAir(inst, .none, &.{un_op});
1990}1990}
19911991
1992fn airCall(cg: *CodeGen, inst: Air.Inst.Index, modifier: std.builtin.CallModifier) InnerError!void {1992fn airCall(cg: *CodeGen, inst: Air.Inst.Index, modifier: std.lang.CallModifier) InnerError!void {
1993 if (modifier == .always_tail) return cg.fail("TODO implement tail calls for wasm", .{});1993 if (modifier == .always_tail) return cg.fail("TODO implement tail calls for wasm", .{});
1994 const call = cg.air.unwrapCall(inst);1994 const call = cg.air.unwrapCall(inst);
1995 const args = call.args;1995 const args = call.args;
...@@ -7268,7 +7268,7 @@ fn airAtomicRmw(cg: *CodeGen, inst: Air.Inst.Index) InnerError!void {...@@ -7268,7 +7268,7 @@ fn airAtomicRmw(cg: *CodeGen, inst: Air.Inst.Index) InnerError!void {
7268 const ptr = try cg.resolveInst(pl_op.operand);7268 const ptr = try cg.resolveInst(pl_op.operand);
7269 const operand = try cg.resolveInst(extra.operand);7269 const operand = try cg.resolveInst(extra.operand);
7270 const ty = cg.typeOfIndex(inst);7270 const ty = cg.typeOfIndex(inst);
7271 const op: std.builtin.AtomicRmwOp = extra.op();7271 const op: std.lang.AtomicRmwOp = extra.op();
72727272
7273 if (cg.useAtomicFeature()) {7273 if (cg.useAtomicFeature()) {
7274 const int_ty: IntType = .fromType(cg, ty);7274 const int_ty: IntType = .fromType(cg, ty);
src/codegen/x86_64/CodeGen.zig+15-15
...@@ -173952,7 +173952,7 @@ fn setFrameLoc(...@@ -173952,7 +173952,7 @@ fn setFrameLoc(
173952 offset.* += self.frame_allocs.items(.abi_size)[frame_i];173952 offset.* += self.frame_allocs.items(.abi_size)[frame_i];
173953}173953}
173954173954
173955fn computeFrameLayout(self: *CodeGen, cc: std.builtin.CallingConvention.Tag) !FrameLayout {173955fn computeFrameLayout(self: *CodeGen, cc: std.lang.CallingConvention.Tag) !FrameLayout {
173956 const frame_allocs_len = self.frame_allocs.len;173956 const frame_allocs_len = self.frame_allocs.len;
173957 try self.frame_locs.resize(self.gpa, frame_allocs_len);173957 try self.frame_locs.resize(self.gpa, frame_allocs_len);
173958 const stack_frame_order = try self.gpa.alloc(FrameIndex, frame_allocs_len - FrameIndex.named_count);173958 const stack_frame_order = try self.gpa.alloc(FrameIndex, frame_allocs_len - FrameIndex.named_count);
...@@ -174294,7 +174294,7 @@ pub fn spillEflagsIfOccupied(self: *CodeGen) !void {...@@ -174294,7 +174294,7 @@ pub fn spillEflagsIfOccupied(self: *CodeGen) !void {
174294 }174294 }
174295}174295}
174296174296
174297pub fn spillCallerPreservedRegs(self: *CodeGen, cc: std.builtin.CallingConvention.Tag, ignore_reg: Register) !void {174297pub fn spillCallerPreservedRegs(self: *CodeGen, cc: std.lang.CallingConvention.Tag, ignore_reg: Register) !void {
174298 switch (cc) {174298 switch (cc) {
174299 inline .auto, .x86_64_sysv, .x86_64_win => |tag| inline for (comptime abi.getCallerPreservedRegs(tag)) |reg|174299 inline .auto, .x86_64_sysv, .x86_64_win => |tag| inline for (comptime abi.getCallerPreservedRegs(tag)) |reg|
174300 if (reg != ignore_reg) try self.register_manager.getKnownReg(reg, null),174300 if (reg != ignore_reg) try self.register_manager.getKnownReg(reg, null),
...@@ -175917,7 +175917,7 @@ fn genLocalDebugInfo(cg: *CodeGen, air_tag: Air.Inst.Tag, ty: Type, mcv: MCValue...@@ -175917,7 +175917,7 @@ fn genLocalDebugInfo(cg: *CodeGen, air_tag: Air.Inst.Tag, ty: Type, mcv: MCValue
175917 };175917 };
175918}175918}
175919175919
175920fn airCall(self: *CodeGen, inst: Air.Inst.Index, modifier: std.builtin.CallModifier, opts: CopyOptions) !void {175920fn airCall(self: *CodeGen, inst: Air.Inst.Index, modifier: std.lang.CallModifier, opts: CopyOptions) !void {
175921 if (modifier == .always_tail) return self.fail("TODO implement tail calls for x86_64", .{});175921 if (modifier == .always_tail) return self.fail("TODO implement tail calls for x86_64", .{});
175922175922
175923 const call = self.air.unwrapCall(inst);175923 const call = self.air.unwrapCall(inst);
...@@ -179498,7 +179498,7 @@ fn airBitCast(self: *CodeGen, inst: Air.Inst.Index) !void {...@@ -179498,7 +179498,7 @@ fn airBitCast(self: *CodeGen, inst: Air.Inst.Index) !void {
179498 );179498 );
179499 var offset = dst_limbs_len * 8;179499 var offset = dst_limbs_len * 8;
179500 if (offset < abi_size) {179500 if (offset < abi_size) {
179501 const dst_signedness: std.builtin.Signedness = if (dst_ty.isAbiInt(zcu))179501 const dst_signedness: std.lang.Signedness = if (dst_ty.isAbiInt(zcu))
179502 dst_ty.intInfo(zcu).signedness179502 dst_ty.intInfo(zcu).signedness
179503 else179503 else
179504 .unsigned;179504 .unsigned;
...@@ -179640,8 +179640,8 @@ fn atomicOp(...@@ -179640,8 +179640,8 @@ fn atomicOp(
179640 ptr_ty: Type,179640 ptr_ty: Type,
179641 val_ty: Type,179641 val_ty: Type,
179642 unused: bool,179642 unused: bool,
179643 rmw_op: ?std.builtin.AtomicRmwOp,179643 rmw_op: ?std.lang.AtomicRmwOp,
179644 order: std.builtin.AtomicOrder,179644 order: std.lang.AtomicOrder,
179645) InnerError!MCValue {179645) InnerError!MCValue {
179646 const pt = self.pt;179646 const pt = self.pt;
179647 const zcu = pt.zcu;179647 const zcu = pt.zcu;
...@@ -179714,7 +179714,7 @@ fn atomicOp(...@@ -179714,7 +179714,7 @@ fn atomicOp(
179714 defer self.register_manager.unlockReg(dst_lock);179714 defer self.register_manager.unlockReg(dst_lock);
179715179715
179716 try self.genSetReg(dst_reg, val_ty, val_mcv, .{});179716 try self.genSetReg(dst_reg, val_ty, val_mcv, .{});
179717 if (rmw_op == std.builtin.AtomicRmwOp.Sub and mir_tag[1] == .xadd) {179717 if (rmw_op == std.lang.AtomicRmwOp.Sub and mir_tag[1] == .xadd) {
179718 try self.genUnOpMir(.{ ._, .neg }, val_ty, dst_mcv);179718 try self.genUnOpMir(.{ ._, .neg }, val_ty, dst_mcv);
179719 }179719 }
179720 try self.asmMemoryRegister(mir_tag, ptr_mem, registerAlias(dst_reg, val_abi_size));179720 try self.asmMemoryRegister(mir_tag, ptr_mem, registerAlias(dst_reg, val_abi_size));
...@@ -179898,7 +179898,7 @@ fn atomicOp(...@@ -179898,7 +179898,7 @@ fn atomicOp(
179898 };179898 };
179899 const val_lo_mem = try val_mem_mcv.mem(self, .{ .size = .qword });179899 const val_lo_mem = try val_mem_mcv.mem(self, .{ .size = .qword });
179900 const val_hi_mem = try val_mem_mcv.address().offset(8).deref().mem(self, .{ .size = .qword });179900 const val_hi_mem = try val_mem_mcv.address().offset(8).deref().mem(self, .{ .size = .qword });
179901 if (rmw_op != std.builtin.AtomicRmwOp.Xchg) {179901 if (rmw_op != std.lang.AtomicRmwOp.Xchg) {
179902 try self.asmRegisterRegister(.{ ._, .mov }, .rbx, .rax);179902 try self.asmRegisterRegister(.{ ._, .mov }, .rbx, .rax);
179903 try self.asmRegisterRegister(.{ ._, .mov }, .rcx, .rdx);179903 try self.asmRegisterRegister(.{ ._, .mov }, .rcx, .rdx);
179904 }179904 }
...@@ -180033,7 +180033,7 @@ fn airAtomicLoad(self: *CodeGen, inst: Air.Inst.Index) !void {...@@ -180033,7 +180033,7 @@ fn airAtomicLoad(self: *CodeGen, inst: Air.Inst.Index) !void {
180033 return self.finishAir(inst, result, .{ atomic_load.ptr, .none, .none });180033 return self.finishAir(inst, result, .{ atomic_load.ptr, .none, .none });
180034}180034}
180035180035
180036fn airAtomicStore(self: *CodeGen, inst: Air.Inst.Index, order: std.builtin.AtomicOrder) !void {180036fn airAtomicStore(self: *CodeGen, inst: Air.Inst.Index, order: std.lang.AtomicOrder) !void {
180037 const bin_op = self.air.instructions.items(.data)[@intFromEnum(inst)].bin_op;180037 const bin_op = self.air.instructions.items(.data)[@intFromEnum(inst)].bin_op;
180038180038
180039 const ptr_ty = self.typeOf(bin_op.lhs);180039 const ptr_ty = self.typeOf(bin_op.lhs);
...@@ -181813,7 +181813,7 @@ fn nonBoolScalarBitSize(cg: *CodeGen, ty: Type) u32 {...@@ -181813,7 +181813,7 @@ fn nonBoolScalarBitSize(cg: *CodeGen, ty: Type) u32 {
181813 };181813 };
181814}181814}
181815181815
181816fn intInfo(cg: *CodeGen, ty: Type) ?std.builtin.Type.Int {181816fn intInfo(cg: *CodeGen, ty: Type) ?std.lang.Type.Int {
181817 const zcu = cg.pt.zcu;181817 const zcu = cg.pt.zcu;
181818 const ip = &zcu.intern_pool;181818 const ip = &zcu.intern_pool;
181819 var ty_index = ty.ip_index;181819 var ty_index = ty.ip_index;
...@@ -188528,7 +188528,7 @@ const Select = struct {...@@ -188528,7 +188528,7 @@ const Select = struct {
188528188528
188529 const ConstSpec = struct {188529 const ConstSpec = struct {
188530 ref: Select.Operand.Ref = .none,188530 ref: Select.Operand.Ref = .none,
188531 to_signedness: ?std.builtin.Signedness = null,188531 to_signedness: ?std.lang.Signedness = null,
188532 vectorize_to: ?Memory.Size = null,188532 vectorize_to: ?Memory.Size = null,
188533 };188533 };
188534188534
...@@ -188537,7 +188537,7 @@ const Select = struct {...@@ -188537,7 +188537,7 @@ const Select = struct {
188537 after: u2,188537 after: u2,
188538 at: u2,188538 at: u2,
188539188539
188540 fn tag(spec: CallConvRegSpec, cg: *const CodeGen) std.builtin.CallingConvention.Tag {188540 fn tag(spec: CallConvRegSpec, cg: *const CodeGen) std.lang.CallingConvention.Tag {
188541 return switch (spec.cc) {188541 return switch (spec.cc) {
188542 .none => unreachable,188542 .none => unreachable,
188543 .ccc => cg.target.cCallingConvention().?,188543 .ccc => cg.target.cCallingConvention().?,
...@@ -188667,11 +188667,11 @@ const Select = struct {...@@ -188667,11 +188667,11 @@ const Select = struct {
188667 .smax_mem, .umin_mem => .bool_false,188667 .smax_mem, .umin_mem => .bool_false,
188668 }) },188668 }) },
188669 else => {188669 else => {
188670 const scalar_info: std.builtin.Type.Int = cg.intInfo(scalar_ty) orelse .{188670 const scalar_info: std.lang.Type.Int = cg.intInfo(scalar_ty) orelse .{
188671 .signedness = .signed,188671 .signedness = .signed,
188672 .bits = cg.floatBits(scalar_ty).?,188672 .bits = cg.floatBits(scalar_ty).?,
188673 };188673 };
188674 const res_scalar_info: std.builtin.Type.Int = .{188674 const res_scalar_info: std.lang.Type.Int = .{
188675 .signedness = const_spec.to_signedness orelse scalar_info.signedness,188675 .signedness = const_spec.to_signedness orelse scalar_info.signedness,
188676 .bits = switch (spec.kind) {188676 .bits = switch (spec.kind) {
188677 else => scalar_info.bits,188677 else => scalar_info.bits,
...@@ -188739,7 +188739,7 @@ const Select = struct {...@@ -188739,7 +188739,7 @@ const Select = struct {
188739 .positive = undefined,188739 .positive = undefined,
188740 };188740 };
188741 defer allocator.free(big_int.limbs);188741 defer allocator.free(big_int.limbs);
188742 const signedness: std.builtin.Signedness = switch (spec.kind) {188742 const signedness: std.lang.Signedness = switch (spec.kind) {
188743 else => unreachable,188743 else => unreachable,
188744 .slimit_delta_mem => .signed,188744 .slimit_delta_mem => .signed,
188745 .umax_delta_mem => .unsigned,188745 .umax_delta_mem => .unsigned,
src/codegen/x86_64/Lower.zig+1-1
...@@ -3,7 +3,7 @@...@@ -3,7 +3,7 @@
3target: *const std.Target,3target: *const std.Target,
4allocator: std.mem.Allocator,4allocator: std.mem.Allocator,
5mir: Mir,5mir: Mir,
6cc: std.builtin.CallingConvention,6cc: std.lang.CallingConvention,
7err_msg: ?*Zcu.ErrorMsg = null,7err_msg: ?*Zcu.ErrorMsg = null,
8src_loc: Zcu.LazySrcLoc,8src_loc: Zcu.LazySrcLoc,
9result_insts_len: ResultInstIndex = undefined,9result_insts_len: ResultInstIndex = undefined,
src/codegen/x86_64/Mir.zig+1-1
...@@ -1737,7 +1737,7 @@ pub const Inst = struct {...@@ -1737,7 +1737,7 @@ pub const Inst = struct {
1737 @typeInfo(Tag).@"enum".fields.len != 251)1737 @typeInfo(Tag).@"enum".fields.len != 251)
1738 {1738 {
1739 const cond_src = (struct {1739 const cond_src = (struct {
1740 fn src() std.builtin.SourceLocation {1740 fn src() std.lang.SourceLocation {
1741 return @src();1741 return @src();
1742 }1742 }
1743 }).src();1743 }).src();
src/codegen/x86_64/abi.zig+9-9
...@@ -478,7 +478,7 @@ pub const Win64 = struct {...@@ -478,7 +478,7 @@ pub const Win64 = struct {
478 pub const c_abi_sse_return_regs = sse_avx_regs[0..1];478 pub const c_abi_sse_return_regs = sse_avx_regs[0..1];
479};479};
480480
481pub fn getCalleePreservedRegs(cc: std.builtin.CallingConvention.Tag) []const Register {481pub fn getCalleePreservedRegs(cc: std.lang.CallingConvention.Tag) []const Register {
482 return switch (cc) {482 return switch (cc) {
483 .auto => zigcc.callee_preserved_regs,483 .auto => zigcc.callee_preserved_regs,
484 .x86_64_sysv => &SysV.callee_preserved_regs,484 .x86_64_sysv => &SysV.callee_preserved_regs,
...@@ -487,7 +487,7 @@ pub fn getCalleePreservedRegs(cc: std.builtin.CallingConvention.Tag) []const Reg...@@ -487,7 +487,7 @@ pub fn getCalleePreservedRegs(cc: std.builtin.CallingConvention.Tag) []const Reg
487 };487 };
488}488}
489489
490pub fn getCallerPreservedRegs(cc: std.builtin.CallingConvention.Tag) []const Register {490pub fn getCallerPreservedRegs(cc: std.lang.CallingConvention.Tag) []const Register {
491 return switch (cc) {491 return switch (cc) {
492 .auto => zigcc.caller_preserved_regs,492 .auto => zigcc.caller_preserved_regs,
493 .x86_64_sysv => &SysV.caller_preserved_regs,493 .x86_64_sysv => &SysV.caller_preserved_regs,
...@@ -496,7 +496,7 @@ pub fn getCallerPreservedRegs(cc: std.builtin.CallingConvention.Tag) []const Reg...@@ -496,7 +496,7 @@ pub fn getCallerPreservedRegs(cc: std.builtin.CallingConvention.Tag) []const Reg
496 };496 };
497}497}
498498
499pub fn getCAbiIntParamRegs(cc: std.builtin.CallingConvention.Tag) []const Register {499pub fn getCAbiIntParamRegs(cc: std.lang.CallingConvention.Tag) []const Register {
500 return switch (cc) {500 return switch (cc) {
501 .auto => zigcc.int_param_regs,501 .auto => zigcc.int_param_regs,
502 .x86_64_sysv => &SysV.c_abi_int_param_regs,502 .x86_64_sysv => &SysV.c_abi_int_param_regs,
...@@ -505,7 +505,7 @@ pub fn getCAbiIntParamRegs(cc: std.builtin.CallingConvention.Tag) []const Regist...@@ -505,7 +505,7 @@ pub fn getCAbiIntParamRegs(cc: std.builtin.CallingConvention.Tag) []const Regist
505 };505 };
506}506}
507507
508pub fn getCAbiX87ParamRegs(cc: std.builtin.CallingConvention.Tag) []const Register {508pub fn getCAbiX87ParamRegs(cc: std.lang.CallingConvention.Tag) []const Register {
509 return switch (cc) {509 return switch (cc) {
510 .auto => zigcc.x87_param_regs,510 .auto => zigcc.x87_param_regs,
511 .x86_64_sysv => SysV.c_abi_x87_param_regs,511 .x86_64_sysv => SysV.c_abi_x87_param_regs,
...@@ -514,7 +514,7 @@ pub fn getCAbiX87ParamRegs(cc: std.builtin.CallingConvention.Tag) []const Regist...@@ -514,7 +514,7 @@ pub fn getCAbiX87ParamRegs(cc: std.builtin.CallingConvention.Tag) []const Regist
514 };514 };
515}515}
516516
517pub fn getCAbiSseParamRegs(cc: std.builtin.CallingConvention.Tag, target: *const std.Target) []const Register {517pub fn getCAbiSseParamRegs(cc: std.lang.CallingConvention.Tag, target: *const std.Target) []const Register {
518 return switch (cc) {518 return switch (cc) {
519 .auto => switch (target.cpu.arch) {519 .auto => switch (target.cpu.arch) {
520 else => unreachable,520 else => unreachable,
...@@ -527,7 +527,7 @@ pub fn getCAbiSseParamRegs(cc: std.builtin.CallingConvention.Tag, target: *const...@@ -527,7 +527,7 @@ pub fn getCAbiSseParamRegs(cc: std.builtin.CallingConvention.Tag, target: *const
527 };527 };
528}528}
529529
530pub fn getCAbiIntReturnRegs(cc: std.builtin.CallingConvention.Tag) []const Register {530pub fn getCAbiIntReturnRegs(cc: std.lang.CallingConvention.Tag) []const Register {
531 return switch (cc) {531 return switch (cc) {
532 .auto => zigcc.int_return_regs,532 .auto => zigcc.int_return_regs,
533 .x86_64_sysv => &SysV.c_abi_int_return_regs,533 .x86_64_sysv => &SysV.c_abi_int_return_regs,
...@@ -536,7 +536,7 @@ pub fn getCAbiIntReturnRegs(cc: std.builtin.CallingConvention.Tag) []const Regis...@@ -536,7 +536,7 @@ pub fn getCAbiIntReturnRegs(cc: std.builtin.CallingConvention.Tag) []const Regis
536 };536 };
537}537}
538538
539pub fn getCAbiX87ReturnRegs(cc: std.builtin.CallingConvention.Tag) []const Register {539pub fn getCAbiX87ReturnRegs(cc: std.lang.CallingConvention.Tag) []const Register {
540 return switch (cc) {540 return switch (cc) {
541 .auto => zigcc.x87_return_regs,541 .auto => zigcc.x87_return_regs,
542 .x86_64_sysv => SysV.c_abi_x87_return_regs,542 .x86_64_sysv => SysV.c_abi_x87_return_regs,
...@@ -545,7 +545,7 @@ pub fn getCAbiX87ReturnRegs(cc: std.builtin.CallingConvention.Tag) []const Regis...@@ -545,7 +545,7 @@ pub fn getCAbiX87ReturnRegs(cc: std.builtin.CallingConvention.Tag) []const Regis
545 };545 };
546}546}
547547
548pub fn getCAbiSseReturnRegs(cc: std.builtin.CallingConvention.Tag) []const Register {548pub fn getCAbiSseReturnRegs(cc: std.lang.CallingConvention.Tag) []const Register {
549 return switch (cc) {549 return switch (cc) {
550 .auto => zigcc.sse_return_regs,550 .auto => zigcc.sse_return_regs,
551 .x86_64_sysv => SysV.c_abi_sse_return_regs,551 .x86_64_sysv => SysV.c_abi_sse_return_regs,
...@@ -554,7 +554,7 @@ pub fn getCAbiSseReturnRegs(cc: std.builtin.CallingConvention.Tag) []const Regis...@@ -554,7 +554,7 @@ pub fn getCAbiSseReturnRegs(cc: std.builtin.CallingConvention.Tag) []const Regis
554 };554 };
555}555}
556556
557pub fn getCAbiLinkerScratchReg(cc: std.builtin.CallingConvention.Tag) Register {557pub fn getCAbiLinkerScratchReg(cc: std.lang.CallingConvention.Tag) Register {
558 return switch (cc) {558 return switch (cc) {
559 .auto => zigcc.int_return_regs[zigcc.int_return_regs.len - 1],559 .auto => zigcc.int_return_regs[zigcc.int_return_regs.len - 1],
560 .x86_64_sysv => SysV.c_abi_int_return_regs[0],560 .x86_64_sysv => SysV.c_abi_int_return_regs[0],
src/codegen/x86_64/bits.zig+1-1
...@@ -106,7 +106,7 @@ pub const Condition = enum(u5) {...@@ -106,7 +106,7 @@ pub const Condition = enum(u5) {
106 }106 }
107107
108 pub fn fromCompareOperator(108 pub fn fromCompareOperator(
109 signedness: std.builtin.Signedness,109 signedness: std.lang.Signedness,
110 op: std.math.CompareOperator,110 op: std.math.CompareOperator,
111 ) Condition {111 ) Condition {
112 return switch (signedness) {112 return switch (signedness) {
src/libs/freebsd.zig+1-1
...@@ -19,7 +19,7 @@ pub const CrtFile = enum {...@@ -19,7 +19,7 @@ pub const CrtFile = enum {
19 scrt1_o,19 scrt1_o,
20};20};
2121
22pub fn needsCrt0(output_mode: std.builtin.OutputMode) ?CrtFile {22pub fn needsCrt0(output_mode: std.lang.OutputMode) ?CrtFile {
23 // For shared libraries and PIC executables, we should actually link in a variant of crt1 that23 // For shared libraries and PIC executables, we should actually link in a variant of crt1 that
24 // is built with `-DSHARED` so that it calls `__cxa_finalize` in an ELF destructor. However, we24 // is built with `-DSHARED` so that it calls `__cxa_finalize` in an ELF destructor. However, we
25 // currently make no effort to respect `__cxa_finalize` on any other targets, so for now, we're25 // currently make no effort to respect `__cxa_finalize` on any other targets, so for now, we're
src/libs/glibc.zig+1-1
...@@ -1277,7 +1277,7 @@ fn buildSharedLib(...@@ -1277,7 +1277,7 @@ fn buildSharedLib(
1277 try comp.updateSubCompilation(sub_compilation, misc_task, prog_node);1277 try comp.updateSubCompilation(sub_compilation, misc_task, prog_node);
1278}1278}
12791279
1280pub fn needsCrt0(output_mode: std.builtin.OutputMode) ?CrtFile {1280pub fn needsCrt0(output_mode: std.lang.OutputMode) ?CrtFile {
1281 return switch (output_mode) {1281 return switch (output_mode) {
1282 .Obj, .Lib => null,1282 .Obj, .Lib => null,
1283 .Exe => .scrt1_o,1283 .Exe => .scrt1_o,
src/libs/libcxx.zig+1-1
...@@ -324,7 +324,7 @@ pub fn buildLibCxxAbi(comp: *Compilation, prog_node: std.Progress.Node) BuildErr...@@ -324,7 +324,7 @@ pub fn buildLibCxxAbi(comp: *Compilation, prog_node: std.Progress.Node) BuildErr
324 const strip = comp.compilerRtStrip();324 const strip = comp.compilerRtStrip();
325 // See the `-fno-exceptions` logic for WASI.325 // See the `-fno-exceptions` logic for WASI.
326 // The old 32-bit x86 variant of SEH doesn't use tables.326 // The old 32-bit x86 variant of SEH doesn't use tables.
327 const unwind_tables: std.builtin.UnwindTables =327 const unwind_tables: std.lang.UnwindTables =
328 if (target.os.tag == .wasi or (target.cpu.arch == .x86 and target.os.tag == .windows)) .none else .async;328 if (target.os.tag == .wasi or (target.cpu.arch == .x86 and target.os.tag == .windows)) .none else .async;
329329
330 const config = Compilation.Config.resolve(.{330 const config = Compilation.Config.resolve(.{
src/libs/libtsan.zig+2-2
...@@ -37,7 +37,7 @@ pub fn buildTsan(comp: *Compilation, prog_node: std.Progress.Node) BuildError!vo...@@ -37,7 +37,7 @@ pub fn buildTsan(comp: *Compilation, prog_node: std.Progress.Node) BuildError!vo
37 .watchos => if (target.abi == .simulator) "clang_rt.tsan_watchossim_dynamic" else "clang_rt.tsan_watchos_dynamic",37 .watchos => if (target.abi == .simulator) "clang_rt.tsan_watchossim_dynamic" else "clang_rt.tsan_watchos_dynamic",
38 else => "tsan",38 else => "tsan",
39 };39 };
40 const link_mode: std.builtin.LinkMode = if (target.os.tag.isDarwin()) .dynamic else .static;40 const link_mode: std.lang.LinkMode = if (target.os.tag.isDarwin()) .dynamic else .static;
41 const output_mode = .Lib;41 const output_mode = .Lib;
42 const basename = try std.zig.binNameAlloc(arena, .{42 const basename = try std.zig.binNameAlloc(arena, .{
43 .root_name = root_name,43 .root_name = root_name,
...@@ -48,7 +48,7 @@ pub fn buildTsan(comp: *Compilation, prog_node: std.Progress.Node) BuildError!vo...@@ -48,7 +48,7 @@ pub fn buildTsan(comp: *Compilation, prog_node: std.Progress.Node) BuildError!vo
4848
49 const optimize_mode = comp.compilerRtOptMode();49 const optimize_mode = comp.compilerRtOptMode();
50 const strip = comp.compilerRtStrip();50 const strip = comp.compilerRtStrip();
51 const unwind_tables: std.builtin.UnwindTables =51 const unwind_tables: std.lang.UnwindTables =
52 if (target.cpu.arch == .x86 and target.os.tag == .windows) .none else .async;52 if (target.cpu.arch == .x86 and target.os.tag == .windows) .none else .async;
53 const link_libcpp = target.os.tag.isDarwin();53 const link_libcpp = target.os.tag.isDarwin();
5454
src/libs/libunwind.zig+1-1
...@@ -29,7 +29,7 @@ pub fn buildStaticLib(comp: *Compilation, prog_node: std.Progress.Node) BuildErr...@@ -29,7 +29,7 @@ pub fn buildStaticLib(comp: *Compilation, prog_node: std.Progress.Node) BuildErr
29 const io = comp.io;29 const io = comp.io;
30 const output_mode = .Lib;30 const output_mode = .Lib;
31 const target = &comp.root_mod.resolved_target.result;31 const target = &comp.root_mod.resolved_target.result;
32 const unwind_tables: std.builtin.UnwindTables =32 const unwind_tables: std.lang.UnwindTables =
33 if (target.cpu.arch == .x86 and target.os.tag == .windows) .none else .async;33 if (target.cpu.arch == .x86 and target.os.tag == .windows) .none else .async;
34 const config = Compilation.Config.resolve(.{34 const config = Compilation.Config.resolve(.{
35 .output_mode = output_mode,35 .output_mode = output_mode,
src/libs/mingw.zig+1-1
...@@ -37,7 +37,7 @@ pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progre...@@ -37,7 +37,7 @@ pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progre
37 const target = comp.getTarget();37 const target = comp.getTarget();
3838
39 // The old 32-bit x86 variant of SEH doesn't use tables.39 // The old 32-bit x86 variant of SEH doesn't use tables.
40 const unwind_tables: std.builtin.UnwindTables = if (target.cpu.arch != .x86) .async else .none;40 const unwind_tables: std.lang.UnwindTables = if (target.cpu.arch != .x86) .async else .none;
4141
42 switch (crt_file) {42 switch (crt_file) {
43 .crt2_o => {43 .crt2_o => {
src/libs/musl.zig+2-2
...@@ -173,7 +173,7 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro...@@ -173,7 +173,7 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro
173 .libc_so => {173 .libc_so => {
174 const optimize_mode = comp.compilerRtOptMode();174 const optimize_mode = comp.compilerRtOptMode();
175 const strip = comp.compilerRtStrip();175 const strip = comp.compilerRtStrip();
176 const output_mode: std.builtin.OutputMode = .Lib;176 const output_mode: std.lang.OutputMode = .Lib;
177 const config = try Compilation.Config.resolve(.{177 const config = try Compilation.Config.resolve(.{
178 .output_mode = output_mode,178 .output_mode = output_mode,
179 .link_mode = .dynamic,179 .link_mode = .dynamic,
...@@ -290,7 +290,7 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro...@@ -290,7 +290,7 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro
290 }290 }
291}291}
292292
293pub fn needsCrt0(output_mode: std.builtin.OutputMode, link_mode: std.builtin.LinkMode, pie: bool) ?CrtFile {293pub fn needsCrt0(output_mode: std.lang.OutputMode, link_mode: std.lang.LinkMode, pie: bool) ?CrtFile {
294 return switch (output_mode) {294 return switch (output_mode) {
295 .Obj, .Lib => null,295 .Obj, .Lib => null,
296 .Exe => switch (link_mode) {296 .Exe => switch (link_mode) {
src/libs/netbsd.zig+1-1
...@@ -19,7 +19,7 @@ pub const CrtFile = enum {...@@ -19,7 +19,7 @@ pub const CrtFile = enum {
19 scrt0_o,19 scrt0_o,
20};20};
2121
22pub fn needsCrt0(output_mode: std.builtin.OutputMode) ?CrtFile {22pub fn needsCrt0(output_mode: std.lang.OutputMode) ?CrtFile {
23 // For shared libraries and PIC executables, we should actually link in a variant of crt1 that23 // For shared libraries and PIC executables, we should actually link in a variant of crt1 that
24 // is built with `-DSHARED` so that it calls `__cxa_finalize` in an ELF destructor. However, we24 // is built with `-DSHARED` so that it calls `__cxa_finalize` in an ELF destructor. However, we
25 // currently make no effort to respect `__cxa_finalize` on any other targets, so for now, we're25 // currently make no effort to respect `__cxa_finalize` on any other targets, so for now, we're
src/libs/openbsd.zig+1-1
...@@ -20,7 +20,7 @@ pub const CrtFile = enum {...@@ -20,7 +20,7 @@ pub const CrtFile = enum {
20 scrt0_o,20 scrt0_o,
21};21};
2222
23pub fn needsCrt0(output_mode: std.builtin.OutputMode) ?CrtFile {23pub fn needsCrt0(output_mode: std.lang.OutputMode) ?CrtFile {
24 // https://github.com/ziglang/zig/issues/23574#issuecomment-286908989724 // https://github.com/ziglang/zig/issues/23574#issuecomment-2869089897
25 return switch (output_mode) {25 return switch (output_mode) {
26 .Obj, .Lib => null,26 .Obj, .Lib => null,
src/libs/wasi_libc.zig+2-2
...@@ -12,14 +12,14 @@ pub const CrtFile = enum {...@@ -12,14 +12,14 @@ pub const CrtFile = enum {
12 libc_a,12 libc_a,
13};13};
1414
15pub fn execModelCrtFile(wasi_exec_model: std.builtin.WasiExecModel) CrtFile {15pub fn execModelCrtFile(wasi_exec_model: std.lang.WasiExecModel) CrtFile {
16 return switch (wasi_exec_model) {16 return switch (wasi_exec_model) {
17 .reactor => CrtFile.crt1_reactor_o,17 .reactor => CrtFile.crt1_reactor_o,
18 .command => CrtFile.crt1_command_o,18 .command => CrtFile.crt1_command_o,
19 };19 };
20}20}
2121
22pub fn execModelCrtFileFullName(wasi_exec_model: std.builtin.WasiExecModel) []const u8 {22pub fn execModelCrtFileFullName(wasi_exec_model: std.lang.WasiExecModel) []const u8 {
23 return switch (execModelCrtFile(wasi_exec_model)) {23 return switch (execModelCrtFile(wasi_exec_model)) {
24 .crt1_reactor_o => "crt1-reactor.o",24 .crt1_reactor_o => "crt1-reactor.o",
25 .crt1_command_o => "crt1-command.o",25 .crt1_command_o => "crt1-command.o",
src/link.zig+8-8
...@@ -1300,8 +1300,8 @@ pub const File = struct {...@@ -1300,8 +1300,8 @@ pub const File = struct {
1300 };1300 };
13011301
1302 pub fn determinePermissions(1302 pub fn determinePermissions(
1303 output_mode: std.builtin.OutputMode,1303 output_mode: std.lang.OutputMode,
1304 link_mode: std.builtin.LinkMode,1304 link_mode: std.lang.LinkMode,
1305 ) Io.File.Permissions {1305 ) Io.File.Permissions {
1306 // On common systems with a 0o022 umask, 0o777 will still result in a file created1306 // On common systems with a 0o022 umask, 0o777 will still result in a file created
1307 // with 0o755 permissions, but it works appropriately if the system is configured1307 // with 0o755 permissions, but it works appropriately if the system is configured
...@@ -1714,10 +1714,10 @@ pub const UnresolvedInput = union(enum) {...@@ -1714,10 +1714,10 @@ pub const UnresolvedInput = union(enum) {
1714 must_link: bool = false,1714 must_link: bool = false,
1715 hidden: bool = false,1715 hidden: bool = false,
1716 allow_so_scripts: bool = false,1716 allow_so_scripts: bool = false,
1717 preferred_mode: std.builtin.LinkMode,1717 preferred_mode: std.lang.LinkMode,
1718 search_strategy: SearchStrategy,1718 search_strategy: SearchStrategy,
17191719
1720 fn fallbackMode(q: Query) std.builtin.LinkMode {1720 fn fallbackMode(q: Query) std.lang.LinkMode {
1721 assert(q.search_strategy != .no_fallback);1721 assert(q.search_strategy != .no_fallback);
1722 return switch (q.preferred_mode) {1722 return switch (q.preferred_mode) {
1723 .dynamic => .static,1723 .dynamic => .static,
...@@ -1843,7 +1843,7 @@ pub fn resolveInputs(...@@ -1843,7 +1843,7 @@ pub fn resolveInputs(
1843 name: []const u8,1843 name: []const u8,
1844 strategy: UnresolvedInput.SearchStrategy,1844 strategy: UnresolvedInput.SearchStrategy,
1845 checked_paths: []const u8,1845 checked_paths: []const u8,
1846 preferred_mode: std.builtin.LinkMode,1846 preferred_mode: std.lang.LinkMode,
1847 }) = .empty;1847 }) = .empty;
18481848
1849 // Convert external system libs into a stack so that items can be1849 // Convert external system libs into a stack so that items can be
...@@ -2077,7 +2077,7 @@ fn resolveLibInput(...@@ -2077,7 +2077,7 @@ fn resolveLibInput(
2077 lib_directory: Directory,2077 lib_directory: Directory,
2078 name_query: UnresolvedInput.NameQuery,2078 name_query: UnresolvedInput.NameQuery,
2079 target: *const std.Target,2079 target: *const std.Target,
2080 link_mode: std.builtin.LinkMode,2080 link_mode: std.lang.LinkMode,
2081 color: std.zig.Color,2081 color: std.zig.Color,
2082) Allocator.Error!ResolveLibInputResult {2082) Allocator.Error!ResolveLibInputResult {
2083 try resolved_inputs.ensureUnusedCapacity(gpa, 1);2083 try resolved_inputs.ensureUnusedCapacity(gpa, 1);
...@@ -2161,7 +2161,7 @@ fn finishResolveLibInput(...@@ -2161,7 +2161,7 @@ fn finishResolveLibInput(
2161 resolved_inputs: *std.ArrayList(Input),2161 resolved_inputs: *std.ArrayList(Input),
2162 path: Path,2162 path: Path,
2163 file: Io.File,2163 file: Io.File,
2164 link_mode: std.builtin.LinkMode,2164 link_mode: std.lang.LinkMode,
2165 query: UnresolvedInput.Query,2165 query: UnresolvedInput.Query,
2166) ResolveLibInputResult {2166) ResolveLibInputResult {
2167 switch (link_mode) {2167 switch (link_mode) {
...@@ -2237,7 +2237,7 @@ fn resolvePathInputLib(...@@ -2237,7 +2237,7 @@ fn resolvePathInputLib(
2237 ld_script_bytes: *std.ArrayList(u8),2237 ld_script_bytes: *std.ArrayList(u8),
2238 target: *const std.Target,2238 target: *const std.Target,
2239 pq: UnresolvedInput.PathQuery,2239 pq: UnresolvedInput.PathQuery,
2240 link_mode: std.builtin.LinkMode,2240 link_mode: std.lang.LinkMode,
2241 color: std.zig.Color,2241 color: std.zig.Color,
2242) Allocator.Error!ResolveLibInputResult {2242) Allocator.Error!ResolveLibInputResult {
2243 try resolved_inputs.ensureUnusedCapacity(gpa, 1);2243 try resolved_inputs.ensureUnusedCapacity(gpa, 1);
src/link/Coff.zig+1-1
...@@ -1091,7 +1091,7 @@ fn computeNodeSectionOffset(coff: *Coff, ni: MappedFile.Node.Index) u32 {...@@ -1091,7 +1091,7 @@ fn computeNodeSectionOffset(coff: *Coff, ni: MappedFile.Node.Index) u32 {
1091 }1091 }
1092}1092}
10931093
1094pub inline fn targetEndian(_: *const Coff) std.builtin.Endian {1094pub inline fn targetEndian(_: *const Coff) std.lang.Endian {
1095 return .little;1095 return .little;
1096}1096}
1097fn targetLoad(coff: *const Coff, ptr: anytype) @typeInfo(@TypeOf(ptr)).pointer.child {1097fn targetLoad(coff: *const Coff, ptr: anytype) @typeInfo(@TypeOf(ptr)).pointer.child {
src/link/Dwarf.zig+5-5
...@@ -22,7 +22,7 @@ const target_info = @import("../target.zig");...@@ -22,7 +22,7 @@ const target_info = @import("../target.zig");
22gpa: Allocator,22gpa: Allocator,
23bin_file: *link.File,23bin_file: *link.File,
24format: DW.Format,24format: DW.Format,
25endian: std.builtin.Endian,25endian: std.lang.Endian,
26address_size: AddressSize,26address_size: AddressSize,
2727
28const_pool: link.ConstPool,28const_pool: link.ConstPool,
...@@ -1963,7 +1963,7 @@ pub const WipNav = struct {...@@ -1963,7 +1963,7 @@ pub const WipNav = struct {
1963 fn writer(counter: *ExprLocCounter) *Writer {1963 fn writer(counter: *ExprLocCounter) *Writer {
1964 return &counter.dw.writer;1964 return &counter.dw.writer;
1965 }1965 }
1966 fn endian(_: ExprLocCounter) std.builtin.Endian {1966 fn endian(_: ExprLocCounter) std.lang.Endian {
1967 return @import("builtin").cpu.arch.endian();1967 return @import("builtin").cpu.arch.endian();
1968 }1968 }
1969 fn addrSym(counter: *ExprLocCounter, _: u32) Writer.Error!void {1969 fn addrSym(counter: *ExprLocCounter, _: u32) Writer.Error!void {
...@@ -1984,7 +1984,7 @@ pub const WipNav = struct {...@@ -1984,7 +1984,7 @@ pub const WipNav = struct {
1984 fn writer(ctx: @This()) *Writer {1984 fn writer(ctx: @This()) *Writer {
1985 return &ctx.wip_nav.debug_info.writer;1985 return &ctx.wip_nav.debug_info.writer;
1986 }1986 }
1987 fn endian(ctx: @This()) std.builtin.Endian {1987 fn endian(ctx: @This()) std.lang.Endian {
1988 return ctx.wip_nav.dwarf.endian;1988 return ctx.wip_nav.dwarf.endian;
1989 }1989 }
1990 fn addrSym(ctx: @This(), sym_index: u32) (UpdateError || Writer.Error)!void {1990 fn addrSym(ctx: @This(), sym_index: u32) (UpdateError || Writer.Error)!void {
...@@ -2026,7 +2026,7 @@ pub const WipNav = struct {...@@ -2026,7 +2026,7 @@ pub const WipNav = struct {
2026 fn writer(ctx: @This()) *Writer {2026 fn writer(ctx: @This()) *Writer {
2027 return &ctx.wip_nav.debug_frame.writer;2027 return &ctx.wip_nav.debug_frame.writer;
2028 }2028 }
2029 fn endian(ctx: @This()) std.builtin.Endian {2029 fn endian(ctx: @This()) std.lang.Endian {
2030 return ctx.wip_nav.dwarf.endian;2030 return ctx.wip_nav.dwarf.endian;
2031 }2031 }
2032 fn addrSym(ctx: @This(), sym_index: u32) (UpdateError || Writer.Error)!void {2032 fn addrSym(ctx: @This(), sym_index: u32) (UpdateError || Writer.Error)!void {
...@@ -4164,7 +4164,7 @@ fn updateConstInner(dwarf: *Dwarf, pt: Zcu.PerThread, debug_const_index: link.Co...@@ -4164,7 +4164,7 @@ fn updateConstInner(dwarf: *Dwarf, pt: Zcu.PerThread, debug_const_index: link.Co
4164 try wip_nav.strpFmt("{f}", .{val.toType().fmt(pt)});4164 try wip_nav.strpFmt("{f}", .{val.toType().fmt(pt)});
4165 const cc: DW.CC = cc: {4165 const cc: DW.CC = cc: {
4166 if (zcu.getTarget().cCallingConvention()) |cc| {4166 if (zcu.getTarget().cCallingConvention()) |cc| {
4167 if (@as(std.builtin.CallingConvention.Tag, cc) == func_type.cc) {4167 if (@as(std.lang.CallingConvention.Tag, cc) == func_type.cc) {
4168 break :cc .normal;4168 break :cc .normal;
4169 }4169 }
4170 }4170 }
src/link/Elf2.zig+1-1
...@@ -1697,7 +1697,7 @@ pub fn identData(elf: *const Elf) std.elf.DATA {...@@ -1697,7 +1697,7 @@ pub fn identData(elf: *const Elf) std.elf.DATA {
1697 return @enumFromInt(elf.mf.memory_map.memory[std.elf.EI.DATA]);1697 return @enumFromInt(elf.mf.memory_map.memory[std.elf.EI.DATA]);
1698}1698}
16991699
1700pub fn targetEndian(elf: *const Elf) std.builtin.Endian {1700pub fn targetEndian(elf: *const Elf) std.lang.Endian {
1701 return switch (elf.identData()) {1701 return switch (elf.identData()) {
1702 .NONE, _ => unreachable,1702 .NONE, _ => unreachable,
1703 .@"2LSB" => .little,1703 .@"2LSB" => .little,
src/link/Wasm.zig+4-4
...@@ -3882,7 +3882,7 @@ pub fn flush(...@@ -3882,7 +3882,7 @@ pub fn flush(
38823882
3883fn defaultEntrySymbolName(3883fn defaultEntrySymbolName(
3884 preloaded_strings: *const PreloadedStrings,3884 preloaded_strings: *const PreloadedStrings,
3885 wasi_exec_model: std.builtin.WasiExecModel,3885 wasi_exec_model: std.lang.WasiExecModel,
3886) String {3886) String {
3887 return switch (wasi_exec_model) {3887 return switch (wasi_exec_model) {
3888 .reactor => preloaded_strings._initialize,3888 .reactor => preloaded_strings._initialize,
...@@ -3962,7 +3962,7 @@ pub fn getExistingFuncType2(wasm: *const Wasm, params: []const std.wasm.Valtype,...@@ -3962,7 +3962,7 @@ pub fn getExistingFuncType2(wasm: *const Wasm, params: []const std.wasm.Valtype,
39623962
3963pub fn internFunctionType(3963pub fn internFunctionType(
3964 wasm: *Wasm,3964 wasm: *Wasm,
3965 cc: std.builtin.CallingConvention,3965 cc: std.lang.CallingConvention,
3966 params: []const InternPool.Index,3966 params: []const InternPool.Index,
3967 return_type: Zcu.Type,3967 return_type: Zcu.Type,
3968 target: *const std.Target,3968 target: *const std.Target,
...@@ -3976,7 +3976,7 @@ pub fn internFunctionType(...@@ -3976,7 +3976,7 @@ pub fn internFunctionType(
39763976
3977pub fn getExistingFunctionType(3977pub fn getExistingFunctionType(
3978 wasm: *Wasm,3978 wasm: *Wasm,
3979 cc: std.builtin.CallingConvention,3979 cc: std.lang.CallingConvention,
3980 params: []const InternPool.Index,3980 params: []const InternPool.Index,
3981 return_type: Zcu.Type,3981 return_type: Zcu.Type,
3982 target: *const std.Target,3982 target: *const std.Target,
...@@ -4210,7 +4210,7 @@ pub fn errorNameTableAddr(wasm: *Wasm) u32 {...@@ -4210,7 +4210,7 @@ pub fn errorNameTableAddr(wasm: *Wasm) u32 {
42104210
4211fn convertZcuFnType(4211fn convertZcuFnType(
4212 comp: *Compilation,4212 comp: *Compilation,
4213 cc: std.builtin.CallingConvention,4213 cc: std.lang.CallingConvention,
4214 params: []const InternPool.Index,4214 params: []const InternPool.Index,
4215 return_type: Zcu.Type,4215 return_type: Zcu.Type,
4216 target: *const std.Target,4216 target: *const std.Target,
src/main.zig+10-10
...@@ -766,7 +766,7 @@ const Emit = union(enum) {...@@ -766,7 +766,7 @@ const Emit = union(enum) {
766};766};
767767
768const ArgMode = union(enum) {768const ArgMode = union(enum) {
769 build: std.builtin.OutputMode,769 build: std.lang.OutputMode,
770 cc,770 cc,
771 cpp,771 cpp,
772 translate_c,772 translate_c,
...@@ -935,13 +935,13 @@ fn buildOutputType(...@@ -935,13 +935,13 @@ fn buildOutputType(
935 var minor_subsystem_version: ?u16 = null;935 var minor_subsystem_version: ?u16 = null;
936 var mingw_unicode_entry_point: bool = false;936 var mingw_unicode_entry_point: bool = false;
937 var enable_link_snapshots: bool = false;937 var enable_link_snapshots: bool = false;
938 var debug_compiler_runtime_libs: ?std.builtin.OptimizeMode = null;938 var debug_compiler_runtime_libs: ?std.lang.OptimizeMode = null;
939 var install_name: ?[]const u8 = null;939 var install_name: ?[]const u8 = null;
940 var hash_style: link.File.Lld.Elf.HashStyle = .both;940 var hash_style: link.File.Lld.Elf.HashStyle = .both;
941 var entitlements: ?[]const u8 = null;941 var entitlements: ?[]const u8 = null;
942 var pagezero_size: ?u64 = null;942 var pagezero_size: ?u64 = null;
943 var lib_search_strategy: link.UnresolvedInput.SearchStrategy = .paths_first;943 var lib_search_strategy: link.UnresolvedInput.SearchStrategy = .paths_first;
944 var lib_preferred_mode: std.builtin.LinkMode = .dynamic;944 var lib_preferred_mode: std.lang.LinkMode = .dynamic;
945 var headerpad_size: ?u32 = null;945 var headerpad_size: ?u32 = null;
946 var headerpad_max_install_names: bool = false;946 var headerpad_max_install_names: bool = false;
947 var dead_strip_dylibs: bool = false;947 var dead_strip_dylibs: bool = false;
...@@ -5752,7 +5752,7 @@ fn jitCmdInner(...@@ -5752,7 +5752,7 @@ fn jitCmdInner(
5752 const self_exe_path = process.executablePathAlloc(io, arena) catch |err|5752 const self_exe_path = process.executablePathAlloc(io, arena) catch |err|
5753 fatal("unable to find self exe path: {t}", .{err});5753 fatal("unable to find self exe path: {t}", .{err});
57545754
5755 const optimize_mode: std.builtin.OptimizeMode = if (EnvVar.ZIG_DEBUG_CMD.isSet(environ_map))5755 const optimize_mode: std.lang.OptimizeMode = if (EnvVar.ZIG_DEBUG_CMD.isSet(environ_map))
5756 .Debug5756 .Debug
5757 else5757 else
5758 .ReleaseFast;5758 .ReleaseFast;
...@@ -6263,8 +6263,8 @@ pub const ClangArgIterator = struct {...@@ -6263,8 +6263,8 @@ pub const ClangArgIterator = struct {
6263 }6263 }
6264};6264};
62656265
6266fn parseCodeModel(arg: []const u8) std.builtin.CodeModel {6266fn parseCodeModel(arg: []const u8) std.lang.CodeModel {
6267 return std.meta.stringToEnum(std.builtin.CodeModel, arg) orelse6267 return std.meta.stringToEnum(std.lang.CodeModel, arg) orelse
6268 fatal("unsupported machine code model: '{s}'", .{arg});6268 fatal("unsupported machine code model: '{s}'", .{arg});
6269}6269}
62706270
...@@ -7667,13 +7667,13 @@ fn findTemplates(gpa: Allocator, arena: Allocator, io: Io) Templates {...@@ -7667,13 +7667,13 @@ fn findTemplates(gpa: Allocator, arena: Allocator, io: Io) Templates {
7667 };7667 };
7668}7668}
76697669
7670fn parseOptimizeMode(s: []const u8) std.builtin.OptimizeMode {7670fn parseOptimizeMode(s: []const u8) std.lang.OptimizeMode {
7671 return std.meta.stringToEnum(std.builtin.OptimizeMode, s) orelse7671 return std.meta.stringToEnum(std.lang.OptimizeMode, s) orelse
7672 fatal("unrecognized optimization mode: '{s}'", .{s});7672 fatal("unrecognized optimization mode: '{s}'", .{s});
7673}7673}
76747674
7675fn parseWasiExecModel(s: []const u8) std.builtin.WasiExecModel {7675fn parseWasiExecModel(s: []const u8) std.lang.WasiExecModel {
7676 return std.meta.stringToEnum(std.builtin.WasiExecModel, s) orelse7676 return std.meta.stringToEnum(std.lang.WasiExecModel, s) orelse
7677 fatal("expected [command|reactor] for -mexec-mode=[value], found '{s}'", .{s});7677 fatal("expected [command|reactor] for -mexec-mode=[value], found '{s}'", .{s});
7678}7678}
76797679
src/print_zir.zig+4-4
...@@ -693,7 +693,7 @@ const Writer = struct {...@@ -693,7 +693,7 @@ const Writer = struct {
693 .restore_err_ret_index => try self.writeRestoreErrRetIndex(stream, extended),693 .restore_err_ret_index => try self.writeRestoreErrRetIndex(stream, extended),
694 .closure_get => try self.writeClosureGet(stream, extended),694 .closure_get => try self.writeClosureGet(stream, extended),
695 .field_parent_ptr => try self.writeFieldParentPtr(stream, extended),695 .field_parent_ptr => try self.writeFieldParentPtr(stream, extended),
696 .builtin_value => try self.writeBuiltinValue(stream, extended),696 .std_lang_value => try self.writeStdLangValue(stream, extended),
697 .inplace_arith_result_ty => try self.writeInplaceArithResultTy(stream, extended),697 .inplace_arith_result_ty => try self.writeInplaceArithResultTy(stream, extended),
698698
699 .dbg_empty_stmt => try stream.writeAll("))"),699 .dbg_empty_stmt => try stream.writeAll("))"),
...@@ -1340,7 +1340,7 @@ const Writer = struct {...@@ -1340,7 +1340,7 @@ const Writer = struct {
1340 if (extra.data.flags.ensure_result_used) {1340 if (extra.data.flags.ensure_result_used) {
1341 try stream.writeAll("nodiscard ");1341 try stream.writeAll("nodiscard ");
1342 }1342 }
1343 try stream.print(".{s}, ", .{@tagName(@as(std.builtin.CallModifier, @enumFromInt(extra.data.flags.packed_modifier)))});1343 try stream.print(".{s}, ", .{@tagName(@as(std.lang.CallModifier, @enumFromInt(extra.data.flags.packed_modifier)))});
1344 switch (kind) {1344 switch (kind) {
1345 .direct => try self.writeInstRef(stream, extra.data.callee),1345 .direct => try self.writeInstRef(stream, extra.data.callee),
1346 .field => {1346 .field => {
...@@ -2232,8 +2232,8 @@ const Writer = struct {...@@ -2232,8 +2232,8 @@ const Writer = struct {
2232 try self.writeSrcNode(stream, src_node);2232 try self.writeSrcNode(stream, src_node);
2233 }2233 }
22342234
2235 fn writeBuiltinValue(self: *Writer, stream: *std.Io.Writer, extended: Zir.Inst.Extended.InstData) !void {2235 fn writeStdLangValue(self: *Writer, stream: *std.Io.Writer, extended: Zir.Inst.Extended.InstData) !void {
2236 const val: Zir.Inst.BuiltinValue = @enumFromInt(extended.small);2236 const val: Zir.Inst.StdLangValue = @enumFromInt(extended.small);
2237 try stream.print("{s})) ", .{@tagName(val)});2237 try stream.print("{s})) ", .{@tagName(val)});
2238 const src_node: Ast.Node.Offset = @enumFromInt(@as(i32, @bitCast(extended.operand)));2238 const src_node: Ast.Node.Offset = @enumFromInt(@as(i32, @bitCast(extended.operand)));
2239 try self.writeSrcNode(stream, src_node);2239 try self.writeSrcNode(stream, src_node);
src/target.zig+15-15
...@@ -3,7 +3,7 @@ const std = @import("std");...@@ -3,7 +3,7 @@ const std = @import("std");
3const assert = std.debug.assert;3const assert = std.debug.assert;
44
5const Type = @import("Type.zig");5const Type = @import("Type.zig");
6const AddressSpace = std.builtin.AddressSpace;6const AddressSpace = std.lang.AddressSpace;
7const Alignment = @import("InternPool.zig").Alignment;7const Alignment = @import("InternPool.zig").Alignment;
8const Compilation = @import("Compilation.zig");8const Compilation = @import("Compilation.zig");
9const Feature = @import("Zcu.zig").Feature;9const Feature = @import("Zcu.zig").Feature;
...@@ -31,7 +31,7 @@ pub fn canDynamicLink(target: *const std.Target) bool {...@@ -31,7 +31,7 @@ pub fn canDynamicLink(target: *const std.Target) bool {
31 };31 };
32}32}
3333
34pub fn libCNeedsLibUnwind(target: *const std.Target, link_mode: std.builtin.LinkMode) bool {34pub fn libCNeedsLibUnwind(target: *const std.Target, link_mode: std.lang.LinkMode) bool {
35 return target.isGnuLibC() and link_mode == .static;35 return target.isGnuLibC() and link_mode == .static;
36}36}
3737
...@@ -119,7 +119,7 @@ pub fn useEmulatedTls(target: *const std.Target) bool {...@@ -119,7 +119,7 @@ pub fn useEmulatedTls(target: *const std.Target) bool {
119 };119 };
120}120}
121121
122pub fn hasValgrindSupport(target: *const std.Target, backend: std.builtin.CompilerBackend) bool {122pub fn hasValgrindSupport(target: *const std.Target, backend: std.lang.CompilerBackend) bool {
123 // We can't currently output the necessary Valgrind client request assembly when using the C123 // We can't currently output the necessary Valgrind client request assembly when using the C
124 // backend and compiling with an MSVC-like compiler.124 // backend and compiling with an MSVC-like compiler.
125 const ofmt_c_msvc = (target.abi == .msvc or target.abi == .itanium) and target.ofmt == .c;125 const ofmt_c_msvc = (target.abi == .msvc or target.abi == .itanium) and target.ofmt == .c;
...@@ -265,7 +265,7 @@ pub fn hasLldSupport(ofmt: std.Target.ObjectFormat) bool {...@@ -265,7 +265,7 @@ pub fn hasLldSupport(ofmt: std.Target.ObjectFormat) bool {
265 };265 };
266}266}
267267
268pub fn hasNewLinkerSupport(ofmt: std.Target.ObjectFormat, backend: std.builtin.CompilerBackend) bool {268pub fn hasNewLinkerSupport(ofmt: std.Target.ObjectFormat, backend: std.lang.CompilerBackend) bool {
269 return switch (ofmt) {269 return switch (ofmt) {
270 .elf, .coff => switch (backend) {270 .elf, .coff => switch (backend) {
271 .stage2_x86_64 => true,271 .stage2_x86_64 => true,
...@@ -299,7 +299,7 @@ pub fn selfHostedBackendIsAsRobustAsLlvm(target: *const std.Target) bool {...@@ -299,7 +299,7 @@ pub fn selfHostedBackendIsAsRobustAsLlvm(target: *const std.Target) bool {
299 return false;299 return false;
300}300}
301301
302pub fn supportsStackProbing(target: *const std.Target, backend: std.builtin.CompilerBackend) bool {302pub fn supportsStackProbing(target: *const std.Target, backend: std.lang.CompilerBackend) bool {
303 return switch (backend) {303 return switch (backend) {
304 .stage2_aarch64, .stage2_x86_64 => true,304 .stage2_aarch64, .stage2_x86_64 => true,
305 .stage2_llvm => target.os.tag != .windows and target.os.tag != .uefi and305 .stage2_llvm => target.os.tag != .windows and target.os.tag != .uefi and
...@@ -308,7 +308,7 @@ pub fn supportsStackProbing(target: *const std.Target, backend: std.builtin.Comp...@@ -308,7 +308,7 @@ pub fn supportsStackProbing(target: *const std.Target, backend: std.builtin.Comp
308 };308 };
309}309}
310310
311pub fn supportsStackProtector(target: *const std.Target, backend: std.builtin.CompilerBackend) bool {311pub fn supportsStackProtector(target: *const std.Target, backend: std.lang.CompilerBackend) bool {
312 switch (target.os.tag) {312 switch (target.os.tag) {
313 .plan9 => return false,313 .plan9 => return false,
314 else => {},314 else => {},
...@@ -336,7 +336,7 @@ pub fn libcProvidesStackProtector(target: *const std.Target) bool {...@@ -336,7 +336,7 @@ pub fn libcProvidesStackProtector(target: *const std.Target) bool {
336336
337/// Returns true if `@returnAddress()` is supported by the target and has a337/// Returns true if `@returnAddress()` is supported by the target and has a
338/// reasonably performant implementation for the requested optimization mode.338/// reasonably performant implementation for the requested optimization mode.
339pub fn supportsReturnAddress(target: *const std.Target, optimize: std.builtin.OptimizeMode) bool {339pub fn supportsReturnAddress(target: *const std.Target, optimize: std.lang.OptimizeMode) bool {
340 return switch (target.cpu.arch) {340 return switch (target.cpu.arch) {
341 // Emscripten currently implements `emscripten_return_address()` by calling341 // Emscripten currently implements `emscripten_return_address()` by calling
342 // out into JavaScript and parsing a stack trace, which introduces significant342 // out into JavaScript and parsing a stack trace, which introduces significant
...@@ -396,7 +396,7 @@ pub fn hasDebugInfo(target: *const std.Target) bool {...@@ -396,7 +396,7 @@ pub fn hasDebugInfo(target: *const std.Target) bool {
396 };396 };
397}397}
398398
399pub fn defaultCompilerRtOptimizeMode(target: *const std.Target) std.builtin.OptimizeMode {399pub fn defaultCompilerRtOptimizeMode(target: *const std.Target) std.lang.OptimizeMode {
400 if (target.cpu.arch.isWasm() and target.os.tag == .freestanding) {400 if (target.cpu.arch.isWasm() and target.os.tag == .freestanding) {
401 return .ReleaseSmall;401 return .ReleaseSmall;
402 } else {402 } else {
...@@ -437,7 +437,7 @@ pub fn canBuildLibUbsanRt(target: *const std.Target) enum { no, yes, llvm_only,...@@ -437,7 +437,7 @@ pub fn canBuildLibUbsanRt(target: *const std.Target) enum { no, yes, llvm_only,
437437
438/// Whether libzigc can fill-in the gaps of an existing libc438/// Whether libzigc can fill-in the gaps of an existing libc
439/// or *is* the libc of the target.439/// or *is* the libc of the target.
440pub fn wantsZigC(target: *const std.Target, link_mode: std.builtin.LinkMode) bool {440pub fn wantsZigC(target: *const std.Target, link_mode: std.lang.LinkMode) bool {
441 return (target.isMuslLibC() and link_mode == .static) or target.isWasiLibC() or target.isMinGW();441 return (target.isMuslLibC() and link_mode == .static) or target.isWasiLibC() or target.isMinGW();
442}442}
443443
...@@ -547,7 +547,7 @@ pub fn clangSupportsNoImplicitFloatArg(target: *const std.Target) bool {...@@ -547,7 +547,7 @@ pub fn clangSupportsNoImplicitFloatArg(target: *const std.Target) bool {
547 };547 };
548}548}
549549
550pub fn defaultUnwindTables(target: *const std.Target, libunwind: bool, libtsan: bool) std.builtin.UnwindTables {550pub fn defaultUnwindTables(target: *const std.Target, libunwind: bool, libtsan: bool) std.lang.UnwindTables {
551 if (target.os.tag == .windows) {551 if (target.os.tag == .windows) {
552 // The old 32-bit x86 variant of SEH doesn't use tables.552 // The old 32-bit x86 variant of SEH doesn't use tables.
553 return if (target.cpu.arch != .x86) .async else .none;553 return if (target.cpu.arch != .x86) .async else .none;
...@@ -824,7 +824,7 @@ pub fn functionPointerMask(target: *const std.Target) ?u64 {...@@ -824,7 +824,7 @@ pub fn functionPointerMask(target: *const std.Target) ?u64 {
824 null;824 null;
825}825}
826826
827pub fn supportsTailCall(target: *const std.Target, backend: std.builtin.CompilerBackend) bool {827pub fn supportsTailCall(target: *const std.Target, backend: std.lang.CompilerBackend) bool {
828 switch (backend) {828 switch (backend) {
829 .stage2_llvm => return @import("codegen/llvm.zig").supportsTailCall(target),829 .stage2_llvm => return @import("codegen/llvm.zig").supportsTailCall(target),
830 .stage2_c => return true,830 .stage2_c => return true,
...@@ -832,7 +832,7 @@ pub fn supportsTailCall(target: *const std.Target, backend: std.builtin.Compiler...@@ -832,7 +832,7 @@ pub fn supportsTailCall(target: *const std.Target, backend: std.builtin.Compiler
832 }832 }
833}833}
834834
835pub fn supportsThreads(target: *const std.Target, backend: std.builtin.CompilerBackend) bool {835pub fn supportsThreads(target: *const std.Target, backend: std.lang.CompilerBackend) bool {
836 _ = target;836 _ = target;
837 return switch (backend) {837 return switch (backend) {
838 .stage2_aarch64 => false,838 .stage2_aarch64 => false,
...@@ -880,7 +880,7 @@ pub fn compilerRtIntAbbrev(bits: u16) []const u8 {...@@ -880,7 +880,7 @@ pub fn compilerRtIntAbbrev(bits: u16) []const u8 {
880 };880 };
881}881}
882882
883pub fn fnCallConvAllowsZigTypes(cc: std.builtin.CallingConvention) bool {883pub fn fnCallConvAllowsZigTypes(cc: std.lang.CallingConvention) bool {
884 return switch (cc) {884 return switch (cc) {
885 .auto, .async, .@"inline" => true,885 .auto, .async, .@"inline" => true,
886 // For now we want to authorize PTX kernel to use zig objects, even if886 // For now we want to authorize PTX kernel to use zig objects, even if
...@@ -891,7 +891,7 @@ pub fn fnCallConvAllowsZigTypes(cc: std.builtin.CallingConvention) bool {...@@ -891,7 +891,7 @@ pub fn fnCallConvAllowsZigTypes(cc: std.builtin.CallingConvention) bool {
891 };891 };
892}892}
893893
894pub fn zigBackend(target: *const std.Target, use_llvm: bool) std.builtin.CompilerBackend {894pub fn zigBackend(target: *const std.Target, use_llvm: bool) std.lang.CompilerBackend {
895 if (use_llvm) return .stage2_llvm;895 if (use_llvm) return .stage2_llvm;
896 if (target.ofmt == .c) return .stage2_c;896 if (target.ofmt == .c) return .stage2_c;
897 return switch (target.cpu.arch) {897 return switch (target.cpu.arch) {
...@@ -908,7 +908,7 @@ pub fn zigBackend(target: *const std.Target, use_llvm: bool) std.builtin.Compile...@@ -908,7 +908,7 @@ pub fn zigBackend(target: *const std.Target, use_llvm: bool) std.builtin.Compile
908 };908 };
909}909}
910910
911pub inline fn backendSupportsFeature(backend: std.builtin.CompilerBackend, comptime feature: Feature) bool {911pub inline fn backendSupportsFeature(backend: std.lang.CompilerBackend, comptime feature: Feature) bool {
912 return switch (feature) {912 return switch (feature) {
913 .panic_fn => switch (backend) {913 .panic_fn => switch (backend) {
914 .stage2_aarch64,914 .stage2_aarch64,
src/tracy.zig+2-2
...@@ -58,7 +58,7 @@ pub const Ctx = if (enable) ___tracy_c_zone_context else struct {...@@ -58,7 +58,7 @@ pub const Ctx = if (enable) ___tracy_c_zone_context else struct {
58 }58 }
59};59};
6060
61pub inline fn trace(comptime src: std.builtin.SourceLocation) Ctx {61pub inline fn trace(comptime src: std.lang.SourceLocation) Ctx {
62 if (!enable) return .{};62 if (!enable) return .{};
6363
64 const global = struct {64 const global = struct {
...@@ -78,7 +78,7 @@ pub inline fn trace(comptime src: std.builtin.SourceLocation) Ctx {...@@ -78,7 +78,7 @@ pub inline fn trace(comptime src: std.builtin.SourceLocation) Ctx {
78 }78 }
79}79}
8080
81pub inline fn traceNamed(comptime src: std.builtin.SourceLocation, comptime name: [:0]const u8) Ctx {81pub inline fn traceNamed(comptime src: std.lang.SourceLocation, comptime name: [:0]const u8) Ctx {
82 if (!enable) return .{};82 if (!enable) return .{};
8383
84 const global = struct {84 const global = struct {
test/cases/compile_errors/invalid_member_of_builtin_enum.zig+3-3
...@@ -1,10 +1,10 @@...@@ -1,10 +1,10 @@
1const builtin = @import("std").builtin;1const lang = @import("std").lang;
2export fn entry() void {2export fn entry() void {
3 const foo = builtin.OptimizeMode.x86;3 const foo = lang.OptimizeMode.x86;
4 _ = foo;4 _ = foo;
5}5}
66
7// error7// error
8//8//
9// :3:38: error: enum 'builtin.OptimizeMode' has no member named 'x86'9// :3:35: error: enum 'lang.OptimizeMode' has no member named 'x86'
10// : note: enum declared here10// : note: enum declared here
test/cases/compile_errors/issue_15572_break_on_inline_while.zig+1-1
...@@ -16,4 +16,4 @@ pub fn main() void {...@@ -16,4 +16,4 @@ pub fn main() void {
16// error16// error
17// target=x86_64-linux17// target=x86_64-linux
18//18//
19// :9:28: error: incompatible types: 'builtin.Type.EnumField' and 'void'19// :9:28: error: incompatible types: 'lang.Type.EnumField' and 'void'
test/cases/compile_errors/runtime_index_into_comptime_type_slice.zig+1-1
...@@ -12,6 +12,6 @@ export fn entry() void {...@@ -12,6 +12,6 @@ export fn entry() void {
1212
13// error13// error
14//14//
15// :9:54: error: values of type 'builtin.Type.StructField' must be comptime-known, but index value is runtime-known15// :9:54: error: values of type 'lang.Type.StructField' must be comptime-known, but index value is runtime-known
16// : note: struct requires comptime because of this field16// : note: struct requires comptime because of this field
17// : note: types are not available at runtime17// : note: types are not available at runtime
test/cases/compile_errors/wrong_type_for_reify_type.zig+3-3
...@@ -16,10 +16,10 @@ export fn entryU() void {...@@ -16,10 +16,10 @@ export fn entryU() void {
1616
17// error17// error
18//18//
19// :2:14: error: expected type 'builtin.Signedness', found 'comptime_int'19// :2:14: error: expected type 'lang.Signedness', found 'comptime_int'
20// :?:?: note: enum declared here20// :?:?: note: enum declared here
21// :6:15: error: expected type 'type', found 'comptime_int'21// :6:15: error: expected type 'type', found 'comptime_int'
22// :10:17: error: expected type 'builtin.Type.ContainerLayout', found 'comptime_int'22// :10:17: error: expected type 'lang.Type.ContainerLayout', found 'comptime_int'
23// :?:?: enum declared here23// :?:?: enum declared here
24// :14:16: error: expected type 'builtin.Type.ContainerLayout', found 'comptime_int'24// :14:16: error: expected type 'lang.Type.ContainerLayout', found 'comptime_int'
25// :?:?: enum declared here25// :?:?: enum declared here
test/cases/compile_errors/wrong_types_given_to_atomic_order_args_in_cmpxchg.zig+1-1
...@@ -5,5 +5,5 @@ export fn entry() void {...@@ -5,5 +5,5 @@ export fn entry() void {
55
6// error6// error
7//7//
8// :3:47: error: expected type 'builtin.AtomicOrder', found 'u32'8// :3:47: error: expected type 'lang.AtomicOrder', found 'u32'
9// :?:?: note: enum declared here9// :?:?: note: enum declared here
test/cases/compile_errors/wrong_types_given_to_export.zig+1-1
...@@ -5,5 +5,5 @@ comptime {...@@ -5,5 +5,5 @@ comptime {
55
6// error6// error
7//7//
8// :3:42: error: expected type 'builtin.GlobalLinkage', found 'u32'8// :3:42: error: expected type 'lang.GlobalLinkage', found 'u32'
9// :?:?: note: enum declared here9// :?:?: note: enum declared here