authorgravatar for michael.dusan@gmail.comMichael Dusan <michael.dusan@gmail.com> 2021-05-24 10:51:02-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-05-24 13:38:47-04:00
log8cebbc352ab7ec324891fec222f317f02aba45d7
tree0069ed8ecff5459268ba1a075abba96705216c18
parent1dc7764f2ddc2f3bd78f96017fd2dd2227280055

housekeeping: builtin.arch → builtin.cpu.arch


6 files changed, 9 insertions(+), 9 deletions(-)

lib/std/c/minix.zig+1-1
...@@ -13,7 +13,7 @@ pub const pthread_cond_t = extern struct {...@@ -13,7 +13,7 @@ pub const pthread_cond_t = extern struct {
13const __SIZEOF_PTHREAD_COND_T = 48;13const __SIZEOF_PTHREAD_COND_T = 48;
14const __SIZEOF_PTHREAD_MUTEX_T = switch (builtin.abi) {14const __SIZEOF_PTHREAD_MUTEX_T = switch (builtin.abi) {
15 .musl, .musleabi, .musleabihf => if (@sizeOf(usize) == 8) 40 else 24,15 .musl, .musleabi, .musleabihf => if (@sizeOf(usize) == 8) 40 else 24,
16 .gnu, .gnuabin32, .gnuabi64, .gnueabi, .gnueabihf, .gnux32 => switch (builtin.arch) {16 .gnu, .gnuabin32, .gnuabi64, .gnueabi, .gnueabihf, .gnux32 => switch (builtin.cpu.arch) {
17 .aarch64 => 48,17 .aarch64 => 48,
18 .x86_64 => if (builtin.abi == .gnux32) 40 else 32,18 .x86_64 => if (builtin.abi == .gnux32) 40 else 32,
19 .mips64, .powerpc64, .powerpc64le, .sparcv9 => 40,19 .mips64, .powerpc64, .powerpc64le, .sparcv9 => 40,
lib/std/c/netbsd.zig+3-3
...@@ -56,7 +56,7 @@ pub const pthread_cond_t = extern struct {...@@ -56,7 +56,7 @@ pub const pthread_cond_t = extern struct {
5656
57pub const pthread_rwlock_t = extern struct {57pub const pthread_rwlock_t = extern struct {
58 ptr_magic: c_uint = 0x99990009,58 ptr_magic: c_uint = 0x99990009,
59 ptr_interlock: switch (std.builtin.arch) {59 ptr_interlock: switch (std.builtin.cpu.arch) {
60 .aarch64, .sparc, .x86_64, .i386 => u8,60 .aarch64, .sparc, .x86_64, .i386 => u8,
61 .arm, .powerpc => c_int,61 .arm, .powerpc => c_int,
62 else => unreachable,62 else => unreachable,
...@@ -70,7 +70,7 @@ pub const pthread_rwlock_t = extern struct {...@@ -70,7 +70,7 @@ pub const pthread_rwlock_t = extern struct {
70 ptr_private: ?*c_void = null,70 ptr_private: ?*c_void = null,
71};71};
7272
73const pthread_spin_t = switch (builtin.arch) {73const pthread_spin_t = switch (builtin.cpu.arch) {
74 .aarch64, .aarch64_be, .aarch64_32 => u8,74 .aarch64, .aarch64_be, .aarch64_32 => u8,
75 .mips, .mipsel, .mips64, .mips64el => u32,75 .mips, .mipsel, .mips64, .mips64el => u32,
76 .powerpc, .powerpc64, .powerpc64le => i32,76 .powerpc, .powerpc64, .powerpc64le => i32,
...@@ -81,7 +81,7 @@ const pthread_spin_t = switch (builtin.arch) {...@@ -81,7 +81,7 @@ const pthread_spin_t = switch (builtin.arch) {
81 else => @compileError("undefined pthread_spin_t for this arch"),81 else => @compileError("undefined pthread_spin_t for this arch"),
82};82};
8383
84const padded_pthread_spin_t = switch (builtin.arch) {84const padded_pthread_spin_t = switch (builtin.cpu.arch) {
85 .i386, .x86_64 => u32,85 .i386, .x86_64 => u32,
86 .sparc, .sparcel, .sparcv9 => u32,86 .sparc, .sparcel, .sparcv9 => u32,
87 else => pthread_spin_t,87 else => pthread_spin_t,
lib/std/os/bits/haiku.zig+1-1
...@@ -858,7 +858,7 @@ pub const EOWNERDEAD = 96; // Previous owner died...@@ -858,7 +858,7 @@ pub const EOWNERDEAD = 96; // Previous owner died
858858
859pub const ELAST = 96; // Must be equal largest errno859pub const ELAST = 96; // Must be equal largest errno
860860
861pub const MINSIGSTKSZ = switch (builtin.arch) {861pub const MINSIGSTKSZ = switch (builtin.cpu.arch) {
862 .i386, .x86_64 => 2048,862 .i386, .x86_64 => 2048,
863 .arm, .aarch64 => 4096,863 .arm, .aarch64 => 4096,
864 else => @compileError("MINSIGSTKSZ not defined for this architecture"),864 else => @compileError("MINSIGSTKSZ not defined for this architecture"),
lib/std/os/bits/netbsd.zig+1-1
...@@ -841,7 +841,7 @@ pub const ucontext_t = extern struct {...@@ -841,7 +841,7 @@ pub const ucontext_t = extern struct {
841 stack: stack_t,841 stack: stack_t,
842 mcontext: mcontext_t,842 mcontext: mcontext_t,
843 __pad: [843 __pad: [
844 switch (builtin.arch) {844 switch (builtin.cpu.arch) {
845 .i386 => 4,845 .i386 => 4,
846 .mips, .mipsel, .mips64, .mips64el => 14,846 .mips, .mipsel, .mips64, .mips64el => 14,
847 .arm, .armeb, .thumb, .thumbeb => 1,847 .arm, .armeb, .thumb, .thumbeb => 1,
lib/std/os/linux/bpf/kern.zig+1-1
...@@ -5,7 +5,7 @@...@@ -5,7 +5,7 @@
5// and substantial portions of the software.5// and substantial portions of the software.
6const std = @import("../../../std.zig");6const std = @import("../../../std.zig");
77
8const in_bpf_program = switch (std.builtin.arch) {8const in_bpf_program = switch (std.builtin.cpu.arch) {
9 .bpfel, .bpfeb => true,9 .bpfel, .bpfeb => true,
10 else => false,10 else => false,
11};11};
lib/std/os/linux/start_pie.zig+2-2
...@@ -9,7 +9,7 @@ const R_ARM_RELATIVE = 23;...@@ -9,7 +9,7 @@ const R_ARM_RELATIVE = 23;
9const R_AARCH64_RELATIVE = 1027;9const R_AARCH64_RELATIVE = 1027;
10const R_RISCV_RELATIVE = 3;10const R_RISCV_RELATIVE = 3;
1111
12const ARCH_RELATIVE_RELOC = switch (builtin.arch) {12const ARCH_RELATIVE_RELOC = switch (builtin.cpu.arch) {
13 .i386 => R_386_RELATIVE,13 .i386 => R_386_RELATIVE,
14 .x86_64 => R_AMD64_RELATIVE,14 .x86_64 => R_AMD64_RELATIVE,
15 .arm => R_ARM_RELATIVE,15 .arm => R_ARM_RELATIVE,
...@@ -21,7 +21,7 @@ const ARCH_RELATIVE_RELOC = switch (builtin.arch) {...@@ -21,7 +21,7 @@ const ARCH_RELATIVE_RELOC = switch (builtin.arch) {
21// Just a convoluted (but necessary) way to obtain the address of the _DYNAMIC[]21// Just a convoluted (but necessary) way to obtain the address of the _DYNAMIC[]
22// vector as PC-relative so that we can use it before any relocation is applied22// vector as PC-relative so that we can use it before any relocation is applied
23fn getDynamicSymbol() [*]elf.Dyn {23fn getDynamicSymbol() [*]elf.Dyn {
24 const addr = switch (builtin.arch) {24 const addr = switch (builtin.cpu.arch) {
25 .i386 => asm volatile (25 .i386 => asm volatile (
26 \\ .weak _DYNAMIC26 \\ .weak _DYNAMIC
27 \\ .hidden _DYNAMIC27 \\ .hidden _DYNAMIC