diff options
| author | kcbanner <kcbanner@gmail.com> | 2023-07-04 13:40:50 -0400 |
|---|---|---|
| committer | kcbanner <kcbanner@gmail.com> | 2023-07-20 22:58:14 -0400 |
| commit | 576ffaa3298b4e99b7e46d4eccad4763b18985f8 (patch) | |
| tree | 5abb00cc3c329894f5d5bb2ad4743c3bd343481e /lib/std/c | |
| parent | 412cd789bf38a8fb6126803b8eab601b700e5a9e (diff) | |
| download | zig-576ffaa3298b4e99b7e46d4eccad4763b18985f8.tar.gz zig-576ffaa3298b4e99b7e46d4eccad4763b18985f8.zip | |
darwin: update mcontext_t definition for aarch64 to add neon state
Diffstat (limited to 'lib/std/c')
| -rw-r--r-- | lib/std/c/darwin.zig | 6 | ||||
| -rw-r--r-- | lib/std/c/darwin/aarch64.zig | 13 | ||||
| -rw-r--r-- | lib/std/c/darwin/x86_64.zig | 6 |
3 files changed, 20 insertions, 5 deletions
diff --git a/lib/std/c/darwin.zig b/lib/std/c/darwin.zig index 5f28191221..1901271b83 100644 --- a/lib/std/c/darwin.zig +++ b/lib/std/c/darwin.zig @@ -151,11 +151,7 @@ pub const ucontext_t = extern struct { __mcontext_data: mcontext_t, }; -pub const mcontext_t = extern struct { - es: arch_bits.exception_state, - ss: arch_bits.thread_state, - fs: arch_bits.float_state, -}; +pub const mcontext_t = arch_bits.mcontext_t; extern "c" fn __error() *c_int; pub extern "c" fn NSVersionOfRunTimeLibrary(library_name: [*:0]const u8) u32; diff --git a/lib/std/c/darwin/aarch64.zig b/lib/std/c/darwin/aarch64.zig index 48b03363a1..d00b92af83 100644 --- a/lib/std/c/darwin/aarch64.zig +++ b/lib/std/c/darwin/aarch64.zig @@ -1,5 +1,12 @@ // See C headers in // lib/libc/include/aarch64-macos.12-gnu/mach/arm/_structs.h +// lib/libc/include/aarch64-macos.13-none/arm/_mcontext.h + +pub const mcontext_t = extern struct { + es: exception_state, + ss: thread_state, + ns: neon_state, +}; pub const exception_state = extern struct { far: u64, // Virtual Fault Address @@ -17,6 +24,12 @@ pub const thread_state = extern struct { __pad: u32, }; +pub const neon_state = extern struct { + q: [32]u128, + fpsr: u32, + fpcr: u32, +}; + pub const EXC_TYPES_COUNT = 14; pub const EXC_MASK_MACHINE = 0; diff --git a/lib/std/c/darwin/x86_64.zig b/lib/std/c/darwin/x86_64.zig index db94840d9d..7b66fb2e97 100644 --- a/lib/std/c/darwin/x86_64.zig +++ b/lib/std/c/darwin/x86_64.zig @@ -1,5 +1,11 @@ const c = @import("../darwin.zig"); +pub const mcontext_t = extern struct { + es: exception_state, + ss: thread_state, + fs: float_state, +}; + pub const exception_state = extern struct { trapno: u16, cpu: u16, |
