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
239239 lib/std/atomic.zig
240240 lib/std/base64.zig
241241 lib/std/buf_map.zig
242 lib/std/builtin.zig
242 lib/std/lang.zig
243 lib/std/lang/assembly.zig
243244 lib/std/c.zig
244245 lib/std/coff.zig
245246 lib/std/crypto.zig
build.zig+10-11
......@@ -1,5 +1,4 @@
11const std = @import("std");
2const builtin = std.builtin;
32const BufMap = std.BufMap;
43const mem = std.mem;
54const fs = std.fs;
......@@ -191,7 +190,7 @@ pub fn build(b: *std.Build) !void {
191190 const valgrind = b.option(bool, "valgrind", "Enable valgrind integration");
192191 const pie = b.option(bool, "pie", "Produce a Position Independent Executable");
193192 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;
195194 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
197196 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 {
398397 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{};
399398 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;
402401 var chosen_mode_index: usize = 0;
403402 if (!skip_debug) {
404 chosen_opt_modes_buf[chosen_mode_index] = builtin.OptimizeMode.Debug;
403 chosen_opt_modes_buf[chosen_mode_index] = .Debug;
405404 chosen_mode_index += 1;
406405 }
407406 if (!skip_release_safe) {
408 chosen_opt_modes_buf[chosen_mode_index] = builtin.OptimizeMode.ReleaseSafe;
407 chosen_opt_modes_buf[chosen_mode_index] = .ReleaseSafe;
409408 chosen_mode_index += 1;
410409 }
411410 if (!skip_release_fast) {
412 chosen_opt_modes_buf[chosen_mode_index] = builtin.OptimizeMode.ReleaseFast;
411 chosen_opt_modes_buf[chosen_mode_index] = .ReleaseFast;
413412 chosen_mode_index += 1;
414413 }
415414 if (!skip_release_small) {
416 chosen_opt_modes_buf[chosen_mode_index] = builtin.OptimizeMode.ReleaseSmall;
415 chosen_opt_modes_buf[chosen_mode_index] = .ReleaseSmall;
417416 chosen_mode_index += 1;
418417 }
419418 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 {
706705 //
707706 // * We lose a small amount of performance. This is essentially irrelevant for zig1.
708707 //
709 // * We lose the ability to perform trivial renames on certain `std.builtin` types without
708 // * We lose the ability to perform trivial renames on certain `std.lang` types without
710709 // zig1.wasm updates. For instance, we cannot rename an enum from PascalCase fields to
711710 // snake_case fields without an update.
712711 //
713 // * We gain the ability to add and remove fields to and from `std.builtin` types without
712 // * We gain the ability to add and remove fields to and from `std.lang` types without
714713 // zig1.wasm updates. For instance, we can add a new tag to `CallingConvention` without
715714 // an update.
716715 //
......@@ -740,7 +739,7 @@ fn addWasiUpdateStep(b: *std.Build, version: [:0]const u8) !void {
740739}
741740
742741const AddCompilerModOptions = struct {
743 optimize: std.builtin.OptimizeMode,
742 optimize: std.lang.OptimizeMode,
744743 target: std.Build.ResolvedTarget,
745744 strip: ?bool = null,
746745 valgrind: ?bool = null,
......@@ -1029,7 +1028,7 @@ fn addCMakeLibraryList(mod: *std.Build.Module, list: []const u8) void {
10291028}
10301029
10311030const CMakeConfig = struct {
1032 llvm_linkage: std.builtin.LinkMode,
1031 llvm_linkage: std.lang.LinkMode,
10331032 cmake_binary_dir: []const u8,
10341033 cmake_prefix_path: []const u8,
10351034 cmake_static_library_prefix: []const u8,
doc/langref.html.in+34-34
......@@ -3771,7 +3771,7 @@ void do_a_thing(struct Foo *foo) {
37713771 <tr>
37723772 <th scope="row">{#syntax#}@Int(x, y){#endsyntax#}</th>
37733773 <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>
37753775 </tr>
37763776 <tr>
37773777 <th scope="row">{#syntax#}@typeInfo(x){#endsyntax#}</th>
......@@ -4381,7 +4381,7 @@ comptime {
43814381 {#syntax#}T{#endsyntax#} must be a pointer, a {#syntax#}bool{#endsyntax#}, a float,
43824382 an integer, an enum, or a packed struct.
43834383 </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>
43854385 {#see_also|@atomicStore|@atomicRmw||@cmpxchgWeak|@cmpxchgStrong#}
43864386 {#header_close#}
43874387
......@@ -4395,8 +4395,8 @@ comptime {
43954395 {#syntax#}T{#endsyntax#} must be a pointer, a {#syntax#}bool{#endsyntax#}, a float,
43964396 an integer, an enum, or a packed struct.
43974397 </p>
4398 <p>{#syntax#}AtomicOrder{#endsyntax#} can be found with {#syntax#}@import("std").builtin.AtomicOrder{#endsyntax#}.</p>
4399 <p>{#syntax#}AtomicRmwOp{#endsyntax#} can be found with {#syntax#}@import("std").builtin.AtomicRmwOp{#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").lang.AtomicRmwOp{#endsyntax#}.</p>
44004400 {#see_also|@atomicStore|@atomicLoad|@cmpxchgWeak|@cmpxchgStrong#}
44014401 {#header_close#}
44024402
......@@ -4409,7 +4409,7 @@ comptime {
44094409 {#syntax#}T{#endsyntax#} must be a pointer, a {#syntax#}bool{#endsyntax#}, a float,
44104410 an integer, an enum, or a packed struct.
44114411 </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>
44134413 {#see_also|@atomicLoad|@atomicRmw|@cmpxchgWeak|@cmpxchgStrong#}
44144414 {#header_close#}
44154415
......@@ -4467,7 +4467,7 @@ comptime {
44674467 {#header_open|@branchHint#}
44684468 <pre>{#syntax#}@branchHint(hint: BranchHint) void{#endsyntax#}</pre>
44694469 <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>
44714471 <p>This function is only valid as the first statement in a control flow branch, or the first statement in a function.</p>
44724472 {#header_close#}
44734473
......@@ -4534,7 +4534,7 @@ comptime {
45344534 {#header_close#}
45354535
45364536 {#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>
45384538 <p>
45394539 Calls a function, in the same way that invoking an expression with parentheses does:
45404540 </p>
......@@ -4544,7 +4544,7 @@ comptime {
45444544 {#syntax#}@call{#endsyntax#} allows more flexibility than normal function call syntax does. The
45454545 {#syntax#}CallModifier{#endsyntax#} enum is reproduced here:
45464546 </p>
4547 {#code|builtin.CallModifier struct.zig#}
4547 {#code|lang.CallModifier struct.zig#}
45484548
45494549 {#header_close#}
45504550
......@@ -4584,7 +4584,7 @@ comptime {
45844584 an integer, an enum, or a packed struct.
45854585 </p>
45864586 <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>
45884588 {#see_also|@atomicStore|@atomicLoad|@atomicRmw|@cmpxchgWeak#}
45894589 {#header_close#}
45904590
......@@ -4616,7 +4616,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
46164616 an integer, an enum, or a packed struct.
46174617 </p>
46184618 <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>
46204620 {#see_also|@atomicStore|@atomicLoad|@atomicRmw|@cmpxchgStrong#}
46214621 {#header_close#}
46224622
......@@ -4678,28 +4678,28 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
46784678 {#header_close#}
46794679
46804680 {#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>
46824682 <p>
46834683 Implements the C macro {#syntax#}va_arg{#endsyntax#}.
46844684 </p>
46854685 {#see_also|@cVaCopy|@cVaEnd|@cVaStart#}
46864686 {#header_close#}
46874687 {#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>
46894689 <p>
46904690 Implements the C macro {#syntax#}va_copy{#endsyntax#}.
46914691 </p>
46924692 {#see_also|@cVaArg|@cVaEnd|@cVaStart#}
46934693 {#header_close#}
46944694 {#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>
46964696 <p>
46974697 Implements the C macro {#syntax#}va_end{#endsyntax#}.
46984698 </p>
46994699 {#see_also|@cVaArg|@cVaCopy|@cVaStart#}
47004700 {#header_close#}
47014701 {#header_open|@cVaStart#}
4702 <pre>{#syntax#}@cVaStart() std.builtin.VaList{#endsyntax#}</pre>
4702 <pre>{#syntax#}@cVaStart() std.lang.VaList{#endsyntax#}</pre>
47034703 <p>
47044704 Implements the C macro {#syntax#}va_start{#endsyntax#}. Only valid inside a variadic function.
47054705 </p>
......@@ -4808,7 +4808,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
48084808 {#header_close#}
48094809
48104810 {#header_open|@errorReturnTrace#}
4811 <pre>{#syntax#}@errorReturnTrace() ?*builtin.StackTrace{#endsyntax#}</pre>
4811 <pre>{#syntax#}@errorReturnTrace() ?*std.lang.StackTrace{#endsyntax#}</pre>
48124812 <p>
48134813 If the binary is built with error return tracing, and this function is invoked in a
48144814 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
48264826 {#header_close#}
48274827
48284828 {#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>
48304830 <p>Creates a symbol in the output object file which refers to the target of <code>ptr</code>.</p>
48314831 <p><code>ptr</code> must point to a global variable or a comptime-known constant.</p>
48324832 <p>
......@@ -4852,7 +4852,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
48524852 {#header_close#}
48534853
48544854 {#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>
48564856 <p>
48574857 Creates a reference to an external symbol in the output object file.
48584858 T must be a pointer type.
......@@ -5173,8 +5173,8 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
51735173 <p>
51745174 Invokes the panic handler function. By default the panic handler function
51755175 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#}
5177 function from {#syntax#}std/builtin.zig{#endsyntax#}.
5176 if there is not one specified, the {#syntax#}std.lang.default_panic{#endsyntax#}
5177 function from {#syntax#}std/lang.zig{#endsyntax#}.
51785178 </p>
51795179 <p>Generally it is better to use {#syntax#}@import("std").debug.panic{#endsyntax#}.
51805180 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
52135213 address to prefetch. This function does not dereference the pointer, it is perfectly legal
52145214 to pass a pointer to invalid memory to this function and no Illegal Behavior will result.
52155215 </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>
52175217 {#header_close#}
52185218
52195219 {#header_open|@ptrCast#}
......@@ -5336,7 +5336,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
53365336 The floating point mode is inherited by child scopes, and can be overridden in any scope.
53375337 You can set the floating point mode in a struct or module scope by using a comptime block.
53385338 </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>
53405340 {#see_also|Floating Point Operations#}
53415341 {#header_close#}
53425342
......@@ -5472,7 +5472,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
54725472 {#header_close#}
54735473
54745474 {#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>
54765476 <p>
54775477 Transforms a {#link|vector|Vectors#} into a scalar value (of type <code>E</code>)
54785478 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
55025502 {#header_close#}
55035503
55045504 {#header_open|@src#}
5505 <pre>{#syntax#}@src() std.builtin.SourceLocation{#endsyntax#}</pre>
5505 <pre>{#syntax#}@src() std.lang.SourceLocation{#endsyntax#}</pre>
55065506 <p>
55075507 Returns a {#syntax#}SourceLocation{#endsyntax#} struct representing the function's name and location in the source code. This must be called in a function.
55085508 </p>
......@@ -5729,7 +5729,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
57295729 {#header_close#}
57305730
57315731 {#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>
57335733 <p>Returns an integer type with the given signedness and bit width.</p>
57345734 <p>For instance, {#syntax#}@Int(.unsigned, 18){#endsyntax#} returns the type {#syntax#}u18{#endsyntax#}.</p>
57355735 {#header_close#}
......@@ -5741,8 +5741,8 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
57415741
57425742 {#header_open|@Pointer#}
57435743 <pre>{#syntax#}@Pointer(
5744 comptime size: std.builtin.Type.Pointer.Size,
5745 comptime attrs: std.builtin.Type.Pointer.Attributes,
5744 comptime size: std.lang.Type.Pointer.Size,
5745 comptime attrs: std.lang.Type.Pointer.Attributes,
57465746 comptime Element: type,
57475747 comptime sentinel: ?Element,
57485748) type{#endsyntax#}</pre>
......@@ -5752,32 +5752,32 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
57525752 {#header_open|@Fn#}
57535753 <pre>{#syntax#}@Fn(
57545754 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,
57565756 comptime ReturnType: type,
5757 comptime attrs: std.builtin.Type.Fn.Attributes,
5757 comptime attrs: std.lang.Type.Fn.Attributes,
57585758) type{#endsyntax#}</pre>
57595759 <p>Returns a {#link|function|Functions#} type with the properties specified by the arguments.</p>
57605760 {#header_close#}
57615761
57625762 {#header_open|@Struct#}
57635763 <pre>{#syntax#}@Struct(
5764 comptime layout: std.builtin.Type.ContainerLayout,
5764 comptime layout: std.lang.Type.ContainerLayout,
57655765 comptime BackingInt: ?type,
57665766 comptime field_names: []const []const u8,
57675767 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,
57695769) type{#endsyntax#}</pre>
57705770 <p>Returns a {#link|struct#} type with the properties specified by the arguments.</p>
57715771 {#header_close#}
57725772
57735773 {#header_open|@Union#}
57745774 <pre>{#syntax#}@Union(
5775 comptime layout: std.builtin.Type.ContainerLayout,
5775 comptime layout: std.lang.Type.ContainerLayout,
57765776 /// Either the integer tag type, or the integer backing type, depending on `layout`.
57775777 comptime ArgType: ?type,
57785778 comptime field_names: []const []const u8,
57795779 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,
57815781) type{#endsyntax#}</pre>
57825782 <p>Returns a {#link|union#} type with the properties specified by the arguments.</p>
57835783 {#header_close#}
......@@ -5785,7 +5785,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
57855785 {#header_open|@Enum#}
57865786 <pre>{#syntax#}@Enum(
57875787 comptime TagInt: type,
5788 comptime mode: std.builtin.Type.Enum.Mode,
5788 comptime mode: std.lang.Type.Enum.Mode,
57895789 comptime field_names: []const []const u8,
57905790 comptime field_values: *const [field_names.len]TagInt,
57915791) type{#endsyntax#}</pre>
......@@ -5793,7 +5793,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
57935793 {#header_close#}
57945794
57955795 {#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>
57975797 <p>
57985798 Provides type reflection.
57995799 </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 @@
11const std = @import("std");
2const builtin = @import("builtin");
3const native_arch = builtin.cpu.arch;
42const expectEqual = std.testing.expectEqual;
53
6const WINAPI: std.builtin.CallingConvention = if (native_arch == .x86) .{ .x86_stdcall = .{} } else .c;
7extern "kernel32" fn ExitProcess(exit_code: c_uint) callconv(WINAPI) noreturn;
4extern "kernel32" fn ExitProcess(exit_code: c_uint) callconv(.winapi) noreturn;
85
96test "foo" {
107 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");
6565pub const atomic = @import("atomic.zig");
6666pub const base64 = @import("base64.zig");
6767pub const bit_set = @import("bit_set.zig");
68/// Deprecated; use `lang`.
69///
70/// To be removed after Zig 0.17.0.
6871pub const builtin = lang;
69pub const lang = @import("builtin.zig");
72pub const lang = @import("lang.zig");
7073pub const c = @import("c.zig");
7174pub const coff = @import("coff.zig");
7275pub const compress = @import("compress.zig");
lib/std/zig.zig+2-2
......@@ -876,7 +876,7 @@ pub const SimpleComptimeReason = enum(u32) {
876876 casted_to_comptime_enum,
877877 casted_to_comptime_int,
878878 casted_to_comptime_float,
879 std_builtin_decl,
879 std_lang_decl,
880880
881881 pub fn message(r: SimpleComptimeReason) []const u8 {
882882 return switch (r) {
......@@ -959,7 +959,7 @@ pub const SimpleComptimeReason = enum(u32) {
959959 .casted_to_comptime_enum => "value casted to enum with 'comptime_int' tag type must be comptime-known",
960960 .casted_to_comptime_int => "value casted to 'comptime_int' must be comptime-known",
961961 .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",
963963 // zig fmt: on
964964 };
965965 }
lib/std/zig/Ast.zig+2-2
......@@ -2103,7 +2103,7 @@ fn fullFnProtoComponents(tree: Ast, info: full.FnProto.Components) full.FnProto
21032103}
21042104
21052105fn 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)) {
21072107 .asterisk => .one,
21082108 .l_bracket => switch (tree.tokenTag(info.main_token + 1)) {
21092109 .asterisk => if (tree.tokenTag(info.main_token + 2) == .identifier) .c else .many,
......@@ -2726,7 +2726,7 @@ pub const full = struct {
27262726 };
27272727
27282728 pub const PtrType = struct {
2729 size: std.builtin.Type.Pointer.Size,
2729 size: std.lang.Type.Pointer.Size,
27302730 allowzero_token: ?TokenIndex,
27312731 const_token: ?TokenIndex,
27322732 volatile_token: ?TokenIndex,
lib/std/zig/AstGen.zig+37-37
......@@ -1398,12 +1398,12 @@ fn fnProtoExprInner(
13981398 try comptimeExpr(
13991399 &block_scope,
14001400 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) } },
14021402 callconv_expr,
14031403 .@"callconv",
14041404 )
14051405 else if (implicit_ccc)
1406 try block_scope.addBuiltinValue(node, .calling_convention_c)
1406 try block_scope.addStdLangValue(node, .calling_convention_c)
14071407 else
14081408 .none;
14091409
......@@ -3782,7 +3782,7 @@ fn ptrType(
37823782 gz.astgen.source_line = source_line;
37833783 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);
37863786 addrspace_ref = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = addrspace_ty } }, addrspace_node, .@"addrspace");
37873787 trailing_count += 1;
37883788 }
......@@ -4077,7 +4077,7 @@ fn fnDecl(
40774077
40784078 if (fn_proto.ast.addrspace_expr.unwrap()) |addrspace_expr| {
40794079 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);
40814081 const inst = try expr(&addrspace_gz, &addrspace_gz.base, .{ .rl = .{ .coerced_ty = addrspace_ty } }, addrspace_expr);
40824082 _ = try addrspace_gz.addBreakWithSrcNode(.break_inline, decl_inst, inst, decl_node);
40834083 }
......@@ -4285,7 +4285,7 @@ fn fnDeclInner(
42854285 const inst = try expr(
42864286 &cc_gz,
42874287 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) } },
42894289 callconv_expr,
42904290 );
42914291 if (cc_gz.instructionsSlice().len == 0) {
......@@ -4295,7 +4295,7 @@ fn fnDeclInner(
42954295 _ = try cc_gz.addBreak(.break_inline, @enumFromInt(0), inst);
42964296 break :blk inst;
42974297 } 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);
42994299 _ = try cc_gz.addBreak(.break_inline, @enumFromInt(0), inst);
43004300 break :blk inst;
43014301 } else {
......@@ -4493,7 +4493,7 @@ fn globalVarDecl(
44934493 defer addrspace_gz.unstack();
44944494
44954495 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);
44974497 const addrspace_inst = try expr(&addrspace_gz, &addrspace_gz.base, .{ .rl = .{ .coerced_ty = addrspace_ty } }, addrspace_node);
44984498 _ = try addrspace_gz.addBreakWithSrcNode(.break_inline, decl_inst, addrspace_inst, node);
44994499 }
......@@ -4815,7 +4815,7 @@ fn structDeclInner(
48154815 scope: *Scope,
48164816 node: Ast.Node.Index,
48174817 container_decl: Ast.full.ContainerDecl,
4818 layout: std.builtin.Type.ContainerLayout,
4818 layout: std.lang.Type.ContainerLayout,
48194819 maybe_backing_int_node: Ast.Node.OptionalIndex,
48204820 name_strat: Zir.Inst.NameStrategy,
48214821) InnerError!Zir.Inst.Ref {
......@@ -5020,7 +5020,7 @@ fn tupleDecl(
50205020 scope: *Scope,
50215021 node: Ast.Node.Index,
50225022 container_decl: Ast.full.ContainerDecl,
5023 layout: std.builtin.Type.ContainerLayout,
5023 layout: std.lang.Type.ContainerLayout,
50245024 backing_int_node: Ast.Node.OptionalIndex,
50255025) InnerError!Zir.Inst.Ref {
50265026 const astgen = gz.astgen;
......@@ -5117,7 +5117,7 @@ fn unionDeclInner(
51175117 scope: *Scope,
51185118 node: Ast.Node.Index,
51195119 members: []const Ast.Node.Index,
5120 layout: std.builtin.Type.ContainerLayout,
5120 layout: std.lang.Type.ContainerLayout,
51215121 opt_arg_node: Ast.Node.OptionalIndex,
51225122 auto_enum_tok: ?Ast.TokenIndex,
51235123 name_strat: Zir.Inst.NameStrategy,
......@@ -5324,7 +5324,7 @@ fn containerDecl(
53245324
53255325 switch (tree.tokenTag(container_decl.ast.main_token)) {
53265326 .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)) {
53285328 .keyword_packed => .@"packed",
53295329 .keyword_extern => .@"extern",
53305330 else => unreachable,
......@@ -5334,7 +5334,7 @@ fn containerDecl(
53345334 return rvalue(gz, ri, result, node);
53355335 },
53365336 .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)) {
53385338 .keyword_packed => .@"packed",
53395339 .keyword_extern => .@"extern",
53405340 else => unreachable,
......@@ -8060,7 +8060,7 @@ fn identifier(
80608060
80618061 int_type: {
80628062 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]) {
80648064 'u' => .unsigned,
80658065 'i' => .signed,
80668066 else => break :int_type,
......@@ -8650,7 +8650,7 @@ fn asmExpr(
86508650
86518651 const clobbers: Zir.Inst.Ref = if (full.ast.clobbers.unwrap()) |clobbers_node|
86528652 try comptimeExpr(gz, scope, .{ .rl = .{
8653 .coerced_ty = try gz.addBuiltinValue(clobbers_node, .clobbers),
8653 .coerced_ty = try gz.addStdLangValue(clobbers_node, .clobbers),
86548654 } }, clobbers_node, .clobber)
86558655 else
86568656 .none;
......@@ -8992,7 +8992,7 @@ fn builtinCall(
89928992 if (!allow_branch_hint) {
89938993 return astgen.failNode(node, "'@branchHint' must appear as the first statement in a function or conditional branch", .{});
89948994 }
8995 const hint_ty = try gz.addBuiltinValue(node, .branch_hint);
8995 const hint_ty = try gz.addStdLangValue(node, .branch_hint);
89968996 const hint_val = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = hint_ty } }, params[0], .operand_branchHint);
89978997 _ = try gz.addExtendedPayload(.branch_hint, Zir.Inst.UnNode{
89988998 .node = gz.nodeIndexToRelative(node),
......@@ -9090,7 +9090,7 @@ fn builtinCall(
90909090
90919091 .@"export" => {
90929092 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);
90949094 const options = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = export_options_ty } }, params[1], .export_options);
90959095 _ = try gz.addPlNode(.@"export", node, Zir.Inst.Export{
90969096 .exported = exported,
......@@ -9100,7 +9100,7 @@ fn builtinCall(
91009100 },
91019101 .@"extern" => {
91029102 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);
91049104 const options = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = extern_options_ty } }, params[1], .extern_options);
91059105 const result = try gz.addExtendedPayload(.builtin_extern, Zir.Inst.BinNode{
91069106 .node = gz.nodeIndexToRelative(node),
......@@ -9110,7 +9110,7 @@ fn builtinCall(
91109110 return rvalue(gz, ri, result, node);
91119111 },
91129112 .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);
91149114 const order = try expr(gz, scope, .{ .rl = .{ .coerced_ty = float_mode_ty } }, params[0]);
91159115 _ = try gz.addExtendedPayload(.set_float_mode, Zir.Inst.UnNode{
91169116 .node = gz.nodeIndexToRelative(node),
......@@ -9196,7 +9196,7 @@ fn builtinCall(
91969196
91979197 .EnumLiteral => return rvalue(gz, ri, .enum_literal_type, node),
91989198 .Int => {
9199 const signedness_ty = try gz.addBuiltinValue(node, .signedness);
9199 const signedness_ty = try gz.addStdLangValue(node, .signedness);
92009200 const result = try gz.addPlNode(.reify_int, node, Zir.Inst.Bin{
92019201 .lhs = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = signedness_ty } }, params[0], .int_signedness),
92029202 .rhs = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = .u16_type } }, params[1], .int_bit_width),
......@@ -9211,8 +9211,8 @@ fn builtinCall(
92119211 return rvalue(gz, ri, result, node);
92129212 },
92139213 .Pointer => {
9214 const ptr_size_ty = try gz.addBuiltinValue(node, .pointer_size);
9215 const ptr_attrs_ty = try gz.addBuiltinValue(node, .pointer_attributes);
9214 const ptr_size_ty = try gz.addStdLangValue(node, .pointer_size);
9215 const ptr_attrs_ty = try gz.addStdLangValue(node, .pointer_attributes);
92169216 const size = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = ptr_size_ty } }, params[0], .pointer_size);
92179217 const attrs = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = ptr_attrs_ty } }, params[1], .pointer_attrs);
92189218 const elem_ty = try typeExpr(gz, scope, params[2]);
......@@ -9231,7 +9231,7 @@ fn builtinCall(
92319231 return rvalue(gz, ri, result, node);
92329232 },
92339233 .Fn => {
9234 const fn_attrs_ty = try gz.addBuiltinValue(node, .fn_attributes);
9234 const fn_attrs_ty = try gz.addStdLangValue(node, .fn_attributes);
92359235 const param_types = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = .slice_const_type_type } }, params[0], .fn_param_types);
92369236 const param_attrs_ty = try gz.addExtendedPayloadSmall(
92379237 .reify_slice_arg_ty,
......@@ -9251,7 +9251,7 @@ fn builtinCall(
92519251 return rvalue(gz, ri, result, node);
92529252 },
92539253 .Struct => {
9254 const container_layout_ty = try gz.addBuiltinValue(node, .container_layout);
9254 const container_layout_ty = try gz.addStdLangValue(node, .container_layout);
92559255 const layout = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = container_layout_ty } }, params[0], .struct_layout);
92569256 const backing_ty = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = .optional_type_type } }, params[1], .type);
92579257 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(
92799279 return rvalue(gz, ri, result, node);
92809280 },
92819281 .Union => {
9282 const container_layout_ty = try gz.addBuiltinValue(node, .container_layout);
9282 const container_layout_ty = try gz.addStdLangValue(node, .container_layout);
92839283 const layout = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = container_layout_ty } }, params[0], .union_layout);
92849284 const arg_ty = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = .optional_type_type } }, params[1], .type);
92859285 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(
93079307 return rvalue(gz, ri, result, node);
93089308 },
93099309 .Enum => {
9310 const enum_mode_ty = try gz.addBuiltinValue(node, .enum_mode);
9310 const enum_mode_ty = try gz.addStdLangValue(node, .enum_mode);
93119311 const tag_ty = try typeExpr(gz, scope, params[0]);
93129312 const mode = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = enum_mode_ty } }, params[1], .type);
93139313 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(
94259425 return rvalue(gz, ri, result, node);
94269426 },
94279427 .reduce => {
9428 const reduce_op_ty = try gz.addBuiltinValue(node, .reduce_op);
9428 const reduce_op_ty = try gz.addStdLangValue(node, .reduce_op);
94299429 const op = try expr(gz, scope, .{ .rl = .{ .coerced_ty = reduce_op_ty } }, params[0]);
94309430 const scalar = try expr(gz, scope, .{ .rl = .none }, params[1]);
94319431 const result = try gz.addPlNode(.reduce, node, Zir.Inst.Bin{
......@@ -9441,7 +9441,7 @@ fn builtinCall(
94419441 .shl_with_overflow => return overflowArithmetic(gz, scope, ri, node, params, .shl_with_overflow),
94429442
94439443 .atomic_load => {
9444 const atomic_order_type = try gz.addBuiltinValue(node, .atomic_order);
9444 const atomic_order_type = try gz.addStdLangValue(node, .atomic_order);
94459445 const result = try gz.addPlNode(.atomic_load, node, Zir.Inst.AtomicLoad{
94469446 // zig fmt: off
94479447 .elem_type = try typeExpr(gz, scope, params[0]),
......@@ -9452,8 +9452,8 @@ fn builtinCall(
94529452 return rvalue(gz, ri, result, node);
94539453 },
94549454 .atomic_rmw => {
9455 const atomic_order_type = try gz.addBuiltinValue(node, .atomic_order);
9456 const atomic_rmw_op_type = try gz.addBuiltinValue(node, .atomic_rmw_op);
9455 const atomic_order_type = try gz.addStdLangValue(node, .atomic_order);
9456 const atomic_rmw_op_type = try gz.addStdLangValue(node, .atomic_rmw_op);
94579457 const int_type = try typeExpr(gz, scope, params[0]);
94589458 const result = try gz.addPlNode(.atomic_rmw, node, Zir.Inst.AtomicRmw{
94599459 // zig fmt: off
......@@ -9466,7 +9466,7 @@ fn builtinCall(
94669466 return rvalue(gz, ri, result, node);
94679467 },
94689468 .atomic_store => {
9469 const atomic_order_type = try gz.addBuiltinValue(node, .atomic_order);
9469 const atomic_order_type = try gz.addStdLangValue(node, .atomic_order);
94709470 const int_type = try typeExpr(gz, scope, params[0]);
94719471 _ = try gz.addPlNode(.atomic_store, node, Zir.Inst.AtomicStore{
94729472 // zig fmt: off
......@@ -9490,7 +9490,7 @@ fn builtinCall(
94909490 return rvalue(gz, ri, result, node);
94919491 },
94929492 .call => {
9493 const call_modifier_ty = try gz.addBuiltinValue(node, .call_modifier);
9493 const call_modifier_ty = try gz.addStdLangValue(node, .call_modifier);
94949494 const modifier = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = call_modifier_ty } }, params[0], .call_modifier);
94959495 const callee = try expr(gz, scope, .{ .rl = .none }, params[1]);
94969496 const args = try expr(gz, scope, .{ .rl = .none }, params[2]);
......@@ -9567,7 +9567,7 @@ fn builtinCall(
95679567 return rvalue(gz, ri, result, node);
95689568 },
95699569 .prefetch => {
9570 const prefetch_options_ty = try gz.addBuiltinValue(node, .prefetch_options);
9570 const prefetch_options_ty = try gz.addStdLangValue(node, .prefetch_options);
95719571 const ptr = try expr(gz, scope, .{ .rl = .none }, params[0]);
95729572 const options = try comptimeExpr(gz, scope, .{ .rl = .{ .coerced_ty = prefetch_options_ty } }, params[1], .prefetch_options);
95739573 _ = try gz.addExtendedPayload(.prefetch, Zir.Inst.BinNode{
......@@ -9800,7 +9800,7 @@ fn cmpxchg(
98009800 small: u16,
98019801) InnerError!Zir.Inst.Ref {
98029802 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);
98049804 const result = try gz.addExtendedPayloadSmall(.cmpxchg, small, Zir.Inst.Cmpxchg{
98059805 // zig fmt: off
98069806 .node = gz.nodeIndexToRelative(node),
......@@ -9925,7 +9925,7 @@ fn callExpr(
99259925 const astgen = gz.astgen;
99269926
99279927 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: {
99299929 if (gz.nosuspend_node != .none) {
99309930 break :blk .no_suspend;
99319931 }
......@@ -11801,8 +11801,8 @@ const GenZir = struct {
1180111801 return new_index;
1180211802 }
1180311803
11804 fn addBuiltinValue(gz: *GenZir, src_node: Ast.Node.Index, val: Zir.Inst.BuiltinValue) !Zir.Inst.Ref {
11805 return addExtendedNodeSmall(gz, .builtin_value, src_node, @intFromEnum(val));
11804 fn addStdLangValue(gz: *GenZir, src_node: Ast.Node.Index, val: Zir.Inst.StdLangValue) !Zir.Inst.Ref {
11805 return addExtendedNodeSmall(gz, .std_lang_value, src_node, @intFromEnum(val));
1180611806 }
1180711807
1180811808 fn addExtendedPayload(gz: *GenZir, opcode: Zir.Inst.Extended, extra: anytype) !Zir.Inst.Ref {
......@@ -12350,7 +12350,7 @@ const GenZir = struct {
1235012350 fn setStruct(gz: *GenZir, inst: Zir.Inst.Index, args: struct {
1235112351 src_node: Ast.Node.Index,
1235212352 name_strat: Zir.Inst.NameStrategy,
12353 layout: std.builtin.Type.ContainerLayout,
12353 layout: std.lang.Type.ContainerLayout,
1235412354 backing_int_type_body_len: ?u32,
1235512355 decls_len: u32,
1235612356 fields_len: u32,
lib/std/zig/LibCInstallation.zig+2-2
......@@ -708,8 +708,8 @@ pub const CrtBasenames = struct {
708708 pub const GetArgs = struct {
709709 target: *const std.Target,
710710 link_libc: bool,
711 output_mode: std.builtin.OutputMode,
712 link_mode: std.builtin.LinkMode,
711 output_mode: std.lang.OutputMode,
712 link_mode: std.lang.LinkMode,
713713 pie: bool,
714714 };
715715
lib/std/zig/Zir.zig+15-15
......@@ -2119,10 +2119,10 @@ pub const Inst = struct {
21192119 /// Guaranteed to not have the `ptr_cast` flag.
21202120 /// Uses the `pl_node` union field with payload `FieldParentPtr`.
21212121 field_parent_ptr,
2122 /// Get a type or value from `std.builtin`.
2122 /// Get a type or value from `std.lang`.
21232123 /// `operand` is `src_node: Ast.Node.Offset`.
2124 /// `small` is an `Inst.BuiltinValue`.
2125 builtin_value,
2124 /// `small` is an `Inst.StdLangValue`.
2125 std_lang_value,
21262126 /// Provide a `@branchHint` for the current block.
21272127 /// `operand` is payload index to `UnNode`.
21282128 /// `small` is unused.
......@@ -2418,7 +2418,7 @@ pub const Inst = struct {
24182418 has_bit_range: bool,
24192419 _: u1 = 0,
24202420 },
2421 size: std.builtin.Type.Pointer.Size,
2421 size: std.lang.Type.Pointer.Size,
24222422 /// Index into extra. See `PtrType`.
24232423 payload_index: u32,
24242424 },
......@@ -2426,7 +2426,7 @@ pub const Inst = struct {
24262426 /// Offset from Decl AST node index.
24272427 /// `Tag` determines which kind of AST node this points to.
24282428 src_node: Ast.Node.Offset,
2429 signedness: std.builtin.Signedness,
2429 signedness: std.lang.Signedness,
24302430 bit_count: u16,
24312431 },
24322432 @"unreachable": struct {
......@@ -3051,7 +3051,7 @@ pub const Inst = struct {
30513051 callee: Ref,
30523052
30533053 pub const Flags = packed struct {
3054 /// std.builtin.CallModifier in packed form
3054 /// std.lang.CallModifier in packed form
30553055 pub const PackedModifier = u3;
30563056 pub const PackedArgsLen = u27;
30573057
......@@ -3063,7 +3063,7 @@ pub const Inst = struct {
30633063 comptime {
30643064 if (@sizeOf(Flags) != 4 or @bitSizeOf(Flags) != 32)
30653065 @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))
30673067 @compileError("Call.Flags.PackedModifier needs to be updated!");
30683068 }
30693069 };
......@@ -3186,7 +3186,7 @@ pub const Inst = struct {
31863186
31873187 pub const ReifySliceArgInfo = enum(u16) {
31883188 /// 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`.
31903190 type_to_fn_param_attrs,
31913191 /// Input element type is `[]const u8`.
31923192 /// Output element type is `type`.
......@@ -3194,10 +3194,10 @@ pub const Inst = struct {
31943194 /// Identical to `string_to_struct_field_type` aside from emitting slightly different error messages.
31953195 string_to_union_field_type,
31963196 /// 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`.
31983198 string_to_struct_field_attrs,
31993199 /// 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`.
32013201 string_to_union_field_attrs,
32023202 };
32033203
......@@ -3468,7 +3468,7 @@ pub const Inst = struct {
34683468 has_decls_len: bool,
34693469 has_fields_len: bool,
34703470 name_strategy: NameStrategy,
3471 layout: std.builtin.Type.ContainerLayout,
3471 layout: std.lang.Type.ContainerLayout,
34723472 /// Always `false` if `layout != .@"packed"`.
34733473 has_backing_int_type: bool,
34743474 any_field_aligns: bool,
......@@ -3564,7 +3564,7 @@ pub const Inst = struct {
35643564 }
35653565 };
35663566
3567 pub const BuiltinValue = enum(u16) {
3567 pub const StdLangValue = enum(u16) {
35683568 // Types
35693569 atomic_order,
35703570 atomic_rmw_op,
......@@ -3688,7 +3688,7 @@ pub const Inst = struct {
36883688 };
36893689 }
36903690
3691 pub fn layout(k: Kind) std.builtin.Type.ContainerLayout {
3691 pub fn layout(k: Kind) std.lang.Type.ContainerLayout {
36923692 return switch (k) {
36933693 .auto, .tagged_explicit, .tagged_enum, .tagged_enum_explicit => .auto,
36943694 .@"extern" => .@"extern",
......@@ -4368,7 +4368,7 @@ fn findTrackableInner(
43684368 .restore_err_ret_index,
43694369 .closure_get,
43704370 .field_parent_ptr,
4371 .builtin_value,
4371 .std_lang_value,
43724372 .branch_hint,
43734373 .inplace_arith_result_ty,
43744374 .tuple_decl,
......@@ -5286,7 +5286,7 @@ pub const UnwrappedStructDecl = struct {
52865286
52875287 decls: []const Inst.Index,
52885288
5289 layout: std.builtin.Type.ContainerLayout,
5289 layout: std.lang.Type.ContainerLayout,
52905290 backing_int_type_body: ?[]const Inst.Index,
52915291
52925292 field_names: []const NullTerminatedString,
lib/std/zig/llvm/Builder.zig+1-1
......@@ -1830,7 +1830,7 @@ pub const Visibility = enum(u2) {
18301830 hidden = 1,
18311831 protected = 2,
18321832
1833 pub fn fromSymbolVisibility(sv: std.builtin.SymbolVisibility) Visibility {
1833 pub fn fromSymbolVisibility(sv: std.lang.SymbolVisibility) Visibility {
18341834 return switch (sv) {
18351835 .default => .default,
18361836 .hidden => .hidden,
src/Air.zig+15-15
......@@ -1260,17 +1260,17 @@ pub const Inst = struct {
12601260 },
12611261 atomic_load: struct {
12621262 ptr: Ref,
1263 order: std.builtin.AtomicOrder,
1263 order: std.lang.AtomicOrder,
12641264 },
12651265 prefetch: struct {
12661266 ptr: Ref,
1267 rw: std.builtin.PrefetchOptions.Rw,
1267 rw: std.lang.PrefetchOptions.Rw,
12681268 locality: u2,
1269 cache: std.builtin.PrefetchOptions.Cache,
1269 cache: std.lang.PrefetchOptions.Cache,
12701270 },
12711271 reduce: struct {
12721272 operand: Ref,
1273 operation: std.builtin.ReduceOp,
1273 operation: std.lang.ReduceOp,
12741274 },
12751275 ty_nav: struct {
12761276 ty: InternPool.Index,
......@@ -1332,8 +1332,8 @@ pub const CondBr = struct {
13321332 else_body_len: u32,
13331333 branch_hints: BranchHints,
13341334 pub const BranchHints = packed struct(u32) {
1335 true: std.builtin.BranchHint = .none,
1336 false: std.builtin.BranchHint = .none,
1335 true: std.lang.BranchHint = .none,
1336 false: std.lang.BranchHint = .none,
13371337 then_cov: CoveragePoint = .none,
13381338 else_cov: CoveragePoint = .none,
13391339 _: u24 = 0,
......@@ -1481,7 +1481,7 @@ pub const Asm = struct {
14811481 /// Length of the assembly source in bytes.
14821482 source_len: u32,
14831483 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.
14851485 clobbers: InternPool.Index,
14861486 flags: Flags,
14871487
......@@ -1499,11 +1499,11 @@ pub const Cmpxchg = struct {
14991499 /// 0b00000000000000000000000000XXX000 - failure_order
15001500 flags: u32,
15011501
1502 pub fn successOrder(self: Cmpxchg) std.builtin.AtomicOrder {
1502 pub fn successOrder(self: Cmpxchg) std.lang.AtomicOrder {
15031503 return @enumFromInt(@as(u3, @truncate(self.flags)));
15041504 }
15051505
1506 pub fn failureOrder(self: Cmpxchg) std.builtin.AtomicOrder {
1506 pub fn failureOrder(self: Cmpxchg) std.lang.AtomicOrder {
15071507 return @enumFromInt(@as(u3, @intCast(self.flags >> 3)));
15081508 }
15091509};
......@@ -1514,11 +1514,11 @@ pub const AtomicRmw = struct {
15141514 /// 0b0000000000000000000000000XXXX000 - op
15151515 flags: u32,
15161516
1517 pub fn ordering(self: AtomicRmw) std.builtin.AtomicOrder {
1517 pub fn ordering(self: AtomicRmw) std.lang.AtomicOrder {
15181518 return @enumFromInt(@as(u3, @truncate(self.flags)));
15191519 }
15201520
1521 pub fn op(self: AtomicRmw) std.builtin.AtomicRmwOp {
1521 pub fn op(self: AtomicRmw) std.lang.AtomicRmwOp {
15221522 return @enumFromInt(@as(u4, @intCast(self.flags >> 3)));
15231523 }
15241524};
......@@ -2077,14 +2077,14 @@ pub const UnwrappedSwitch = struct {
20772077 cases_start: u32,
20782078
20792079 /// 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 {
20812081 assert(case_idx < us.cases_len);
20822082 return us.getHintInner(case_idx);
20832083 }
2084 pub fn getElseHint(us: UnwrappedSwitch) std.builtin.BranchHint {
2084 pub fn getElseHint(us: UnwrappedSwitch) std.lang.BranchHint {
20852085 return us.getHintInner(us.cases_len);
20862086 }
2087 fn getHintInner(us: UnwrappedSwitch, idx: u32) std.builtin.BranchHint {
2087 fn getHintInner(us: UnwrappedSwitch, idx: u32) std.lang.BranchHint {
20882088 const bag = us.air.extra.items[us.branch_hints_start..][idx / 10];
20892089 const bits: u3 = @truncate(bag >> @intCast(3 * (idx % 10)));
20902090 return @enumFromInt(bits);
......@@ -2630,7 +2630,7 @@ pub const CompilerRtFunc = enum(u32) {
26302630 };
26312631 }
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 {
26342634 const use_gnu_f16_abi = switch (target.cpu.arch) {
26352635 .wasm32,
26362636 .wasm64,
src/Air/Legalize.zig+1-1
......@@ -2644,7 +2644,7 @@ const Block = struct {
26442644 });
26452645 return;
26462646 }
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());
26482648 _ = b.add(l, .{
26492649 .tag = .call,
26502650 .data = .{ .pl_op = .{
src/Air/print.zig+1-1
......@@ -625,7 +625,7 @@ const Writer = struct {
625625 w: *Writer,
626626 s: *std.Io.Writer,
627627 inst: Air.Inst.Index,
628 order: std.builtin.AtomicOrder,
628 order: std.lang.AtomicOrder,
629629 ) Error!void {
630630 const bin_op = w.air.instructions.items(.data)[@intFromEnum(inst)].bin_op;
631631 try w.writeOperand(s, inst, 0, bin_op.lhs);
src/Builtin.zig+15-15
......@@ -1,13 +1,13 @@
11target: std.Target,
2zig_backend: std.builtin.CompilerBackend,
3output_mode: std.builtin.OutputMode,
4link_mode: std.builtin.LinkMode,
5unwind_tables: std.builtin.UnwindTables,
2zig_backend: std.lang.CompilerBackend,
3output_mode: std.lang.OutputMode,
4link_mode: std.lang.LinkMode,
5unwind_tables: std.lang.UnwindTables,
66is_test: bool,
77single_threaded: bool,
88link_libc: bool,
99link_libcpp: bool,
10optimize_mode: std.builtin.OptimizeMode,
10optimize_mode: std.lang.OptimizeMode,
1111error_tracing: bool,
1212valgrind: bool,
1313sanitize_thread: bool,
......@@ -15,9 +15,9 @@ fuzz: bool,
1515pic: bool,
1616pie: bool,
1717strip: bool,
18code_model: std.builtin.CodeModel,
18code_model: std.lang.CodeModel,
1919omit_frame_pointer: bool,
20wasi_exec_model: std.builtin.WasiExecModel,
20wasi_exec_model: std.lang.WasiExecModel,
2121
2222/// Compute an abstract hash representing this `Builtin`. This is *not* a hash
2323/// of the resulting file contents.
......@@ -57,11 +57,11 @@ pub fn append(opts: @This(), buffer: *std.array_list.Managed(u8)) Allocator.Erro
5757 \\/// feature detection (i.e. with `@hasDecl` or `@hasField`) over version checks.
5858 \\pub const zig_version = std.SemanticVersion.parse(zig_version_string) catch unreachable;
5959 \\pub const zig_version_string = "{s}";
60 \\pub const zig_backend = std.builtin.CompilerBackend.{f};
60 \\pub const zig_backend = std.lang.CompilerBackend.{f};
6161 \\
62 \\pub const output_mode: std.builtin.OutputMode = .{f};
63 \\pub const link_mode: std.builtin.LinkMode = .{f};
64 \\pub const unwind_tables: std.builtin.UnwindTables = .{f};
62 \\pub const output_mode: std.lang.OutputMode = .{f};
63 \\pub const link_mode: std.lang.LinkMode = .{f};
64 \\pub const unwind_tables: std.lang.UnwindTables = .{f};
6565 \\pub const is_test = {};
6666 \\pub const single_threaded = {};
6767 \\pub const abi: std.Target.Abi = .{f};
......@@ -239,7 +239,7 @@ pub fn append(opts: @This(), buffer: *std.array_list.Managed(u8)) Allocator.Erro
239239
240240 try buffer.print(
241241 \\pub const object_format: std.Target.ObjectFormat = .{f};
242 \\pub const mode: std.builtin.OptimizeMode = .{f};
242 \\pub const mode: std.lang.OptimizeMode = .{f};
243243 \\pub const link_libc = {};
244244 \\pub const link_libcpp = {};
245245 \\pub const have_error_return_tracing = {};
......@@ -249,7 +249,7 @@ pub fn append(opts: @This(), buffer: *std.array_list.Managed(u8)) Allocator.Erro
249249 \\pub const position_independent_code = {};
250250 \\pub const position_independent_executable = {};
251251 \\pub const strip_debug_info = {};
252 \\pub const code_model: std.builtin.CodeModel = .{f};
252 \\pub const code_model: std.lang.CodeModel = .{f};
253253 \\pub const omit_frame_pointer = {};
254254 \\
255255 , .{
......@@ -270,14 +270,14 @@ pub fn append(opts: @This(), buffer: *std.array_list.Managed(u8)) Allocator.Erro
270270
271271 if (target.os.tag == .wasi) {
272272 try buffer.print(
273 \\pub const wasi_exec_model: std.builtin.WasiExecModel = .{f};
273 \\pub const wasi_exec_model: std.lang.WasiExecModel = .{f};
274274 \\
275275 , .{std.zig.fmtIdPU(@tagName(opts.wasi_exec_model))});
276276 }
277277
278278 if (opts.is_test) {
279279 try buffer.appendSlice(
280 \\pub var test_functions: []const std.builtin.TestFn = &.{}; // overwritten later
280 \\pub var test_functions: []const std.lang.TestFn = &.{}; // overwritten later
281281 \\
282282 );
283283 }
src/Compilation.zig+12-12
......@@ -177,7 +177,7 @@ verbose_link: bool,
177177link_depfile: ?[]const u8,
178178disable_c_depfile: bool,
179179stack_report: bool,
180debug_compiler_runtime_libs: ?std.builtin.OptimizeMode,
180debug_compiler_runtime_libs: ?std.lang.OptimizeMode,
181181debug_compile_errors: bool,
182182/// Do not check this field directly. Instead, use the `debugIncremental` wrapper function.
183183debug_incremental: bool,
......@@ -1676,7 +1676,7 @@ pub const CreateOptions = struct {
16761676 verbose_llvm_bc: ?[]const u8 = null,
16771677 link_depfile: ?[]const u8 = null,
16781678 verbose_llvm_cpu_features: bool = false,
1679 debug_compiler_runtime_libs: ?std.builtin.OptimizeMode = null,
1679 debug_compiler_runtime_libs: ?std.lang.OptimizeMode = null,
16801680 debug_compile_errors: bool = false,
16811681 debug_incremental: bool = false,
16821682 /// Normally when you create a `Compilation`, Zig will automatically build
......@@ -4928,8 +4928,8 @@ fn workerDocsWasmFallible(comp: *Compilation, prog_node: std.Progress.Node) SubU
49284928 defer arena_allocator.deinit();
49294929 const arena = arena_allocator.allocator();
49304930
4931 const optimize_mode = std.builtin.OptimizeMode.ReleaseSmall;
4932 const output_mode = std.builtin.OutputMode.Exe;
4931 const optimize_mode = std.lang.OptimizeMode.ReleaseSmall;
4932 const output_mode = std.lang.OutputMode.Exe;
49334933 const resolved_target: Package.Module.ResolvedTarget = .{
49344934 .result = std.zig.system.resolveTargetQuery(io, .{
49354935 .cpu_arch = .wasm32,
......@@ -5285,8 +5285,8 @@ fn buildRt(
52855285 comp: *Compilation,
52865286 root_source_name: []const u8,
52875287 root_name: []const u8,
5288 output_mode: std.builtin.OutputMode,
5289 link_mode: std.builtin.LinkMode,
5288 output_mode: std.lang.OutputMode,
5289 link_mode: std.lang.LinkMode,
52905290 misc_task: MiscTask,
52915291 prog_node: std.Progress.Node,
52925292 options: RtOptions,
......@@ -7260,7 +7260,7 @@ fn dumpArgvWriter(w: *Io.Writer, argv: []const []const u8) Io.Writer.Error!void
72607260 try w.writeByte('\n');
72617261}
72627262
7263pub fn getZigBackend(comp: Compilation) std.builtin.CompilerBackend {
7263pub fn getZigBackend(comp: Compilation) std.lang.CompilerBackend {
72647264 const target = &comp.root_mod.resolved_target.result;
72657265 return target_util.zigBackend(target, comp.config.use_llvm);
72667266}
......@@ -7302,8 +7302,8 @@ fn buildOutputFromZig(
73027302 comp: *Compilation,
73037303 src_basename: []const u8,
73047304 root_name: []const u8,
7305 output_mode: std.builtin.OutputMode,
7306 link_mode: std.builtin.LinkMode,
7305 output_mode: std.lang.OutputMode,
7306 link_mode: std.lang.LinkMode,
73077307 misc_task_tag: MiscTask,
73087308 prog_node: std.Progress.Node,
73097309 options: RtOptions,
......@@ -7433,7 +7433,7 @@ pub const CrtFileOptions = struct {
74337433 function_sections: bool = true,
74347434 data_sections: bool = true,
74357435 omit_frame_pointer: ?bool = null,
7436 unwind_tables: ?std.builtin.UnwindTables = null,
7436 unwind_tables: ?std.lang.UnwindTables = null,
74377437 pic: ?bool = null,
74387438 no_builtin: ?bool = null,
74397439
......@@ -7443,7 +7443,7 @@ pub const CrtFileOptions = struct {
74437443pub fn build_crt_file(
74447444 comp: *Compilation,
74457445 root_name: []const u8,
7446 output_mode: std.builtin.OutputMode,
7446 output_mode: std.lang.OutputMode,
74477447 misc_task_tag: MiscTask,
74487448 prog_node: std.Progress.Node,
74497449 /// 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 {
76577657
76587658/// This decides the optimization mode for all zig-provided libraries, including
76597659/// compiler-rt, libcxx, libc, libunwind, etc.
7660pub fn compilerRtOptMode(comp: Compilation) std.builtin.OptimizeMode {
7660pub fn compilerRtOptMode(comp: Compilation) std.lang.OptimizeMode {
76617661 if (comp.debug_compiler_runtime_libs) |mode| {
76627662 return mode;
76637663 }
src/Compilation/Config.zig+8-8
......@@ -4,8 +4,8 @@
44//! order to resolve per-Module defaults.
55
66have_zcu: bool,
7output_mode: std.builtin.OutputMode,
8link_mode: std.builtin.LinkMode,
7output_mode: std.lang.OutputMode,
8link_mode: std.lang.LinkMode,
99link_libc: bool,
1010link_libcpp: bool,
1111link_libunwind: bool,
......@@ -53,13 +53,13 @@ lto: std.zig.LtoMode,
5353incremental: bool,
5454/// WASI-only. Type of WASI execution model ("command" or "reactor").
5555/// Always set to `command` for non-WASI targets.
56wasi_exec_model: std.builtin.WasiExecModel,
56wasi_exec_model: std.lang.WasiExecModel,
5757import_memory: bool,
5858export_memory: bool,
5959shared_memory: bool,
6060is_test: bool,
6161debug_format: DebugFormat,
62root_optimize_mode: std.builtin.OptimizeMode,
62root_optimize_mode: std.lang.OptimizeMode,
6363root_strip: bool,
6464root_error_tracing: bool,
6565dll_export_fns: bool,
......@@ -75,15 +75,15 @@ pub const DebugFormat = union(enum) {
7575};
7676
7777pub const Options = struct {
78 output_mode: std.builtin.OutputMode,
78 output_mode: std.lang.OutputMode,
7979 resolved_target: Module.ResolvedTarget,
8080 is_test: bool,
8181 have_zcu: bool,
8282 emit_bin: bool,
83 root_optimize_mode: ?std.builtin.OptimizeMode = null,
83 root_optimize_mode: ?std.lang.OptimizeMode = null,
8484 root_strip: ?bool = null,
8585 root_error_tracing: ?bool = null,
86 link_mode: ?std.builtin.LinkMode = null,
86 link_mode: ?std.lang.LinkMode = null,
8787 ensure_libc_on_non_freestanding: bool = false,
8888 ensure_libcpp_on_non_freestanding: bool = false,
8989 any_non_single_threaded: bool = false,
......@@ -109,7 +109,7 @@ pub const Options = struct {
109109 lto: ?std.zig.LtoMode = null,
110110 incremental: bool = false,
111111 /// 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,
113113 import_memory: ?bool = null,
114114 export_memory: ?bool = null,
115115 shared_memory: ?bool = null,
src/InternPool.zig+54-54
......@@ -486,12 +486,12 @@ pub const AnalUnit = packed struct(u64) {
486486pub const MemoizedStateStage = enum(u32) {
487487 /// Everything other than panics and `VaList`.
488488 main,
489 /// Everything within `std.builtin.Panic`.
489 /// Everything within `std.lang.Panic`.
490490 /// Since the panic handler is user-provided, this must be able to reference the other memoized state.
491491 panic,
492 /// Specifically `std.builtin.VaList`. See `Zcu.BuiltinDecl.stage`.
492 /// Specifically `std.lang.VaList`. See `Zcu.StdLangDecl.stage`.
493493 va_list,
494 /// Everything within `std.builtin.assembly`. See `Zcu.BuiltinDecl.stage`.
494 /// Everything within `std.lang.assembly`. See `Zcu.StdLangDecl.stage`.
495495 assembly,
496496};
497497
......@@ -566,7 +566,7 @@ pub const Nav = struct {
566566 type: InternPool.Index,
567567 @"align": Alignment,
568568 @"linksection": OptionalNullTerminatedString,
569 @"addrspace": std.builtin.AddressSpace,
569 @"addrspace": std.lang.AddressSpace,
570570 @"const": bool,
571571 @"threadlocal": bool,
572572 /// This field is whether this `Nav` is a literal `extern` definition.
......@@ -678,7 +678,7 @@ pub const Nav = struct {
678678
679679 const Bits = packed struct(u16) {
680680 @"align": Alignment,
681 @"addrspace": std.builtin.AddressSpace,
681 @"addrspace": std.lang.AddressSpace,
682682 @"const": bool,
683683 @"threadlocal": bool,
684684 is_extern_decl: bool,
......@@ -1084,7 +1084,7 @@ const Local = struct {
10841084 }
10851085 }
10861086 fn PtrElem(comptime opts: struct {
1087 size: std.builtin.Type.Pointer.Size,
1087 size: std.lang.Type.Pointer.Size,
10881088 is_const: bool = false,
10891089 }) type {
10901090 const elem_info = @typeInfo(Elem).@"struct";
......@@ -2029,7 +2029,7 @@ pub const Key = union(enum) {
20292029 val: Index,
20302030 };
20312031
2032 pub const IntType = std.builtin.Type.Int;
2032 pub const IntType = std.lang.Type.Int;
20332033
20342034 /// Extern for hashing via memory reinterpretation.
20352035 pub const ErrorUnionType = extern struct {
......@@ -2090,8 +2090,8 @@ pub const Key = union(enum) {
20902090 bit_offset: u16,
20912091 };
20922092
2093 pub const Size = std.builtin.Type.Pointer.Size;
2094 pub const AddressSpace = std.builtin.AddressSpace;
2093 pub const Size = std.lang.Type.Pointer.Size;
2094 pub const AddressSpace = std.lang.AddressSpace;
20952095 };
20962096
20972097 /// Extern so that hashing can be done via memory reinterpreting.
......@@ -2160,7 +2160,7 @@ pub const Key = union(enum) {
21602160 /// Tells whether a parameter is noalias. See `paramIsNoalias` helper
21612161 /// method for accessing this.
21622162 noalias_bits: u32,
2163 cc: std.builtin.CallingConvention,
2163 cc: std.lang.CallingConvention,
21642164 is_var_args: bool,
21652165 is_noinline: bool,
21662166
......@@ -2207,15 +2207,15 @@ pub const Key = union(enum) {
22072207 /// For example `extern "c" fn write(...) usize` would have 'c' as library name.
22082208 /// Index into the string table bytes.
22092209 lib_name: OptionalNullTerminatedString,
2210 linkage: std.builtin.GlobalLinkage,
2211 visibility: std.builtin.SymbolVisibility,
2210 linkage: std.lang.GlobalLinkage,
2211 visibility: std.lang.SymbolVisibility,
22122212 is_threadlocal: bool,
22132213 is_dll_import: bool,
2214 relocation: std.builtin.ExternOptions.Relocation,
2215 decoration: ?std.builtin.ExternOptions.Decoration,
2214 relocation: std.lang.ExternOptions.Relocation,
2215 decoration: ?std.lang.ExternOptions.Decoration,
22162216 is_const: bool,
22172217 alignment: Alignment,
2218 @"addrspace": std.builtin.AddressSpace,
2218 @"addrspace": std.lang.AddressSpace,
22192219 /// The ZIR instruction which created this extern; used only for source locations.
22202220 /// This is a `declaration`.
22212221 zir_index: TrackedInst.Index,
......@@ -2289,7 +2289,7 @@ pub const Key = union(enum) {
22892289 return @atomicLoad(FuncAnalysis, func.analysisPtr(ip), .unordered);
22902290 }
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 {
22932293 const extra_mutex = &ip.getLocal(func.tid).mutate.extra.mutex;
22942294 extra_mutex.lockUncancelable(io);
22952295 defer extra_mutex.unlock(io);
......@@ -3186,7 +3186,7 @@ pub const LoadedStructType = struct {
31863186 name_nav: Nav.Index.Optional,
31873187 namespace: NamespaceIndex,
31883188
3189 layout: std.builtin.Type.ContainerLayout,
3189 layout: std.lang.Type.ContainerLayout,
31903190 /// May be `undefined` if `layout != .@"packed"`.
31913191 packed_backing_mode: BackingTypeMode,
31923192
......@@ -3369,7 +3369,7 @@ pub const LoadedUnionType = struct {
33693369 name_nav: Nav.Index.Optional,
33703370 namespace: NamespaceIndex,
33713371
3372 layout: std.builtin.Type.ContainerLayout,
3372 layout: std.lang.Type.ContainerLayout,
33733373 enum_tag_mode: BackingTypeMode,
33743374 /// May be `undefined` if `layout != .@"packed"`.
33753375 packed_backing_mode: BackingTypeMode,
......@@ -5368,10 +5368,10 @@ pub const Tag = enum(u8) {
53685368 descriptor_binding: u32,
53695369
53705370 pub const Flags = packed struct(u32) {
5371 linkage: std.builtin.GlobalLinkage,
5372 visibility: std.builtin.SymbolVisibility,
5371 linkage: std.lang.GlobalLinkage,
5372 visibility: std.lang.SymbolVisibility,
53735373 is_dll_import: bool,
5374 relocation: std.builtin.ExternOptions.Relocation,
5374 relocation: std.lang.ExternOptions.Relocation,
53755375 source: Source,
53765376 decoration_type: DecorationType,
53775377 _: u23 = 0,
......@@ -5380,13 +5380,13 @@ pub const Tag = enum(u8) {
53805380 pub const DecorationType = enum(u2) { none, location, descriptor };
53815381 };
53825382
5383 pub fn decoration(self: Extern) ?std.builtin.ExternOptions.Decoration {
5383 pub fn decoration(self: Extern) ?std.lang.ExternOptions.Decoration {
53845384 return switch (self.flags.decoration_type) {
53855385 .none => null,
5386 .location => std.builtin.ExternOptions.Decoration{
5386 .location => std.lang.ExternOptions.Decoration{
53875387 .location = self.location_or_descriptor_set,
53885388 },
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 } },
53905390 };
53915391 }
53925392 };
......@@ -5711,7 +5711,7 @@ pub const BackingTypeMode = enum(u1) {
57115711/// to be part of the type of the function.
57125712pub const FuncAnalysis = packed struct(u32) {
57135713 want_runtime_analysis: bool,
5714 branch_hint: std.builtin.BranchHint,
5714 branch_hint: std.lang.BranchHint,
57155715 is_noinline: bool,
57165716 has_error_trace: bool,
57175717 /// True if this function has an inferred error set.
......@@ -7980,7 +7980,7 @@ pub fn getDeclaredStructType(
79807980 // InternPool, so that it is possible for their backing storage to be "reallocated" as needed
79817981 // during type resolution.
79827982 fields_len: u32,
7983 layout: std.builtin.Type.ContainerLayout,
7983 layout: std.lang.Type.ContainerLayout,
79847984 any_comptime_fields: bool,
79857985 any_field_defaults: bool,
79867986 any_field_aligns: bool,
......@@ -8124,7 +8124,7 @@ pub fn getReifiedStructType(ip: *InternPool, gpa: Allocator, io: Io, tid: Zcu.Pe
81248124 zir_index: TrackedInst.Index,
81258125 type_hash: u64,
81268126 fields_len: u32,
8127 layout: std.builtin.Type.ContainerLayout,
8127 layout: std.lang.Type.ContainerLayout,
81288128 any_comptime_fields: bool,
81298129 any_field_defaults: bool,
81308130 any_field_aligns: bool,
......@@ -8300,7 +8300,7 @@ pub fn getDeclaredUnionType(
83008300 // InternPool, so that it is possible for their backing storage to be "reallocated" as needed
83018301 // during type resolution.
83028302 fields_len: u32,
8303 layout: std.builtin.Type.ContainerLayout,
8303 layout: std.lang.Type.ContainerLayout,
83048304 any_field_aligns: bool,
83058305 tag_usage: LoadedUnionType.TagUsage,
83068306 enum_tag_mode: BackingTypeMode,
......@@ -8421,7 +8421,7 @@ pub fn getReifiedUnionType(ip: *InternPool, gpa: Allocator, io: Io, tid: Zcu.Per
84218421 zir_index: TrackedInst.Index,
84228422 type_hash: u64,
84238423 fields_len: u32,
8424 layout: std.builtin.Type.ContainerLayout,
8424 layout: std.lang.Type.ContainerLayout,
84258425 any_field_aligns: bool,
84268426 tag_usage: LoadedUnionType.TagUsage,
84278427 /// Explicitly specified enum tag type. `.none` if `tag_usage != .tagged`.
......@@ -8969,7 +8969,7 @@ pub const GetFuncTypeKey = struct {
89698969 comptime_bits: u32 = 0,
89708970 noalias_bits: u32 = 0,
89718971 /// `null` means generic.
8972 cc: ?std.builtin.CallingConvention = .auto,
8972 cc: ?std.lang.CallingConvention = .auto,
89738973 is_var_args: bool = false,
89748974 is_noinline: bool = false,
89758975};
......@@ -9117,7 +9117,7 @@ pub const GetFuncDeclKey = struct {
91179117 rbrace_line: u32,
91189118 lbrace_column: u32,
91199119 rbrace_column: u32,
9120 cc: ?std.builtin.CallingConvention,
9120 cc: ?std.lang.CallingConvention,
91219121 is_noinline: bool,
91229122};
91239123
......@@ -9193,7 +9193,7 @@ pub const GetFuncDeclIesKey = struct {
91939193 comptime_bits: u32,
91949194 bare_return_type: Index,
91959195 /// null means generic.
9196 cc: ?std.builtin.CallingConvention,
9196 cc: ?std.lang.CallingConvention,
91979197 is_var_args: bool,
91989198 is_noinline: bool,
91999199 zir_body_inst: TrackedInst.Index,
......@@ -11763,7 +11763,7 @@ pub fn getBackingAddrTag(ip: *const InternPool, val: Index) ?Key.Ptr.BaseAddr.Ta
1176311763/// This is a particularly hot function, so we operate directly on encodings
1176411764/// rather than the more straightforward implementation of calling `indexToKey`.
1176511765/// 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 {
1176711767 return switch (index) {
1176811768 .u0_type,
1176911769 .u1_type,
......@@ -12407,13 +12407,13 @@ pub fn getErrorValueIfExists(ip: *const InternPool, name: NullTerminatedString)
1240712407}
1240812408
1240912409const PackedCallingConvention = packed struct(u18) {
12410 tag: std.builtin.CallingConvention.Tag,
12410 tag: std.lang.CallingConvention.Tag,
1241112411 /// May be ignored depending on `tag`.
1241212412 incoming_stack_alignment: Alignment,
1241312413 /// Interpretation depends on `tag`.
1241412414 extra: u4,
1241512415
12416 fn pack(cc: std.builtin.CallingConvention) PackedCallingConvention {
12416 fn pack(cc: std.lang.CallingConvention) PackedCallingConvention {
1241712417 return switch (cc) {
1241812418 inline else => |pl, tag| switch (@TypeOf(pl)) {
1241912419 void => .{
......@@ -12421,42 +12421,42 @@ const PackedCallingConvention = packed struct(u18) {
1242112421 .incoming_stack_alignment = .none, // unused
1242212422 .extra = 0, // unused
1242312423 },
12424 std.builtin.CallingConvention.CommonOptions => .{
12424 std.lang.CallingConvention.CommonOptions => .{
1242512425 .tag = tag,
1242612426 .incoming_stack_alignment = .fromByteUnits(pl.incoming_stack_alignment orelse 0),
1242712427 .extra = 0, // unused
1242812428 },
12429 std.builtin.CallingConvention.X86RegparmOptions => .{
12429 std.lang.CallingConvention.X86RegparmOptions => .{
1243012430 .tag = tag,
1243112431 .incoming_stack_alignment = .fromByteUnits(pl.incoming_stack_alignment orelse 0),
1243212432 .extra = pl.register_params,
1243312433 },
12434 std.builtin.CallingConvention.ArcInterruptOptions => .{
12434 std.lang.CallingConvention.ArcInterruptOptions => .{
1243512435 .tag = tag,
1243612436 .incoming_stack_alignment = .fromByteUnits(pl.incoming_stack_alignment orelse 0),
1243712437 .extra = @intFromEnum(pl.type),
1243812438 },
12439 std.builtin.CallingConvention.ArmInterruptOptions => .{
12439 std.lang.CallingConvention.ArmInterruptOptions => .{
1244012440 .tag = tag,
1244112441 .incoming_stack_alignment = .fromByteUnits(pl.incoming_stack_alignment orelse 0),
1244212442 .extra = @intFromEnum(pl.type),
1244312443 },
12444 std.builtin.CallingConvention.MicroblazeInterruptOptions => .{
12444 std.lang.CallingConvention.MicroblazeInterruptOptions => .{
1244512445 .tag = tag,
1244612446 .incoming_stack_alignment = .fromByteUnits(pl.incoming_stack_alignment orelse 0),
1244712447 .extra = @intFromEnum(pl.type),
1244812448 },
12449 std.builtin.CallingConvention.MipsInterruptOptions => .{
12449 std.lang.CallingConvention.MipsInterruptOptions => .{
1245012450 .tag = tag,
1245112451 .incoming_stack_alignment = .fromByteUnits(pl.incoming_stack_alignment orelse 0),
1245212452 .extra = @intFromEnum(pl.mode),
1245312453 },
12454 std.builtin.CallingConvention.RiscvInterruptOptions => .{
12454 std.lang.CallingConvention.RiscvInterruptOptions => .{
1245512455 .tag = tag,
1245612456 .incoming_stack_alignment = .fromByteUnits(pl.incoming_stack_alignment orelse 0),
1245712457 .extra = @intFromEnum(pl.mode),
1245812458 },
12459 std.builtin.CallingConvention.ShInterruptOptions => .{
12459 std.lang.CallingConvention.ShInterruptOptions => .{
1246012460 .tag = tag,
1246112461 .incoming_stack_alignment = .fromByteUnits(pl.incoming_stack_alignment orelse 0),
1246212462 .extra = @intFromEnum(pl.save),
......@@ -12466,41 +12466,41 @@ const PackedCallingConvention = packed struct(u18) {
1246612466 };
1246712467 }
1246812468
12469 fn unpack(cc: PackedCallingConvention) std.builtin.CallingConvention {
12469 fn unpack(cc: PackedCallingConvention) std.lang.CallingConvention {
1247012470 return switch (cc.tag) {
1247112471 inline else => |tag| @unionInit(
12472 std.builtin.CallingConvention,
12472 std.lang.CallingConvention,
1247312473 @tagName(tag),
12474 switch (@FieldType(std.builtin.CallingConvention, @tagName(tag))) {
12474 switch (@FieldType(std.lang.CallingConvention, @tagName(tag))) {
1247512475 void => {},
12476 std.builtin.CallingConvention.CommonOptions => .{
12476 std.lang.CallingConvention.CommonOptions => .{
1247712477 .incoming_stack_alignment = cc.incoming_stack_alignment.toByteUnits(),
1247812478 },
12479 std.builtin.CallingConvention.X86RegparmOptions => .{
12479 std.lang.CallingConvention.X86RegparmOptions => .{
1248012480 .incoming_stack_alignment = cc.incoming_stack_alignment.toByteUnits(),
1248112481 .register_params = @intCast(cc.extra),
1248212482 },
12483 std.builtin.CallingConvention.ArcInterruptOptions => .{
12483 std.lang.CallingConvention.ArcInterruptOptions => .{
1248412484 .incoming_stack_alignment = cc.incoming_stack_alignment.toByteUnits(),
1248512485 .type = @enumFromInt(cc.extra),
1248612486 },
12487 std.builtin.CallingConvention.ArmInterruptOptions => .{
12487 std.lang.CallingConvention.ArmInterruptOptions => .{
1248812488 .incoming_stack_alignment = cc.incoming_stack_alignment.toByteUnits(),
1248912489 .type = @enumFromInt(cc.extra),
1249012490 },
12491 std.builtin.CallingConvention.MicroblazeInterruptOptions => .{
12491 std.lang.CallingConvention.MicroblazeInterruptOptions => .{
1249212492 .incoming_stack_alignment = cc.incoming_stack_alignment.toByteUnits(),
1249312493 .type = @enumFromInt(cc.extra),
1249412494 },
12495 std.builtin.CallingConvention.MipsInterruptOptions => .{
12495 std.lang.CallingConvention.MipsInterruptOptions => .{
1249612496 .incoming_stack_alignment = cc.incoming_stack_alignment.toByteUnits(),
1249712497 .mode = @enumFromInt(cc.extra),
1249812498 },
12499 std.builtin.CallingConvention.RiscvInterruptOptions => .{
12499 std.lang.CallingConvention.RiscvInterruptOptions => .{
1250012500 .incoming_stack_alignment = cc.incoming_stack_alignment.toByteUnits(),
1250112501 .mode = @enumFromInt(cc.extra),
1250212502 },
12503 std.builtin.CallingConvention.ShInterruptOptions => .{
12503 std.lang.CallingConvention.ShInterruptOptions => .{
1250412504 .incoming_stack_alignment = cc.incoming_stack_alignment.toByteUnits(),
1250512505 .save = @enumFromInt(cc.extra),
1250612506 },
src/Package/Module.zig+7-7
......@@ -15,8 +15,8 @@ fully_qualified_name: []const u8,
1515deps: Deps = .{},
1616
1717resolved_target: ResolvedTarget,
18optimize_mode: std.builtin.OptimizeMode,
19code_model: std.builtin.CodeModel,
18optimize_mode: std.lang.OptimizeMode,
19code_model: std.lang.CodeModel,
2020single_threaded: bool,
2121error_tracing: bool,
2222valgrind: bool,
......@@ -29,7 +29,7 @@ red_zone: bool,
2929sanitize_c: std.zig.SanitizeC,
3030sanitize_thread: bool,
3131fuzz: bool,
32unwind_tables: std.builtin.UnwindTables,
32unwind_tables: std.lang.UnwindTables,
3333cc_argv: []const []const u8,
3434/// (SPIR-V) whether to generate a structured control flow graph or not
3535structured_cfg: bool,
......@@ -61,8 +61,8 @@ pub const CreateOptions = struct {
6161 pub const Inherited = struct {
6262 /// If this is null then `parent` must be non-null.
6363 resolved_target: ?ResolvedTarget = null,
64 optimize_mode: ?std.builtin.OptimizeMode = null,
65 code_model: ?std.builtin.CodeModel = null,
64 optimize_mode: ?std.lang.OptimizeMode = null,
65 code_model: ?std.lang.CodeModel = null,
6666 single_threaded: ?bool = null,
6767 error_tracing: ?bool = null,
6868 valgrind: ?bool = null,
......@@ -75,7 +75,7 @@ pub const CreateOptions = struct {
7575 /// other number means stack protection with that buffer size.
7676 stack_protector: ?u32 = null,
7777 red_zone: ?bool = null,
78 unwind_tables: ?std.builtin.UnwindTables = null,
78 unwind_tables: ?std.lang.UnwindTables = null,
7979 sanitize_c: ?std.zig.SanitizeC = null,
8080 sanitize_thread: ?bool = null,
8181 fuzz: ?bool = null,
......@@ -238,7 +238,7 @@ pub fn create(arena: Allocator, options: CreateOptions) !*Package.Module {
238238 break :b false;
239239 };
240240
241 const code_model: std.builtin.CodeModel = b: {
241 const code_model: std.lang.CodeModel = b: {
242242 if (options.inherited.code_model) |x| break :b x;
243243 if (options.parent) |p| break :b p.code_model;
244244 break :b .default;
src/Sema.zig+228-228
......@@ -135,7 +135,7 @@ allow_memoize: bool = true,
135135
136136/// The `BranchHint` for the current branch of runtime control flow.
137137/// 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
140140const RuntimeIndex = enum(u32) {
141141 zero = 0,
......@@ -383,7 +383,7 @@ pub const Block = struct {
383383 want_safety: ?bool = null,
384384
385385 /// 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
388388 /// If not `null`, this boolean is set when a `dbg_var_ptr`, `dbg_var_val`, or `dbg_arg_inline`.
389389 /// instruction is emitted. It signals that the innermost lexically
......@@ -759,7 +759,7 @@ pub const Block = struct {
759759 });
760760 }
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 {
763763 const sema = block.sema;
764764 const zcu = sema.pt.zcu;
765765 const allow_optimized = switch (sema.typeOf(operand).childType(zcu).zigTypeTag(zcu)) {
......@@ -1023,7 +1023,7 @@ pub fn deinit(sema: *Sema) void {
10231023/// control flow happens here, Sema will convert it to runtime control flow by introducing post-hoc
10241024/// blocks where necessary.
10251025/// 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 {
10271027 const parent_hint = sema.branch_hint;
10281028 defer sema.branch_hint = parent_hint;
10291029 sema.branch_hint = null;
......@@ -1473,7 +1473,7 @@ fn analyzeBodyInner(
14731473 },
14741474 .value_placeholder => unreachable, // never appears in a body
14751475 .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),
14771477 .inplace_arith_result_ty => try sema.zirInplaceArithResultTy(extended),
14781478 .dbg_empty_stmt => {
14791479 try sema.zirDbgEmptyStmt(block, inst);
......@@ -2225,7 +2225,7 @@ pub fn setupErrorReturnTrace(sema: *Sema, block: *Block, last_arg_index: usize)
22252225 const addrs_ptr = try err_trace_block.addTy(.alloc, try pt.singleMutPtrType(addr_arr_ty));
22262226
22272227 // 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);
22292229 const st_ptr = try err_trace_block.addTy(.alloc, try pt.singleMutPtrType(stack_trace_ty));
22302230
22312231 // st.instruction_addresses = &addrs;
......@@ -2804,11 +2804,11 @@ fn analyzeValueAsCallconv(
28042804 block: *Block,
28052805 src: LazySrcLoc,
28062806 val: Value,
2807) !std.builtin.CallingConvention {
2808 return interpretBuiltinType(sema, block, src, val, std.builtin.CallingConvention);
2807) !std.lang.CallingConvention {
2808 return interpretStdLangType(sema, block, src, val, std.lang.CallingConvention);
28092809}
28102810
2811fn interpretBuiltinType(
2811fn interpretStdLangType(
28122812 sema: *Sema,
28132813 block: *Block,
28142814 src: LazySrcLoc,
......@@ -2818,7 +2818,7 @@ fn interpretBuiltinType(
28182818 return val.interpret(T, sema.pt) catch |err| switch (err) {
28192819 error.OutOfMemory => |e| return e,
28202820 error.UndefinedValue => return sema.failWithUseOfUndef(block, src, null),
2821 error.TypeMismatch => @panic("std.builtin is corrupt"),
2821 error.TypeMismatch => @panic("std.lang is corrupt"),
28222822 };
28232823}
28242824
......@@ -5074,7 +5074,7 @@ fn zirPanic(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!void
50745074 }
50755075
50765076 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");
50785078 const opt_usize_ty = try pt.optionalType(.usize_type);
50795079 const null_ret_addr = Air.internedToRef((try pt.intern(.{ .opt = .{
50805080 .ty = opt_usize_ty.toIntern(),
......@@ -5692,7 +5692,7 @@ fn zirDisableIntrinsics(sema: *Sema) CompileError!void {
56925692fn zirSetFloatMode(sema: *Sema, block: *Block, extended: Zir.Inst.Extended.InstData) CompileError!void {
56935693 const extra = sema.code.extraData(Zir.Inst.UnNode, extended.operand).data;
56945694 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 });
56965696}
56975697
56985698fn 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
60086008
60096009 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);
60126012 const field_name = try zcu.intern_pool.getOrPutString(gpa, io, pt.tid, "index", .no_embedded_nulls);
60136013 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"),
60156015 error.ComptimeReturn, error.ComptimeBreak => unreachable,
60166016 error.OutOfMemory, error.Canceled => |e| return e,
60176017 };
......@@ -6051,7 +6051,7 @@ fn popErrorReturnTrace(
60516051 // AstGen determined this result does not go to an error-handling expr (try/catch/return etc.), or
60526052 // 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);
60556055 const ptr_stack_trace_ty = try pt.singleMutPtrType(stack_trace_ty);
60566056 const err_return_trace = try block.addTy(.err_return_trace, ptr_stack_trace_ty);
60576057 const field_name = try zcu.intern_pool.getOrPutString(gpa, io, pt.tid, "index", .no_embedded_nulls);
......@@ -6076,7 +6076,7 @@ fn popErrorReturnTrace(
60766076 defer then_block.instructions.deinit(gpa);
60776077
60786078 // 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);
60806080 const ptr_stack_trace_ty = try pt.singleMutPtrType(stack_trace_ty);
60816081 const err_return_trace = try then_block.addTy(.err_return_trace, ptr_stack_trace_ty);
60826082 const field_name = try zcu.intern_pool.getOrPutString(gpa, io, pt.tid, "index", .no_embedded_nulls);
......@@ -6147,7 +6147,7 @@ fn zirCall(
61476147 const extra = sema.code.extraData(ExtraType, inst_data.payload_index);
61486148 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);
61516151 const ensure_result_used = extra.data.flags.ensure_result_used;
61526152 const pop_error_return_trace = extra.data.flags.pop_error_return_trace;
61536153
......@@ -6215,7 +6215,7 @@ fn zirCall(
62156215 // If any input is an error-type, we might need to pop any trace it generated. Otherwise, we only
62166216 // need to clean-up our own trace if we were passed to a non-error-handling expression.
62176217 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);
62196219 const field_name = try zcu.intern_pool.getOrPutString(gpa, io, pt.tid, "index", .no_embedded_nulls);
62206220 const field_index = try sema.structFieldIndex(block, stack_trace_ty, field_name, call_src);
62216221
......@@ -6322,7 +6322,7 @@ fn callBuiltin(
63226322 block: *Block,
63236323 call_src: LazySrcLoc,
63246324 builtin_fn: Air.Inst.Ref,
6325 modifier: std.builtin.CallModifier,
6325 modifier: std.lang.CallModifier,
63266326 args: []const Air.Inst.Ref,
63276327 operation: CallOperation,
63286328) !void {
......@@ -6543,7 +6543,7 @@ fn analyzeCall(
65436543 func_ty: Type,
65446544 func_src: LazySrcLoc,
65456545 call_src: LazySrcLoc,
6546 modifier: std.builtin.CallModifier,
6546 modifier: std.lang.CallModifier,
65476547 ensure_result_used: bool,
65486548 args_info: CallArgsInfo,
65496549 call_dbg_node: ?Zir.Inst.Index,
......@@ -8367,7 +8367,7 @@ fn zirFunc(
83678367 // If this instruction has a body, then it's a function declaration, and we decide
83688368 // the callconv based on whether it is exported. Otherwise, the callconv defaults
83698369 // to `.auto`.
8370 const cc: std.builtin.CallingConvention = if (has_body) cc: {
8370 const cc: std.lang.CallingConvention = if (has_body) cc: {
83718371 const func_decl_nav = sema.owner.unwrap().nav_val;
83728372 const fn_is_exported = exported: {
83738373 const decl_inst = ip.getNav(func_decl_nav).analysis.?.zir_index.resolve(ip) orelse return error.AnalysisFail;
......@@ -8377,10 +8377,10 @@ fn zirFunc(
83778377 if (fn_is_exported) {
83788378 break :cc target.cCallingConvention() orelse {
83798379 // 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,
83818381 // let's eval that now and just get the transitive error. (It's guaranteed to error
83828382 // 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);
83848384 _ = try sema.namespaceLookupVal(
83858385 block,
83868386 LazySrcLoc.unneeded,
......@@ -8388,7 +8388,7 @@ fn zirFunc(
83888388 try ip.getOrPutString(gpa, io, pt.tid, "c", .no_embedded_nulls),
83898389 );
83908390 // The above should have errored.
8391 @panic("std.builtin is corrupt");
8391 @panic("std.lang is corrupt");
83928392 };
83938393 } else {
83948394 break :cc .auto;
......@@ -8509,7 +8509,7 @@ pub fn handleExternLibName(
85098509/// These are calling conventions that are confirmed to work with variadic functions.
85108510/// Any calling conventions not included here are either not yet verified to work with variadic
85118511/// 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{
85138513 .x86_16_cdecl,
85148514 .x86_64_sysv,
85158515 .x86_64_x32,
......@@ -8570,12 +8570,12 @@ const calling_conventions_supporting_var_args = [_]std.builtin.CallingConvention
85708570 .xtensa_call0,
85718571 .xtensa_windowed,
85728572};
8573fn callConvSupportsVarArgs(cc: std.builtin.CallingConvention.Tag) bool {
8573fn callConvSupportsVarArgs(cc: std.lang.CallingConvention.Tag) bool {
85748574 return for (calling_conventions_supporting_var_args) |supported_cc| {
85758575 if (cc == supported_cc) return true;
85768576 } else false;
85778577}
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 {
85798579 const CallingConventionsSupportingVarArgsList = struct {
85808580 arch: std.Target.Cpu.Arch,
85818581 pub fn format(ctx: @This(), w: *std.Io.Writer) std.Io.Writer.Error!void {
......@@ -8612,7 +8612,7 @@ fn checkParamType(
86128612 param_is_comptime: bool,
86138613 param_is_noalias: bool,
86148614 param_src: LazySrcLoc,
8615 cc: std.builtin.CallingConvention,
8615 cc: std.lang.CallingConvention,
86168616) CompileError!void {
86178617 const pt = sema.pt;
86188618 const zcu = pt.zcu;
......@@ -8668,7 +8668,7 @@ fn checkReturnTypeAndCallConv(
86688668 block: *Block,
86698669 bare_ret_ty: Type,
86708670 ret_ty_src: LazySrcLoc,
8671 @"callconv": std.builtin.CallingConvention,
8671 @"callconv": std.lang.CallingConvention,
86728672 callconv_src: LazySrcLoc,
86738673 /// non-`null` only if the function is varargs.
86748674 opt_varargs_src: ?LazySrcLoc,
......@@ -8772,7 +8772,7 @@ fn checkReturnTypeAndCallConv(
87728772fn validateResolvedFuncType(
87738773 sema: *Sema,
87748774 block: *Block,
8775 @"callconv": std.builtin.CallingConvention,
8775 @"callconv": std.lang.CallingConvention,
87768776 param_types: []const InternPool.Index,
87778777 ret_ty: Type,
87788778 src: LazySrcLoc,
......@@ -8823,7 +8823,7 @@ fn validateResolvedFuncType(
88238823 }
88248824}
88258825
8826fn callConvIsCallable(cc: std.builtin.CallingConvention.Tag) bool {
8826fn callConvIsCallable(cc: std.lang.CallingConvention.Tag) bool {
88278827 return switch (cc) {
88288828 .naked,
88298829
......@@ -8898,7 +8898,7 @@ fn funcCommon(
88988898 block: *Block,
88998899 src_node_offset: std.zig.Ast.Node.Offset,
89008900 func_inst: Zir.Inst.Index,
8901 cc: std.builtin.CallingConvention,
8901 cc: std.lang.CallingConvention,
89028902 /// this might be Type.generic_poison
89038903 bare_return_type: Type,
89048904 var_args: bool,
......@@ -9896,7 +9896,7 @@ fn zirSwitchBlockErrUnion(sema: *Sema, block: *Block, inst: Zir.Inst.Index) Comp
98969896 else
98979897 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: {
99009900 // don't analyze the non-error body if it's unreachable
99019901 if (non_err_cond == .bool_false) {
99029902 break :hint undefined;
......@@ -10488,14 +10488,14 @@ fn finishSwitchBr(
1048810488 const bags_required = std.math.divCeil(u32, hints.count + additional_count, hints_per_bag) catch unreachable;
1048910489 return hints.bags.ensureUnusedCapacity(gpa_inner, bags_required);
1049010490 }
10491 fn appendAssumeCapacity(hints: *@This(), hint: std.builtin.BranchHint) void {
10491 fn appendAssumeCapacity(hints: *@This(), hint: std.lang.BranchHint) void {
1049210492 const idx_in_bag = hints.count % hints_per_bag;
1049310493 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);
1049510495 hints.count += 1;
1049610496 return hints.bags.appendAssumeCapacity(bag);
1049710497 }
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 {
1049910499 try hints.ensureUnusedCapacity(gpa_inner, 1);
1050010500 return hints.appendAssumeCapacity(hint);
1050110501 }
......@@ -10574,7 +10574,7 @@ fn finishSwitchBr(
1057410574 }
1057510575 emit_bb = true;
1057610576
10577 const prong_hint: std.builtin.BranchHint = hint: {
10577 const prong_hint: std.lang.BranchHint = hint: {
1057810578 if (analyze_body) break :hint try sema.analyzeSwitchProng(
1057910579 &case_block,
1058010580 operand,
......@@ -10717,7 +10717,7 @@ fn finishSwitchBr(
1071710717 case_block.instructions.clearRetainingCapacity();
1071810718 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: {
1072110721 if (any_analyze_body) break :hint try sema.analyzeSwitchProng(
1072210722 &case_block,
1072310723 operand,
......@@ -10804,7 +10804,7 @@ fn finishSwitchBr(
1080410804 if (emit_bb) try sema.emitBackwardBranch(block, else_prong_src);
1080510805 emit_bb = true;
1080610806
10807 const prong_hint: std.builtin.BranchHint = hint: {
10807 const prong_hint: std.lang.BranchHint = hint: {
1080810808 if (analyze_body) break :hint try sema.analyzeSwitchProng(
1080910809 &case_block,
1081010810 operand,
......@@ -10864,7 +10864,7 @@ fn finishSwitchBr(
1086410864
1086510865 cases_len += 1;
1086610866
10867 const prong_hint: std.builtin.BranchHint = hint: {
10867 const prong_hint: std.lang.BranchHint = hint: {
1086810868 if (!else_case.is_inline) break :hint try sema.analyzeSwitchProng(
1086910869 &case_block,
1087010870 operand,
......@@ -11937,7 +11937,7 @@ fn analyzeSwitchProng(
1193711937 else_err_ty: ?Type,
1193811938 switch_inst: Zir.Inst.Index,
1193911939 zir_switch: *const Zir.UnwrappedSwitchBlock,
11940) CompileError!std.builtin.BranchHint {
11940) CompileError!std.lang.BranchHint {
1194111941 const pt = sema.pt;
1194211942 const zcu = pt.zcu;
1194311943
......@@ -12328,7 +12328,7 @@ fn analyzeSwitchPayloadCapture(
1232812328
1232912329 {
1233012330 // 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);
1233212332 const need_elems = std.math.divCeil(usize, prong_count + 1, 10) catch unreachable;
1233312333 try cases_extra.appendNTimes(0, need_elems);
1233412334 }
......@@ -12711,7 +12711,7 @@ fn maybeErrorUnwrap(
1271112711 const inst_data = sema.code.instructions.items(.data)[@intFromEnum(inst)].un_node;
1271212712 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");
1271512715 const args: [2]Air.Inst.Ref = .{ msg_inst, .null_value };
1271612716 try sema.callBuiltin(block, operand_src, Air.internedToRef(panic_fn), .auto, &args, .@"safety check");
1271712717 return true;
......@@ -15319,7 +15319,7 @@ fn zirAsm(
1531915319 }
1532015320
1532115321 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");
1532315323 const clobbers = if (extra.data.clobbers == .none) empty: {
1532415324 break :empty try sema.structInitEmpty(block, clobbers_ty, src, src);
1532515325 } else clobbers: {
......@@ -15930,7 +15930,7 @@ fn zirBuiltinSrc(
1593015930 } });
1593115931 };
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);
1593415934 const fields = .{
1593515935 // module: [:0]const u8,
1593615936 module_name_val,
......@@ -15957,7 +15957,7 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
1595715957 const inst_data = sema.code.instructions.items(.data)[@intFromEnum(inst)].un_node;
1595815958 const src = block.nodeOffset(inst_data.src_node);
1595915959 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);
1596115961 const type_info_tag_ty = type_info_ty.unionTagType(zcu).?;
1596215962
1596315963 try sema.ensureLayoutResolved(ty, src, .type_info);
......@@ -15979,15 +15979,15 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
1597915979 => |type_info_tag| return .fromValue(try pt.unionValue(
1598015980 type_info_ty,
1598115981 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"),
1598315983 error.OutOfMemory => |e| return e,
1598415984 },
1598515985 .void,
1598615986 )),
1598715987
1598815988 .@"fn" => {
15989 const fn_info_ty = try sema.getBuiltinType(src, .@"Type.Fn");
15990 const param_info_ty = try sema.getBuiltinType(src, .@"Type.Fn.Param");
15989 const fn_info_ty = try sema.getStdLangType(src, .@"Type.Fn");
15990 const param_info_ty = try sema.getStdLangType(src, .@"Type.Fn.Param");
1599115991
1599215992 const func_ty_info = zcu.typeToFunc(ty).?;
1599315993 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
1606816068 .val = if (ret_ty_is_generic) .none else func_ty_info.return_type,
1606916069 } });
1607016070
16071 const callconv_ty = try sema.getBuiltinType(src, .CallingConvention);
16071 const callconv_ty = try sema.getStdLangType(src, .CallingConvention);
1607216072 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"),
1607416074 error.OutOfMemory => |e| return e,
1607516075 };
1607616076
......@@ -16088,13 +16088,13 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
1608816088 };
1608916089 return Air.internedToRef((try pt.internUnion(.{
1609016090 .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(),
1609216092 .val = (try pt.aggregateValue(fn_info_ty, &field_values)).toIntern(),
1609316093 })));
1609416094 },
1609516095 .int => {
16096 const int_info_ty = try sema.getBuiltinType(src, .@"Type.Int");
16097 const signedness_ty = try sema.getBuiltinType(src, .Signedness);
16096 const int_info_ty = try sema.getStdLangType(src, .@"Type.Int");
16097 const signedness_ty = try sema.getStdLangType(src, .Signedness);
1609816098 const info = ty.intInfo(zcu);
1609916099 const field_values = .{
1610016100 // signedness: Signedness,
......@@ -16104,12 +16104,12 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
1610416104 };
1610516105 return Air.internedToRef((try pt.internUnion(.{
1610616106 .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(),
1610816108 .val = (try pt.aggregateValue(int_info_ty, &field_values)).toIntern(),
1610916109 })));
1611016110 },
1611116111 .float => {
16112 const float_info_ty = try sema.getBuiltinType(src, .@"Type.Float");
16112 const float_info_ty = try sema.getStdLangType(src, .@"Type.Float");
1611316113
1611416114 const field_vals = .{
1611516115 // bits: u16,
......@@ -16117,7 +16117,7 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
1611716117 };
1611816118 return Air.internedToRef((try pt.internUnion(.{
1611916119 .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(),
1612116121 .val = (try pt.aggregateValue(float_info_ty, &field_vals)).toIntern(),
1612216122 })));
1612316123 },
......@@ -16135,9 +16135,9 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
1613516135 } }));
1613616136 };
1613716137
16138 const addrspace_ty = try sema.getBuiltinType(src, .AddressSpace);
16139 const pointer_ty = try sema.getBuiltinType(src, .@"Type.Pointer");
16140 const ptr_size_ty = try sema.getBuiltinType(src, .@"Type.Pointer.Size");
16138 const addrspace_ty = try sema.getStdLangType(src, .AddressSpace);
16139 const pointer_ty = try sema.getStdLangType(src, .@"Type.Pointer");
16140 const ptr_size_ty = try sema.getStdLangType(src, .@"Type.Pointer.Size");
1614116141
1614216142 const field_values = .{
1614316143 // size: Size,
......@@ -16162,12 +16162,12 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
1616216162 };
1616316163 return Air.internedToRef((try pt.internUnion(.{
1616416164 .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(),
1616616166 .val = (try pt.aggregateValue(pointer_ty, &field_values)).toIntern(),
1616716167 })));
1616816168 },
1616916169 .array => {
16170 const array_field_ty = try sema.getBuiltinType(src, .@"Type.Array");
16170 const array_field_ty = try sema.getStdLangType(src, .@"Type.Array");
1617116171
1617216172 const info = ty.arrayInfo(zcu);
1617316173 const field_values = .{
......@@ -16180,12 +16180,12 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
1618016180 };
1618116181 return Air.internedToRef((try pt.internUnion(.{
1618216182 .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(),
1618416184 .val = (try pt.aggregateValue(array_field_ty, &field_values)).toIntern(),
1618516185 })));
1618616186 },
1618716187 .vector => {
16188 const vector_field_ty = try sema.getBuiltinType(src, .@"Type.Vector");
16188 const vector_field_ty = try sema.getStdLangType(src, .@"Type.Vector");
1618916189
1619016190 const info = ty.arrayInfo(zcu);
1619116191 const field_values = .{
......@@ -16196,12 +16196,12 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
1619616196 };
1619716197 return Air.internedToRef((try pt.internUnion(.{
1619816198 .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(),
1620016200 .val = (try pt.aggregateValue(vector_field_ty, &field_values)).toIntern(),
1620116201 })));
1620216202 },
1620316203 .optional => {
16204 const optional_field_ty = try sema.getBuiltinType(src, .@"Type.Optional");
16204 const optional_field_ty = try sema.getStdLangType(src, .@"Type.Optional");
1620516205
1620616206 const field_values = .{
1620716207 // child: type,
......@@ -16209,13 +16209,13 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
1620916209 };
1621016210 return Air.internedToRef((try pt.internUnion(.{
1621116211 .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(),
1621316213 .val = (try pt.aggregateValue(optional_field_ty, &field_values)).toIntern(),
1621416214 })));
1621516215 },
1621616216 .error_set => {
1621716217 // 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
1622016220 // Build our list of Error values
1622116221 // Optional value is only null if anyerror
......@@ -16300,12 +16300,12 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
1630016300 // Construct Type{ .error_set = errors_val }
1630116301 return Air.internedToRef((try pt.internUnion(.{
1630216302 .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(),
1630416304 .val = errors_val,
1630516305 })));
1630616306 },
1630716307 .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
1631016310 const field_values = .{
1631116311 // error_set: type,
......@@ -16315,7 +16315,7 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
1631516315 };
1631616316 return Air.internedToRef((try pt.internUnion(.{
1631716317 .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(),
1631916319 .val = (try pt.aggregateValue(error_union_field_ty, &field_values)).toIntern(),
1632016320 })));
1632116321 },
......@@ -16323,7 +16323,7 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
1632316323 const enum_obj = ip.loadEnumType(ty.toIntern());
1632416324 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
1632816328 const enum_field_vals = try sema.arena.alloc(InternPool.Index, enum_obj.field_names.len);
1632916329 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
1640416404
1640516405 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
1640916409 const field_values = .{
1641016410 // tag_type: type,
......@@ -16418,13 +16418,13 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
1641816418 };
1641916419 return Air.internedToRef((try pt.internUnion(.{
1642016420 .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(),
1642216422 .val = (try pt.aggregateValue(type_enum_ty, &field_values)).toIntern(),
1642316423 })));
1642416424 },
1642516425 .@"union" => {
16426 const type_union_ty = try sema.getBuiltinType(src, .@"Type.Union");
16427 const union_field_ty = try sema.getBuiltinType(src, .@"Type.UnionField");
16426 const type_union_ty = try sema.getStdLangType(src, .@"Type.Union");
16427 const union_field_ty = try sema.getStdLangType(src, .@"Type.UnionField");
1642816428
1642916429 const union_obj = ip.loadUnionType(ty.toIntern());
1643016430 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
1652416524 .val = if (ty.unionTagType(zcu)) |tag_ty| tag_ty.toIntern() else .none,
1652516525 } });
1652616526
16527 const container_layout_ty = try sema.getBuiltinType(src, .@"Type.ContainerLayout");
16527 const container_layout_ty = try sema.getStdLangType(src, .@"Type.ContainerLayout");
1652816528
1652916529 const field_values = .{
1653016530 // layout: ContainerLayout,
......@@ -16539,13 +16539,13 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
1653916539 };
1654016540 return Air.internedToRef((try pt.internUnion(.{
1654116541 .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(),
1654316543 .val = (try pt.aggregateValue(type_union_ty, &field_values)).toIntern(),
1654416544 })));
1654516545 },
1654616546 .@"struct" => {
16547 const type_struct_ty = try sema.getBuiltinType(src, .@"Type.Struct");
16548 const struct_field_ty = try sema.getBuiltinType(src, .@"Type.StructField");
16547 const type_struct_ty = try sema.getStdLangType(src, .@"Type.Struct");
16548 const struct_field_ty = try sema.getStdLangType(src, .@"Type.StructField");
1654916549
1655016550 var struct_field_vals: []InternPool.Index = &.{};
1655116551 defer gpa.free(struct_field_vals);
......@@ -16713,7 +16713,7 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
1671316713 } else .none,
1671416714 } });
1671516715
16716 const container_layout_ty = try sema.getBuiltinType(src, .@"Type.ContainerLayout");
16716 const container_layout_ty = try sema.getStdLangType(src, .@"Type.ContainerLayout");
1671716717
1671816718 const layout = ty.containerLayout(zcu);
1671916719
......@@ -16731,12 +16731,12 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai
1673116731 };
1673216732 return Air.internedToRef((try pt.internUnion(.{
1673316733 .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(),
1673516735 .val = (try pt.aggregateValue(type_struct_ty, &field_values)).toIntern(),
1673616736 })));
1673716737 },
1673816738 .@"opaque" => {
16739 const type_opaque_ty = try sema.getBuiltinType(src, .@"Type.Opaque");
16739 const type_opaque_ty = try sema.getStdLangType(src, .@"Type.Opaque");
1674016740
1674116741 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
1674616746 };
1674716747 return Air.internedToRef((try pt.internUnion(.{
1674816748 .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(),
1675016750 .val = (try pt.aggregateValue(type_opaque_ty, &field_values)).toIntern(),
1675116751 })));
1675216752 },
......@@ -16764,7 +16764,7 @@ fn typeInfoDecls(
1676416764 const zcu = pt.zcu;
1676516765 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
1676916769 var decl_vals = std.array_list.Managed(InternPool.Index).init(gpa);
1677016770 defer decl_vals.deinit();
......@@ -17323,7 +17323,7 @@ fn zirCondbr(
1732317323 // Reset, this may have been updated by the then block analysis
1732417324 sub_block.error_return_trace_index = parent_block.error_return_trace_index;
1732517325
17326 const false_hint: std.builtin.BranchHint = if (err_cond != null and
17326 const false_hint: std.lang.BranchHint = if (err_cond != null and
1732717327 try sema.maybeErrorUnwrap(&sub_block, else_body, err_cond.?, cond_src, false))
1732817328 h: {
1732917329 // nothing to do here. weight against error branch
......@@ -17714,7 +17714,7 @@ fn maybePushErrorTrace(
1771417714 assert(pt.zcu.intern_pool.funcAnalysisUnordered(sema.owner.unwrap().func).has_error_trace);
1771517715
1771617716 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
1771917719 if (!need_check) {
1772017720 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
1804018040 break :blk try sema.validateAlign(block, align_src, align_bytes);
1804118041 } 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: {
1804418044 const ref: Zir.Inst.Ref = @enumFromInt(sema.code.extra[extra_i]);
1804518045 extra_i += 1;
1804618046 break :blk try sema.resolveAddressSpace(block, addrspace_src, ref, .pointer);
......@@ -19179,7 +19179,7 @@ fn getErrorReturnTrace(sema: *Sema, block: *Block) CompileError!Air.Inst.Ref {
1917919179 const pt = sema.pt;
1918019180 const zcu = pt.zcu;
1918119181 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);
1918319183 const ptr_stack_trace_ty = try pt.singleMutPtrType(stack_trace_ty);
1918419184 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
1944619446 const signedness_src = block.builtinCallArgSrc(inst_data.src_node, 0);
1944719447 const bits_src = block.builtinCallArgSrc(inst_data.src_node, 1);
1944819448 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 });
1945019450 const bits: u16 = @intCast(try sema.resolveInt(block, bits_src, extra.rhs, .u16, .{ .simple = .int_bit_width }));
1945119451 if (bits == 0 and signedness == .signed) {
1945219452 return sema.fail(block, bits_src, "signed integer cannot have bit width 0", .{});
......@@ -19469,11 +19469,11 @@ fn zirReifySliceArgTy(
1946919469
1947019470 const comptime_reason: std.zig.SimpleComptimeReason, const in_scalar_ty: Type, const out_scalar_ty: Type = switch (info) {
1947119471 // 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") },
1947319473 .string_to_struct_field_type => .{ .struct_field_types, .slice_const_u8, .type },
1947419474 .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") },
19476 .string_to_union_field_attrs => .{ .union_field_attrs, .slice_const_u8, try sema.getBuiltinType(src, .@"Type.UnionField.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.getStdLangType(src, .@"Type.UnionField.Attributes") },
1947719477 // zig fmt: on
1947819478 };
1947919479
......@@ -19599,18 +19599,18 @@ fn zirReifyPointer(
1959919599 const elem_ty_src = block.builtinCallArgSrc(extra.node, 2);
1960019600 const sentinel_src = block.builtinCallArgSrc(extra.node, 3);
1960119601
19602 const size_ty = try sema.getBuiltinType(size_src, .@"Type.Pointer.Size");
19603 const attrs_ty = try sema.getBuiltinType(attrs_src, .@"Type.Pointer.Attributes");
19602 const size_ty = try sema.getStdLangType(size_src, .@"Type.Pointer.Size");
19603 const attrs_ty = try sema.getStdLangType(attrs_src, .@"Type.Pointer.Attributes");
1960419604
1960519605 const size_uncoerced = sema.resolveInst(extra.size);
1960619606 const size_coerced = try sema.coerce(block, size_ty, size_uncoerced, size_src);
1960719607 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
1961019610 const attrs_uncoerced = sema.resolveInst(extra.attrs);
1961119611 const attrs_coerced = try sema.coerce(block, attrs_ty, attrs_uncoerced, attrs_src);
1961219612 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
1961519615 const @"align": Alignment = if (attrs.@"align") |bytes| a: {
1961619616 break :a try sema.validateAlign(block, attrs_src, bytes);
......@@ -19687,8 +19687,8 @@ fn zirReifyFn(
1968719687 const ret_ty_src = block.builtinCallArgSrc(extra.node, 2);
1968819688 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");
19691 const fn_attrs_ty = try sema.getBuiltinType(fn_attrs_src, .@"Type.Fn.Attributes");
19690 const single_param_attrs_ty = try sema.getStdLangType(param_attrs_src, .@"Type.Fn.Param.Attributes");
19691 const fn_attrs_ty = try sema.getStdLangType(fn_attrs_src, .@"Type.Fn.Attributes");
1969219692
1969319693 const param_types_uncoerced = sema.resolveInst(extra.param_types);
1969419694 const param_types_coerced = try sema.coerce(block, .slice_const_type, param_types_uncoerced, param_types_src);
......@@ -19711,17 +19711,17 @@ fn zirReifyFn(
1971119711 const fn_attrs_uncoerced = sema.resolveInst(extra.fn_attrs);
1971219712 const fn_attrs_coerced = try sema.coerce(block, fn_attrs_ty, fn_attrs_uncoerced, fn_attrs_src);
1971319713 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
1971619716 var noalias_bits: u32 = 0;
1971719717 const param_types_ip = try sema.arena.alloc(InternPool.Index, @intCast(params_len));
1971819718 for (param_types_ip, 0..@intCast(params_len)) |*param_ty_ip, param_idx| {
1971919719 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(
1972119721 block,
1972219722 param_attrs_src,
1972319723 try param_attrs_arr.elemValue(pt, param_idx),
19724 std.builtin.Type.Fn.Param.Attributes,
19724 std.lang.Type.Fn.Param.Attributes,
1972519725 );
1972619726 try sema.checkParamType(
1972719727 block,
......@@ -19825,13 +19825,13 @@ fn zirReifyStruct(
1982519825 } },
1982619826 };
1982719827
19828 const container_layout_ty = try sema.getBuiltinType(layout_src, .@"Type.ContainerLayout");
19829 const single_field_attrs_ty = try sema.getBuiltinType(field_attrs_src, .@"Type.StructField.Attributes");
19828 const container_layout_ty = try sema.getStdLangType(layout_src, .@"Type.ContainerLayout");
19829 const single_field_attrs_ty = try sema.getStdLangType(field_attrs_src, .@"Type.StructField.Attributes");
1983019830
1983119831 const layout_uncoerced = sema.resolveInst(extra.layout);
1983219832 const layout_coerced = try sema.coerce(block, container_layout_ty, layout_uncoerced, layout_src);
1983319833 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
1983619836 const backing_int_ty_uncoerced = sema.resolveInst(extra.backing_ty);
1983719837 const backing_int_ty_coerced = try sema.coerce(block, .optional_type, backing_int_ty_uncoerced, backing_ty_src);
......@@ -19912,15 +19912,15 @@ fn zirReifyStruct(
1991219912 const field_name = try sema.sliceToIpString(block, field_names_src, field_name_val, .{ .simple = .struct_field_names });
1991319913
1991419914 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,
1991619916 "comptime",
1991719917 ).?);
1991819918 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,
1992019920 "align",
1992119921 ).?);
1992219922 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,
1992419924 "default_value_ptr",
1992519925 ).?);
1992619926
......@@ -19997,15 +19997,15 @@ fn zirReifyStruct(
1999719997 wip.field_types.get(ip)[field_idx] = field_ty.toIntern();
1999819998
1999919999 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,
2000120001 "comptime",
2000220002 ).?);
2000320003 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,
2000520005 "align",
2000620006 ).?);
2000720007 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,
2000920009 "default_value_ptr",
2001020010 ).?);
2001120011
......@@ -20105,13 +20105,13 @@ fn zirReifyUnion(
2010520105 } },
2010620106 };
2010720107
20108 const container_layout_ty = try sema.getBuiltinType(layout_src, .@"Type.ContainerLayout");
20109 const single_field_attrs_ty = try sema.getBuiltinType(field_attrs_src, .@"Type.UnionField.Attributes");
20108 const container_layout_ty = try sema.getStdLangType(layout_src, .@"Type.ContainerLayout");
20109 const single_field_attrs_ty = try sema.getStdLangType(field_attrs_src, .@"Type.UnionField.Attributes");
2011020110
2011120111 const layout_uncoerced = sema.resolveInst(extra.layout);
2011220112 const layout_coerced = try sema.coerce(block, container_layout_ty, layout_uncoerced, layout_src);
2011320113 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
2011620116 const arg_ty_uncoerced = sema.resolveInst(extra.arg_ty);
2011720117 const arg_ty_coerced = try sema.coerce(block, .optional_type, arg_ty_uncoerced, arg_ty_src);
......@@ -20191,11 +20191,11 @@ fn zirReifyUnion(
2019120191 const field_name = try sema.sliceToIpString(block, field_names_src, field_name_val, .{ .simple = .union_field_names });
2019220192 std.hash.autoHash(&hasher, field_name);
2019320193
20194 const field_attrs = try sema.interpretBuiltinType(
20194 const field_attrs = try sema.interpretStdLangType(
2019520195 block,
2019620196 field_attrs_src,
2019720197 try field_attrs_arr.elemValue(pt, field_idx),
20198 std.builtin.Type.UnionField.Attributes,
20198 std.lang.Type.UnionField.Attributes,
2019920199 );
2020020200 if (field_attrs.@"align") |bytes| {
2020120201 if (layout == .@"packed") {
......@@ -20240,11 +20240,11 @@ fn zirReifyUnion(
2024020240 wip.field_types.get(ip)[field_idx] = field_ty.toIntern();
2024120241
2024220242 // No source location; first loop checked this is valid.
20243 const field_attrs = try sema.interpretBuiltinType(
20243 const field_attrs = try sema.interpretStdLangType(
2024420244 block,
2024520245 .unneeded,
2024620246 try field_attrs_arr.elemValue(pt, field_idx),
20247 std.builtin.Type.UnionField.Attributes,
20247 std.lang.Type.UnionField.Attributes,
2024820248 );
2024920249 if (field_attrs.@"align") |bytes| {
2025020250 // No source location; first loop checked this is valid.
......@@ -20319,7 +20319,7 @@ fn zirReifyEnum(
2031920319 } },
2032020320 };
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
2032420324 const tag_ty_uncoerced = sema.resolveInst(extra.tag_ty);
2032520325 const tag_ty_coerced = try sema.coerce(block, .type, tag_ty_uncoerced, tag_ty_src);
......@@ -20329,7 +20329,7 @@ fn zirReifyEnum(
2032920329 const mode_uncoerced = sema.resolveInst(extra.mode);
2033020330 const mode_coerced = try sema.coerce(block, enum_mode_ty, mode_uncoerced, mode_src);
2033120331 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)) {
2033320333 .exhaustive => false,
2033420334 .nonexhaustive => true,
2033520335 };
......@@ -20423,7 +20423,7 @@ fn zirReifyEnum(
2042320423
2042420424fn resolveVaListRef(sema: *Sema, block: *Block, src: LazySrcLoc, zir_ref: Zir.Inst.Ref) CompileError!Air.Inst.Ref {
2042520425 const pt = sema.pt;
20426 const va_list_ty = try sema.getBuiltinType(src, .VaList);
20426 const va_list_ty = try sema.getStdLangType(src, .VaList);
2042720427 const va_list_ptr = try pt.singleMutPtrType(va_list_ty);
2042820428
2042920429 const inst = sema.resolveInst(zir_ref);
......@@ -20462,7 +20462,7 @@ fn zirCVaCopy(sema: *Sema, block: *Block, extended: Zir.Inst.Extended.InstData)
2046220462 const va_list_src = block.builtinCallArgSrc(extra.node, 0);
2046320463
2046420464 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
2046720467 try sema.requireRuntimeBlock(block, src, null);
2046820468 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)
2048420484 const src_node: std.zig.Ast.Node.Offset = @enumFromInt(@as(i32, @bitCast(extended.operand)));
2048520485 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);
2048820488 try sema.requireRuntimeBlock(block, src, null);
2048920489 return block.addInst(.{
2049020490 .tag = .c_va_start,
......@@ -21962,9 +21962,9 @@ fn checkArithmeticOp(
2196221962 sema: *Sema,
2196321963 block: *Block,
2196421964 src: LazySrcLoc,
21965 scalar_tag: std.builtin.TypeId,
21966 lhs_zig_ty_tag: std.builtin.TypeId,
21967 rhs_zig_ty_tag: std.builtin.TypeId,
21965 scalar_tag: std.lang.TypeId,
21966 lhs_zig_ty_tag: std.lang.TypeId,
21967 rhs_zig_ty_tag: std.lang.TypeId,
2196821968 zir_tag: Zir.Inst.Tag,
2196921969) CompileError!void {
2197021970 const is_int = scalar_tag == .int or scalar_tag == .comptime_int;
......@@ -22373,7 +22373,7 @@ fn resolveExportOptions(
2237322373 const io = comp.io;
2237422374 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);
2237722377 const air_ref = sema.resolveInst(zir_ref);
2237822378 const options = try sema.coerce(block, export_options_ty, air_ref, src);
2237922379
......@@ -22387,7 +22387,7 @@ fn resolveExportOptions(
2238722387
2238822388 const linkage_operand = try sema.fieldVal(block, src, options, try ip.getOrPutString(gpa, io, pt.tid, "linkage", .no_embedded_nulls), linkage_src);
2238922389 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
2239222392 const section_operand = try sema.fieldVal(block, src, options, try ip.getOrPutString(gpa, io, pt.tid, "section", .no_embedded_nulls), section_src);
2239322393 const section_opt_val = try sema.resolveConstDefinedValue(block, section_src, section_operand, .{ .simple = .export_options });
......@@ -22398,7 +22398,7 @@ fn resolveExportOptions(
2239822398
2239922399 const visibility_operand = try sema.fieldVal(block, src, options, try ip.getOrPutString(gpa, io, pt.tid, "visibility", .no_embedded_nulls), visibility_src);
2240022400 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
2240322403 if (name.len < 1) {
2240422404 return sema.fail(block, name_src, "exported symbol name cannot be empty", .{});
......@@ -22418,19 +22418,19 @@ fn resolveExportOptions(
2241822418 };
2241922419}
2242022420
22421fn resolveBuiltinEnum(
22421fn resolveStdLangEnum(
2242222422 sema: *Sema,
2242322423 block: *Block,
2242422424 src: LazySrcLoc,
2242522425 zir_ref: Zir.Inst.Ref,
22426 comptime name: Zcu.BuiltinDecl,
22426 comptime name: Zcu.StdLangDecl,
2242722427 reason: ComptimeReason,
22428) CompileError!@field(std.builtin, @tagName(name)) {
22429 const ty = try sema.getBuiltinType(src, name);
22428) CompileError!@field(std.lang, @tagName(name)) {
22429 const ty = try sema.getStdLangType(src, name);
2243022430 const air_ref = sema.resolveInst(zir_ref);
2243122431 const coerced = try sema.coerce(block, ty, air_ref, src);
2243222432 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)));
2243422434}
2243522435
2243622436fn resolveAtomicOrder(
......@@ -22439,8 +22439,8 @@ fn resolveAtomicOrder(
2243922439 src: LazySrcLoc,
2244022440 zir_ref: Zir.Inst.Ref,
2244122441 reason: ComptimeReason,
22442) CompileError!std.builtin.AtomicOrder {
22443 return sema.resolveBuiltinEnum(block, src, zir_ref, .AtomicOrder, reason);
22442) CompileError!std.lang.AtomicOrder {
22443 return sema.resolveStdLangEnum(block, src, zir_ref, .AtomicOrder, reason);
2244422444}
2244522445
2244622446fn resolveAtomicRmwOp(
......@@ -22448,8 +22448,8 @@ fn resolveAtomicRmwOp(
2244822448 block: *Block,
2244922449 src: LazySrcLoc,
2245022450 zir_ref: Zir.Inst.Ref,
22451) CompileError!std.builtin.AtomicRmwOp {
22452 return sema.resolveBuiltinEnum(block, src, zir_ref, .AtomicRmwOp, .{ .simple = .operand_atomicRmw_operation });
22451) CompileError!std.lang.AtomicRmwOp {
22452 return sema.resolveStdLangEnum(block, src, zir_ref, .AtomicRmwOp, .{ .simple = .operand_atomicRmw_operation });
2245322453}
2245422454
2245522455fn zirCmpxchg(
......@@ -22490,10 +22490,10 @@ fn zirCmpxchg(
2249022490 const success_order = try sema.resolveAtomicOrder(block, success_order_src, extra.success_order, .{ .simple = .atomic_order });
2249122491 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)) {
2249422494 return sema.fail(block, success_order_src, "success atomic ordering must be monotonic or stricter", .{});
2249522495 }
22496 if (@intFromEnum(failure_order) < @intFromEnum(std.builtin.AtomicOrder.monotonic)) {
22496 if (@intFromEnum(failure_order) < @intFromEnum(std.lang.AtomicOrder.monotonic)) {
2249722497 return sema.fail(block, failure_order_src, "failure atomic ordering must be monotonic or stricter", .{});
2249822498 }
2249922499 if (@intFromEnum(failure_order) > @intFromEnum(success_order)) {
......@@ -22609,7 +22609,7 @@ fn zirReduce(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Air.
2260922609 const extra = sema.code.extraData(Zir.Inst.Bin, inst_data.payload_index).data;
2261022610 const op_src = block.builtinCallArgSrc(inst_data.src_node, 0);
2261122611 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 });
2261322613 const operand = sema.resolveInst(extra.rhs);
2261422614 const operand_ty = sema.typeOf(operand);
2261522615 const pt = sema.pt;
......@@ -23196,11 +23196,11 @@ fn zirBuiltinCall(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError
2319623196 const extra = sema.code.extraData(Zir.Inst.BuiltinCall, inst_data.payload_index).data;
2319723197 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);
2320023200 const air_ref = sema.resolveInst(extra.modifier);
2320123201 const modifier_ref = try sema.coerce(block, modifier_ty, air_ref, modifier_src);
2320223202 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);
2320423204 switch (modifier) {
2320523205 // These can be upgraded to comptime or nosuspend calls.
2320623206 .auto, .never_tail, .no_suspend => {
......@@ -24250,19 +24250,19 @@ fn zirFuncFancy(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!A
2425024250
2425124251 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: {
2425424254 const body_len = sema.code.extra[extra_index];
2425524255 extra_index += 1;
2425624256 const body = sema.code.bodySlice(extra_index, body_len);
2425724257 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);
2426024260 const val = try sema.resolveGenericBody(block, cc_src, body, inst, cc_ty, .{ .simple = .@"callconv" });
2426124261 break :blk try sema.analyzeValueAsCallconv(block, cc_src, val);
2426224262 } else if (extra.data.bits.has_cc_ref) blk: {
2426324263 const cc_ref: Zir.Inst.Ref = @enumFromInt(sema.code.extra[extra_index]);
2426424264 extra_index += 1;
24265 const cc_ty = try sema.getBuiltinType(cc_src, .CallingConvention);
24265 const cc_ty = try sema.getStdLangType(cc_src, .CallingConvention);
2426624266 const uncoerced_cc = sema.resolveInst(cc_ref);
2426724267 const coerced_cc = try sema.coerce(block, cc_ty, uncoerced_cc, cc_src);
2426824268 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
2427524275 if (zir_decl.linkage == .@"export") {
2427624276 break :cc target.cCallingConvention() orelse {
2427724277 // 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,
2427924279 // let's eval that now and just get the transitive error. (It's guaranteed to error
2428024280 // 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);
2428224282 _ = try sema.namespaceLookupVal(
2428324283 block,
2428424284 LazySrcLoc.unneeded,
......@@ -24286,7 +24286,7 @@ fn zirFuncFancy(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!A
2428624286 try ip.getOrPutString(gpa, io, pt.tid, "c", .no_embedded_nulls),
2428724287 );
2428824288 // The above should have errored.
24289 @panic("std.builtin is corrupt");
24289 @panic("std.lang is corrupt");
2429024290 };
2429124291 }
2429224292 }
......@@ -24398,7 +24398,7 @@ fn resolvePrefetchOptions(
2439824398 block: *Block,
2439924399 src: LazySrcLoc,
2440024400 zir_ref: Zir.Inst.Ref,
24401) CompileError!std.builtin.PrefetchOptions {
24401) CompileError!std.lang.PrefetchOptions {
2440224402 const pt = sema.pt;
2440324403 const zcu = pt.zcu;
2440424404 const comp = zcu.comp;
......@@ -24406,7 +24406,7 @@ fn resolvePrefetchOptions(
2440624406 const io = comp.io;
2440724407 const ip = &zcu.intern_pool;
2440824408
24409 const options_ty = try sema.getBuiltinType(src, .PrefetchOptions);
24409 const options_ty = try sema.getStdLangType(src, .PrefetchOptions);
2441024410 const options = try sema.coerce(block, options_ty, sema.resolveInst(zir_ref), src);
2441124411
2441224412 const rw_src = block.src(.{ .init_field_rw = src.offset.node_offset_builtin_call_arg.builtin_call_node });
......@@ -24422,10 +24422,10 @@ fn resolvePrefetchOptions(
2442224422 const cache = try sema.fieldVal(block, src, options, try ip.getOrPutString(gpa, io, pt.tid, "cache", .no_embedded_nulls), cache_src);
2442324423 const cache_val = try sema.resolveConstDefinedValue(block, cache_src, cache, .{ .simple = .prefetch_options });
2442424424
24425 return std.builtin.PrefetchOptions{
24426 .rw = try sema.interpretBuiltinType(block, rw_src, rw_val, std.builtin.PrefetchOptions.Rw),
24425 return std.lang.PrefetchOptions{
24426 .rw = try sema.interpretStdLangType(block, rw_src, rw_val, std.lang.PrefetchOptions.Rw),
2442724427 .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),
2442924429 };
2443024430}
2443124431
......@@ -24465,12 +24465,12 @@ fn resolveExternOptions(
2446524465) CompileError!struct {
2446624466 name: InternPool.NullTerminatedString,
2446724467 library_name: InternPool.OptionalNullTerminatedString,
24468 linkage: std.builtin.GlobalLinkage,
24469 visibility: std.builtin.SymbolVisibility,
24468 linkage: std.lang.GlobalLinkage,
24469 visibility: std.lang.SymbolVisibility,
2447024470 is_thread_local: bool,
2447124471 is_dll_import: bool,
24472 relocation: std.builtin.ExternOptions.Relocation,
24473 decoration: ?std.builtin.ExternOptions.Decoration,
24472 relocation: std.lang.ExternOptions.Relocation,
24473 decoration: ?std.lang.ExternOptions.Decoration,
2447424474} {
2447524475 const pt = sema.pt;
2447624476 const zcu = pt.zcu;
......@@ -24480,7 +24480,7 @@ fn resolveExternOptions(
2448024480 const ip = &zcu.intern_pool;
2448124481
2448224482 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);
2448424484 const options = try sema.coerce(block, extern_options_ty, options_inst, src);
2448524485
2448624486 const name_src = block.src(.{ .init_field_name = src.offset.node_offset_builtin_call_arg.builtin_call_node });
......@@ -24500,11 +24500,11 @@ fn resolveExternOptions(
2450024500
2450124501 const linkage_ref = try sema.fieldVal(block, src, options, try ip.getOrPutString(gpa, io, pt.tid, "linkage", .no_embedded_nulls), linkage_src);
2450224502 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
2450524505 const visibility_ref = try sema.fieldVal(block, src, options, try ip.getOrPutString(gpa, io, pt.tid, "visibility", .no_embedded_nulls), visibility_src);
2450624506 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
2450924509 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);
2451024510 const is_thread_local_val = try sema.resolveConstDefinedValue(block, thread_local_src, is_thread_local, .{ .simple = .extern_options });
......@@ -24523,11 +24523,11 @@ fn resolveExternOptions(
2452324523
2452424524 const relocation_ref = try sema.fieldVal(block, src, options, try ip.getOrPutString(gpa, io, pt.tid, "relocation", .no_embedded_nulls), relocation_src);
2452524525 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
2452824528 const decoration_ref = try sema.fieldVal(block, src, options, try ip.getOrPutString(gpa, io, pt.tid, "decoration", .no_embedded_nulls), decoration_src);
2452924529 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
2453224532 if (name.len == 0) {
2453324533 return sema.fail(block, name_src, "extern symbol name cannot be empty", .{});
......@@ -24696,7 +24696,7 @@ fn zirInComptime(
2469624696 return if (block.isComptime()) .bool_true else .bool_false;
2469724697}
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 {
2470024700 const pt = sema.pt;
2470124701 const zcu = pt.zcu;
2470224702 const comp = zcu.comp;
......@@ -24706,9 +24706,9 @@ fn zirBuiltinValue(sema: *Sema, block: *Block, extended: Zir.Inst.Extended.InstD
2470624706
2470724707 const src_node: std.zig.Ast.Node.Offset = @enumFromInt(@as(i32, @bitCast(extended.operand)));
2470824708 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) {
2471224712 // zig fmt: off
2471324713 .atomic_order => .AtomicOrder,
2471424714 .atomic_rmw_op => .AtomicRmwOp,
......@@ -24732,28 +24732,28 @@ fn zirBuiltinValue(sema: *Sema, block: *Block, extended: Zir.Inst.Extended.InstD
2473224732
2473324733 // Values are handled here.
2473424734 .calling_convention_c => {
24735 const callconv_ty = try sema.getBuiltinType(src, .CallingConvention);
24735 const callconv_ty = try sema.getStdLangType(src, .CallingConvention);
2473624736 // Cannot use `Value.uninterpret` because `c` is a *declaration* whose value depends on the target.
2473724737 return try sema.namespaceLookupVal(
2473824738 block,
2473924739 src,
2474024740 callconv_ty.getNamespaceIndex(zcu),
2474124741 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");
2474324743 },
2474424744 .calling_convention_inline => {
24745 const callconv_ty = try sema.getBuiltinType(src, .CallingConvention);
24745 const callconv_ty = try sema.getStdLangType(src, .CallingConvention);
2474624746 return .fromValue(Value.uninterpret(
24747 @as(std.builtin.CallingConvention, .@"inline"),
24747 @as(std.lang.CallingConvention, .@"inline"),
2474824748 callconv_ty,
2474924749 pt,
2475024750 ) catch |err| switch (err) {
24751 error.TypeMismatch => @panic("std.builtin is corrupt"),
24751 error.TypeMismatch => @panic("std.lang is corrupt"),
2475224752 error.OutOfMemory => |e| return e,
2475324753 });
2475424754 },
2475524755 };
24756 return .fromType(try sema.getBuiltinType(src, builtin_type));
24756 return .fromType(try sema.getStdLangType(src, std_lang_type));
2475724757}
2475824758
2475924759fn 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
2478824788 const uncoerced_hint = sema.resolveInst(extra.operand);
2478924789 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);
2479224792 const coerced_hint = try sema.coerce(block, hint_ty, uncoerced_hint, operand_src);
2479324793 const hint_val = try sema.resolveConstDefinedValue(block, operand_src, coerced_hint, .{ .simple = .operand_branchHint });
2479424794
2479524795 // We only apply the first hint in a branch.
2479624796 // This allows user-provided hints to override implicit cold hints.
2479724797 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);
2479924799 }
2480024800}
2480124801
......@@ -25148,7 +25148,7 @@ fn getPanicIdFunc(sema: *Sema, src: LazySrcLoc, panic_id: Zcu.SimplePanicId) !In
2514825148 const zcu = sema.pt.zcu;
2514925149 const io = zcu.comp.io;
2515025150 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());
2515225152 switch (sema.owner.unwrap()) {
2515325153 .@"comptime",
2515425154 .nav_ty,
......@@ -25292,7 +25292,7 @@ fn safetyPanicUnwrapError(sema: *Sema, block: *Block, src: LazySrcLoc, err: Air.
2529225292 if (!zcu.backendSupportsFeature(.panic_fn)) {
2529325293 _ = try block.addNoOp(.trap);
2529425294 } else {
25295 const panic_fn = try getBuiltin(sema, src, .@"panic.unwrapError");
25295 const panic_fn = try getStdLangValue(sema, src, .@"panic.unwrapError");
2529625296 try sema.callBuiltin(block, src, Air.internedToRef(panic_fn), .auto, &.{err}, .@"safety check");
2529725297 }
2529825298}
......@@ -25382,7 +25382,7 @@ fn addSafetyCheckCall(
2538225382 parent_block: *Block,
2538325383 src: LazySrcLoc,
2538425384 ok: Air.Inst.Ref,
25385 comptime func_decl: Zcu.BuiltinDecl,
25385 comptime func_decl: Zcu.StdLangDecl,
2538625386 args: []const Air.Inst.Ref,
2538725387) !void {
2538825388 assert(!parent_block.isComptime());
......@@ -25406,7 +25406,7 @@ fn addSafetyCheckCall(
2540625406 if (!zcu.backendSupportsFeature(.panic_fn)) {
2540725407 _ = try fail_block.addNoOp(.trap);
2540825408 } else {
25409 const panic_fn = try getBuiltin(sema, src, func_decl);
25409 const panic_fn = try getStdLangValue(sema, src, func_decl);
2541025410 try sema.callBuiltin(&fail_block, src, Air.internedToRef(panic_fn), .auto, args, .@"safety check");
2541125411 }
2541225412
......@@ -27911,8 +27911,8 @@ const InMemoryCoercionResult = union(enum) {
2791127911 };
2791227912
2791327913 const Int = struct {
27914 actual_signedness: std.builtin.Signedness,
27915 wanted_signedness: std.builtin.Signedness,
27914 actual_signedness: std.lang.Signedness,
27915 wanted_signedness: std.lang.Signedness,
2791627916 actual_bits: u16,
2791727917 wanted_bits: u16,
2791827918 };
......@@ -27928,18 +27928,18 @@ const InMemoryCoercionResult = union(enum) {
2792827928 };
2792927929
2793027930 const Size = struct {
27931 actual: std.builtin.Type.Pointer.Size,
27932 wanted: std.builtin.Type.Pointer.Size,
27931 actual: std.lang.Type.Pointer.Size,
27932 wanted: std.lang.Type.Pointer.Size,
2793327933 };
2793427934
2793527935 const AddressSpace = struct {
27936 actual: std.builtin.AddressSpace,
27937 wanted: std.builtin.AddressSpace,
27936 actual: std.lang.AddressSpace,
27937 wanted: std.lang.AddressSpace,
2793827938 };
2793927939
2794027940 const CC = struct {
27941 actual: std.builtin.CallingConvention,
27942 wanted: std.builtin.CallingConvention,
27941 actual: std.lang.CallingConvention,
27942 wanted: std.lang.CallingConvention,
2794327943 };
2794427944
2794527945 const BitRange = struct {
......@@ -28209,7 +28209,7 @@ const InMemoryCoercionResult = union(enum) {
2820928209 }
2821028210};
2821128211
28212fn pointerSizeString(size: std.builtin.Type.Pointer.Size) []const u8 {
28212fn pointerSizeString(size: std.lang.Type.Pointer.Size) []const u8 {
2821328213 return switch (size) {
2821428214 .one => "single pointer",
2821528215 .many => "many pointer",
......@@ -28635,10 +28635,10 @@ fn coerceInMemoryAllowedFns(
2863528635
2863628636fn callconvCoerceAllowed(
2863728637 target: *const std.Target,
28638 src_cc: std.builtin.CallingConvention,
28639 dest_cc: std.builtin.CallingConvention,
28638 src_cc: std.lang.CallingConvention,
28639 dest_cc: std.lang.CallingConvention,
2864028640) bool {
28641 const Tag = std.builtin.CallingConvention.Tag;
28641 const Tag = std.lang.CallingConvention.Tag;
2864228642 if (@as(Tag, src_cc) != @as(Tag, dest_cc)) return false;
2864328643
2864428644 switch (src_cc) {
......@@ -28651,26 +28651,26 @@ fn callconvCoerceAllowed(
2865128651 if (dest_stack_align < src_stack_align) return false;
2865228652 }
2865328653 switch (@TypeOf(src_data)) {
28654 void, std.builtin.CallingConvention.CommonOptions => {},
28655 std.builtin.CallingConvention.X86RegparmOptions => {
28654 void, std.lang.CallingConvention.CommonOptions => {},
28655 std.lang.CallingConvention.X86RegparmOptions => {
2865628656 if (src_data.register_params != dest_data.register_params) return false;
2865728657 },
28658 std.builtin.CallingConvention.ArcInterruptOptions => {
28658 std.lang.CallingConvention.ArcInterruptOptions => {
2865928659 if (src_data.type != dest_data.type) return false;
2866028660 },
28661 std.builtin.CallingConvention.ArmInterruptOptions => {
28661 std.lang.CallingConvention.ArmInterruptOptions => {
2866228662 if (src_data.type != dest_data.type) return false;
2866328663 },
28664 std.builtin.CallingConvention.MicroblazeInterruptOptions => {
28664 std.lang.CallingConvention.MicroblazeInterruptOptions => {
2866528665 if (src_data.type != dest_data.type) return false;
2866628666 },
28667 std.builtin.CallingConvention.MipsInterruptOptions => {
28667 std.lang.CallingConvention.MipsInterruptOptions => {
2866828668 if (src_data.mode != dest_data.mode) return false;
2866928669 },
28670 std.builtin.CallingConvention.RiscvInterruptOptions => {
28670 std.lang.CallingConvention.RiscvInterruptOptions => {
2867128671 if (src_data.mode != dest_data.mode) return false;
2867228672 },
28673 std.builtin.CallingConvention.ShInterruptOptions => {
28673 std.lang.CallingConvention.ShInterruptOptions => {
2867428674 if (src_data.save != dest_data.save) return false;
2867528675 },
2867628676 else => comptime unreachable,
......@@ -31115,7 +31115,7 @@ fn cmpNumeric(
3111531115 const dest_ty = if (dest_float_type) |ft| ft else blk: {
3111631116 const max_bits = @max(lhs_bits, rhs_bits);
3111731117 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;
3111931119 break :blk try pt.intType(signedness, casted_bits);
3112031120 };
3112131121 const casted_lhs = try sema.coerce(block, dest_ty, lhs, lhs_src);
......@@ -33101,7 +33101,7 @@ fn resolveAddressSpace(
3310133101 src: LazySrcLoc,
3310233102 zir_ref: Zir.Inst.Ref,
3310333103 ctx: std.Target.AddressSpaceContext,
33104) !std.builtin.AddressSpace {
33104) !std.lang.AddressSpace {
3310533105 const air_ref = sema.resolveInst(zir_ref);
3310633106 return sema.analyzeAsAddressSpace(block, src, air_ref, ctx);
3310733107}
......@@ -33112,12 +33112,12 @@ pub fn analyzeAsAddressSpace(
3311233112 src: LazySrcLoc,
3311333113 air_ref: Air.Inst.Ref,
3311433114 ctx: std.Target.AddressSpaceContext,
33115) !std.builtin.AddressSpace {
33115) !std.lang.AddressSpace {
3311633116 const pt = sema.pt;
33117 const addrspace_ty = try sema.getBuiltinType(src, .AddressSpace);
33117 const addrspace_ty = try sema.getStdLangType(src, .AddressSpace);
3311833118 const coerced = try sema.coerce(block, addrspace_ty, air_ref, src);
3311933119 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);
3312133121 const target = pt.zcu.getTarget();
3312233122
3312333123 if (!target.supportsAddressSpace(address_space, ctx)) {
......@@ -33819,21 +33819,21 @@ pub const type_resolution = @import("Sema/type_resolution.zig");
3381933819pub const ensureLayoutResolved = type_resolution.ensureLayoutResolved;
3382033820pub 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 {
3382333823 assert(decl.kind() == .type);
3382433824 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));
3382633826}
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 {
3382833828 assert(decl.kind() != .type);
3382933829 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);
3383133831}
3383233832
3383333833pub const NavPtrModifiers = struct {
3383433834 @"align": Alignment,
3383533835 @"linksection": InternPool.OptionalNullTerminatedString,
33836 @"addrspace": std.builtin.AddressSpace,
33836 @"addrspace": std.lang.AddressSpace,
3383733837};
3383833838
3383933839pub fn resolveNavPtrModifiers(
......@@ -33872,7 +33872,7 @@ pub fn resolveNavPtrModifiers(
3387233872 break :ls try ip.getOrPutStringOpt(gpa, io, pt.tid, bytes, .no_embedded_nulls);
3387333873 };
3387433874
33875 const @"addrspace": std.builtin.AddressSpace = as: {
33875 const @"addrspace": std.lang.AddressSpace = as: {
3387633876 const addrspace_ctx: std.Target.AddressSpaceContext = switch (zir_decl.kind) {
3387733877 .@"var" => .variable,
3387833878 else => switch (nav_ty.zigTypeTag(zcu)) {
......@@ -33928,30 +33928,30 @@ pub fn analyzeMemoizedState(sema: *Sema, stage: InternPool.MemoizedStateStage) C
3392833928 };
3392933929 defer block.instructions.deinit(gpa);
3393033930
33931 const std_builtin_ty: Type = ty: {
33931 const std_lang_ty: Type = ty: {
3393233932 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);
3393433934 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'", .{});
3393633936 };
3393733937 const uncoerced_val = try sema.analyzeNavVal(&block, std_src, nav);
3393833938 const decl_src: LazySrcLoc = .{
3393933939 .base_node_inst = ip.getNav(nav).srcInst(ip),
3394033940 .offset = .nodeOffset(.zero),
3394133941 };
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);
3394333943 };
3394433944
3394533945 var any_changed = false;
3394633946
33947 inline for (comptime std.enums.values(Zcu.BuiltinDecl)) |builtin_decl| {
33948 if (stage == comptime builtin_decl.stage()) {
33949 const parent_ns_ty: Type, const parent_name: []const u8, const name: []const u8 = switch (comptime builtin_decl.access()) {
33950 .direct => |name| .{ std_builtin_ty, "std.builtin", name },
33947 inline for (comptime std.enums.values(Zcu.StdLangDecl)) |std_lang_decl| {
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 std_lang_decl.access()) {
33950 .direct => |name| .{ std_lang_ty, "std.lang", name },
3395133951 .nested => |nested| access: {
3395233952 const parent_decl, const name = nested;
33953 const parent_ty: Type = .fromInterned(zcu.builtin_decl_values.get(parent_decl));
33954 break :access .{ parent_ty, "std.builtin." ++ @tagName(parent_decl), name };
33953 const parent_ty: Type = .fromInterned(zcu.std_lang_decl_values.get(parent_decl));
33954 break :access .{ parent_ty, "std.lang." ++ @tagName(parent_decl), name };
3395533955 },
3395633956 };
3395733957
......@@ -33970,25 +33970,25 @@ pub fn analyzeMemoizedState(sema: *Sema, stage: InternPool.MemoizedStateStage) C
3397033970 .offset = .nodeOffset(.zero),
3397133971 };
3397233972
33973 const val: Value = switch (builtin_decl.kind()) {
33973 const val: Value = switch (std_lang_decl.kind()) {
3397433974 .type => val: {
33975 const ty = try sema.analyzeAsType(&block, decl_src, .std_builtin_decl, uncoerced_val);
33976 try sema.ensureLayoutResolved(ty, decl_src, .builtin_type);
33975 const ty = try sema.analyzeAsType(&block, decl_src, .std_lang_decl, uncoerced_val);
33976 try sema.ensureLayoutResolved(ty, decl_src, .std_lang_type);
3397733977 break :val ty.toValue();
3397833978 },
3397933979 .func => val: {
33980 const func_ty = try sema.getExpectedBuiltinFnType(builtin_decl);
33980 const func_ty = try sema.getExpectedBuiltinFnType(std_lang_decl);
3398133981 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 });
3398333983 },
3398433984 .string => val: {
3398533985 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 });
3398733987 },
3398833988 };
3398933989
33990 if (zcu.builtin_decl_values.get(builtin_decl) != val.toIntern()) {
33991 zcu.builtin_decl_values.set(builtin_decl, val.toIntern());
33990 if (zcu.std_lang_decl_values.get(std_lang_decl) != val.toIntern()) {
33991 zcu.std_lang_decl_values.set(std_lang_decl, val.toIntern());
3399233992 any_changed = true;
3399333993 }
3399433994 }
......@@ -33998,7 +33998,7 @@ pub fn analyzeMemoizedState(sema: *Sema, stage: InternPool.MemoizedStateStage) C
3399833998}
3399933999
3400034000/// 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 {
3400234002 const pt = sema.pt;
3400334003 return switch (decl) {
3400434004 // `noinline fn () void`
src/Sema/arith.zig+2-2
......@@ -1191,7 +1191,7 @@ pub fn truncate(
11911191 val: Value,
11921192 ty: Type,
11931193 dest_ty: Type,
1194 dest_signedness: std.builtin.Signedness,
1194 dest_signedness: std.lang.Signedness,
11951195 dest_bits: u16,
11961196) CompileError!Value {
11971197 const pt = sema.pt;
......@@ -1808,7 +1808,7 @@ fn intTruncate(
18081808 sema: *Sema,
18091809 val: Value,
18101810 dest_ty: Type,
1811 dest_signedness: std.builtin.Signedness,
1811 dest_signedness: std.lang.Signedness,
18121812 dest_bits: u16,
18131813) !Value {
18141814 const pt = sema.pt;
src/Sema/type_resolution.zig+2-2
......@@ -35,7 +35,7 @@ pub const LayoutResolveReason = enum {
3535 @"export",
3636 @"extern",
3737 asm_out_type,
38 builtin_type,
38 std_lang_type,
3939
4040 /// Written after string: "while resolving type 'T' "
4141 /// e.g. "while resolving type 'MyStruct' for variable declared here"
......@@ -62,7 +62,7 @@ pub const LayoutResolveReason = enum {
6262 .@"export" => "for export here",
6363 .@"extern" => "for extern declaration here",
6464 .asm_out_type => "for inline assembly output type declared here",
65 .builtin_type => "from 'std.builtin'",
65 .std_lang_type => "from 'std.lang'",
6666 // zig fmt: on
6767 };
6868 }
src/Type.zig+8-8
......@@ -19,7 +19,7 @@ const Type = @This();
1919
2020ip_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 {
2323 return zcu.intern_pool.zigTypeTag(ty.toIntern());
2424}
2525
......@@ -903,7 +903,7 @@ pub fn ptrAlignment(ptr_ty: Type, zcu: *Zcu) Alignment {
903903 return Type.fromInterned(ptr_key.child).abiAlignment(zcu);
904904}
905905
906pub fn ptrAddressSpace(ty: Type, zcu: *const Zcu) std.builtin.AddressSpace {
906pub fn ptrAddressSpace(ty: Type, zcu: *const Zcu) std.lang.AddressSpace {
907907 return switch (zcu.intern_pool.indexToKey(ty.toIntern())) {
908908 .ptr_type => |ptr_type| ptr_type.flags.address_space,
909909 .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 {
13371337}
13381338
13391339/// 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 {
13411341 return ty.ptrSizeOrNull(zcu).?;
13421342}
13431343
13441344/// 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 {
13461346 return switch (zcu.intern_pool.indexToKey(ty.toIntern())) {
13471347 .ptr_type => |ptr_info| ptr_info.flags.size,
13481348 else => null,
......@@ -1627,7 +1627,7 @@ pub fn unionGetLayout(ty: Type, zcu: *const Zcu) Zcu.UnionLayout {
16271627 return Type.getUnionLayout(union_obj, zcu);
16281628}
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 {
16311631 const ip = &zcu.intern_pool;
16321632 return switch (ip.indexToKey(ty.toIntern())) {
16331633 .tuple_type => .auto,
......@@ -1949,7 +1949,7 @@ pub fn fnReturnType(ty: Type, zcu: *const Zcu) Type {
19491949}
19501950
19511951/// 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 {
19531953 return zcu.intern_pool.indexToKey(ty.toIntern()).func_type.cc;
19541954}
19551955
......@@ -2477,7 +2477,7 @@ pub fn explicitFieldAlignment(ty: Type, index: usize, zcu: *const Zcu) Alignment
24772477/// Asserts that the layout of `field_ty` is resolved. Asserts that `layout` is not `.@"packed"`.
24782478pub fn defaultStructFieldAlignment(
24792479 field_ty: Type,
2480 layout: std.builtin.Type.ContainerLayout,
2480 layout: std.lang.Type.ContainerLayout,
24812481 zcu: *const Zcu,
24822482) Alignment {
24832483 const overalign_big_int = switch (layout) {
......@@ -3227,7 +3227,7 @@ pub fn validateExtern(ty: Type, position: ExternPosition, zcu: *const Zcu) bool
32273227 .optional => ty.isPtrLikeOptional(zcu),
32283228 };
32293229}
3230fn validateExternCallconv(cc: std.builtin.CallingConvention) bool {
3230fn validateExternCallconv(cc: std.lang.CallingConvention) bool {
32313231 return switch (cc) {
32323232 // For now we want to authorize PTX kernel to use zig objects, even if we end up exposing the ABI.
32333233 // 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
18451845 } }));
18461846}
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 {
18491849 const ptr_ty = base_ptr.typeOf(pt.zcu);
18501850 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
21992199const InterpretMode = enum {
22002200 /// In this mode, types are assumed to match what the compiler was built with in terms of field
22012201 /// 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.
22032203 direct,
22042204 /// In this mode, various details of the type are allowed to differ from what the compiler was built
22052205 /// with. Fields are matched by name rather than index; added struct fields are ignored, and removed
22062206 /// 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 it
2208 /// is useful when applying breaking changes.
2207 /// making certain changes to `std.lang` (in particular reordering/adding/removing fields), so it is
2208 /// useful when applying breaking changes.
22092209 by_name,
22102210};
22112211const interpret_mode: InterpretMode = @field(InterpretMode, @tagName(build_options.value_interpret_mode));
22122212
22132213/// 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.
22152215pub fn interpret(val: Value, comptime T: type, pt: Zcu.PerThread) error{ OutOfMemory, UndefinedValue, TypeMismatch }!T {
22162216 const zcu = pt.zcu;
22172217 const io = zcu.comp.io;
......@@ -2313,7 +2313,7 @@ pub fn interpret(val: Value, comptime T: type, pt: Zcu.PerThread) error{ OutOfMe
23132313}
23142314
23152315/// 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.
23172317/// This is the inverse of `interpret`.
23182318pub fn uninterpret(val: anytype, ty: Type, pt: Zcu.PerThread) error{ OutOfMemory, TypeMismatch }!Value {
23192319 const T = @TypeOf(val);
src/Zcu.zig+21-21
......@@ -333,7 +333,7 @@ all_type_references: std.ArrayList(TypeReference) = .empty,
333333free_type_references: std.ArrayList(u32) = .empty,
334334
335335/// 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
338338incremental_debug_state: if (build_options.enable_debug_extensions) IncrementalDebugState else void =
339339 if (build_options.enable_debug_extensions) .init else {},
......@@ -425,11 +425,11 @@ pub const EmbedTableAdapter = struct {
425425 }
426426};
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`.
429429/// The name must exactly match the declaration name, as comptime logic is used to compute the namespace accesses.
430430/// 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`.
432pub const BuiltinDecl = enum {
431/// Additionally, parent namespaces must be resolved in the same stage as their children; see `StdLangDecl.stage`.
432pub const StdLangDecl = enum {
433433 Signedness,
434434 AddressSpace,
435435 CallingConvention,
......@@ -508,7 +508,7 @@ pub const BuiltinDecl = enum {
508508 @"assembly.Clobbers",
509509
510510 /// 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 } {
512512 return switch (decl) {
513513 .returnError => .func,
514514
......@@ -593,7 +593,7 @@ pub const BuiltinDecl = enum {
593593 }
594594
595595 /// Resolution of these values is done in three distinct stages:
596 /// * Resolution of `std.builtin.Panic` and everything under it
596 /// * Resolution of `std.lang.Panic` and everything under it
597597 /// * Resolution of `VaList`
598598 /// * Resolution of `assembly`
599599 /// * Everything else
......@@ -606,12 +606,12 @@ pub const BuiltinDecl = enum {
606606 /// by itself.
607607 ///
608608 /// `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 {
610610 return switch (decl) {
611611 .VaList => .va_list,
612612 .assembly, .@"assembly.Clobbers" => .assembly,
613613 else => {
614 if (@intFromEnum(decl) <= @intFromEnum(BuiltinDecl.@"Type.Declaration")) {
614 if (@intFromEnum(decl) <= @intFromEnum(StdLangDecl.@"Type.Declaration")) {
615615 return .main;
616616 } else {
617617 return .panic;
......@@ -621,24 +621,24 @@ pub const BuiltinDecl = enum {
621621 }
622622
623623 /// 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.
625 pub fn access(decl: BuiltinDecl) union(enum) {
624 /// `std.lang` namespace, or as a child of some preceding `StdLangDecl` value.
625 pub fn access(decl: StdLangDecl) union(enum) {
626626 direct: []const u8,
627 nested: struct { BuiltinDecl, []const u8 },
627 nested: struct { StdLangDecl, []const u8 },
628628 } {
629629 @setEvalBranchQuota(2000);
630630 return switch (decl) {
631631 inline else => |tag| {
632632 const name = @tagName(tag);
633633 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]);
635635 comptime assert(@intFromEnum(parent) < @intFromEnum(tag)); // dependencies ordered correctly
636636 return .{ .nested = .{ parent, name[split + 1 ..] } };
637637 },
638638 };
639639 }
640640
641 const Memoized = std.enums.EnumArray(BuiltinDecl, InternPool.Index);
641 const Memoized = std.enums.EnumArray(StdLangDecl, InternPool.Index);
642642};
643643
644644pub const SimplePanicId = enum {
......@@ -662,7 +662,7 @@ pub const SimplePanicId = enum {
662662 memcpy_alias,
663663 noreturn_returned,
664664
665 pub fn toBuiltin(id: SimplePanicId) BuiltinDecl {
665 pub fn toStdLangDecl(id: SimplePanicId) StdLangDecl {
666666 return switch (id) {
667667 // zig fmt: off
668668 .reached_unreachable => .@"panic.reachedUnreachable",
......@@ -744,9 +744,9 @@ pub const Export = struct {
744744
745745 pub const Options = struct {
746746 name: InternPool.NullTerminatedString,
747 linkage: std.builtin.GlobalLinkage = .strong,
747 linkage: std.lang.GlobalLinkage = .strong,
748748 section: InternPool.OptionalNullTerminatedString = .none,
749 visibility: std.builtin.SymbolVisibility = .default,
749 visibility: std.lang.SymbolVisibility = .default,
750750 };
751751
752752 /// Index into `all_exports`.
......@@ -3941,7 +3941,7 @@ pub fn addGlobalAssembly(zcu: *Zcu, unit: AnalUnit, source: []const u8) !void {
39413941
39423942pub const Feature = enum {
39433943 /// When this feature is enabled, Sema will emit calls to
3944 /// `std.builtin.panic` functions for things like safety checks and
3944 /// `std.lang.panic` functions for things like safety checks and
39453945 /// unreachables. Otherwise traps will be emitted.
39463946 panic_fn,
39473947 /// 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
45244524 }
45254525}
45264526
4527pub fn callconvSupported(zcu: *Zcu, cc: std.builtin.CallingConvention) union(enum) {
4527pub fn callconvSupported(zcu: *Zcu, cc: std.lang.CallingConvention) union(enum) {
45284528 ok,
45294529 bad_arch: []const std.Target.Cpu.Arch, // value is allowed archs for cc
4530 bad_backend: std.builtin.CompilerBackend, // value is current backend
4530 bad_backend: std.lang.CompilerBackend, // value is current backend
45314531} {
45324532 const target = zcu.getTarget();
45334533 const backend = target_util.zigBackend(target, zcu.comp.config.use_llvm);
......@@ -4995,7 +4995,7 @@ fn addDependencyLoopErrorLine(
49954995 }),
49964996 .memoized_state => |stage| switch (stage) {
49974997 .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}),
49994999 },
50005000 .func => |func| try eb.printString("{f} uses inferred error set of function '{f}' here", .{
50015001 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
50465046 .nav_ty => |nav| try w.print("type of declaration '{f}'", .{ip.getNav(nav).fqn.fmt(ip)}),
50475047 .memoized_state => |stage| switch (stage) {
50485048 .panic => try w.writeAll("panic handler"),
5049 else => try w.writeAll("'std.builtin' declarations"),
5049 else => try w.writeAll("'std.lang' declarations"),
50505050 },
50515051 .type_layout => |ty| try w.print("type '{f}'", .{
50525052 Type.fromInterned(ty).containerTypeName(ip).fmt(ip),
src/Zcu/PerThread.zig+4-4
......@@ -1083,13 +1083,13 @@ pub fn ensureMemoizedStateUpToDate(
10831083 } else {
10841084 if (prev_failed) return error.AnalysisFail;
10851085 // 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) {
10871087 .main => .Type,
10881088 .panic => .panic,
10891089 .va_list => .VaList,
10901090 .assembly => .assembly,
10911091 };
1092 if (zcu.builtin_decl_values.get(to_check) != .none) return;
1092 if (zcu.std_lang_decl_values.get(to_check) != .none) return;
10931093 }
10941094
10951095 if (zcu.comp.debugIncremental()) {
......@@ -3751,7 +3751,7 @@ pub fn populateTestFunctions(pt: Zcu.PerThread) Allocator.Error!void {
37513751
37523752 // Our job is to correctly set the value of the `test_functions` declaration if it has been
37533753 // 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 been
3754 // reference it, and `std.lang` shouldn't have type errors. However, if it hasn't been
37553755 // analyzed, we will just terminate early, since clearly the test runner hasn't referenced
37563756 // `test_functions` so there's no point populating it. More to the the point, we potentially
37573757 // *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
39653965 return .fromInterned(try ip.getCoerced(gpa, io, pt.tid, val.toIntern(), new_ty.toIntern()));
39663966}
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 {
39693969 return Type.fromInterned(try pt.intern(.{ .int_type = .{
39703970 .signedness = signedness,
39713971 .bits = bits,
src/codegen.zig+3-3
......@@ -29,7 +29,7 @@ pub const CodeGenError = GenerateSymbolError || error{
2929 CodegenFail,
3030};
3131
32fn devFeatureForBackend(backend: std.builtin.CompilerBackend) dev.Feature {
32fn devFeatureForBackend(backend: std.lang.CompilerBackend) dev.Feature {
3333 return switch (backend) {
3434 .other, .stage1 => unreachable,
3535 .stage2_aarch64 => .aarch64_backend,
......@@ -47,7 +47,7 @@ fn devFeatureForBackend(backend: std.builtin.CompilerBackend) dev.Feature {
4747 };
4848}
4949
50fn importBackend(comptime backend: std.builtin.CompilerBackend) type {
50fn importBackend(comptime backend: std.lang.CompilerBackend) type {
5151 return switch (backend) {
5252 .other, .stage1 => unreachable,
5353 .stage2_aarch64 => aarch64,
......@@ -105,7 +105,7 @@ pub const AnyMir = union {
105105 wasm: if (dev.env.supports(.wasm_backend)) @import("codegen/wasm/Mir.zig") else noreturn,
106106 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 {
109109 return switch (backend) {
110110 .stage2_aarch64 => "aarch64",
111111 .stage2_riscv64 => "riscv64",
src/codegen/aarch64/Assemble.zig+1-1
......@@ -307,7 +307,7 @@ const SymbolSpec = union(enum) {
307307 },
308308 systemreg,
309309 imm: struct {
310 type: std.builtin.Type.Int,
310 type: std.lang.Type.Int,
311311 multiple_of: ?comptime_int = null,
312312 min_valid: ?comptime_int = null,
313313 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,
28872887
28882888 const bin_op = air.data(air.inst_index).bin_op;
28892889 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)
28912891 .{ .signedness = .unsigned, .bits = 1 }
28922892 else if (ty.isAbiInt(zcu))
28932893 ty.intInfo(zcu)
......@@ -3144,7 +3144,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,
31443144
31453145 const ty_op = air.data(air.inst_index).ty_op;
31463146 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: {
31483148 if (ty_op.ty == .bool_type) break :int_info .{ .signedness = .unsigned, .bits = 1 };
31493149 if (!ty.isAbiInt(zcu)) return isel.fail("bad {t} {f}", .{ air_tag, isel.fmtType(ty) });
31503150 break :int_info ty.intInfo(zcu);
......@@ -3199,7 +3199,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory,
31993199 const src_tag = src_ty.zigTypeTag(zcu);
32003200 if (dst_ty.isAbiInt(zcu) and (src_tag == .bool or src_ty.isAbiInt(zcu))) {
32013201 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);
32033203 assert(dst_int_info.bits == src_int_info.bits);
32043204 if (dst_tag != .@"struct" and src_tag != .@"struct" and src_tag != .bool and dst_int_info.signedness == src_int_info.signedness) {
32053205 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,
45174517 .switch_br => {
45184518 const switch_br = isel.air.unwrapSwitch(air.inst_index);
45194519 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)
45214521 .{ .signedness = .unsigned, .bits = 1 }
45224522 else if (cond_ty.isAbiInt(zcu))
45234523 cond_ty.intInfo(zcu)
......@@ -7981,7 +7981,7 @@ fn emit(isel: *Select, instruction: codegen.aarch64.encoding.Instruction) !void
79817981fn emitPanic(isel: *Select, panic_id: Zcu.SimplePanicId) !void {
79827982 const zcu = isel.pt.zcu;
79837983 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()))) {
79857985 else => unreachable,
79867986 inline .@"extern", .func => |func| func.owner_nav,
79877987 },
......@@ -8229,7 +8229,7 @@ fn elemPtr(
82298229fn clzLimb(
82308230 isel: *Select,
82318231 res_ra: Register.Alias,
8232 src_int_info: std.builtin.Type.Int,
8232 src_int_info: std.lang.Type.Int,
82338233 src_ra: Register.Alias,
82348234) !void {
82358235 switch (src_int_info.bits) {
......@@ -8274,7 +8274,7 @@ fn clzLimb(
82748274fn ctzLimb(
82758275 isel: *Select,
82768276 res_ra: Register.Alias,
8277 src_int_info: std.builtin.Type.Int,
8277 src_int_info: std.lang.Type.Int,
82788278 src_ra: Register.Alias,
82798279) !void {
82808280 switch (src_int_info.bits) {
......@@ -8319,7 +8319,7 @@ fn cmp(
83198319 var lhs_vi = orig_lhs_vi;
83208320 var rhs_vi = orig_rhs_vi;
83218321 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)
83238323 .{ .signedness = .unsigned, .bits = 1 }
83248324 else if (ty.isAbiInt(isel.pt.zcu))
83258325 ty.intInfo(isel.pt.zcu)
......@@ -8523,7 +8523,7 @@ fn loadReg(
85238523 isel: *Select,
85248524 ra: Register.Alias,
85258525 size: u64,
8526 signedness: std.builtin.Signedness,
8526 signedness: std.lang.Signedness,
85278527 base_ra: Register.Alias,
85288528 offset: i65,
85298529) !void {
......@@ -8908,7 +8908,7 @@ pub const Value = struct {
89088908 },
89098909 small: struct {
89108910 size: u5,
8911 signedness: std.builtin.Signedness,
8911 signedness: std.lang.Signedness,
89128912 is_vector: bool,
89138913 hint: Register.Alias,
89148914 register: Register.Alias,
......@@ -9037,13 +9037,13 @@ pub const Value = struct {
90379037 };
90389038 }
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 {
90419041 const value = vi.get(isel);
90429042 assert(value.location_payload.small.size <= 2);
90439043 value.location_payload.small.signedness = new_signedness;
90449044 }
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 {
90479047 const value = vi.get(isel);
90489048 return switch (value.flags.location_tag) {
90499049 .large => .unsigned,
......@@ -9505,7 +9505,7 @@ pub const Value = struct {
95059505 offset: u64 = 0,
95069506 @"volatile": bool = false,
95079507 split: bool = true,
9508 wrap: ?std.builtin.Type.Int = null,
9508 wrap: ?std.lang.Type.Int = null,
95099509 expected_live_registers: *const LiveRegisters = &.initFill(.free),
95109510 };
95119511
......@@ -9717,7 +9717,7 @@ pub const Value = struct {
97179717 root_ty: ZigType,
97189718 opts: struct {
97199719 root_vi: Value.Index = .free,
9720 wrap: ?std.builtin.Type.Int = null,
9720 wrap: ?std.lang.Type.Int = null,
97219721 expected_live_registers: *const LiveRegisters = &.initFill(.free),
97229722 },
97239723 ) !?void {
......@@ -10289,7 +10289,7 @@ pub const Value = struct {
1028910289 const payload_ty: ZigType = .fromInterned(error_union_type.payload_type);
1029010290 const error_set_offset = codegen.errUnionErrorOffset(payload_ty, zcu);
1029110291 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 };
1029310293 var parts: [2]Part = undefined;
1029410294 var parts_len: Value.PartsLen = 0;
1029510295 var field_end: u64 = 0;
......@@ -10393,7 +10393,7 @@ pub const Value = struct {
1039310393 (std.math.divCeil(u64, size, @as(u64, 1) << min_part_log2_stride) catch unreachable) > Value.max_parts)
1039410394 return isel.fail("Value.FieldPartIterator.next({f})", .{isel.fmtType(ty)});
1039510395 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 };
1039710397 var parts: [Value.max_parts]Part = undefined;
1039810398 var parts_len: Value.PartsLen = 0;
1039910399 var field_end: u64 = 0;
......@@ -10512,7 +10512,7 @@ pub const Value = struct {
1051210512 const alignment = vi.alignment(isel);
1051310513 const tag_offset = union_layout.tagOffset();
1051410514 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 };
1051610516 var parts: [2]Part = undefined;
1051710517 var parts_len: Value.PartsLen = 0;
1051810518 var field_end: u64 = 0;
src/codegen/aarch64/encoding.zig+154-154
......@@ -6755,7 +6755,7 @@ pub const Instruction = packed union {
67556755 o0: AddSubtractOp = .add,
67566756 Rm: Register.Encoded,
67576757 op21: u2 = 0b01,
6758 U: std.builtin.Signedness = .signed,
6758 U: std.lang.Signedness = .signed,
67596759 decoded24: u5 = 0b11011,
67606760 op54: u2 = 0b00,
67616761 sf: Register.GeneralSize = .doubleword,
......@@ -6769,7 +6769,7 @@ pub const Instruction = packed union {
67696769 o0: AddSubtractOp = .sub,
67706770 Rm: Register.Encoded,
67716771 op21: u2 = 0b01,
6772 U: std.builtin.Signedness = .signed,
6772 U: std.lang.Signedness = .signed,
67736773 decoded24: u5 = 0b11011,
67746774 op54: u2 = 0b00,
67756775 sf: Register.GeneralSize = .doubleword,
......@@ -6783,7 +6783,7 @@ pub const Instruction = packed union {
67836783 o0: AddSubtractOp = .add,
67846784 Rm: Register.Encoded,
67856785 op21: u2 = 0b10,
6786 U: std.builtin.Signedness = .signed,
6786 U: std.lang.Signedness = .signed,
67876787 decoded24: u5 = 0b11011,
67886788 op54: u2 = 0b00,
67896789 sf: Register.GeneralSize = .doubleword,
......@@ -6797,7 +6797,7 @@ pub const Instruction = packed union {
67976797 o0: AddSubtractOp = .add,
67986798 Rm: Register.Encoded,
67996799 op21: u2 = 0b01,
6800 U: std.builtin.Signedness = .unsigned,
6800 U: std.lang.Signedness = .unsigned,
68016801 decoded24: u5 = 0b11011,
68026802 op54: u2 = 0b00,
68036803 sf: Register.GeneralSize = .doubleword,
......@@ -6811,7 +6811,7 @@ pub const Instruction = packed union {
68116811 o0: AddSubtractOp = .sub,
68126812 Rm: Register.Encoded,
68136813 op21: u2 = 0b01,
6814 U: std.builtin.Signedness = .unsigned,
6814 U: std.lang.Signedness = .unsigned,
68156815 decoded24: u5 = 0b11011,
68166816 op54: u2 = 0b00,
68176817 sf: Register.GeneralSize = .doubleword,
......@@ -6825,7 +6825,7 @@ pub const Instruction = packed union {
68256825 o0: AddSubtractOp = .add,
68266826 Rm: Register.Encoded,
68276827 op21: u2 = 0b10,
6828 U: std.builtin.Signedness = .unsigned,
6828 U: std.lang.Signedness = .unsigned,
68296829 decoded24: u5 = 0b11011,
68306830 op54: u2 = 0b00,
68316831 sf: Register.GeneralSize = .doubleword,
......@@ -7052,7 +7052,7 @@ pub const Instruction = packed union {
70527052 decoded17: u6 = 0b111100,
70537053 a: u1,
70547054 decoded24: u5 = 0b11110,
7055 U: std.builtin.Signedness,
7055 U: std.lang.Signedness,
70567056 decoded30: u2 = 0b01,
70577057 };
70587058
......@@ -7065,7 +7065,7 @@ pub const Instruction = packed union {
70657065 decoded17: u6 = 0b111100,
70667066 o2: u1 = 0b0,
70677067 decoded24: u5 = 0b11110,
7068 U: std.builtin.Signedness = .signed,
7068 U: std.lang.Signedness = .signed,
70697069 decoded30: u2 = 0b01,
70707070 };
70717071
......@@ -7078,7 +7078,7 @@ pub const Instruction = packed union {
70787078 decoded17: u6 = 0b111100,
70797079 o2: u1 = 0b0,
70807080 decoded24: u5 = 0b11110,
7081 U: std.builtin.Signedness = .signed,
7081 U: std.lang.Signedness = .signed,
70827082 decoded30: u2 = 0b01,
70837083 };
70847084
......@@ -7091,7 +7091,7 @@ pub const Instruction = packed union {
70917091 decoded17: u6 = 0b111100,
70927092 o2: u1 = 0b0,
70937093 decoded24: u5 = 0b11110,
7094 U: std.builtin.Signedness = .signed,
7094 U: std.lang.Signedness = .signed,
70957095 decoded30: u2 = 0b01,
70967096 };
70977097
......@@ -7104,7 +7104,7 @@ pub const Instruction = packed union {
71047104 decoded17: u6 = 0b111100,
71057105 o2: u1 = 0b0,
71067106 decoded24: u5 = 0b11110,
7107 U: std.builtin.Signedness = .signed,
7107 U: std.lang.Signedness = .signed,
71087108 decoded30: u2 = 0b01,
71097109 };
71107110
......@@ -7117,7 +7117,7 @@ pub const Instruction = packed union {
71177117 decoded17: u6 = 0b111100,
71187118 o2: u1 = 0b1,
71197119 decoded24: u5 = 0b11110,
7120 U: std.builtin.Signedness = .signed,
7120 U: std.lang.Signedness = .signed,
71217121 decoded30: u2 = 0b01,
71227122 };
71237123
......@@ -7130,7 +7130,7 @@ pub const Instruction = packed union {
71307130 decoded17: u6 = 0b111100,
71317131 o2: u1 = 0b1,
71327132 decoded24: u5 = 0b11110,
7133 U: std.builtin.Signedness = .signed,
7133 U: std.lang.Signedness = .signed,
71347134 decoded30: u2 = 0b01,
71357135 };
71367136
......@@ -7143,7 +7143,7 @@ pub const Instruction = packed union {
71437143 decoded17: u6 = 0b111100,
71447144 o2: u1 = 0b1,
71457145 decoded24: u5 = 0b11110,
7146 U: std.builtin.Signedness = .signed,
7146 U: std.lang.Signedness = .signed,
71477147 decoded30: u2 = 0b01,
71487148 };
71497149
......@@ -7156,7 +7156,7 @@ pub const Instruction = packed union {
71567156 decoded17: u6 = 0b111100,
71577157 o2: u1 = 0b1,
71587158 decoded24: u5 = 0b11110,
7159 U: std.builtin.Signedness = .signed,
7159 U: std.lang.Signedness = .signed,
71607160 decoded30: u2 = 0b01,
71617161 };
71627162
......@@ -7169,7 +7169,7 @@ pub const Instruction = packed union {
71697169 decoded17: u6 = 0b111100,
71707170 o2: u1 = 0b1,
71717171 decoded24: u5 = 0b11110,
7172 U: std.builtin.Signedness = .signed,
7172 U: std.lang.Signedness = .signed,
71737173 decoded30: u2 = 0b01,
71747174 };
71757175
......@@ -7182,7 +7182,7 @@ pub const Instruction = packed union {
71827182 decoded17: u6 = 0b111100,
71837183 o2: u1 = 0b1,
71847184 decoded24: u5 = 0b11110,
7185 U: std.builtin.Signedness = .signed,
7185 U: std.lang.Signedness = .signed,
71867186 decoded30: u2 = 0b01,
71877187 };
71887188
......@@ -7195,7 +7195,7 @@ pub const Instruction = packed union {
71957195 decoded17: u6 = 0b111100,
71967196 o2: u1 = 0b1,
71977197 decoded24: u5 = 0b11110,
7198 U: std.builtin.Signedness = .signed,
7198 U: std.lang.Signedness = .signed,
71997199 decoded30: u2 = 0b01,
72007200 };
72017201
......@@ -7208,7 +7208,7 @@ pub const Instruction = packed union {
72087208 decoded17: u6 = 0b111100,
72097209 o2: u1 = 0b0,
72107210 decoded24: u5 = 0b11110,
7211 U: std.builtin.Signedness = .unsigned,
7211 U: std.lang.Signedness = .unsigned,
72127212 decoded30: u2 = 0b01,
72137213 };
72147214
......@@ -7221,7 +7221,7 @@ pub const Instruction = packed union {
72217221 decoded17: u6 = 0b111100,
72227222 o2: u1 = 0b0,
72237223 decoded24: u5 = 0b11110,
7224 U: std.builtin.Signedness = .unsigned,
7224 U: std.lang.Signedness = .unsigned,
72257225 decoded30: u2 = 0b01,
72267226 };
72277227
......@@ -7234,7 +7234,7 @@ pub const Instruction = packed union {
72347234 decoded17: u6 = 0b111100,
72357235 o2: u1 = 0b0,
72367236 decoded24: u5 = 0b11110,
7237 U: std.builtin.Signedness = .unsigned,
7237 U: std.lang.Signedness = .unsigned,
72387238 decoded30: u2 = 0b01,
72397239 };
72407240
......@@ -7247,7 +7247,7 @@ pub const Instruction = packed union {
72477247 decoded17: u6 = 0b111100,
72487248 o2: u1 = 0b0,
72497249 decoded24: u5 = 0b11110,
7250 U: std.builtin.Signedness = .unsigned,
7250 U: std.lang.Signedness = .unsigned,
72517251 decoded30: u2 = 0b01,
72527252 };
72537253
......@@ -7260,7 +7260,7 @@ pub const Instruction = packed union {
72607260 decoded17: u6 = 0b111100,
72617261 o2: u1 = 0b1,
72627262 decoded24: u5 = 0b11110,
7263 U: std.builtin.Signedness = .unsigned,
7263 U: std.lang.Signedness = .unsigned,
72647264 decoded30: u2 = 0b01,
72657265 };
72667266
......@@ -7273,7 +7273,7 @@ pub const Instruction = packed union {
72737273 decoded17: u6 = 0b111100,
72747274 o2: u1 = 0b1,
72757275 decoded24: u5 = 0b11110,
7276 U: std.builtin.Signedness = .unsigned,
7276 U: std.lang.Signedness = .unsigned,
72777277 decoded30: u2 = 0b01,
72787278 };
72797279
......@@ -7286,7 +7286,7 @@ pub const Instruction = packed union {
72867286 decoded17: u6 = 0b111100,
72877287 o2: u1 = 0b1,
72887288 decoded24: u5 = 0b11110,
7289 U: std.builtin.Signedness = .unsigned,
7289 U: std.lang.Signedness = .unsigned,
72907290 decoded30: u2 = 0b01,
72917291 };
72927292
......@@ -7299,7 +7299,7 @@ pub const Instruction = packed union {
72997299 decoded17: u6 = 0b111100,
73007300 o2: u1 = 0b1,
73017301 decoded24: u5 = 0b11110,
7302 U: std.builtin.Signedness = .unsigned,
7302 U: std.lang.Signedness = .unsigned,
73037303 decoded30: u2 = 0b01,
73047304 };
73057305
......@@ -7312,7 +7312,7 @@ pub const Instruction = packed union {
73127312 decoded17: u6 = 0b111100,
73137313 o2: u1 = 0b1,
73147314 decoded24: u5 = 0b11110,
7315 U: std.builtin.Signedness = .unsigned,
7315 U: std.lang.Signedness = .unsigned,
73167316 decoded30: u2 = 0b01,
73177317 };
73187318
......@@ -7428,7 +7428,7 @@ pub const Instruction = packed union {
74287428 decoded17: u5 = 0b10000,
74297429 size: Size,
74307430 decoded24: u5 = 0b11110,
7431 U: std.builtin.Signedness,
7431 U: std.lang.Signedness,
74327432 decoded30: u2 = 0b01,
74337433 };
74347434
......@@ -7441,7 +7441,7 @@ pub const Instruction = packed union {
74417441 decoded17: u5 = 0b10000,
74427442 size: Size,
74437443 decoded24: u5 = 0b11110,
7444 U: std.builtin.Signedness = .signed,
7444 U: std.lang.Signedness = .signed,
74457445 decoded30: u2 = 0b01,
74467446 };
74477447
......@@ -7454,7 +7454,7 @@ pub const Instruction = packed union {
74547454 decoded17: u5 = 0b10000,
74557455 size: Size,
74567456 decoded24: u5 = 0b11110,
7457 U: std.builtin.Signedness = .signed,
7457 U: std.lang.Signedness = .signed,
74587458 decoded30: u2 = 0b01,
74597459 };
74607460
......@@ -7467,7 +7467,7 @@ pub const Instruction = packed union {
74677467 decoded17: u5 = 0b10000,
74687468 size: Size,
74697469 decoded24: u5 = 0b11110,
7470 U: std.builtin.Signedness = .signed,
7470 U: std.lang.Signedness = .signed,
74717471 decoded30: u2 = 0b01,
74727472 };
74737473
......@@ -7480,7 +7480,7 @@ pub const Instruction = packed union {
74807480 decoded17: u5 = 0b10000,
74817481 size: Size,
74827482 decoded24: u5 = 0b11110,
7483 U: std.builtin.Signedness = .signed,
7483 U: std.lang.Signedness = .signed,
74847484 decoded30: u2 = 0b01,
74857485 };
74867486
......@@ -7493,7 +7493,7 @@ pub const Instruction = packed union {
74937493 decoded17: u5 = 0b10000,
74947494 size: Size,
74957495 decoded24: u5 = 0b11110,
7496 U: std.builtin.Signedness = .signed,
7496 U: std.lang.Signedness = .signed,
74977497 decoded30: u2 = 0b01,
74987498 };
74997499
......@@ -7506,7 +7506,7 @@ pub const Instruction = packed union {
75067506 decoded17: u5 = 0b10000,
75077507 size: Size,
75087508 decoded24: u5 = 0b11110,
7509 U: std.builtin.Signedness = .signed,
7509 U: std.lang.Signedness = .signed,
75107510 decoded30: u2 = 0b01,
75117511 };
75127512
......@@ -7519,7 +7519,7 @@ pub const Instruction = packed union {
75197519 decoded17: u5 = 0b10000,
75207520 size: Size,
75217521 decoded24: u5 = 0b11110,
7522 U: std.builtin.Signedness = .signed,
7522 U: std.lang.Signedness = .signed,
75237523 decoded30: u2 = 0b01,
75247524 };
75257525
......@@ -7533,7 +7533,7 @@ pub const Instruction = packed union {
75337533 sz: Sz,
75347534 o2: u1 = 0b0,
75357535 decoded24: u5 = 0b11110,
7536 U: std.builtin.Signedness = .signed,
7536 U: std.lang.Signedness = .signed,
75377537 decoded30: u2 = 0b01,
75387538 };
75397539
......@@ -7547,7 +7547,7 @@ pub const Instruction = packed union {
75477547 sz: Sz,
75487548 o2: u1 = 0b0,
75497549 decoded24: u5 = 0b11110,
7550 U: std.builtin.Signedness = .signed,
7550 U: std.lang.Signedness = .signed,
75517551 decoded30: u2 = 0b01,
75527552 };
75537553
......@@ -7561,7 +7561,7 @@ pub const Instruction = packed union {
75617561 sz: Sz,
75627562 o2: u1 = 0b0,
75637563 decoded24: u5 = 0b11110,
7564 U: std.builtin.Signedness = .signed,
7564 U: std.lang.Signedness = .signed,
75657565 decoded30: u2 = 0b01,
75667566 };
75677567
......@@ -7575,7 +7575,7 @@ pub const Instruction = packed union {
75757575 sz: Sz,
75767576 o2: u1 = 0b0,
75777577 decoded24: u5 = 0b11110,
7578 U: std.builtin.Signedness = .signed,
7578 U: std.lang.Signedness = .signed,
75797579 decoded30: u2 = 0b01,
75807580 };
75817581
......@@ -7589,7 +7589,7 @@ pub const Instruction = packed union {
75897589 sz: Sz,
75907590 o2: u1 = 0b1,
75917591 decoded24: u5 = 0b11110,
7592 U: std.builtin.Signedness = .signed,
7592 U: std.lang.Signedness = .signed,
75937593 decoded30: u2 = 0b01,
75947594 };
75957595
......@@ -7603,7 +7603,7 @@ pub const Instruction = packed union {
76037603 sz: Sz,
76047604 o2: u1 = 0b1,
76057605 decoded24: u5 = 0b11110,
7606 U: std.builtin.Signedness = .signed,
7606 U: std.lang.Signedness = .signed,
76077607 decoded30: u2 = 0b01,
76087608 };
76097609
......@@ -7617,7 +7617,7 @@ pub const Instruction = packed union {
76177617 sz: Sz,
76187618 o2: u1 = 0b1,
76197619 decoded24: u5 = 0b11110,
7620 U: std.builtin.Signedness = .signed,
7620 U: std.lang.Signedness = .signed,
76217621 decoded30: u2 = 0b01,
76227622 };
76237623
......@@ -7631,7 +7631,7 @@ pub const Instruction = packed union {
76317631 sz: Sz,
76327632 o2: u1 = 0b1,
76337633 decoded24: u5 = 0b11110,
7634 U: std.builtin.Signedness = .signed,
7634 U: std.lang.Signedness = .signed,
76357635 decoded30: u2 = 0b01,
76367636 };
76377637
......@@ -7645,7 +7645,7 @@ pub const Instruction = packed union {
76457645 sz: Sz,
76467646 o2: u1 = 0b1,
76477647 decoded24: u5 = 0b11110,
7648 U: std.builtin.Signedness = .signed,
7648 U: std.lang.Signedness = .signed,
76497649 decoded30: u2 = 0b01,
76507650 };
76517651
......@@ -7659,7 +7659,7 @@ pub const Instruction = packed union {
76597659 sz: Sz,
76607660 o2: u1 = 0b1,
76617661 decoded24: u5 = 0b11110,
7662 U: std.builtin.Signedness = .signed,
7662 U: std.lang.Signedness = .signed,
76637663 decoded30: u2 = 0b01,
76647664 };
76657665
......@@ -7673,7 +7673,7 @@ pub const Instruction = packed union {
76737673 sz: Sz,
76747674 o2: u1 = 0b1,
76757675 decoded24: u5 = 0b11110,
7676 U: std.builtin.Signedness = .signed,
7676 U: std.lang.Signedness = .signed,
76777677 decoded30: u2 = 0b01,
76787678 };
76797679
......@@ -7686,7 +7686,7 @@ pub const Instruction = packed union {
76867686 decoded17: u5 = 0b10000,
76877687 size: Size,
76887688 decoded24: u5 = 0b11110,
7689 U: std.builtin.Signedness = .unsigned,
7689 U: std.lang.Signedness = .unsigned,
76907690 decoded30: u2 = 0b01,
76917691 };
76927692
......@@ -7699,7 +7699,7 @@ pub const Instruction = packed union {
76997699 decoded17: u5 = 0b10000,
77007700 size: Size,
77017701 decoded24: u5 = 0b11110,
7702 U: std.builtin.Signedness = .unsigned,
7702 U: std.lang.Signedness = .unsigned,
77037703 decoded30: u2 = 0b01,
77047704 };
77057705
......@@ -7712,7 +7712,7 @@ pub const Instruction = packed union {
77127712 decoded17: u5 = 0b10000,
77137713 size: Size,
77147714 decoded24: u5 = 0b11110,
7715 U: std.builtin.Signedness = .unsigned,
7715 U: std.lang.Signedness = .unsigned,
77167716 decoded30: u2 = 0b01,
77177717 };
77187718
......@@ -7725,7 +7725,7 @@ pub const Instruction = packed union {
77257725 decoded17: u5 = 0b10000,
77267726 size: Size,
77277727 decoded24: u5 = 0b11110,
7728 U: std.builtin.Signedness = .unsigned,
7728 U: std.lang.Signedness = .unsigned,
77297729 decoded30: u2 = 0b01,
77307730 };
77317731
......@@ -7738,7 +7738,7 @@ pub const Instruction = packed union {
77387738 decoded17: u5 = 0b10000,
77397739 size: Size,
77407740 decoded24: u5 = 0b11110,
7741 U: std.builtin.Signedness = .unsigned,
7741 U: std.lang.Signedness = .unsigned,
77427742 decoded30: u2 = 0b01,
77437743 };
77447744
......@@ -7751,7 +7751,7 @@ pub const Instruction = packed union {
77517751 decoded17: u5 = 0b10000,
77527752 size: Size,
77537753 decoded24: u5 = 0b11110,
7754 U: std.builtin.Signedness = .unsigned,
7754 U: std.lang.Signedness = .unsigned,
77557755 decoded30: u2 = 0b01,
77567756 };
77577757
......@@ -7764,7 +7764,7 @@ pub const Instruction = packed union {
77647764 decoded17: u5 = 0b10000,
77657765 size: Size,
77667766 decoded24: u5 = 0b11110,
7767 U: std.builtin.Signedness = .unsigned,
7767 U: std.lang.Signedness = .unsigned,
77687768 decoded30: u2 = 0b01,
77697769 };
77707770
......@@ -7778,7 +7778,7 @@ pub const Instruction = packed union {
77787778 sz: Sz,
77797779 o2: u1 = 0b0,
77807780 decoded24: u5 = 0b11110,
7781 U: std.builtin.Signedness = .unsigned,
7781 U: std.lang.Signedness = .unsigned,
77827782 decoded30: u2 = 0b01,
77837783 };
77847784
......@@ -7792,7 +7792,7 @@ pub const Instruction = packed union {
77927792 sz: Sz,
77937793 o2: u1 = 0b0,
77947794 decoded24: u5 = 0b11110,
7795 U: std.builtin.Signedness = .unsigned,
7795 U: std.lang.Signedness = .unsigned,
77967796 decoded30: u2 = 0b01,
77977797 };
77987798
......@@ -7806,7 +7806,7 @@ pub const Instruction = packed union {
78067806 sz: Sz,
78077807 o2: u1 = 0b0,
78087808 decoded24: u5 = 0b11110,
7809 U: std.builtin.Signedness = .unsigned,
7809 U: std.lang.Signedness = .unsigned,
78107810 decoded30: u2 = 0b01,
78117811 };
78127812
......@@ -7820,7 +7820,7 @@ pub const Instruction = packed union {
78207820 sz: Sz,
78217821 o2: u1 = 0b0,
78227822 decoded24: u5 = 0b11110,
7823 U: std.builtin.Signedness = .unsigned,
7823 U: std.lang.Signedness = .unsigned,
78247824 decoded30: u2 = 0b01,
78257825 };
78267826
......@@ -7834,7 +7834,7 @@ pub const Instruction = packed union {
78347834 sz: Sz,
78357835 o2: u1 = 0b0,
78367836 decoded24: u5 = 0b11110,
7837 U: std.builtin.Signedness = .unsigned,
7837 U: std.lang.Signedness = .unsigned,
78387838 decoded30: u2 = 0b01,
78397839 };
78407840
......@@ -7848,7 +7848,7 @@ pub const Instruction = packed union {
78487848 sz: Sz,
78497849 o2: u1 = 0b1,
78507850 decoded24: u5 = 0b11110,
7851 U: std.builtin.Signedness = .unsigned,
7851 U: std.lang.Signedness = .unsigned,
78527852 decoded30: u2 = 0b01,
78537853 };
78547854
......@@ -7862,7 +7862,7 @@ pub const Instruction = packed union {
78627862 sz: Sz,
78637863 o2: u1 = 0b1,
78647864 decoded24: u5 = 0b11110,
7865 U: std.builtin.Signedness = .unsigned,
7865 U: std.lang.Signedness = .unsigned,
78667866 decoded30: u2 = 0b01,
78677867 };
78687868
......@@ -7876,7 +7876,7 @@ pub const Instruction = packed union {
78767876 sz: Sz,
78777877 o2: u1 = 0b1,
78787878 decoded24: u5 = 0b11110,
7879 U: std.builtin.Signedness = .unsigned,
7879 U: std.lang.Signedness = .unsigned,
78807880 decoded30: u2 = 0b01,
78817881 };
78827882
......@@ -7890,7 +7890,7 @@ pub const Instruction = packed union {
78907890 sz: Sz,
78917891 o2: u1 = 0b1,
78927892 decoded24: u5 = 0b11110,
7893 U: std.builtin.Signedness = .unsigned,
7893 U: std.lang.Signedness = .unsigned,
78947894 decoded30: u2 = 0b01,
78957895 };
78967896
......@@ -7904,7 +7904,7 @@ pub const Instruction = packed union {
79047904 sz: Sz,
79057905 o2: u1 = 0b1,
79067906 decoded24: u5 = 0b11110,
7907 U: std.builtin.Signedness = .unsigned,
7907 U: std.lang.Signedness = .unsigned,
79087908 decoded30: u2 = 0b01,
79097909 };
79107910
......@@ -8045,7 +8045,7 @@ pub const Instruction = packed union {
80458045 decoded17: u5 = 0b11000,
80468046 size: Size,
80478047 decoded24: u5 = 0b11110,
8048 U: std.builtin.Signedness,
8048 U: std.lang.Signedness,
80498049 decoded30: u2 = 0b01,
80508050 };
80518051
......@@ -8058,7 +8058,7 @@ pub const Instruction = packed union {
80588058 decoded17: u5 = 0b11000,
80598059 size: Size,
80608060 decoded24: u5 = 0b11110,
8061 U: std.builtin.Signedness = .signed,
8061 U: std.lang.Signedness = .signed,
80628062 decoded30: u2 = 0b01,
80638063 };
80648064
......@@ -8262,7 +8262,7 @@ pub const Instruction = packed union {
82628262 decoded17: u6 = 0b111100,
82638263 a: u1,
82648264 decoded24: u5 = 0b01110,
8265 U: std.builtin.Signedness,
8265 U: std.lang.Signedness,
82668266 Q: Q,
82678267 decoded31: u1 = 0b0,
82688268 };
......@@ -8276,7 +8276,7 @@ pub const Instruction = packed union {
82768276 decoded17: u6 = 0b111100,
82778277 o2: u1 = 0b0,
82788278 decoded24: u5 = 0b01110,
8279 U: std.builtin.Signedness = .signed,
8279 U: std.lang.Signedness = .signed,
82808280 Q: Q,
82818281 decoded31: u1 = 0b0,
82828282 };
......@@ -8290,7 +8290,7 @@ pub const Instruction = packed union {
82908290 decoded17: u6 = 0b111100,
82918291 o2: u1 = 0b0,
82928292 decoded24: u5 = 0b01110,
8293 U: std.builtin.Signedness = .signed,
8293 U: std.lang.Signedness = .signed,
82948294 Q: Q,
82958295 decoded31: u1 = 0b0,
82968296 };
......@@ -8304,7 +8304,7 @@ pub const Instruction = packed union {
83048304 decoded17: u6 = 0b111100,
83058305 o2: u1 = 0b0,
83068306 decoded24: u5 = 0b01110,
8307 U: std.builtin.Signedness = .signed,
8307 U: std.lang.Signedness = .signed,
83088308 Q: Q,
83098309 decoded31: u1 = 0b0,
83108310 };
......@@ -8318,7 +8318,7 @@ pub const Instruction = packed union {
83188318 decoded17: u6 = 0b111100,
83198319 o2: u1 = 0b0,
83208320 decoded24: u5 = 0b01110,
8321 U: std.builtin.Signedness = .signed,
8321 U: std.lang.Signedness = .signed,
83228322 Q: Q,
83238323 decoded31: u1 = 0b0,
83248324 };
......@@ -8332,7 +8332,7 @@ pub const Instruction = packed union {
83328332 decoded17: u6 = 0b111100,
83338333 o2: u1 = 0b0,
83348334 decoded24: u5 = 0b01110,
8335 U: std.builtin.Signedness = .signed,
8335 U: std.lang.Signedness = .signed,
83368336 Q: Q,
83378337 decoded31: u1 = 0b0,
83388338 };
......@@ -8346,7 +8346,7 @@ pub const Instruction = packed union {
83468346 decoded17: u6 = 0b111100,
83478347 o2: u1 = 0b0,
83488348 decoded24: u5 = 0b01110,
8349 U: std.builtin.Signedness = .signed,
8349 U: std.lang.Signedness = .signed,
83508350 Q: Q,
83518351 decoded31: u1 = 0b0,
83528352 };
......@@ -8360,7 +8360,7 @@ pub const Instruction = packed union {
83608360 decoded17: u6 = 0b111100,
83618361 o2: u1 = 0b1,
83628362 decoded24: u5 = 0b01110,
8363 U: std.builtin.Signedness = .signed,
8363 U: std.lang.Signedness = .signed,
83648364 Q: Q,
83658365 decoded31: u1 = 0b0,
83668366 };
......@@ -8374,7 +8374,7 @@ pub const Instruction = packed union {
83748374 decoded17: u6 = 0b111100,
83758375 o2: u1 = 0b1,
83768376 decoded24: u5 = 0b01110,
8377 U: std.builtin.Signedness = .signed,
8377 U: std.lang.Signedness = .signed,
83788378 Q: Q,
83798379 decoded31: u1 = 0b0,
83808380 };
......@@ -8388,7 +8388,7 @@ pub const Instruction = packed union {
83888388 decoded17: u6 = 0b111100,
83898389 o2: u1 = 0b1,
83908390 decoded24: u5 = 0b01110,
8391 U: std.builtin.Signedness = .signed,
8391 U: std.lang.Signedness = .signed,
83928392 Q: Q,
83938393 decoded31: u1 = 0b0,
83948394 };
......@@ -8402,7 +8402,7 @@ pub const Instruction = packed union {
84028402 decoded17: u6 = 0b111100,
84038403 o2: u1 = 0b1,
84048404 decoded24: u5 = 0b01110,
8405 U: std.builtin.Signedness = .signed,
8405 U: std.lang.Signedness = .signed,
84068406 Q: Q,
84078407 decoded31: u1 = 0b0,
84088408 };
......@@ -8416,7 +8416,7 @@ pub const Instruction = packed union {
84168416 decoded17: u6 = 0b111100,
84178417 o2: u1 = 0b1,
84188418 decoded24: u5 = 0b01110,
8419 U: std.builtin.Signedness = .signed,
8419 U: std.lang.Signedness = .signed,
84208420 Q: Q,
84218421 decoded31: u1 = 0b0,
84228422 };
......@@ -8430,7 +8430,7 @@ pub const Instruction = packed union {
84308430 decoded17: u6 = 0b111100,
84318431 o2: u1 = 0b1,
84328432 decoded24: u5 = 0b01110,
8433 U: std.builtin.Signedness = .signed,
8433 U: std.lang.Signedness = .signed,
84348434 Q: Q,
84358435 decoded31: u1 = 0b0,
84368436 };
......@@ -8444,7 +8444,7 @@ pub const Instruction = packed union {
84448444 decoded17: u6 = 0b111100,
84458445 o2: u1 = 0b1,
84468446 decoded24: u5 = 0b01110,
8447 U: std.builtin.Signedness = .signed,
8447 U: std.lang.Signedness = .signed,
84488448 Q: Q,
84498449 decoded31: u1 = 0b0,
84508450 };
......@@ -8458,7 +8458,7 @@ pub const Instruction = packed union {
84588458 decoded17: u6 = 0b111100,
84598459 o2: u1 = 0b1,
84608460 decoded24: u5 = 0b01110,
8461 U: std.builtin.Signedness = .signed,
8461 U: std.lang.Signedness = .signed,
84628462 Q: Q,
84638463 decoded31: u1 = 0b0,
84648464 };
......@@ -8472,7 +8472,7 @@ pub const Instruction = packed union {
84728472 decoded17: u6 = 0b111100,
84738473 o2: u1 = 0b1,
84748474 decoded24: u5 = 0b01110,
8475 U: std.builtin.Signedness = .signed,
8475 U: std.lang.Signedness = .signed,
84768476 Q: Q,
84778477 decoded31: u1 = 0b0,
84788478 };
......@@ -8486,7 +8486,7 @@ pub const Instruction = packed union {
84868486 decoded17: u6 = 0b111100,
84878487 o2: u1 = 0b0,
84888488 decoded24: u5 = 0b01110,
8489 U: std.builtin.Signedness = .unsigned,
8489 U: std.lang.Signedness = .unsigned,
84908490 Q: Q,
84918491 decoded31: u1 = 0b0,
84928492 };
......@@ -8500,7 +8500,7 @@ pub const Instruction = packed union {
85008500 decoded17: u6 = 0b111100,
85018501 o2: u1 = 0b0,
85028502 decoded24: u5 = 0b01110,
8503 U: std.builtin.Signedness = .unsigned,
8503 U: std.lang.Signedness = .unsigned,
85048504 Q: Q,
85058505 decoded31: u1 = 0b0,
85068506 };
......@@ -8514,7 +8514,7 @@ pub const Instruction = packed union {
85148514 decoded17: u6 = 0b111100,
85158515 o2: u1 = 0b0,
85168516 decoded24: u5 = 0b01110,
8517 U: std.builtin.Signedness = .unsigned,
8517 U: std.lang.Signedness = .unsigned,
85188518 Q: Q,
85198519 decoded31: u1 = 0b0,
85208520 };
......@@ -8528,7 +8528,7 @@ pub const Instruction = packed union {
85288528 decoded17: u6 = 0b111100,
85298529 o2: u1 = 0b0,
85308530 decoded24: u5 = 0b01110,
8531 U: std.builtin.Signedness = .unsigned,
8531 U: std.lang.Signedness = .unsigned,
85328532 Q: Q,
85338533 decoded31: u1 = 0b0,
85348534 };
......@@ -8542,7 +8542,7 @@ pub const Instruction = packed union {
85428542 decoded17: u6 = 0b111100,
85438543 o2: u1 = 0b0,
85448544 decoded24: u5 = 0b01110,
8545 U: std.builtin.Signedness = .unsigned,
8545 U: std.lang.Signedness = .unsigned,
85468546 Q: Q,
85478547 decoded31: u1 = 0b0,
85488548 };
......@@ -8556,7 +8556,7 @@ pub const Instruction = packed union {
85568556 decoded17: u6 = 0b111100,
85578557 o2: u1 = 0b0,
85588558 decoded24: u5 = 0b01110,
8559 U: std.builtin.Signedness = .unsigned,
8559 U: std.lang.Signedness = .unsigned,
85608560 Q: Q,
85618561 decoded31: u1 = 0b0,
85628562 };
......@@ -8570,7 +8570,7 @@ pub const Instruction = packed union {
85708570 decoded17: u6 = 0b111100,
85718571 o2: u1 = 0b1,
85728572 decoded24: u5 = 0b01110,
8573 U: std.builtin.Signedness = .unsigned,
8573 U: std.lang.Signedness = .unsigned,
85748574 Q: Q,
85758575 decoded31: u1 = 0b0,
85768576 };
......@@ -8584,7 +8584,7 @@ pub const Instruction = packed union {
85848584 decoded17: u6 = 0b111100,
85858585 o2: u1 = 0b1,
85868586 decoded24: u5 = 0b01110,
8587 U: std.builtin.Signedness = .unsigned,
8587 U: std.lang.Signedness = .unsigned,
85888588 Q: Q,
85898589 decoded31: u1 = 0b0,
85908590 };
......@@ -8598,7 +8598,7 @@ pub const Instruction = packed union {
85988598 decoded17: u6 = 0b111100,
85998599 o2: u1 = 0b1,
86008600 decoded24: u5 = 0b01110,
8601 U: std.builtin.Signedness = .unsigned,
8601 U: std.lang.Signedness = .unsigned,
86028602 Q: Q,
86038603 decoded31: u1 = 0b0,
86048604 };
......@@ -8612,7 +8612,7 @@ pub const Instruction = packed union {
86128612 decoded17: u6 = 0b111100,
86138613 o2: u1 = 0b1,
86148614 decoded24: u5 = 0b01110,
8615 U: std.builtin.Signedness = .unsigned,
8615 U: std.lang.Signedness = .unsigned,
86168616 Q: Q,
86178617 decoded31: u1 = 0b0,
86188618 };
......@@ -8626,7 +8626,7 @@ pub const Instruction = packed union {
86268626 decoded17: u6 = 0b111100,
86278627 o2: u1 = 0b1,
86288628 decoded24: u5 = 0b01110,
8629 U: std.builtin.Signedness = .unsigned,
8629 U: std.lang.Signedness = .unsigned,
86308630 Q: Q,
86318631 decoded31: u1 = 0b0,
86328632 };
......@@ -8640,7 +8640,7 @@ pub const Instruction = packed union {
86408640 decoded17: u6 = 0b111100,
86418641 o2: u1 = 0b1,
86428642 decoded24: u5 = 0b01110,
8643 U: std.builtin.Signedness = .unsigned,
8643 U: std.lang.Signedness = .unsigned,
86448644 Q: Q,
86458645 decoded31: u1 = 0b0,
86468646 };
......@@ -8654,7 +8654,7 @@ pub const Instruction = packed union {
86548654 decoded17: u6 = 0b111100,
86558655 o2: u1 = 0b1,
86568656 decoded24: u5 = 0b01110,
8657 U: std.builtin.Signedness = .unsigned,
8657 U: std.lang.Signedness = .unsigned,
86588658 Q: Q,
86598659 decoded31: u1 = 0b0,
86608660 };
......@@ -8668,7 +8668,7 @@ pub const Instruction = packed union {
86688668 decoded17: u6 = 0b111100,
86698669 o2: u1 = 0b1,
86708670 decoded24: u5 = 0b01110,
8671 U: std.builtin.Signedness = .unsigned,
8671 U: std.lang.Signedness = .unsigned,
86728672 Q: Q,
86738673 decoded31: u1 = 0b0,
86748674 };
......@@ -8814,7 +8814,7 @@ pub const Instruction = packed union {
88148814 decoded17: u5 = 0b10000,
88158815 size: Size,
88168816 decoded24: u5 = 0b01110,
8817 U: std.builtin.Signedness,
8817 U: std.lang.Signedness,
88188818 Q: Q,
88198819 decoded31: u1 = 0b0,
88208820 };
......@@ -8828,7 +8828,7 @@ pub const Instruction = packed union {
88288828 decoded17: u5 = 0b10000,
88298829 size: Size,
88308830 decoded24: u5 = 0b01110,
8831 U: std.builtin.Signedness = .signed,
8831 U: std.lang.Signedness = .signed,
88328832 Q: Q,
88338833 decoded31: u1 = 0b0,
88348834 };
......@@ -8842,7 +8842,7 @@ pub const Instruction = packed union {
88428842 decoded17: u5 = 0b10000,
88438843 size: Size,
88448844 decoded24: u5 = 0b01110,
8845 U: std.builtin.Signedness = .signed,
8845 U: std.lang.Signedness = .signed,
88468846 Q: Q,
88478847 decoded31: u1 = 0b0,
88488848 };
......@@ -8856,7 +8856,7 @@ pub const Instruction = packed union {
88568856 decoded17: u5 = 0b10000,
88578857 size: Size,
88588858 decoded24: u5 = 0b01110,
8859 U: std.builtin.Signedness = .signed,
8859 U: std.lang.Signedness = .signed,
88608860 Q: Q,
88618861 decoded31: u1 = 0b0,
88628862 };
......@@ -8870,7 +8870,7 @@ pub const Instruction = packed union {
88708870 decoded17: u5 = 0b10000,
88718871 size: Size,
88728872 decoded24: u5 = 0b01110,
8873 U: std.builtin.Signedness = .signed,
8873 U: std.lang.Signedness = .signed,
88748874 Q: Q,
88758875 decoded31: u1 = 0b0,
88768876 };
......@@ -8884,7 +8884,7 @@ pub const Instruction = packed union {
88848884 decoded17: u5 = 0b10000,
88858885 size: Size,
88868886 decoded24: u5 = 0b01110,
8887 U: std.builtin.Signedness = .signed,
8887 U: std.lang.Signedness = .signed,
88888888 Q: Q,
88898889 decoded31: u1 = 0b0,
88908890 };
......@@ -8898,7 +8898,7 @@ pub const Instruction = packed union {
88988898 decoded17: u5 = 0b10000,
88998899 size: Size,
89008900 decoded24: u5 = 0b01110,
8901 U: std.builtin.Signedness = .signed,
8901 U: std.lang.Signedness = .signed,
89028902 Q: Q,
89038903 decoded31: u1 = 0b0,
89048904 };
......@@ -8912,7 +8912,7 @@ pub const Instruction = packed union {
89128912 decoded17: u5 = 0b10000,
89138913 size: Size,
89148914 decoded24: u5 = 0b01110,
8915 U: std.builtin.Signedness = .signed,
8915 U: std.lang.Signedness = .signed,
89168916 Q: Q,
89178917 decoded31: u1 = 0b0,
89188918 };
......@@ -8926,7 +8926,7 @@ pub const Instruction = packed union {
89268926 decoded17: u5 = 0b10000,
89278927 size: Size,
89288928 decoded24: u5 = 0b01110,
8929 U: std.builtin.Signedness = .signed,
8929 U: std.lang.Signedness = .signed,
89308930 Q: Q,
89318931 decoded31: u1 = 0b0,
89328932 };
......@@ -8941,7 +8941,7 @@ pub const Instruction = packed union {
89418941 sz: Sz,
89428942 o2: u1 = 0b0,
89438943 decoded24: u5 = 0b01110,
8944 U: std.builtin.Signedness = .signed,
8944 U: std.lang.Signedness = .signed,
89458945 Q: Q,
89468946 decoded31: u1 = 0b0,
89478947 };
......@@ -8956,7 +8956,7 @@ pub const Instruction = packed union {
89568956 sz: Sz,
89578957 o2: u1 = 0b0,
89588958 decoded24: u5 = 0b01110,
8959 U: std.builtin.Signedness = .signed,
8959 U: std.lang.Signedness = .signed,
89608960 Q: Q,
89618961 decoded31: u1 = 0b0,
89628962 };
......@@ -8971,7 +8971,7 @@ pub const Instruction = packed union {
89718971 sz: Sz,
89728972 o2: u1 = 0b0,
89738973 decoded24: u5 = 0b01110,
8974 U: std.builtin.Signedness = .signed,
8974 U: std.lang.Signedness = .signed,
89758975 Q: Q,
89768976 decoded31: u1 = 0b0,
89778977 };
......@@ -8986,7 +8986,7 @@ pub const Instruction = packed union {
89868986 sz: Sz,
89878987 o2: u1 = 0b0,
89888988 decoded24: u5 = 0b01110,
8989 U: std.builtin.Signedness = .signed,
8989 U: std.lang.Signedness = .signed,
89908990 Q: Q,
89918991 decoded31: u1 = 0b0,
89928992 };
......@@ -9001,7 +9001,7 @@ pub const Instruction = packed union {
90019001 sz: Sz,
90029002 o2: u1 = 0b0,
90039003 decoded24: u5 = 0b01110,
9004 U: std.builtin.Signedness = .signed,
9004 U: std.lang.Signedness = .signed,
90059005 Q: Q,
90069006 decoded31: u1 = 0b0,
90079007 };
......@@ -9016,7 +9016,7 @@ pub const Instruction = packed union {
90169016 sz: Sz,
90179017 o2: u1 = 0b0,
90189018 decoded24: u5 = 0b01110,
9019 U: std.builtin.Signedness = .signed,
9019 U: std.lang.Signedness = .signed,
90209020 Q: Q,
90219021 decoded31: u1 = 0b0,
90229022 };
......@@ -9031,7 +9031,7 @@ pub const Instruction = packed union {
90319031 sz: Sz,
90329032 o2: u1 = 0b1,
90339033 decoded24: u5 = 0b01110,
9034 U: std.builtin.Signedness = .signed,
9034 U: std.lang.Signedness = .signed,
90359035 Q: Q,
90369036 decoded31: u1 = 0b0,
90379037 };
......@@ -9046,7 +9046,7 @@ pub const Instruction = packed union {
90469046 sz: Sz,
90479047 o2: u1 = 0b1,
90489048 decoded24: u5 = 0b01110,
9049 U: std.builtin.Signedness = .signed,
9049 U: std.lang.Signedness = .signed,
90509050 Q: Q,
90519051 decoded31: u1 = 0b0,
90529052 };
......@@ -9061,7 +9061,7 @@ pub const Instruction = packed union {
90619061 sz: Sz,
90629062 o2: u1 = 0b1,
90639063 decoded24: u5 = 0b01110,
9064 U: std.builtin.Signedness = .signed,
9064 U: std.lang.Signedness = .signed,
90659065 Q: Q,
90669066 decoded31: u1 = 0b0,
90679067 };
......@@ -9076,7 +9076,7 @@ pub const Instruction = packed union {
90769076 sz: Sz,
90779077 o2: u1 = 0b1,
90789078 decoded24: u5 = 0b01110,
9079 U: std.builtin.Signedness = .signed,
9079 U: std.lang.Signedness = .signed,
90809080 Q: Q,
90819081 decoded31: u1 = 0b0,
90829082 };
......@@ -9091,7 +9091,7 @@ pub const Instruction = packed union {
90919091 sz: Sz,
90929092 o2: u1 = 0b1,
90939093 decoded24: u5 = 0b01110,
9094 U: std.builtin.Signedness = .signed,
9094 U: std.lang.Signedness = .signed,
90959095 Q: Q,
90969096 decoded31: u1 = 0b0,
90979097 };
......@@ -9106,7 +9106,7 @@ pub const Instruction = packed union {
91069106 sz: Sz,
91079107 o2: u1 = 0b1,
91089108 decoded24: u5 = 0b01110,
9109 U: std.builtin.Signedness = .signed,
9109 U: std.lang.Signedness = .signed,
91109110 Q: Q,
91119111 decoded31: u1 = 0b0,
91129112 };
......@@ -9121,7 +9121,7 @@ pub const Instruction = packed union {
91219121 sz: Sz,
91229122 o2: u1 = 0b1,
91239123 decoded24: u5 = 0b01110,
9124 U: std.builtin.Signedness = .signed,
9124 U: std.lang.Signedness = .signed,
91259125 Q: Q,
91269126 decoded31: u1 = 0b0,
91279127 };
......@@ -9136,7 +9136,7 @@ pub const Instruction = packed union {
91369136 sz: Sz,
91379137 o2: u1 = 0b1,
91389138 decoded24: u5 = 0b01110,
9139 U: std.builtin.Signedness = .signed,
9139 U: std.lang.Signedness = .signed,
91409140 Q: Q,
91419141 decoded31: u1 = 0b0,
91429142 };
......@@ -9151,7 +9151,7 @@ pub const Instruction = packed union {
91519151 sz: Sz,
91529152 o2: u1 = 0b1,
91539153 decoded24: u5 = 0b01110,
9154 U: std.builtin.Signedness = .signed,
9154 U: std.lang.Signedness = .signed,
91559155 Q: Q,
91569156 decoded31: u1 = 0b0,
91579157 };
......@@ -9165,7 +9165,7 @@ pub const Instruction = packed union {
91659165 decoded17: u5 = 0b10000,
91669166 size: Size,
91679167 decoded24: u5 = 0b01110,
9168 U: std.builtin.Signedness = .unsigned,
9168 U: std.lang.Signedness = .unsigned,
91699169 Q: Q,
91709170 decoded31: u1 = 0b0,
91719171 };
......@@ -9179,7 +9179,7 @@ pub const Instruction = packed union {
91799179 decoded17: u5 = 0b10000,
91809180 size: Size,
91819181 decoded24: u5 = 0b01110,
9182 U: std.builtin.Signedness = .unsigned,
9182 U: std.lang.Signedness = .unsigned,
91839183 Q: Q,
91849184 decoded31: u1 = 0b0,
91859185 };
......@@ -9193,7 +9193,7 @@ pub const Instruction = packed union {
91939193 decoded17: u5 = 0b10000,
91949194 size: Size,
91959195 decoded24: u5 = 0b01110,
9196 U: std.builtin.Signedness = .unsigned,
9196 U: std.lang.Signedness = .unsigned,
91979197 Q: Q,
91989198 decoded31: u1 = 0b0,
91999199 };
......@@ -9207,7 +9207,7 @@ pub const Instruction = packed union {
92079207 decoded17: u5 = 0b10000,
92089208 size: Size,
92099209 decoded24: u5 = 0b01110,
9210 U: std.builtin.Signedness = .unsigned,
9210 U: std.lang.Signedness = .unsigned,
92119211 Q: Q,
92129212 decoded31: u1 = 0b0,
92139213 };
......@@ -9221,7 +9221,7 @@ pub const Instruction = packed union {
92219221 decoded17: u5 = 0b10000,
92229222 size: Size,
92239223 decoded24: u5 = 0b01110,
9224 U: std.builtin.Signedness = .unsigned,
9224 U: std.lang.Signedness = .unsigned,
92259225 Q: Q,
92269226 decoded31: u1 = 0b0,
92279227 };
......@@ -9235,7 +9235,7 @@ pub const Instruction = packed union {
92359235 decoded17: u5 = 0b10000,
92369236 size: Size,
92379237 decoded24: u5 = 0b01110,
9238 U: std.builtin.Signedness = .unsigned,
9238 U: std.lang.Signedness = .unsigned,
92399239 Q: Q,
92409240 decoded31: u1 = 0b0,
92419241 };
......@@ -9249,7 +9249,7 @@ pub const Instruction = packed union {
92499249 decoded17: u5 = 0b10000,
92509250 size: Size,
92519251 decoded24: u5 = 0b01110,
9252 U: std.builtin.Signedness = .unsigned,
9252 U: std.lang.Signedness = .unsigned,
92539253 Q: Q,
92549254 decoded31: u1 = 0b0,
92559255 };
......@@ -9264,7 +9264,7 @@ pub const Instruction = packed union {
92649264 sz: Sz,
92659265 o2: u1 = 0b0,
92669266 decoded24: u5 = 0b01110,
9267 U: std.builtin.Signedness = .unsigned,
9267 U: std.lang.Signedness = .unsigned,
92689268 Q: Q,
92699269 decoded31: u1 = 0b0,
92709270 };
......@@ -9279,7 +9279,7 @@ pub const Instruction = packed union {
92799279 sz: Sz,
92809280 o2: u1 = 0b0,
92819281 decoded24: u5 = 0b01110,
9282 U: std.builtin.Signedness = .unsigned,
9282 U: std.lang.Signedness = .unsigned,
92839283 Q: Q,
92849284 decoded31: u1 = 0b0,
92859285 };
......@@ -9294,7 +9294,7 @@ pub const Instruction = packed union {
92949294 sz: Sz,
92959295 o2: u1 = 0b0,
92969296 decoded24: u5 = 0b01110,
9297 U: std.builtin.Signedness = .unsigned,
9297 U: std.lang.Signedness = .unsigned,
92989298 Q: Q,
92999299 decoded31: u1 = 0b0,
93009300 };
......@@ -9309,7 +9309,7 @@ pub const Instruction = packed union {
93099309 sz: Sz,
93109310 o2: u1 = 0b0,
93119311 decoded24: u5 = 0b01110,
9312 U: std.builtin.Signedness = .unsigned,
9312 U: std.lang.Signedness = .unsigned,
93139313 Q: Q,
93149314 decoded31: u1 = 0b0,
93159315 };
......@@ -9324,7 +9324,7 @@ pub const Instruction = packed union {
93249324 sz: Sz,
93259325 o2: u1 = 0b0,
93269326 decoded24: u5 = 0b01110,
9327 U: std.builtin.Signedness = .unsigned,
9327 U: std.lang.Signedness = .unsigned,
93289328 Q: Q,
93299329 decoded31: u1 = 0b0,
93309330 };
......@@ -9339,7 +9339,7 @@ pub const Instruction = packed union {
93399339 sz: Sz,
93409340 o2: u1 = 0b0,
93419341 decoded24: u5 = 0b01110,
9342 U: std.builtin.Signedness = .unsigned,
9342 U: std.lang.Signedness = .unsigned,
93439343 Q: Q,
93449344 decoded31: u1 = 0b0,
93459345 };
......@@ -9354,7 +9354,7 @@ pub const Instruction = packed union {
93549354 sz: Sz,
93559355 o2: u1 = 0b0,
93569356 decoded24: u5 = 0b01110,
9357 U: std.builtin.Signedness = .unsigned,
9357 U: std.lang.Signedness = .unsigned,
93589358 Q: Q,
93599359 decoded31: u1 = 0b0,
93609360 };
......@@ -9368,7 +9368,7 @@ pub const Instruction = packed union {
93689368 decoded17: u5 = 0b10000,
93699369 size: Size = .byte,
93709370 decoded24: u5 = 0b01110,
9371 U: std.builtin.Signedness = .unsigned,
9371 U: std.lang.Signedness = .unsigned,
93729372 Q: Q,
93739373 decoded31: u1 = 0b0,
93749374 };
......@@ -9383,7 +9383,7 @@ pub const Instruction = packed union {
93839383 sz: Sz,
93849384 o2: u1 = 0b1,
93859385 decoded24: u5 = 0b01110,
9386 U: std.builtin.Signedness = .unsigned,
9386 U: std.lang.Signedness = .unsigned,
93879387 Q: Q,
93889388 decoded31: u1 = 0b0,
93899389 };
......@@ -9398,7 +9398,7 @@ pub const Instruction = packed union {
93989398 sz: Sz,
93999399 o2: u1 = 0b1,
94009400 decoded24: u5 = 0b01110,
9401 U: std.builtin.Signedness = .unsigned,
9401 U: std.lang.Signedness = .unsigned,
94029402 Q: Q,
94039403 decoded31: u1 = 0b0,
94049404 };
......@@ -9413,7 +9413,7 @@ pub const Instruction = packed union {
94139413 sz: Sz,
94149414 o2: u1 = 0b1,
94159415 decoded24: u5 = 0b01110,
9416 U: std.builtin.Signedness = .unsigned,
9416 U: std.lang.Signedness = .unsigned,
94179417 Q: Q,
94189418 decoded31: u1 = 0b0,
94199419 };
......@@ -9428,7 +9428,7 @@ pub const Instruction = packed union {
94289428 sz: Sz,
94299429 o2: u1 = 0b1,
94309430 decoded24: u5 = 0b01110,
9431 U: std.builtin.Signedness = .unsigned,
9431 U: std.lang.Signedness = .unsigned,
94329432 Q: Q,
94339433 decoded31: u1 = 0b0,
94349434 };
......@@ -9443,7 +9443,7 @@ pub const Instruction = packed union {
94439443 sz: Sz,
94449444 o2: u1 = 0b1,
94459445 decoded24: u5 = 0b01110,
9446 U: std.builtin.Signedness = .unsigned,
9446 U: std.lang.Signedness = .unsigned,
94479447 Q: Q,
94489448 decoded31: u1 = 0b0,
94499449 };
......@@ -9458,7 +9458,7 @@ pub const Instruction = packed union {
94589458 sz: Sz,
94599459 o2: u1 = 0b1,
94609460 decoded24: u5 = 0b01110,
9461 U: std.builtin.Signedness = .unsigned,
9461 U: std.lang.Signedness = .unsigned,
94629462 Q: Q,
94639463 decoded31: u1 = 0b0,
94649464 };
......@@ -9473,7 +9473,7 @@ pub const Instruction = packed union {
94739473 sz: Sz,
94749474 o2: u1 = 0b1,
94759475 decoded24: u5 = 0b01110,
9476 U: std.builtin.Signedness = .unsigned,
9476 U: std.lang.Signedness = .unsigned,
94779477 Q: Q,
94789478 decoded31: u1 = 0b0,
94799479 };
......@@ -9488,7 +9488,7 @@ pub const Instruction = packed union {
94889488 sz: Sz,
94899489 o2: u1 = 0b1,
94909490 decoded24: u5 = 0b01110,
9491 U: std.builtin.Signedness = .unsigned,
9491 U: std.lang.Signedness = .unsigned,
94929492 Q: Q,
94939493 decoded31: u1 = 0b0,
94949494 };
......@@ -9670,7 +9670,7 @@ pub const Instruction = packed union {
96709670 decoded17: u5 = 0b11000,
96719671 size: Size,
96729672 decoded24: u5 = 0b01110,
9673 U: std.builtin.Signedness,
9673 U: std.lang.Signedness,
96749674 Q: Q,
96759675 decoded31: u1 = 0b0,
96769676 };
......@@ -9684,7 +9684,7 @@ pub const Instruction = packed union {
96849684 decoded17: u5 = 0b11000,
96859685 size: Size,
96869686 decoded24: u5 = 0b01110,
9687 U: std.builtin.Signedness = .signed,
9687 U: std.lang.Signedness = .signed,
96889688 Q: Q,
96899689 decoded31: u1 = 0b0,
96909690 };
......@@ -9726,7 +9726,7 @@ pub const Instruction = packed union {
97269726 decoded21: u1 = 0b1,
97279727 size: Size,
97289728 decoded24: u5 = 0b01110,
9729 U: std.builtin.Signedness,
9729 U: std.lang.Signedness,
97309730 Q: Q,
97319731 decoded31: u1 = 0b0,
97329732 };
......@@ -9741,7 +9741,7 @@ pub const Instruction = packed union {
97419741 decoded21: u1 = 0b1,
97429742 size: Size,
97439743 decoded24: u5 = 0b01110,
9744 U: std.builtin.Signedness = .signed,
9744 U: std.lang.Signedness = .signed,
97459745 Q: Q,
97469746 decoded31: u1 = 0b0,
97479747 };
......@@ -9756,7 +9756,7 @@ pub const Instruction = packed union {
97569756 decoded21: u1 = 0b1,
97579757 size: Size = .byte,
97589758 decoded24: u5 = 0b01110,
9759 U: std.builtin.Signedness = .signed,
9759 U: std.lang.Signedness = .signed,
97609760 Q: Q,
97619761 decoded31: u1 = 0b0,
97629762 };
......@@ -9771,7 +9771,7 @@ pub const Instruction = packed union {
97719771 decoded21: u1 = 0b1,
97729772 size: Size = .half,
97739773 decoded24: u5 = 0b01110,
9774 U: std.builtin.Signedness = .signed,
9774 U: std.lang.Signedness = .signed,
97759775 Q: Q,
97769776 decoded31: u1 = 0b0,
97779777 };
......@@ -9786,7 +9786,7 @@ pub const Instruction = packed union {
97869786 decoded21: u1 = 0b1,
97879787 size: Size = .single,
97889788 decoded24: u5 = 0b01110,
9789 U: std.builtin.Signedness = .signed,
9789 U: std.lang.Signedness = .signed,
97909790 Q: Q,
97919791 decoded31: u1 = 0b0,
97929792 };
......@@ -9801,7 +9801,7 @@ pub const Instruction = packed union {
98019801 decoded21: u1 = 0b1,
98029802 size: Size = .double,
98039803 decoded24: u5 = 0b01110,
9804 U: std.builtin.Signedness = .signed,
9804 U: std.lang.Signedness = .signed,
98059805 Q: Q,
98069806 decoded31: u1 = 0b0,
98079807 };
......@@ -9816,7 +9816,7 @@ pub const Instruction = packed union {
98169816 decoded21: u1 = 0b1,
98179817 size: Size = .byte,
98189818 decoded24: u5 = 0b01110,
9819 U: std.builtin.Signedness = .unsigned,
9819 U: std.lang.Signedness = .unsigned,
98209820 Q: Q,
98219821 decoded31: u1 = 0b0,
98229822 };
......@@ -9831,7 +9831,7 @@ pub const Instruction = packed union {
98319831 decoded21: u1 = 0b1,
98329832 size: Size = .half,
98339833 decoded24: u5 = 0b01110,
9834 U: std.builtin.Signedness = .unsigned,
9834 U: std.lang.Signedness = .unsigned,
98359835 Q: Q,
98369836 decoded31: u1 = 0b0,
98379837 };
......@@ -9846,7 +9846,7 @@ pub const Instruction = packed union {
98469846 decoded21: u1 = 0b1,
98479847 size: Size = .single,
98489848 decoded24: u5 = 0b01110,
9849 U: std.builtin.Signedness = .unsigned,
9849 U: std.lang.Signedness = .unsigned,
98509850 Q: Q,
98519851 decoded31: u1 = 0b0,
98529852 };
......@@ -9861,7 +9861,7 @@ pub const Instruction = packed union {
98619861 decoded21: u1 = 0b1,
98629862 size: Size = .double,
98639863 decoded24: u5 = 0b01110,
9864 U: std.builtin.Signedness = .unsigned,
9864 U: std.lang.Signedness = .unsigned,
98659865 Q: Q,
98669866 decoded31: u1 = 0b0,
98679867 };
src/codegen/c.zig+7-7
......@@ -1997,7 +1997,7 @@ pub const DeclGen = struct {
19971997 .bits => {},
19981998 }
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 .{
20012001 .signedness = .unsigned,
20022002 .bits = @intCast(ty.bitSize(zcu)),
20032003 };
......@@ -3878,7 +3878,7 @@ fn airSlice(f: *Function, inst: Air.Inst.Index) !CValue {
38783878fn airCall(
38793879 f: *Function,
38803880 inst: Air.Inst.Index,
3881 modifier: std.builtin.CallModifier,
3881 modifier: std.lang.CallModifier,
38823882) !CValue {
38833883 const pt = f.dg.pt;
38843884 const zcu = pt.zcu;
......@@ -6911,7 +6911,7 @@ fn airCVaCopy(f: *Function, inst: Air.Inst.Index) !CValue {
69116911 return local;
69126912}
69136913
6914fn toMemoryOrder(order: std.builtin.AtomicOrder) [:0]const u8 {
6914fn toMemoryOrder(order: std.lang.AtomicOrder) [:0]const u8 {
69156915 return switch (order) {
69166916 // Note: unordered is actually even less atomic than relaxed
69176917 .unordered, .monotonic => "zig_memory_order_relaxed",
......@@ -6922,11 +6922,11 @@ fn toMemoryOrder(order: std.builtin.AtomicOrder) [:0]const u8 {
69226922 };
69236923}
69246924
6925fn writeMemoryOrder(w: *Writer, order: std.builtin.AtomicOrder) !void {
6925fn writeMemoryOrder(w: *Writer, order: std.lang.AtomicOrder) !void {
69266926 return w.writeAll(toMemoryOrder(order));
69276927}
69286928
6929fn toCallingConvention(cc: std.builtin.CallingConvention, zcu: *Zcu) ?[]const u8 {
6929fn toCallingConvention(cc: std.lang.CallingConvention, zcu: *Zcu) ?[]const u8 {
69306930 if (zcu.getTarget().cCallingConvention()) |ccc| {
69316931 if (cc.eql(ccc)) {
69326932 return null;
......@@ -7021,7 +7021,7 @@ fn toCallingConvention(cc: std.builtin.CallingConvention, zcu: *Zcu) ?[]const u8
70217021 };
70227022}
70237023
7024fn toAtomicRmwSuffix(order: std.builtin.AtomicRmwOp) []const u8 {
7024fn toAtomicRmwSuffix(order: std.lang.AtomicRmwOp) []const u8 {
70257025 return switch (order) {
70267026 .Xchg => "xchg",
70277027 .Add => "add",
......@@ -7044,7 +7044,7 @@ fn toCIntBits(zig_bits: u32) ?u32 {
70447044 return null;
70457045}
70467046
7047fn signAbbrev(signedness: std.builtin.Signedness) u8 {
7047fn signAbbrev(signedness: std.lang.Signedness) u8 {
70487048 return switch (signedness) {
70497049 .signed => 'i',
70507050 .unsigned => 'u',
src/codegen/c/type.zig+1-1
......@@ -512,7 +512,7 @@ pub const CType = union(enum) {
512512 },
513513 }
514514 }
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 {
516516 const is_ez80 = zcu.getTarget().cpu.arch == .ez80;
517517 return switch (bits) {
518518 0 => .void,
src/codegen/llvm.zig+19-19
......@@ -500,7 +500,7 @@ const CodeModel = enum {
500500 large,
501501};
502502
503fn codeModel(model: std.builtin.CodeModel, target: *const std.Target) CodeModel {
503fn codeModel(model: std.lang.CodeModel, target: *const std.Target) CodeModel {
504504 // Roughly match Clang's mapping of GCC code models to LLVM code models.
505505 return switch (model) {
506506 .default => .default,
......@@ -556,7 +556,7 @@ pub const Object = struct {
556556 /// Same as `nav_map` but for UAVs (which are always global constants).
557557 uav_map: std.AutoHashMapUnmanaged(struct {
558558 val: InternPool.Index,
559 @"addrspace": std.builtin.AddressSpace,
559 @"addrspace": std.lang.AddressSpace,
560560 }, Builder.Variable.Index),
561561 /// Maps enum types to their corresponding LLVM functions for implementing the `tag_name` instruction.
562562 enum_tag_name_map: std.AutoHashMapUnmanaged(InternPool.Index, Builder.Function.Index),
......@@ -1755,7 +1755,7 @@ pub const Object = struct {
17551755 }
17561756
17571757 // 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 actually
1758 // one. This is kind of a hack because `std.lang.ExportOptions.section` doesn't actually
17591759 // make much sense: the linksection should be associated with the declaration itself rather
17601760 // than some particular symbol it is exported as!
17611761 if (export_indices[0].ptr(zcu).opts.section.toSlice(ip)) |section_slice| {
......@@ -3378,7 +3378,7 @@ pub const Object = struct {
33783378 }
33793379
33803380 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`.
33823382 const llvm_ptr_ty = try o.builder.ptrType(toLlvmAddressSpace(.generic, target));
33833383 try llvm_params.append(o.gpa, llvm_ptr_ty);
33843384 }
......@@ -3986,7 +3986,7 @@ pub const Object = struct {
39863986 o: *Object,
39873987 /// Must not be `.none`.
39883988 @"align": InternPool.Alignment,
3989 @"addrspace": std.builtin.AddressSpace,
3989 @"addrspace": std.lang.AddressSpace,
39903990 ) Allocator.Error!Builder.Constant {
39913991 const addr: u64 = @"align".toByteUnits().?;
39923992 const llvm_usize = try o.lowerType(.usize);
......@@ -4000,7 +4000,7 @@ pub const Object = struct {
40004000 uav_val: InternPool.Index,
40014001 /// Must not be `.none`.
40024002 @"align": InternPool.Alignment,
4003 @"addrspace": std.builtin.AddressSpace,
4003 @"addrspace": std.lang.AddressSpace,
40044004 ) Allocator.Error!Builder.Constant {
40054005 assert(@"align" != .none);
40064006
......@@ -4383,20 +4383,20 @@ const CallingConventionInfo = struct {
43834383 inreg_param_count: u2 = 0,
43844384};
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 {
43874387 const llvm_cc = toLlvmCallConvTag(cc, target) orelse return null;
43884388 const incoming_stack_alignment: ?u64, const register_params: u2 = switch (cc) {
43894389 inline else => |pl| switch (@TypeOf(pl)) {
43904390 void => .{ null, 0 },
4391 std.builtin.CallingConvention.ArcInterruptOptions,
4392 std.builtin.CallingConvention.ArmInterruptOptions,
4393 std.builtin.CallingConvention.RiscvInterruptOptions,
4394 std.builtin.CallingConvention.ShInterruptOptions,
4395 std.builtin.CallingConvention.MicroblazeInterruptOptions,
4396 std.builtin.CallingConvention.MipsInterruptOptions,
4397 std.builtin.CallingConvention.CommonOptions,
4391 std.lang.CallingConvention.ArcInterruptOptions,
4392 std.lang.CallingConvention.ArmInterruptOptions,
4393 std.lang.CallingConvention.RiscvInterruptOptions,
4394 std.lang.CallingConvention.ShInterruptOptions,
4395 std.lang.CallingConvention.MicroblazeInterruptOptions,
4396 std.lang.CallingConvention.MipsInterruptOptions,
4397 std.lang.CallingConvention.CommonOptions,
43984398 => .{ 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 },
44004400 else => @compileError("TODO: toLlvmCallConv" ++ @tagName(pl)),
44014401 },
44024402 };
......@@ -4410,7 +4410,7 @@ pub fn toLlvmCallConv(cc: std.builtin.CallingConvention, target: *const std.Targ
44104410 .inreg_param_count = register_params,
44114411 };
44124412}
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 {
44144414 if (target.cCallingConvention()) |default_c| {
44154415 if (cc_tag == default_c) {
44164416 return .ccc;
......@@ -4543,13 +4543,13 @@ pub fn toLlvmCallConvTag(cc_tag: std.builtin.CallingConvention.Tag, target: *con
45434543}
45444544
45454545/// 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 {
45474547 for (llvmAddrSpaceInfo(target)) |info| if (info.zig == address_space) return info.llvm;
45484548 unreachable;
45494549}
45504550
45514551const AddrSpaceInfo = struct {
4552 zig: ?std.builtin.AddressSpace,
4552 zig: ?std.lang.AddressSpace,
45534553 llvm: Builder.AddrSpace,
45544554 non_integral: bool = false,
45554555 size: ?u16 = null,
......@@ -4643,7 +4643,7 @@ fn llvmDefaultGlobalAddressSpace(target: *const std.Target) Builder.AddrSpace {
46434643
46444644/// Return the actual address space that a value should be stored in if its a global address space.
46454645/// 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 {
46474647 return switch (wanted_address_space) {
46484648 .generic => llvmDefaultGlobalAddressSpace(target),
46494649 else => |as| toLlvmAddressSpace(as, target),
src/codegen/llvm/FuncGen.zig+9-9
......@@ -567,7 +567,7 @@ const CallAttr = enum {
567567 AlwaysInline,
568568};
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 {
571571 const air_call = self.air.unwrapCall(inst);
572572 const args = air_call.args;
573573 const o = self.object;
......@@ -891,7 +891,7 @@ fn buildSimplePanic(fg: *FuncGen, panic_id: Zcu.SimplePanicId) Allocator.Error!v
891891 const o = fg.object;
892892 const zcu = o.zcu;
893893 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()));
895895 const fn_info = zcu.typeToFunc(.fromInterned(panic_func.ty)).?;
896896 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
60176017 const o = self.object;
60186018 const prefetch = self.air.instructions.items(.data)[@intFromEnum(inst)].prefetch;
60196019
6020 comptime assert(@intFromEnum(std.builtin.PrefetchOptions.Rw.read) == 0);
6021 comptime assert(@intFromEnum(std.builtin.PrefetchOptions.Rw.write) == 1);
6020 comptime assert(@intFromEnum(std.lang.PrefetchOptions.Rw.read) == 0);
6021 comptime assert(@intFromEnum(std.lang.PrefetchOptions.Rw.write) == 1);
60226022
60236023 comptime assert(prefetch.locality >= 0);
60246024 comptime assert(prefetch.locality <= 3);
60256025
6026 comptime assert(@intFromEnum(std.builtin.PrefetchOptions.Cache.instruction) == 0);
6027 comptime assert(@intFromEnum(std.builtin.PrefetchOptions.Cache.data) == 1);
6026 comptime assert(@intFromEnum(std.lang.PrefetchOptions.Cache.instruction) == 0);
6027 comptime assert(@intFromEnum(std.lang.PrefetchOptions.Cache.data) == 1);
60286028
60296029 // LLVM fails during codegen of instruction cache prefetchs for these architectures.
60306030 // 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
71067106/// has different ABI than regular integer types, and there is no currently no
71077107/// way to determine whether a Zig integer type is meant to represent e.g. `int`
71087108/// 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 {
71107110 switch (cc) {
71117111 .auto, .@"inline", .async => return null,
71127112 else => {},
......@@ -7379,7 +7379,7 @@ fn intrinsicsAllowed(scalar_ty: Type, target: *const std.Target) bool {
73797379 };
73807380}
73817381
7382fn toLlvmAtomicOrdering(atomic_order: std.builtin.AtomicOrder) Builder.AtomicOrdering {
7382fn toLlvmAtomicOrdering(atomic_order: std.lang.AtomicOrder) Builder.AtomicOrdering {
73837383 return switch (atomic_order) {
73847384 .unordered => .unordered,
73857385 .monotonic => .monotonic,
......@@ -7391,7 +7391,7 @@ fn toLlvmAtomicOrdering(atomic_order: std.builtin.AtomicOrder) Builder.AtomicOrd
73917391}
73927392
73937393fn toLlvmAtomicRmwBinOp(
7394 op: std.builtin.AtomicRmwOp,
7394 op: std.lang.AtomicRmwOp,
73957395 is_signed: bool,
73967396 is_float: bool,
73977397) Builder.Function.Instruction.AtomicRmw.Operation {
src/codegen/riscv64/CodeGen.zig+4-4
......@@ -1901,7 +1901,7 @@ fn splitType(func: *Func, ty: Type) ![2]Type {
19011901fn truncateRegister(func: *Func, ty: Type, reg: Register) !void {
19021902 const pt = func.pt;
19031903 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{
19051905 .signedness = .unsigned,
19061906 .bits = @intCast(ty.bitSize(zcu)),
19071907 };
......@@ -4788,7 +4788,7 @@ fn airFrameAddress(func: *Func, inst: Air.Inst.Index) !void {
47884788 return func.finishAir(inst, dst_mcv, .{ .none, .none, .none });
47894789}
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 {
47924792 if (modifier == .always_tail) return func.fail("TODO implement tail calls for riscv64", .{});
47934793 const call = func.air.unwrapCall(inst);
47944794 const arg_refs = call.args;
......@@ -7691,7 +7691,7 @@ fn airAtomicLoad(func: *Func, inst: Air.Inst.Index) !void {
76917691 const pt = func.pt;
76927692 const zcu = pt.zcu;
76937693 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
76967696 const ptr_ty = func.typeOf(atomic_load.ptr);
76977697 const elem_ty = ptr_ty.childType(zcu);
......@@ -7737,7 +7737,7 @@ fn airAtomicLoad(func: *Func, inst: Air.Inst.Index) !void {
77377737 return func.finishAir(inst, result_mcv, .{ atomic_load.ptr, .none, .none });
77387738}
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 {
77417741 const bin_op = func.air.instructions.items(.data)[@intFromEnum(inst)].bin_op;
77427742
77437743 const ptr_ty = func.typeOf(bin_op.lhs);
src/codegen/riscv64/Lower.zig+3-3
......@@ -1,12 +1,12 @@
11//! This file contains the functionality for lowering RISC-V MIR to Instructions
22
33pt: Zcu.PerThread,
4output_mode: std.builtin.OutputMode,
5link_mode: std.builtin.LinkMode,
4output_mode: std.lang.OutputMode,
5link_mode: std.lang.LinkMode,
66pic: bool,
77allocator: Allocator,
88mir: Mir,
9cc: std.builtin.CallingConvention,
9cc: std.lang.CallingConvention,
1010err_msg: ?*ErrorMsg = null,
1111src_loc: Zcu.LazySrcLoc,
1212result_insts_len: u8 = undefined,
src/codegen/sparc64/CodeGen.zig+3-3
......@@ -20,7 +20,7 @@ const Mir = @import("Mir.zig");
2020const Emit = @import("Emit.zig");
2121const Type = @import("../../Type.zig");
2222const CodeGenError = codegen.CodeGenError;
23const Endian = std.builtin.Endian;
23const Endian = std.lang.Endian;
2424const Alignment = InternPool.Alignment;
2525
2626const build_options = @import("build_options");
......@@ -1255,7 +1255,7 @@ fn airByteSwap(self: *Self, inst: Air.Inst.Index) !void {
12551255 return self.finishAir(inst, result, .{ ty_op.operand, .none, .none });
12561256}
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 {
12591259 if (modifier == .always_tail) return self.fail("TODO implement tail calls for {}", .{self.target.cpu.arch});
12601260
12611261 const call = self.air.unwrapCall(inst);
......@@ -4702,7 +4702,7 @@ fn truncRegister(
47024702 self: *Self,
47034703 operand_reg: Register,
47044704 dest_reg: Register,
4705 int_signedness: std.builtin.Signedness,
4705 int_signedness: std.lang.Signedness,
47064706 int_bits: u16,
47074707) !void {
47084708 switch (int_bits) {
src/codegen/sparc64/Emit.zig+1-1
......@@ -2,7 +2,7 @@
22//! machine code
33
44const std = @import("std");
5const Endian = std.builtin.Endian;
5const Endian = std.lang.Endian;
66const assert = std.debug.assert;
77const link = @import("../../link.zig");
88const Zcu = @import("../../Zcu.zig");
src/codegen/spirv/Assembler.zig+2-2
......@@ -212,7 +212,7 @@ fn processTypeInstruction(ass: *Assembler) !AsmValue {
212212 .OpTypeVoid => try module.voidType(),
213213 .OpTypeBool => try module.boolType(),
214214 .OpTypeInt => blk: {
215 const signedness: std.builtin.Signedness = switch (operands[2].literal32) {
215 const signedness: std.lang.Signedness = switch (operands[2].literal32) {
216216 0 => .unsigned,
217217 1 => .signed,
218218 else => {
......@@ -766,7 +766,7 @@ fn parseContextDependentNumber(ass: *Assembler) !void {
766766 return ass.fail(tok.start, "cannot parse literal constant", .{});
767767}
768768
769fn parseContextDependentInt(ass: *Assembler, signedness: std.builtin.Signedness, width: u32) !void {
769fn parseContextDependentInt(ass: *Assembler, signedness: std.lang.Signedness, width: u32) !void {
770770 const gpa = ass.cg.module.gpa;
771771
772772 const tok = ass.currentToken();
src/codegen/spirv/CodeGen.zig+5-5
......@@ -1,7 +1,7 @@
11const std = @import("std");
22const Allocator = std.mem.Allocator;
33const Target = std.Target;
4const Signedness = std.builtin.Signedness;
4const Signedness = std.lang.Signedness;
55const assert = std.debug.assert;
66const log = std.log.scoped(.codegen);
77
......@@ -569,7 +569,7 @@ const ArithmeticTypeInfo = struct {
569569 /// Null if this type is a scalar, or the length of the vector otherwise.
570570 vector_len: ?u32,
571571 /// Whether the inner type is signed. Only relevant for integers.
572 signedness: std.builtin.Signedness,
572 signedness: std.lang.Signedness,
573573};
574574
575575fn arithmeticTypeInfo(cg: *CodeGen, ty: Type) ArithmeticTypeInfo {
......@@ -2251,7 +2251,7 @@ fn buildBinary(cg: *CodeGen, opcode: Opcode, lhs: Temporary, rhs: Temporary) !Te
22512251/// or OpIMul and s_mul_hi or u_mul_hi on OpenCL.
22522252fn buildWideMul(
22532253 cg: *CodeGen,
2254 signedness: std.builtin.Signedness,
2254 signedness: std.lang.Signedness,
22552255 lhs: Temporary,
22562256 rhs: Temporary,
22572257) !struct { Temporary, Temporary } {
......@@ -2358,7 +2358,7 @@ fn buildWideMul(
23582358/// The SPIR-V backend is not yet advanced enough to support the std testing infrastructure.
23592359/// In order to be able to run tests, we "temporarily" lower test kernels into separate entry-
23602360/// 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`.
23622362/// (anyerror!void has the same layout as anyerror).
23632363/// Each test declaration generates a function like.
23642364/// %anyerror = OpTypeInt 0 16
......@@ -5976,7 +5976,7 @@ fn airAssembly(cg: *CodeGen, inst: Air.Inst.Index) !?Id {
59765976 return null;
59775977}
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 {
59805980 _ = modifier;
59815981
59825982 const gpa = cg.module.gpa;
src/codegen/spirv/Module.zig+4-4
......@@ -54,8 +54,8 @@ cache: struct {
5454 bool_type: ?Id = null,
5555 void_type: ?Id = null,
5656 opaque_types: std.StringHashMapUnmanaged(Id) = .empty,
57 int_types: std.AutoHashMapUnmanaged(std.builtin.Type.Int, Id) = .empty,
58 float_types: std.AutoHashMapUnmanaged(std.builtin.Type.Float, Id) = .empty,
57 int_types: std.AutoHashMapUnmanaged(std.lang.Type.Int, Id) = .empty,
58 float_types: std.AutoHashMapUnmanaged(std.lang.Type.Float, Id) = .empty,
5959 vector_types: std.AutoHashMapUnmanaged(struct { Id, u32 }, Id) = .empty,
6060 array_types: std.AutoHashMapUnmanaged(struct { Id, Id }, Id) = .empty,
6161 struct_types: std.ArrayHashMapUnmanaged(StructType, Id, StructType.HashContext, true) = .empty,
......@@ -582,7 +582,7 @@ pub fn backingIntBits(module: *Module, bits: u16) struct { u16, bool } {
582582 return .{ std.mem.alignForward(u16, bits, big_int_bits), true };
583583}
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 {
586586 assert(bits > 0);
587587
588588 const target = module.zcu.getTarget();
......@@ -918,7 +918,7 @@ pub fn debugString(module: *Module, string: []const u8) !Id {
918918 return entry.value_ptr.*;
919919}
920920
921pub fn storageClass(module: *Module, as: std.builtin.AddressSpace) spec.StorageClass {
921pub fn storageClass(module: *Module, as: std.lang.AddressSpace) spec.StorageClass {
922922 const target = module.zcu.getTarget();
923923 return switch (as) {
924924 .generic => .function,
src/codegen/wasm/CodeGen.zig+5-5
......@@ -586,7 +586,7 @@ fn addExtraAssumeCapacity(cg: *CodeGen, extra: anytype) error{OutOfMemory}!u32 {
586586 return result;
587587}
588588
589/// For `std.builtin.CallingConvention.auto`.
589/// For `std.lang.CallingConvention.auto`.
590590pub fn typeToValtype(ty: Type, zcu: *const Zcu, target: *const std.Target) std.wasm.Valtype {
591591 return switch (ty.zigTypeTag(zcu)) {
592592 .float => switch (ty.floatBits(target)) {
......@@ -951,7 +951,7 @@ fn resolveCallingConventionValues(
951951}
952952
953953pub fn firstParamSRet(
954 cc: std.builtin.CallingConvention,
954 cc: std.lang.CallingConvention,
955955 return_type: Type,
956956 zcu: *const Zcu,
957957 target: *const std.Target,
......@@ -970,7 +970,7 @@ pub fn firstParamSRet(
970970
971971/// Lowers a Zig type and its value based on a given calling convention to ensure
972972/// 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 {
974974 if (cc != .wasm_mvp) {
975975 return cg.lowerToStack(value);
976976 }
......@@ -1989,7 +1989,7 @@ fn airRetLoad(cg: *CodeGen, inst: Air.Inst.Index) InnerError!void {
19891989 return cg.finishAir(inst, .none, &.{un_op});
19901990}
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 {
19931993 if (modifier == .always_tail) return cg.fail("TODO implement tail calls for wasm", .{});
19941994 const call = cg.air.unwrapCall(inst);
19951995 const args = call.args;
......@@ -7268,7 +7268,7 @@ fn airAtomicRmw(cg: *CodeGen, inst: Air.Inst.Index) InnerError!void {
72687268 const ptr = try cg.resolveInst(pl_op.operand);
72697269 const operand = try cg.resolveInst(extra.operand);
72707270 const ty = cg.typeOfIndex(inst);
7271 const op: std.builtin.AtomicRmwOp = extra.op();
7271 const op: std.lang.AtomicRmwOp = extra.op();
72727272
72737273 if (cg.useAtomicFeature()) {
72747274 const int_ty: IntType = .fromType(cg, ty);
src/codegen/x86_64/CodeGen.zig+15-15
......@@ -173952,7 +173952,7 @@ fn setFrameLoc(
173952173952 offset.* += self.frame_allocs.items(.abi_size)[frame_i];
173953173953}
173954173954
173955fn computeFrameLayout(self: *CodeGen, cc: std.builtin.CallingConvention.Tag) !FrameLayout {
173955fn computeFrameLayout(self: *CodeGen, cc: std.lang.CallingConvention.Tag) !FrameLayout {
173956173956 const frame_allocs_len = self.frame_allocs.len;
173957173957 try self.frame_locs.resize(self.gpa, frame_allocs_len);
173958173958 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 {
174294174294 }
174295174295}
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 {
174298174298 switch (cc) {
174299174299 inline .auto, .x86_64_sysv, .x86_64_win => |tag| inline for (comptime abi.getCallerPreservedRegs(tag)) |reg|
174300174300 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
175917175917 };
175918175918}
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 {
175921175921 if (modifier == .always_tail) return self.fail("TODO implement tail calls for x86_64", .{});
175922175922
175923175923 const call = self.air.unwrapCall(inst);
......@@ -179498,7 +179498,7 @@ fn airBitCast(self: *CodeGen, inst: Air.Inst.Index) !void {
179498179498 );
179499179499 var offset = dst_limbs_len * 8;
179500179500 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))
179502179502 dst_ty.intInfo(zcu).signedness
179503179503 else
179504179504 .unsigned;
......@@ -179640,8 +179640,8 @@ fn atomicOp(
179640179640 ptr_ty: Type,
179641179641 val_ty: Type,
179642179642 unused: bool,
179643 rmw_op: ?std.builtin.AtomicRmwOp,
179644 order: std.builtin.AtomicOrder,
179643 rmw_op: ?std.lang.AtomicRmwOp,
179644 order: std.lang.AtomicOrder,
179645179645) InnerError!MCValue {
179646179646 const pt = self.pt;
179647179647 const zcu = pt.zcu;
......@@ -179714,7 +179714,7 @@ fn atomicOp(
179714179714 defer self.register_manager.unlockReg(dst_lock);
179715179715
179716179716 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) {
179718179718 try self.genUnOpMir(.{ ._, .neg }, val_ty, dst_mcv);
179719179719 }
179720179720 try self.asmMemoryRegister(mir_tag, ptr_mem, registerAlias(dst_reg, val_abi_size));
......@@ -179898,7 +179898,7 @@ fn atomicOp(
179898179898 };
179899179899 const val_lo_mem = try val_mem_mcv.mem(self, .{ .size = .qword });
179900179900 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) {
179902179902 try self.asmRegisterRegister(.{ ._, .mov }, .rbx, .rax);
179903179903 try self.asmRegisterRegister(.{ ._, .mov }, .rcx, .rdx);
179904179904 }
......@@ -180033,7 +180033,7 @@ fn airAtomicLoad(self: *CodeGen, inst: Air.Inst.Index) !void {
180033180033 return self.finishAir(inst, result, .{ atomic_load.ptr, .none, .none });
180034180034}
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 {
180037180037 const bin_op = self.air.instructions.items(.data)[@intFromEnum(inst)].bin_op;
180038180038
180039180039 const ptr_ty = self.typeOf(bin_op.lhs);
......@@ -181813,7 +181813,7 @@ fn nonBoolScalarBitSize(cg: *CodeGen, ty: Type) u32 {
181813181813 };
181814181814}
181815181815
181816fn intInfo(cg: *CodeGen, ty: Type) ?std.builtin.Type.Int {
181816fn intInfo(cg: *CodeGen, ty: Type) ?std.lang.Type.Int {
181817181817 const zcu = cg.pt.zcu;
181818181818 const ip = &zcu.intern_pool;
181819181819 var ty_index = ty.ip_index;
......@@ -188528,7 +188528,7 @@ const Select = struct {
188528188528
188529188529 const ConstSpec = struct {
188530188530 ref: Select.Operand.Ref = .none,
188531 to_signedness: ?std.builtin.Signedness = null,
188531 to_signedness: ?std.lang.Signedness = null,
188532188532 vectorize_to: ?Memory.Size = null,
188533188533 };
188534188534
......@@ -188537,7 +188537,7 @@ const Select = struct {
188537188537 after: u2,
188538188538 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 {
188541188541 return switch (spec.cc) {
188542188542 .none => unreachable,
188543188543 .ccc => cg.target.cCallingConvention().?,
......@@ -188667,11 +188667,11 @@ const Select = struct {
188667188667 .smax_mem, .umin_mem => .bool_false,
188668188668 }) },
188669188669 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 .{
188671188671 .signedness = .signed,
188672188672 .bits = cg.floatBits(scalar_ty).?,
188673188673 };
188674 const res_scalar_info: std.builtin.Type.Int = .{
188674 const res_scalar_info: std.lang.Type.Int = .{
188675188675 .signedness = const_spec.to_signedness orelse scalar_info.signedness,
188676188676 .bits = switch (spec.kind) {
188677188677 else => scalar_info.bits,
......@@ -188739,7 +188739,7 @@ const Select = struct {
188739188739 .positive = undefined,
188740188740 };
188741188741 defer allocator.free(big_int.limbs);
188742 const signedness: std.builtin.Signedness = switch (spec.kind) {
188742 const signedness: std.lang.Signedness = switch (spec.kind) {
188743188743 else => unreachable,
188744188744 .slimit_delta_mem => .signed,
188745188745 .umax_delta_mem => .unsigned,
src/codegen/x86_64/Lower.zig+1-1
......@@ -3,7 +3,7 @@
33target: *const std.Target,
44allocator: std.mem.Allocator,
55mir: Mir,
6cc: std.builtin.CallingConvention,
6cc: std.lang.CallingConvention,
77err_msg: ?*Zcu.ErrorMsg = null,
88src_loc: Zcu.LazySrcLoc,
99result_insts_len: ResultInstIndex = undefined,
src/codegen/x86_64/Mir.zig+1-1
......@@ -1737,7 +1737,7 @@ pub const Inst = struct {
17371737 @typeInfo(Tag).@"enum".fields.len != 251)
17381738 {
17391739 const cond_src = (struct {
1740 fn src() std.builtin.SourceLocation {
1740 fn src() std.lang.SourceLocation {
17411741 return @src();
17421742 }
17431743 }).src();
src/codegen/x86_64/abi.zig+9-9
......@@ -478,7 +478,7 @@ pub const Win64 = struct {
478478 pub const c_abi_sse_return_regs = sse_avx_regs[0..1];
479479};
480480
481pub fn getCalleePreservedRegs(cc: std.builtin.CallingConvention.Tag) []const Register {
481pub fn getCalleePreservedRegs(cc: std.lang.CallingConvention.Tag) []const Register {
482482 return switch (cc) {
483483 .auto => zigcc.callee_preserved_regs,
484484 .x86_64_sysv => &SysV.callee_preserved_regs,
......@@ -487,7 +487,7 @@ pub fn getCalleePreservedRegs(cc: std.builtin.CallingConvention.Tag) []const Reg
487487 };
488488}
489489
490pub fn getCallerPreservedRegs(cc: std.builtin.CallingConvention.Tag) []const Register {
490pub fn getCallerPreservedRegs(cc: std.lang.CallingConvention.Tag) []const Register {
491491 return switch (cc) {
492492 .auto => zigcc.caller_preserved_regs,
493493 .x86_64_sysv => &SysV.caller_preserved_regs,
......@@ -496,7 +496,7 @@ pub fn getCallerPreservedRegs(cc: std.builtin.CallingConvention.Tag) []const Reg
496496 };
497497}
498498
499pub fn getCAbiIntParamRegs(cc: std.builtin.CallingConvention.Tag) []const Register {
499pub fn getCAbiIntParamRegs(cc: std.lang.CallingConvention.Tag) []const Register {
500500 return switch (cc) {
501501 .auto => zigcc.int_param_regs,
502502 .x86_64_sysv => &SysV.c_abi_int_param_regs,
......@@ -505,7 +505,7 @@ pub fn getCAbiIntParamRegs(cc: std.builtin.CallingConvention.Tag) []const Regist
505505 };
506506}
507507
508pub fn getCAbiX87ParamRegs(cc: std.builtin.CallingConvention.Tag) []const Register {
508pub fn getCAbiX87ParamRegs(cc: std.lang.CallingConvention.Tag) []const Register {
509509 return switch (cc) {
510510 .auto => zigcc.x87_param_regs,
511511 .x86_64_sysv => SysV.c_abi_x87_param_regs,
......@@ -514,7 +514,7 @@ pub fn getCAbiX87ParamRegs(cc: std.builtin.CallingConvention.Tag) []const Regist
514514 };
515515}
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 {
518518 return switch (cc) {
519519 .auto => switch (target.cpu.arch) {
520520 else => unreachable,
......@@ -527,7 +527,7 @@ pub fn getCAbiSseParamRegs(cc: std.builtin.CallingConvention.Tag, target: *const
527527 };
528528}
529529
530pub fn getCAbiIntReturnRegs(cc: std.builtin.CallingConvention.Tag) []const Register {
530pub fn getCAbiIntReturnRegs(cc: std.lang.CallingConvention.Tag) []const Register {
531531 return switch (cc) {
532532 .auto => zigcc.int_return_regs,
533533 .x86_64_sysv => &SysV.c_abi_int_return_regs,
......@@ -536,7 +536,7 @@ pub fn getCAbiIntReturnRegs(cc: std.builtin.CallingConvention.Tag) []const Regis
536536 };
537537}
538538
539pub fn getCAbiX87ReturnRegs(cc: std.builtin.CallingConvention.Tag) []const Register {
539pub fn getCAbiX87ReturnRegs(cc: std.lang.CallingConvention.Tag) []const Register {
540540 return switch (cc) {
541541 .auto => zigcc.x87_return_regs,
542542 .x86_64_sysv => SysV.c_abi_x87_return_regs,
......@@ -545,7 +545,7 @@ pub fn getCAbiX87ReturnRegs(cc: std.builtin.CallingConvention.Tag) []const Regis
545545 };
546546}
547547
548pub fn getCAbiSseReturnRegs(cc: std.builtin.CallingConvention.Tag) []const Register {
548pub fn getCAbiSseReturnRegs(cc: std.lang.CallingConvention.Tag) []const Register {
549549 return switch (cc) {
550550 .auto => zigcc.sse_return_regs,
551551 .x86_64_sysv => SysV.c_abi_sse_return_regs,
......@@ -554,7 +554,7 @@ pub fn getCAbiSseReturnRegs(cc: std.builtin.CallingConvention.Tag) []const Regis
554554 };
555555}
556556
557pub fn getCAbiLinkerScratchReg(cc: std.builtin.CallingConvention.Tag) Register {
557pub fn getCAbiLinkerScratchReg(cc: std.lang.CallingConvention.Tag) Register {
558558 return switch (cc) {
559559 .auto => zigcc.int_return_regs[zigcc.int_return_regs.len - 1],
560560 .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) {
106106 }
107107
108108 pub fn fromCompareOperator(
109 signedness: std.builtin.Signedness,
109 signedness: std.lang.Signedness,
110110 op: std.math.CompareOperator,
111111 ) Condition {
112112 return switch (signedness) {
src/libs/freebsd.zig+1-1
......@@ -19,7 +19,7 @@ pub const CrtFile = enum {
1919 scrt1_o,
2020};
2121
22pub fn needsCrt0(output_mode: std.builtin.OutputMode) ?CrtFile {
22pub fn needsCrt0(output_mode: std.lang.OutputMode) ?CrtFile {
2323 // For shared libraries and PIC executables, we should actually link in a variant of crt1 that
2424 // is built with `-DSHARED` so that it calls `__cxa_finalize` in an ELF destructor. However, we
2525 // 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(
12771277 try comp.updateSubCompilation(sub_compilation, misc_task, prog_node);
12781278}
12791279
1280pub fn needsCrt0(output_mode: std.builtin.OutputMode) ?CrtFile {
1280pub fn needsCrt0(output_mode: std.lang.OutputMode) ?CrtFile {
12811281 return switch (output_mode) {
12821282 .Obj, .Lib => null,
12831283 .Exe => .scrt1_o,
src/libs/libcxx.zig+1-1
......@@ -324,7 +324,7 @@ pub fn buildLibCxxAbi(comp: *Compilation, prog_node: std.Progress.Node) BuildErr
324324 const strip = comp.compilerRtStrip();
325325 // See the `-fno-exceptions` logic for WASI.
326326 // 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 =
328328 if (target.os.tag == .wasi or (target.cpu.arch == .x86 and target.os.tag == .windows)) .none else .async;
329329
330330 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
3737 .watchos => if (target.abi == .simulator) "clang_rt.tsan_watchossim_dynamic" else "clang_rt.tsan_watchos_dynamic",
3838 else => "tsan",
3939 };
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;
4141 const output_mode = .Lib;
4242 const basename = try std.zig.binNameAlloc(arena, .{
4343 .root_name = root_name,
......@@ -48,7 +48,7 @@ pub fn buildTsan(comp: *Compilation, prog_node: std.Progress.Node) BuildError!vo
4848
4949 const optimize_mode = comp.compilerRtOptMode();
5050 const strip = comp.compilerRtStrip();
51 const unwind_tables: std.builtin.UnwindTables =
51 const unwind_tables: std.lang.UnwindTables =
5252 if (target.cpu.arch == .x86 and target.os.tag == .windows) .none else .async;
5353 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
2929 const io = comp.io;
3030 const output_mode = .Lib;
3131 const target = &comp.root_mod.resolved_target.result;
32 const unwind_tables: std.builtin.UnwindTables =
32 const unwind_tables: std.lang.UnwindTables =
3333 if (target.cpu.arch == .x86 and target.os.tag == .windows) .none else .async;
3434 const config = Compilation.Config.resolve(.{
3535 .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
3737 const target = comp.getTarget();
3838
3939 // 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
4242 switch (crt_file) {
4343 .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
173173 .libc_so => {
174174 const optimize_mode = comp.compilerRtOptMode();
175175 const strip = comp.compilerRtStrip();
176 const output_mode: std.builtin.OutputMode = .Lib;
176 const output_mode: std.lang.OutputMode = .Lib;
177177 const config = try Compilation.Config.resolve(.{
178178 .output_mode = output_mode,
179179 .link_mode = .dynamic,
......@@ -290,7 +290,7 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro
290290 }
291291}
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 {
294294 return switch (output_mode) {
295295 .Obj, .Lib => null,
296296 .Exe => switch (link_mode) {
src/libs/netbsd.zig+1-1
......@@ -19,7 +19,7 @@ pub const CrtFile = enum {
1919 scrt0_o,
2020};
2121
22pub fn needsCrt0(output_mode: std.builtin.OutputMode) ?CrtFile {
22pub fn needsCrt0(output_mode: std.lang.OutputMode) ?CrtFile {
2323 // For shared libraries and PIC executables, we should actually link in a variant of crt1 that
2424 // is built with `-DSHARED` so that it calls `__cxa_finalize` in an ELF destructor. However, we
2525 // 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 {
2020 scrt0_o,
2121};
2222
23pub fn needsCrt0(output_mode: std.builtin.OutputMode) ?CrtFile {
23pub fn needsCrt0(output_mode: std.lang.OutputMode) ?CrtFile {
2424 // https://github.com/ziglang/zig/issues/23574#issuecomment-2869089897
2525 return switch (output_mode) {
2626 .Obj, .Lib => null,
src/libs/wasi_libc.zig+2-2
......@@ -12,14 +12,14 @@ pub const CrtFile = enum {
1212 libc_a,
1313};
1414
15pub fn execModelCrtFile(wasi_exec_model: std.builtin.WasiExecModel) CrtFile {
15pub fn execModelCrtFile(wasi_exec_model: std.lang.WasiExecModel) CrtFile {
1616 return switch (wasi_exec_model) {
1717 .reactor => CrtFile.crt1_reactor_o,
1818 .command => CrtFile.crt1_command_o,
1919 };
2020}
2121
22pub fn execModelCrtFileFullName(wasi_exec_model: std.builtin.WasiExecModel) []const u8 {
22pub fn execModelCrtFileFullName(wasi_exec_model: std.lang.WasiExecModel) []const u8 {
2323 return switch (execModelCrtFile(wasi_exec_model)) {
2424 .crt1_reactor_o => "crt1-reactor.o",
2525 .crt1_command_o => "crt1-command.o",
src/link.zig+8-8
......@@ -1300,8 +1300,8 @@ pub const File = struct {
13001300 };
13011301
13021302 pub fn determinePermissions(
1303 output_mode: std.builtin.OutputMode,
1304 link_mode: std.builtin.LinkMode,
1303 output_mode: std.lang.OutputMode,
1304 link_mode: std.lang.LinkMode,
13051305 ) Io.File.Permissions {
13061306 // On common systems with a 0o022 umask, 0o777 will still result in a file created
13071307 // with 0o755 permissions, but it works appropriately if the system is configured
......@@ -1714,10 +1714,10 @@ pub const UnresolvedInput = union(enum) {
17141714 must_link: bool = false,
17151715 hidden: bool = false,
17161716 allow_so_scripts: bool = false,
1717 preferred_mode: std.builtin.LinkMode,
1717 preferred_mode: std.lang.LinkMode,
17181718 search_strategy: SearchStrategy,
17191719
1720 fn fallbackMode(q: Query) std.builtin.LinkMode {
1720 fn fallbackMode(q: Query) std.lang.LinkMode {
17211721 assert(q.search_strategy != .no_fallback);
17221722 return switch (q.preferred_mode) {
17231723 .dynamic => .static,
......@@ -1843,7 +1843,7 @@ pub fn resolveInputs(
18431843 name: []const u8,
18441844 strategy: UnresolvedInput.SearchStrategy,
18451845 checked_paths: []const u8,
1846 preferred_mode: std.builtin.LinkMode,
1846 preferred_mode: std.lang.LinkMode,
18471847 }) = .empty;
18481848
18491849 // Convert external system libs into a stack so that items can be
......@@ -2077,7 +2077,7 @@ fn resolveLibInput(
20772077 lib_directory: Directory,
20782078 name_query: UnresolvedInput.NameQuery,
20792079 target: *const std.Target,
2080 link_mode: std.builtin.LinkMode,
2080 link_mode: std.lang.LinkMode,
20812081 color: std.zig.Color,
20822082) Allocator.Error!ResolveLibInputResult {
20832083 try resolved_inputs.ensureUnusedCapacity(gpa, 1);
......@@ -2161,7 +2161,7 @@ fn finishResolveLibInput(
21612161 resolved_inputs: *std.ArrayList(Input),
21622162 path: Path,
21632163 file: Io.File,
2164 link_mode: std.builtin.LinkMode,
2164 link_mode: std.lang.LinkMode,
21652165 query: UnresolvedInput.Query,
21662166) ResolveLibInputResult {
21672167 switch (link_mode) {
......@@ -2237,7 +2237,7 @@ fn resolvePathInputLib(
22372237 ld_script_bytes: *std.ArrayList(u8),
22382238 target: *const std.Target,
22392239 pq: UnresolvedInput.PathQuery,
2240 link_mode: std.builtin.LinkMode,
2240 link_mode: std.lang.LinkMode,
22412241 color: std.zig.Color,
22422242) Allocator.Error!ResolveLibInputResult {
22432243 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 {
10911091 }
10921092}
10931093
1094pub inline fn targetEndian(_: *const Coff) std.builtin.Endian {
1094pub inline fn targetEndian(_: *const Coff) std.lang.Endian {
10951095 return .little;
10961096}
10971097fn 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");
2222gpa: Allocator,
2323bin_file: *link.File,
2424format: DW.Format,
25endian: std.builtin.Endian,
25endian: std.lang.Endian,
2626address_size: AddressSize,
2727
2828const_pool: link.ConstPool,
......@@ -1963,7 +1963,7 @@ pub const WipNav = struct {
19631963 fn writer(counter: *ExprLocCounter) *Writer {
19641964 return &counter.dw.writer;
19651965 }
1966 fn endian(_: ExprLocCounter) std.builtin.Endian {
1966 fn endian(_: ExprLocCounter) std.lang.Endian {
19671967 return @import("builtin").cpu.arch.endian();
19681968 }
19691969 fn addrSym(counter: *ExprLocCounter, _: u32) Writer.Error!void {
......@@ -1984,7 +1984,7 @@ pub const WipNav = struct {
19841984 fn writer(ctx: @This()) *Writer {
19851985 return &ctx.wip_nav.debug_info.writer;
19861986 }
1987 fn endian(ctx: @This()) std.builtin.Endian {
1987 fn endian(ctx: @This()) std.lang.Endian {
19881988 return ctx.wip_nav.dwarf.endian;
19891989 }
19901990 fn addrSym(ctx: @This(), sym_index: u32) (UpdateError || Writer.Error)!void {
......@@ -2026,7 +2026,7 @@ pub const WipNav = struct {
20262026 fn writer(ctx: @This()) *Writer {
20272027 return &ctx.wip_nav.debug_frame.writer;
20282028 }
2029 fn endian(ctx: @This()) std.builtin.Endian {
2029 fn endian(ctx: @This()) std.lang.Endian {
20302030 return ctx.wip_nav.dwarf.endian;
20312031 }
20322032 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
41644164 try wip_nav.strpFmt("{f}", .{val.toType().fmt(pt)});
41654165 const cc: DW.CC = cc: {
41664166 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) {
41684168 break :cc .normal;
41694169 }
41704170 }
src/link/Elf2.zig+1-1
......@@ -1697,7 +1697,7 @@ pub fn identData(elf: *const Elf) std.elf.DATA {
16971697 return @enumFromInt(elf.mf.memory_map.memory[std.elf.EI.DATA]);
16981698}
16991699
1700pub fn targetEndian(elf: *const Elf) std.builtin.Endian {
1700pub fn targetEndian(elf: *const Elf) std.lang.Endian {
17011701 return switch (elf.identData()) {
17021702 .NONE, _ => unreachable,
17031703 .@"2LSB" => .little,
src/link/Wasm.zig+4-4
......@@ -3882,7 +3882,7 @@ pub fn flush(
38823882
38833883fn defaultEntrySymbolName(
38843884 preloaded_strings: *const PreloadedStrings,
3885 wasi_exec_model: std.builtin.WasiExecModel,
3885 wasi_exec_model: std.lang.WasiExecModel,
38863886) String {
38873887 return switch (wasi_exec_model) {
38883888 .reactor => preloaded_strings._initialize,
......@@ -3962,7 +3962,7 @@ pub fn getExistingFuncType2(wasm: *const Wasm, params: []const std.wasm.Valtype,
39623962
39633963pub fn internFunctionType(
39643964 wasm: *Wasm,
3965 cc: std.builtin.CallingConvention,
3965 cc: std.lang.CallingConvention,
39663966 params: []const InternPool.Index,
39673967 return_type: Zcu.Type,
39683968 target: *const std.Target,
......@@ -3976,7 +3976,7 @@ pub fn internFunctionType(
39763976
39773977pub fn getExistingFunctionType(
39783978 wasm: *Wasm,
3979 cc: std.builtin.CallingConvention,
3979 cc: std.lang.CallingConvention,
39803980 params: []const InternPool.Index,
39813981 return_type: Zcu.Type,
39823982 target: *const std.Target,
......@@ -4210,7 +4210,7 @@ pub fn errorNameTableAddr(wasm: *Wasm) u32 {
42104210
42114211fn convertZcuFnType(
42124212 comp: *Compilation,
4213 cc: std.builtin.CallingConvention,
4213 cc: std.lang.CallingConvention,
42144214 params: []const InternPool.Index,
42154215 return_type: Zcu.Type,
42164216 target: *const std.Target,
src/main.zig+10-10
......@@ -766,7 +766,7 @@ const Emit = union(enum) {
766766};
767767
768768const ArgMode = union(enum) {
769 build: std.builtin.OutputMode,
769 build: std.lang.OutputMode,
770770 cc,
771771 cpp,
772772 translate_c,
......@@ -935,13 +935,13 @@ fn buildOutputType(
935935 var minor_subsystem_version: ?u16 = null;
936936 var mingw_unicode_entry_point: bool = false;
937937 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;
939939 var install_name: ?[]const u8 = null;
940940 var hash_style: link.File.Lld.Elf.HashStyle = .both;
941941 var entitlements: ?[]const u8 = null;
942942 var pagezero_size: ?u64 = null;
943943 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;
945945 var headerpad_size: ?u32 = null;
946946 var headerpad_max_install_names: bool = false;
947947 var dead_strip_dylibs: bool = false;
......@@ -5752,7 +5752,7 @@ fn jitCmdInner(
57525752 const self_exe_path = process.executablePathAlloc(io, arena) catch |err|
57535753 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))
57565756 .Debug
57575757 else
57585758 .ReleaseFast;
......@@ -6263,8 +6263,8 @@ pub const ClangArgIterator = struct {
62636263 }
62646264};
62656265
6266fn parseCodeModel(arg: []const u8) std.builtin.CodeModel {
6267 return std.meta.stringToEnum(std.builtin.CodeModel, arg) orelse
6266fn parseCodeModel(arg: []const u8) std.lang.CodeModel {
6267 return std.meta.stringToEnum(std.lang.CodeModel, arg) orelse
62686268 fatal("unsupported machine code model: '{s}'", .{arg});
62696269}
62706270
......@@ -7667,13 +7667,13 @@ fn findTemplates(gpa: Allocator, arena: Allocator, io: Io) Templates {
76677667 };
76687668}
76697669
7670fn parseOptimizeMode(s: []const u8) std.builtin.OptimizeMode {
7671 return std.meta.stringToEnum(std.builtin.OptimizeMode, s) orelse
7670fn parseOptimizeMode(s: []const u8) std.lang.OptimizeMode {
7671 return std.meta.stringToEnum(std.lang.OptimizeMode, s) orelse
76727672 fatal("unrecognized optimization mode: '{s}'", .{s});
76737673}
76747674
7675fn parseWasiExecModel(s: []const u8) std.builtin.WasiExecModel {
7676 return std.meta.stringToEnum(std.builtin.WasiExecModel, s) orelse
7675fn parseWasiExecModel(s: []const u8) std.lang.WasiExecModel {
7676 return std.meta.stringToEnum(std.lang.WasiExecModel, s) orelse
76777677 fatal("expected [command|reactor] for -mexec-mode=[value], found '{s}'", .{s});
76787678}
76797679
src/print_zir.zig+4-4
......@@ -693,7 +693,7 @@ const Writer = struct {
693693 .restore_err_ret_index => try self.writeRestoreErrRetIndex(stream, extended),
694694 .closure_get => try self.writeClosureGet(stream, extended),
695695 .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),
697697 .inplace_arith_result_ty => try self.writeInplaceArithResultTy(stream, extended),
698698
699699 .dbg_empty_stmt => try stream.writeAll("))"),
......@@ -1340,7 +1340,7 @@ const Writer = struct {
13401340 if (extra.data.flags.ensure_result_used) {
13411341 try stream.writeAll("nodiscard ");
13421342 }
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)))});
13441344 switch (kind) {
13451345 .direct => try self.writeInstRef(stream, extra.data.callee),
13461346 .field => {
......@@ -2232,8 +2232,8 @@ const Writer = struct {
22322232 try self.writeSrcNode(stream, src_node);
22332233 }
22342234
2235 fn writeBuiltinValue(self: *Writer, stream: *std.Io.Writer, extended: Zir.Inst.Extended.InstData) !void {
2236 const val: Zir.Inst.BuiltinValue = @enumFromInt(extended.small);
2235 fn writeStdLangValue(self: *Writer, stream: *std.Io.Writer, extended: Zir.Inst.Extended.InstData) !void {
2236 const val: Zir.Inst.StdLangValue = @enumFromInt(extended.small);
22372237 try stream.print("{s})) ", .{@tagName(val)});
22382238 const src_node: Ast.Node.Offset = @enumFromInt(@as(i32, @bitCast(extended.operand)));
22392239 try self.writeSrcNode(stream, src_node);
src/target.zig+15-15
......@@ -3,7 +3,7 @@ const std = @import("std");
33const assert = std.debug.assert;
44
55const Type = @import("Type.zig");
6const AddressSpace = std.builtin.AddressSpace;
6const AddressSpace = std.lang.AddressSpace;
77const Alignment = @import("InternPool.zig").Alignment;
88const Compilation = @import("Compilation.zig");
99const Feature = @import("Zcu.zig").Feature;
......@@ -31,7 +31,7 @@ pub fn canDynamicLink(target: *const std.Target) bool {
3131 };
3232}
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 {
3535 return target.isGnuLibC() and link_mode == .static;
3636}
3737
......@@ -119,7 +119,7 @@ pub fn useEmulatedTls(target: *const std.Target) bool {
119119 };
120120}
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 {
123123 // We can't currently output the necessary Valgrind client request assembly when using the C
124124 // backend and compiling with an MSVC-like compiler.
125125 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 {
265265 };
266266}
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 {
269269 return switch (ofmt) {
270270 .elf, .coff => switch (backend) {
271271 .stage2_x86_64 => true,
......@@ -299,7 +299,7 @@ pub fn selfHostedBackendIsAsRobustAsLlvm(target: *const std.Target) bool {
299299 return false;
300300}
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 {
303303 return switch (backend) {
304304 .stage2_aarch64, .stage2_x86_64 => true,
305305 .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
308308 };
309309}
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 {
312312 switch (target.os.tag) {
313313 .plan9 => return false,
314314 else => {},
......@@ -336,7 +336,7 @@ pub fn libcProvidesStackProtector(target: *const std.Target) bool {
336336
337337/// Returns true if `@returnAddress()` is supported by the target and has a
338338/// 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 {
340340 return switch (target.cpu.arch) {
341341 // Emscripten currently implements `emscripten_return_address()` by calling
342342 // out into JavaScript and parsing a stack trace, which introduces significant
......@@ -396,7 +396,7 @@ pub fn hasDebugInfo(target: *const std.Target) bool {
396396 };
397397}
398398
399pub fn defaultCompilerRtOptimizeMode(target: *const std.Target) std.builtin.OptimizeMode {
399pub fn defaultCompilerRtOptimizeMode(target: *const std.Target) std.lang.OptimizeMode {
400400 if (target.cpu.arch.isWasm() and target.os.tag == .freestanding) {
401401 return .ReleaseSmall;
402402 } else {
......@@ -437,7 +437,7 @@ pub fn canBuildLibUbsanRt(target: *const std.Target) enum { no, yes, llvm_only,
437437
438438/// Whether libzigc can fill-in the gaps of an existing libc
439439/// 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 {
441441 return (target.isMuslLibC() and link_mode == .static) or target.isWasiLibC() or target.isMinGW();
442442}
443443
......@@ -547,7 +547,7 @@ pub fn clangSupportsNoImplicitFloatArg(target: *const std.Target) bool {
547547 };
548548}
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 {
551551 if (target.os.tag == .windows) {
552552 // The old 32-bit x86 variant of SEH doesn't use tables.
553553 return if (target.cpu.arch != .x86) .async else .none;
......@@ -824,7 +824,7 @@ pub fn functionPointerMask(target: *const std.Target) ?u64 {
824824 null;
825825}
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 {
828828 switch (backend) {
829829 .stage2_llvm => return @import("codegen/llvm.zig").supportsTailCall(target),
830830 .stage2_c => return true,
......@@ -832,7 +832,7 @@ pub fn supportsTailCall(target: *const std.Target, backend: std.builtin.Compiler
832832 }
833833}
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 {
836836 _ = target;
837837 return switch (backend) {
838838 .stage2_aarch64 => false,
......@@ -880,7 +880,7 @@ pub fn compilerRtIntAbbrev(bits: u16) []const u8 {
880880 };
881881}
882882
883pub fn fnCallConvAllowsZigTypes(cc: std.builtin.CallingConvention) bool {
883pub fn fnCallConvAllowsZigTypes(cc: std.lang.CallingConvention) bool {
884884 return switch (cc) {
885885 .auto, .async, .@"inline" => true,
886886 // 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 {
891891 };
892892}
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 {
895895 if (use_llvm) return .stage2_llvm;
896896 if (target.ofmt == .c) return .stage2_c;
897897 return switch (target.cpu.arch) {
......@@ -908,7 +908,7 @@ pub fn zigBackend(target: *const std.Target, use_llvm: bool) std.builtin.Compile
908908 };
909909}
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 {
912912 return switch (feature) {
913913 .panic_fn => switch (backend) {
914914 .stage2_aarch64,
src/tracy.zig+2-2
......@@ -58,7 +58,7 @@ pub const Ctx = if (enable) ___tracy_c_zone_context else struct {
5858 }
5959};
6060
61pub inline fn trace(comptime src: std.builtin.SourceLocation) Ctx {
61pub inline fn trace(comptime src: std.lang.SourceLocation) Ctx {
6262 if (!enable) return .{};
6363
6464 const global = struct {
......@@ -78,7 +78,7 @@ pub inline fn trace(comptime src: std.builtin.SourceLocation) Ctx {
7878 }
7979}
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 {
8282 if (!enable) return .{};
8383
8484 const global = struct {
test/cases/compile_errors/invalid_member_of_builtin_enum.zig+3-3
......@@ -1,10 +1,10 @@
1const builtin = @import("std").builtin;
1const lang = @import("std").lang;
22export fn entry() void {
3 const foo = builtin.OptimizeMode.x86;
3 const foo = lang.OptimizeMode.x86;
44 _ = foo;
55}
66
77// error
88//
9// :3:38: error: enum 'builtin.OptimizeMode' has no member named 'x86'
9// :3:35: error: enum 'lang.OptimizeMode' has no member named 'x86'
1010// : 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 {
1616// error
1717// target=x86_64-linux
1818//
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 {
1212
1313// error
1414//
15// :9:54: error: values of type 'builtin.Type.StructField' must be comptime-known, but index value is runtime-known
15// :9:54: error: values of type 'lang.Type.StructField' must be comptime-known, but index value is runtime-known
1616// : note: struct requires comptime because of this field
1717// : 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 {
1616
1717// error
1818//
19// :2:14: error: expected type 'builtin.Signedness', found 'comptime_int'
19// :2:14: error: expected type 'lang.Signedness', found 'comptime_int'
2020// :?:?: note: enum declared here
2121// :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'
2323// :?:?: 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'
2525// :?:?: 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 {
55
66// error
77//
8// :3:47: error: expected type 'builtin.AtomicOrder', found 'u32'
8// :3:47: error: expected type 'lang.AtomicOrder', found 'u32'
99// :?:?: note: enum declared here
test/cases/compile_errors/wrong_types_given_to_export.zig+1-1
......@@ -5,5 +5,5 @@ comptime {
55
66// error
77//
8// :3:42: error: expected type 'builtin.GlobalLinkage', found 'u32'
8// :3:42: error: expected type 'lang.GlobalLinkage', found 'u32'
99// :?:?: note: enum declared here