authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-11-17 11:32:12-08:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-11-17 11:40:24-08:00
log2eee0582f8654cb2b344ed8e2c43dcda3424dbe5
tree82292f7be0beb71b927e1b57540b24a956c198f1
parent21a77f7ac35cc3404a1ed3cb03329aef1c980f30

macOS libc headers: downgrade to 10.15.7 (Catalina)

See ziglang/fetch-them-macos-headers#2 for more details. The path forward looks like one of the following: * Ony provide headers for the oldest supported macOS (currently 10.13 but soon to be bumped to 10.14). * Provide headers for multiple versions, and select based on the Zig target OS version range minimum. * Don't try to provide macOS headers. If we don't tackle the version problem, we would have to re-introduce the ability to detect and depend on native system headers if we wanted to support C/C++ code that used newer OS definitions. This patch also adds support for `#include <mach/mach_time.h>`. Also related: #5236

136 files changed, 1168 insertions(+), 2927 deletions(-)

lib/libc/include/x86_64-macos-gnu/Availability.h+124-1
...@@ -132,7 +132,130 @@...@@ -132,7 +132,130 @@
132#define __API_TO_BE_DEPRECATED 100000132#define __API_TO_BE_DEPRECATED 100000
133#endif133#endif
134134
135#include <AvailabilityVersions.h>135#ifndef __MAC_10_0
136#define __MAC_10_0 1000
137#define __MAC_10_1 1010
138#define __MAC_10_2 1020
139#define __MAC_10_3 1030
140#define __MAC_10_4 1040
141#define __MAC_10_5 1050
142#define __MAC_10_6 1060
143#define __MAC_10_7 1070
144#define __MAC_10_8 1080
145#define __MAC_10_9 1090
146#define __MAC_10_10 101000
147#define __MAC_10_10_2 101002
148#define __MAC_10_10_3 101003
149#define __MAC_10_11 101100
150#define __MAC_10_11_2 101102
151#define __MAC_10_11_3 101103
152#define __MAC_10_11_4 101104
153#define __MAC_10_12 101200
154#define __MAC_10_12_1 101201
155#define __MAC_10_12_2 101202
156#define __MAC_10_12_4 101204
157#define __MAC_10_13 101300
158#define __MAC_10_13_1 101301
159#define __MAC_10_13_2 101302
160#define __MAC_10_13_4 101304
161#define __MAC_10_14 101400
162#define __MAC_10_14_1 101401
163#define __MAC_10_14_4 101404
164#define __MAC_10_15 101500
165#define __MAC_10_15_1 101501
166#define __MAC_10_15_4 101504
167/* __MAC_NA is not defined to a value but is uses as a token by macros to indicate that the API is unavailable */
168
169#define __IPHONE_2_0 20000
170#define __IPHONE_2_1 20100
171#define __IPHONE_2_2 20200
172#define __IPHONE_3_0 30000
173#define __IPHONE_3_1 30100
174#define __IPHONE_3_2 30200
175#define __IPHONE_4_0 40000
176#define __IPHONE_4_1 40100
177#define __IPHONE_4_2 40200
178#define __IPHONE_4_3 40300
179#define __IPHONE_5_0 50000
180#define __IPHONE_5_1 50100
181#define __IPHONE_6_0 60000
182#define __IPHONE_6_1 60100
183#define __IPHONE_7_0 70000
184#define __IPHONE_7_1 70100
185#define __IPHONE_8_0 80000
186#define __IPHONE_8_1 80100
187#define __IPHONE_8_2 80200
188#define __IPHONE_8_3 80300
189#define __IPHONE_8_4 80400
190#define __IPHONE_9_0 90000
191#define __IPHONE_9_1 90100
192#define __IPHONE_9_2 90200
193#define __IPHONE_9_3 90300
194#define __IPHONE_10_0 100000
195#define __IPHONE_10_1 100100
196#define __IPHONE_10_2 100200
197#define __IPHONE_10_3 100300
198#define __IPHONE_11_0 110000
199#define __IPHONE_11_1 110100
200#define __IPHONE_11_2 110200
201#define __IPHONE_11_3 110300
202#define __IPHONE_11_4 110400
203#define __IPHONE_12_0 120000
204#define __IPHONE_12_1 120100
205#define __IPHONE_12_2 120200
206#define __IPHONE_12_3 120300
207#define __IPHONE_13_0 130000
208#define __IPHONE_13_1 130100
209#define __IPHONE_13_2 130200
210#define __IPHONE_13_3 130300
211#define __IPHONE_13_4 130400
212#define __IPHONE_13_5 130500
213#define __IPHONE_13_6 130600
214/* __IPHONE_NA is not defined to a value but is uses as a token by macros to indicate that the API is unavailable */
215
216#define __TVOS_9_0 90000
217#define __TVOS_9_1 90100
218#define __TVOS_9_2 90200
219#define __TVOS_10_0 100000
220#define __TVOS_10_0_1 100001
221#define __TVOS_10_1 100100
222#define __TVOS_10_2 100200
223#define __TVOS_11_0 110000
224#define __TVOS_11_1 110100
225#define __TVOS_11_2 110200
226#define __TVOS_11_3 110300
227#define __TVOS_11_4 110400
228#define __TVOS_12_0 120000
229#define __TVOS_12_1 120100
230#define __TVOS_12_2 120200
231#define __TVOS_12_3 120300
232#define __TVOS_13_0 130000
233#define __TVOS_13_2 130200
234#define __TVOS_13_3 130300
235#define __TVOS_13_4 130400
236
237#define __WATCHOS_1_0 10000
238#define __WATCHOS_2_0 20000
239#define __WATCHOS_2_1 20100
240#define __WATCHOS_2_2 20200
241#define __WATCHOS_3_0 30000
242#define __WATCHOS_3_1 30100
243#define __WATCHOS_3_1_1 30101
244#define __WATCHOS_3_2 30200
245#define __WATCHOS_4_0 40000
246#define __WATCHOS_4_1 40100
247#define __WATCHOS_4_2 40200
248#define __WATCHOS_4_3 40300
249#define __WATCHOS_5_0 50000
250#define __WATCHOS_5_1 50100
251#define __WATCHOS_5_2 50200
252#define __WATCHOS_6_0 60000
253#define __WATCHOS_6_1 60100
254#define __WATCHOS_6_2 60200
255
256#define __DRIVERKIT_19_0 190000
257#endif /* __MAC_10_0 */
258
136#include <AvailabilityInternal.h>259#include <AvailabilityInternal.h>
137260
138#ifdef __IPHONE_OS_VERSION_MIN_REQUIRED261#ifdef __IPHONE_OS_VERSION_MIN_REQUIRED
lib/libc/include/x86_64-macos-gnu/AvailabilityInternal.h+6-9
...@@ -45,9 +45,6 @@...@@ -45,9 +45,6 @@
45 #ifdef __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__45 #ifdef __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__
46 /* compiler sets __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ when -miphoneos-version-min is used */46 /* compiler sets __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ when -miphoneos-version-min is used */
47 #define __IPHONE_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__47 #define __IPHONE_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__
48 /* set to 1 when RC_FALLBACK_PLATFORM=iphoneos */
49 #elif 0
50 #define __IPHONE_OS_VERSION_MIN_REQUIRED __IPHONE_14_0
51 #endif48 #endif
52#endif /* __IPHONE_OS_VERSION_MIN_REQUIRED */49#endif /* __IPHONE_OS_VERSION_MIN_REQUIRED */
5350
...@@ -55,7 +52,7 @@...@@ -55,7 +52,7 @@
55 #ifdef __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__52 #ifdef __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__
56 /* compiler sets __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ when -mtvos-version-min is used */53 /* compiler sets __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ when -mtvos-version-min is used */
57 #define __TV_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__54 #define __TV_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__
58 #define __TV_OS_VERSION_MAX_ALLOWED __TVOS_14_255 #define __TV_OS_VERSION_MAX_ALLOWED __TVOS_13_0
59 /* for compatibility with existing code. New code should use platform specific checks */56 /* for compatibility with existing code. New code should use platform specific checks */
60 #define __IPHONE_OS_VERSION_MIN_REQUIRED 9000057 #define __IPHONE_OS_VERSION_MIN_REQUIRED 90000
61 #endif58 #endif
...@@ -65,7 +62,7 @@...@@ -65,7 +62,7 @@
65 #ifdef __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__62 #ifdef __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__
66 /* compiler sets __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ when -mwatchos-version-min is used */63 /* compiler sets __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ when -mwatchos-version-min is used */
67 #define __WATCH_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__64 #define __WATCH_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__
68 #define __WATCH_OS_VERSION_MAX_ALLOWED __WATCHOS_7_165 #define __WATCH_OS_VERSION_MAX_ALLOWED 60000
69 /* for compatibility with existing code. New code should use platform specific checks */66 /* for compatibility with existing code. New code should use platform specific checks */
70 #define __IPHONE_OS_VERSION_MIN_REQUIRED 9000067 #define __IPHONE_OS_VERSION_MIN_REQUIRED 90000
71 #endif68 #endif
...@@ -75,7 +72,7 @@...@@ -75,7 +72,7 @@
75 #ifdef __ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__72 #ifdef __ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__
76 73
77 #define __BRIDGE_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__74 #define __BRIDGE_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__
78 #define __BRIDGE_OS_VERSION_MAX_ALLOWED 5000075 #define __BRIDGE_OS_VERSION_MAX_ALLOWED 20000
79 /* for compatibility with existing code. New code should use platform specific checks */76 /* for compatibility with existing code. New code should use platform specific checks */
80 #define __IPHONE_OS_VERSION_MIN_REQUIRED 11000077 #define __IPHONE_OS_VERSION_MIN_REQUIRED 110000
81 #endif78 #endif
...@@ -90,14 +87,14 @@...@@ -90,14 +87,14 @@
90#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED87#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED
91 /* make sure a default max version is set */88 /* make sure a default max version is set */
92 #ifndef __MAC_OS_X_VERSION_MAX_ALLOWED89 #ifndef __MAC_OS_X_VERSION_MAX_ALLOWED
93 #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_11_090 #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_10_15
94 #endif91 #endif
95#endif /* __MAC_OS_X_VERSION_MIN_REQUIRED */92#endif /* __MAC_OS_X_VERSION_MIN_REQUIRED */
9693
97#ifdef __IPHONE_OS_VERSION_MIN_REQUIRED94#ifdef __IPHONE_OS_VERSION_MIN_REQUIRED
98 /* make sure a default max version is set */95 /* make sure a default max version is set */
99 #ifndef __IPHONE_OS_VERSION_MAX_ALLOWED96 #ifndef __IPHONE_OS_VERSION_MAX_ALLOWED
100 #define __IPHONE_OS_VERSION_MAX_ALLOWED __IPHONE_14_297 #define __IPHONE_OS_VERSION_MAX_ALLOWED __IPHONE_13_0
101 #endif98 #endif
102 /* make sure a valid min is set */99 /* make sure a valid min is set */
103 #if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_2_0100 #if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_2_0
...@@ -2890,7 +2887,7 @@...@@ -2890,7 +2887,7 @@
2890 #if __has_builtin(__is_target_environment)2887 #if __has_builtin(__is_target_environment)
2891 #if __has_builtin(__is_target_variant_os)2888 #if __has_builtin(__is_target_variant_os)
2892 #if __has_builtin(__is_target_variant_environment)2889 #if __has_builtin(__is_target_variant_environment)
2893 #if ((__is_target_arch(x86_64) || __is_target_arch(arm64) || __is_target_arch(arm64e)) && __is_target_vendor(apple) && __is_target_os(ios) && __is_target_environment(macabi))2890 #if (__is_target_arch(x86_64) && __is_target_vendor(apple) && __is_target_os(ios) && __is_target_environment(macabi))
2894 #define __AVAILABILITY_INTERNAL__IPHONE_COMPAT_VERSION __attribute__((availability(ios,introduced=4.0)))2891 #define __AVAILABILITY_INTERNAL__IPHONE_COMPAT_VERSION __attribute__((availability(ios,introduced=4.0)))
2895 #define __AVAILABILITY_INTERNAL__IPHONE_COMPAT_VERSION_DEP__IPHONE_COMPAT_VERSION __attribute__((availability(ios,unavailable)))2892 #define __AVAILABILITY_INTERNAL__IPHONE_COMPAT_VERSION_DEP__IPHONE_COMPAT_VERSION __attribute__((availability(ios,unavailable)))
2896 #define __AVAILABILITY_INTERNAL__IPHONE_COMPAT_VERSION_DEP__IPHONE_COMPAT_VERSION_MSG(_msg) __attribute__((availability(ios,unavailable)))2893 #define __AVAILABILITY_INTERNAL__IPHONE_COMPAT_VERSION_DEP__IPHONE_COMPAT_VERSION_MSG(_msg) __attribute__((availability(ios,unavailable)))
lib/libc/include/x86_64-macos-gnu/AvailabilityMacros.h+4-4
...@@ -117,9 +117,9 @@...@@ -117,9 +117,9 @@
117#define MAC_OS_X_VERSION_10_14_1 101401117#define MAC_OS_X_VERSION_10_14_1 101401
118#define MAC_OS_X_VERSION_10_14_4 101404118#define MAC_OS_X_VERSION_10_14_4 101404
119#define MAC_OS_X_VERSION_10_15 101500119#define MAC_OS_X_VERSION_10_15 101500
120#define MAC_OS_VERSION_11_0 110000120#define MAC_OS_X_VERSION_10_15_1 101501
121121
122/* 122/*
123 * If min OS not specified, assume 10.4 for intel123 * If min OS not specified, assume 10.4 for intel
124 * Note: compiler driver may set _ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED_ based on MACOSX_DEPLOYMENT_TARGET environment variable124 * Note: compiler driver may set _ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED_ based on MACOSX_DEPLOYMENT_TARGET environment variable
125 */125 */
...@@ -144,10 +144,10 @@...@@ -144,10 +144,10 @@
144 * if max OS not specified, assume larger of (10.15, min)144 * if max OS not specified, assume larger of (10.15, min)
145 */145 */
146#ifndef MAC_OS_X_VERSION_MAX_ALLOWED146#ifndef MAC_OS_X_VERSION_MAX_ALLOWED
147 #if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_VERSION_11_0147 #if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_15
148 #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_MIN_REQUIRED148 #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_MIN_REQUIRED
149 #else149 #else
150 #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_VERSION_11_0150 #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_10_15
151 #endif151 #endif
152#endif152#endif
153153
lib/libc/include/x86_64-macos-gnu/AvailabilityVersions.h deleted-208
...@@ -1,208 +0,0 @@
1/*
2 * Copyright (c) 2019 by Apple Inc.. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23
24#ifndef __AVAILABILITY_VERSIONS__
25#define __AVAILABILITY_VERSIONS__
26
27#define __MAC_10_0 1000
28#define __MAC_10_1 1010
29#define __MAC_10_2 1020
30#define __MAC_10_3 1030
31#define __MAC_10_4 1040
32#define __MAC_10_5 1050
33#define __MAC_10_6 1060
34#define __MAC_10_7 1070
35#define __MAC_10_8 1080
36#define __MAC_10_9 1090
37#define __MAC_10_10 101000
38#define __MAC_10_10_2 101002
39#define __MAC_10_10_3 101003
40#define __MAC_10_11 101100
41#define __MAC_10_11_2 101102
42#define __MAC_10_11_3 101103
43#define __MAC_10_11_4 101104
44#define __MAC_10_12 101200
45#define __MAC_10_12_1 101201
46#define __MAC_10_12_2 101202
47#define __MAC_10_12_4 101204
48#define __MAC_10_13 101300
49#define __MAC_10_13_1 101301
50#define __MAC_10_13_2 101302
51#define __MAC_10_13_4 101304
52#define __MAC_10_14 101400
53#define __MAC_10_14_1 101401
54#define __MAC_10_14_4 101404
55#define __MAC_10_14_6 101406
56#define __MAC_10_15 101500
57#define __MAC_10_15_1 101501
58#define __MAC_10_15_4 101504
59#define __MAC_10_16 101600
60#define __MAC_11_0 110000
61/* __MAC_NA is not defined to a value but is used as a token by macros to indicate that the API is unavailable */
62
63#define __IPHONE_2_0 20000
64#define __IPHONE_2_1 20100
65#define __IPHONE_2_2 20200
66#define __IPHONE_3_0 30000
67#define __IPHONE_3_1 30100
68#define __IPHONE_3_2 30200
69#define __IPHONE_4_0 40000
70#define __IPHONE_4_1 40100
71#define __IPHONE_4_2 40200
72#define __IPHONE_4_3 40300
73#define __IPHONE_5_0 50000
74#define __IPHONE_5_1 50100
75#define __IPHONE_6_0 60000
76#define __IPHONE_6_1 60100
77#define __IPHONE_7_0 70000
78#define __IPHONE_7_1 70100
79#define __IPHONE_8_0 80000
80#define __IPHONE_8_1 80100
81#define __IPHONE_8_2 80200
82#define __IPHONE_8_3 80300
83#define __IPHONE_8_4 80400
84#define __IPHONE_9_0 90000
85#define __IPHONE_9_1 90100
86#define __IPHONE_9_2 90200
87#define __IPHONE_9_3 90300
88#define __IPHONE_10_0 100000
89#define __IPHONE_10_1 100100
90#define __IPHONE_10_2 100200
91#define __IPHONE_10_3 100300
92#define __IPHONE_11_0 110000
93#define __IPHONE_11_1 110100
94#define __IPHONE_11_2 110200
95#define __IPHONE_11_3 110300
96#define __IPHONE_11_4 110400
97#define __IPHONE_12_0 120000
98#define __IPHONE_12_1 120100
99#define __IPHONE_12_2 120200
100#define __IPHONE_12_3 120300
101#define __IPHONE_12_4 120400
102#define __IPHONE_13_0 130000
103#define __IPHONE_13_1 130100
104#define __IPHONE_13_2 130200
105#define __IPHONE_13_3 130300
106#define __IPHONE_13_4 130400
107#define __IPHONE_13_5 130500
108#define __IPHONE_13_6 130600
109#define __IPHONE_13_7 130700
110#define __IPHONE_14_0 140000
111#define __IPHONE_14_1 140100
112#define __IPHONE_14_2 140200
113/* __IPHONE_NA is not defined to a value but is used as a token by macros to indicate that the API is unavailable */
114
115#define __TVOS_9_0 90000
116#define __TVOS_9_1 90100
117#define __TVOS_9_2 90200
118#define __TVOS_10_0 100000
119#define __TVOS_10_0_1 100001
120#define __TVOS_10_1 100100
121#define __TVOS_10_2 100200
122#define __TVOS_11_0 110000
123#define __TVOS_11_1 110100
124#define __TVOS_11_2 110200
125#define __TVOS_11_3 110300
126#define __TVOS_11_4 110400
127#define __TVOS_12_0 120000
128#define __TVOS_12_1 120100
129#define __TVOS_12_2 120200
130#define __TVOS_12_3 120300
131#define __TVOS_12_4 120400
132#define __TVOS_13_0 130000
133#define __TVOS_13_2 130200
134#define __TVOS_13_3 130300
135#define __TVOS_13_4 130400
136#define __TVOS_14_0 140000
137#define __TVOS_14_1 140100
138#define __TVOS_14_2 140200
139
140#define __WATCHOS_1_0 10000
141#define __WATCHOS_2_0 20000
142#define __WATCHOS_2_1 20100
143#define __WATCHOS_2_2 20200
144#define __WATCHOS_3_0 30000
145#define __WATCHOS_3_1 30100
146#define __WATCHOS_3_1_1 30101
147#define __WATCHOS_3_2 30200
148#define __WATCHOS_4_0 40000
149#define __WATCHOS_4_1 40100
150#define __WATCHOS_4_2 40200
151#define __WATCHOS_4_3 40300
152#define __WATCHOS_5_0 50000
153#define __WATCHOS_5_1 50100
154#define __WATCHOS_5_2 50200
155#define __WATCHOS_5_3 50300
156#define __WATCHOS_6_0 60000
157#define __WATCHOS_6_1 60100
158#define __WATCHOS_6_2 60200
159#define __WATCHOS_7_0 70000
160#define __WATCHOS_7_1 70100
161
162/*
163 * Set up standard Mac OS X versions
164 */
165
166#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || defined(_DARWIN_C_SOURCE)
167
168#define MAC_OS_X_VERSION_10_0 1000
169#define MAC_OS_X_VERSION_10_1 1010
170#define MAC_OS_X_VERSION_10_2 1020
171#define MAC_OS_X_VERSION_10_3 1030
172#define MAC_OS_X_VERSION_10_4 1040
173#define MAC_OS_X_VERSION_10_5 1050
174#define MAC_OS_X_VERSION_10_6 1060
175#define MAC_OS_X_VERSION_10_7 1070
176#define MAC_OS_X_VERSION_10_8 1080
177#define MAC_OS_X_VERSION_10_9 1090
178#define MAC_OS_X_VERSION_10_10 101000
179#define MAC_OS_X_VERSION_10_10_2 101002
180#define MAC_OS_X_VERSION_10_10_3 101003
181#define MAC_OS_X_VERSION_10_11 101100
182#define MAC_OS_X_VERSION_10_11_2 101102
183#define MAC_OS_X_VERSION_10_11_3 101103
184#define MAC_OS_X_VERSION_10_11_4 101104
185#define MAC_OS_X_VERSION_10_12 101200
186#define MAC_OS_X_VERSION_10_12_1 101201
187#define MAC_OS_X_VERSION_10_12_2 101202
188#define MAC_OS_X_VERSION_10_12_4 101204
189#define MAC_OS_X_VERSION_10_13 101300
190#define MAC_OS_X_VERSION_10_13_1 101301
191#define MAC_OS_X_VERSION_10_13_2 101302
192#define MAC_OS_X_VERSION_10_13_4 101304
193#define MAC_OS_X_VERSION_10_14 101400
194#define MAC_OS_X_VERSION_10_14_1 101401
195#define MAC_OS_X_VERSION_10_14_4 101404
196#define MAC_OS_X_VERSION_10_14_6 101406
197#define MAC_OS_X_VERSION_10_15 101500
198#define MAC_OS_X_VERSION_10_15_1 101501
199#define MAC_OS_X_VERSION_10_16 101600
200#define MAC_OS_VERSION_11_0 110000
201
202#endif /* #if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || defined(_DARWIN_C_SOURCE) */
203
204#define __DRIVERKIT_19_0 190000
205#define __DRIVERKIT_20_0 200000
206
207#endif /* __AVAILABILITY_VERSIONS__ */
208
lib/libc/include/x86_64-macos-gnu/TargetConditionals.h+68-74
...@@ -35,72 +35,71 @@...@@ -35,72 +35,71 @@
35#ifndef __TARGETCONDITIONALS__35#ifndef __TARGETCONDITIONALS__
36#define __TARGETCONDITIONALS__36#define __TARGETCONDITIONALS__
3737
38/*38/****************************************************************************************************
39 *39
40 * TARGET_CPU_*40 TARGET_CPU_*
41 * These conditionals specify which microprocessor instruction set is being41 These conditionals specify which microprocessor instruction set is being
42 * generated. At most one of these is true, the rest are false.42 generated. At most one of these is true, the rest are false.
43 *43
44 * TARGET_CPU_PPC - Compiler is generating PowerPC instructions for 32-bit mode44 TARGET_CPU_PPC - Compiler is generating PowerPC instructions for 32-bit mode
45 * TARGET_CPU_PPC64 - Compiler is generating PowerPC instructions for 64-bit mode45 TARGET_CPU_PPC64 - Compiler is generating PowerPC instructions for 64-bit mode
46 * TARGET_CPU_68K - Compiler is generating 680x0 instructions46 TARGET_CPU_68K - Compiler is generating 680x0 instructions
47 * TARGET_CPU_X86 - Compiler is generating x86 instructions for 32-bit mode47 TARGET_CPU_X86 - Compiler is generating x86 instructions for 32-bit mode
48 * TARGET_CPU_X86_64 - Compiler is generating x86 instructions for 64-bit mode48 TARGET_CPU_X86_64 - Compiler is generating x86 instructions for 64-bit mode
49 * TARGET_CPU_ARM - Compiler is generating ARM instructions for 32-bit mode49 TARGET_CPU_ARM - Compiler is generating ARM instructions for 32-bit mode
50 * TARGET_CPU_ARM64 - Compiler is generating ARM instructions for 64-bit mode50 TARGET_CPU_ARM64 - Compiler is generating ARM instructions for 64-bit mode
51 * TARGET_CPU_MIPS - Compiler is generating MIPS instructions51 TARGET_CPU_MIPS - Compiler is generating MIPS instructions
52 * TARGET_CPU_SPARC - Compiler is generating Sparc instructions52 TARGET_CPU_SPARC - Compiler is generating Sparc instructions
53 * TARGET_CPU_ALPHA - Compiler is generating Dec Alpha instructions53 TARGET_CPU_ALPHA - Compiler is generating Dec Alpha instructions
54 *54
55 *55
56 * TARGET_OS_*56 TARGET_OS_*
57 * These conditionals specify in which Operating System the generated code will57 These conditionals specify in which Operating System the generated code will
58 * run. Indention is used to show which conditionals are evolutionary subclasses.58 run. Indention is used to show which conditionals are evolutionary subclasses.
59 *59
60 * The MAC/WIN32/UNIX conditionals are mutually exclusive.60 The MAC/WIN32/UNIX conditionals are mutually exclusive.
61 * The IOS/TV/WATCH conditionals are mutually exclusive.61 The IOS/TV/WATCH conditionals are mutually exclusive.
62 *62
63 *63
64 * TARGET_OS_WIN32 - Generated code will run under 32-bit Windows64 TARGET_OS_WIN32 - Generated code will run under 32-bit Windows
65 * TARGET_OS_UNIX - Generated code will run under some Unix (not OSX)65 TARGET_OS_UNIX - Generated code will run under some Unix (not OSX)
66 * TARGET_OS_MAC - Generated code will run under Mac OS X variant66 TARGET_OS_MAC - Generated code will run under Mac OS X variant
67 * TARGET_OS_OSX - Generated code will run under OS X devices67 TARGET_OS_OSX - Generated code will run under OS X devices
68 * TARGET_OS_IPHONE - Generated code for firmware, devices, or simulator68 TARGET_OS_IPHONE - Generated code for firmware, devices, or simulator
69 * TARGET_OS_IOS - Generated code will run under iOS69 TARGET_OS_IOS - Generated code will run under iOS
70 * TARGET_OS_TV - Generated code will run under Apple TV OS70 TARGET_OS_TV - Generated code will run under Apple TV OS
71 * TARGET_OS_WATCH - Generated code will run under Apple Watch OS71 TARGET_OS_WATCH - Generated code will run under Apple Watch OS
72 * TARGET_OS_BRIDGE - Generated code will run under Bridge devices72 TARGET_OS_BRIDGE - Generated code will run under Bridge devices
73 * TARGET_OS_MACCATALYST - Generated code will run under macOS73 TARGET_OS_MACCATALYST - Generated code will run under macOS
74 * TARGET_OS_SIMULATOR - Generated code will run under a simulator74 TARGET_OS_SIMULATOR - Generated code will run under a simulator
75 *75
76 * TARGET_OS_EMBEDDED - DEPRECATED: Use TARGET_OS_IPHONE and/or TARGET_OS_SIMULATOR instead76 TARGET_OS_EMBEDDED - DEPRECATED: Use TARGET_OS_IPHONE and/or TARGET_OS_SIMULATOR instead
77 * TARGET_IPHONE_SIMULATOR - DEPRECATED: Same as TARGET_OS_SIMULATOR77 TARGET_IPHONE_SIMULATOR - DEPRECATED: Same as TARGET_OS_SIMULATOR
78 * TARGET_OS_NANO - DEPRECATED: Same as TARGET_OS_WATCH78 TARGET_OS_NANO - DEPRECATED: Same as TARGET_OS_WATCH
79 *79
80 * +---------------------------------------------------------------------+80 +----------------------------------------------------------------+
81 * | TARGET_OS_MAC |81 | TARGET_OS_MAC |
82 * | +---+ +-----------------------------------------------+ +---------+ |82 | +---+ +-----------------------------------------------------+ |
83 * | | | | TARGET_OS_IPHONE | | | |83 | | | | TARGET_OS_IPHONE | |
84 * | | | | +---------------+ +----+ +-------+ +--------+ | | | |84 | |OSX| | +-----+ +----+ +-------+ +--------+ +-------------+ | |
85 * | | | | | IOS | | | | | | | | | | |85 | | | | | IOS | | TV | | WATCH | | BRIDGE | | MACCATALYST | | |
86 * | |OSX| | |+-------------+| | TV | | WATCH | | BRIDGE | | |DRIVERKIT| |86 | | | | +-----+ +----+ +-------+ +--------+ +-------------+ | |
87 * | | | | || MACCATALYST || | | | | | | | | | |87 | +---+ +-----------------------------------------------------+ |
88 * | | | | |+-------------+| | | | | | | | | | |88 +----------------------------------------------------------------+
89 * | | | | +---------------+ +----+ +-------+ +--------+ | | | |89
90 * | +---+ +-----------------------------------------------+ +---------+ |90 TARGET_RT_*
91 * +---------------------------------------------------------------------+91 These conditionals specify in which runtime the generated code will
92 *92 run. This is needed when the OS and CPU support more than one runtime
93 * TARGET_RT_*93 (e.g. Mac OS X supports CFM and mach-o).
94 * These conditionals specify in which runtime the generated code will94
95 * run. This is needed when the OS and CPU support more than one runtime95 TARGET_RT_LITTLE_ENDIAN - Generated code uses little endian format for integers
96 * (e.g. Mac OS X supports CFM and mach-o).96 TARGET_RT_BIG_ENDIAN - Generated code uses big endian format for integers
97 *97 TARGET_RT_64_BIT - Generated code uses 64-bit pointers
98 * TARGET_RT_LITTLE_ENDIAN - Generated code uses little endian format for integers98 TARGET_RT_MAC_CFM - TARGET_OS_MAC is true and CFM68K or PowerPC CFM (TVectors) are used
99 * TARGET_RT_BIG_ENDIAN - Generated code uses big endian format for integers99 TARGET_RT_MAC_MACHO - TARGET_OS_MAC is true and Mach-O/dlyd runtime is used
100 * TARGET_RT_64_BIT - Generated code uses 64-bit pointers100
101 * TARGET_RT_MAC_CFM - TARGET_OS_MAC is true and CFM68K or PowerPC CFM (TVectors) are used101
102 * TARGET_RT_MAC_MACHO - TARGET_OS_MAC is true and Mach-O/dlyd runtime is used102****************************************************************************************************/
103 */
104 103
105 /*104 /*
106 * TARGET_OS conditionals can be enabled via clang preprocessor extensions:105 * TARGET_OS conditionals can be enabled via clang preprocessor extensions:
...@@ -134,9 +133,7 @@...@@ -134,9 +133,7 @@
134 #if __has_builtin(__is_target_environment)133 #if __has_builtin(__is_target_environment)
135134
136 /* “-target=x86_64-apple-ios12-macabi” */135 /* “-target=x86_64-apple-ios12-macabi” */
137 /* “-target=arm64-apple-ios12-macabi” */136 #if __is_target_arch(x86_64) && __is_target_vendor(apple) && __is_target_os(ios) && __is_target_environment(macabi)
138 /* “-target=arm64e-apple-ios12-macabi” */
139 #if (__is_target_arch(x86_64) || __is_target_arch(arm64) || __is_target_arch(arm64e)) && __is_target_vendor(apple) && __is_target_os(ios) && __is_target_environment(macabi)
140 #define TARGET_OS_OSX 0137 #define TARGET_OS_OSX 0
141 #define TARGET_OS_IPHONE 1138 #define TARGET_OS_IPHONE 1
142 #define TARGET_OS_IOS 1139 #define TARGET_OS_IOS 1
...@@ -176,9 +173,7 @@...@@ -176,9 +173,7 @@
176 #endif 173 #endif
177174
178 /* -target=x86_64-apple-driverkit19.0 */175 /* -target=x86_64-apple-driverkit19.0 */
179 /* -target=arm64-apple-driverkit19.0 */176 #if __is_target_arch(x86_64) && __is_target_vendor(apple) && __is_target_os(driverkit)
180 /* -target=arm64e-apple-driverkit19.0 */
181 #if (__is_target_arch(x86_64) || __is_target_arch(arm64) || __is_target_arch(arm64e)) && __is_target_vendor(apple) && __is_target_os(driverkit)
182 #define TARGET_OS_OSX 0177 #define TARGET_OS_OSX 0
183 #define TARGET_OS_IPHONE 0178 #define TARGET_OS_IPHONE 0
184 #define TARGET_OS_IOS 0179 #define TARGET_OS_IOS 0
...@@ -236,8 +231,7 @@...@@ -236,8 +231,7 @@
236 231
237 #define TARGET_IPHONE_SIMULATOR TARGET_OS_SIMULATOR /* deprecated */232 #define TARGET_IPHONE_SIMULATOR TARGET_OS_SIMULATOR /* deprecated */
238 #define TARGET_OS_NANO TARGET_OS_WATCH /* deprecated */ 233 #define TARGET_OS_NANO TARGET_OS_WATCH /* deprecated */
239234 #define TARGET_ABI_USES_IOS_VALUES (TARGET_OS_IPHONE && !TARGET_OS_MACCATALYST)
240 #define TARGET_ABI_USES_IOS_VALUES (!TARGET_CPU_X86_64 || (TARGET_OS_IPHONE && !TARGET_OS_MACCATALYST))
241 #if defined(__ppc__)235 #if defined(__ppc__)
242 #define TARGET_CPU_PPC 1236 #define TARGET_CPU_PPC 1
243 #define TARGET_CPU_PPC64 0237 #define TARGET_CPU_PPC64 0
lib/libc/include/x86_64-macos-gnu/_ctermid.h+1-9
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright (c) 2000, 2002-2006, 2008-2010, 2012, 2020 Apple Inc. All rights reserved.2 * Copyright (c) 2000, 2002-2006, 2008-2010, 2012 Apple Inc. All rights reserved.
3 *3 *
4 * @APPLE_LICENSE_HEADER_START@4 * @APPLE_LICENSE_HEADER_START@
5 *5 *
...@@ -23,13 +23,5 @@...@@ -23,13 +23,5 @@
2323
24#ifndef _CTERMID_H_24#ifndef _CTERMID_H_
25#define _CTERMID_H_25#define _CTERMID_H_
26
27#include <sys/cdefs.h>
28
29__BEGIN_DECLS
30
31char *ctermid(char *);26char *ctermid(char *);
32
33__END_DECLS
34
35#endif27#endif
lib/libc/include/x86_64-macos-gnu/bsm/audit.h+5-18
...@@ -332,24 +332,13 @@ struct au_evclass_map {...@@ -332,24 +332,13 @@ struct au_evclass_map {
332};332};
333typedef struct au_evclass_map au_evclass_map_t;333typedef struct au_evclass_map au_evclass_map_t;
334334
335
336#if !defined(_KERNEL) && !defined(KERNEL)
337#include <Availability.h>
338#define __AUDIT_API_DEPRECATED __API_DEPRECATED("audit is deprecated", macos(10.4, 11.0))
339#else
340#define __AUDIT_API_DEPRECATED
341#endif
342
343/*335/*
344 * Audit system calls.336 * Audit system calls.
345 */337 */
346#if !defined(_KERNEL) && !defined(KERNEL)338#if !defined(_KERNEL) && !defined(KERNEL)
347int audit(const void *, int)339int audit(const void *, int);
348__AUDIT_API_DEPRECATED;340int auditon(int, void *, int);
349int auditon(int, void *, int)341int auditctl(const char *);
350__AUDIT_API_DEPRECATED;
351int auditctl(const char *)
352__AUDIT_API_DEPRECATED;
353int getauid(au_id_t *);342int getauid(au_id_t *);
354int setauid(const au_id_t *);343int setauid(const au_id_t *);
355int getaudit_addr(struct auditinfo_addr *, int);344int getaudit_addr(struct auditinfo_addr *, int);
...@@ -371,10 +360,8 @@ __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8,...@@ -371,10 +360,8 @@ __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8,
371 __IPHONE_2_0, __IPHONE_6_0);360 __IPHONE_2_0, __IPHONE_6_0);
372#else361#else
373362
374int getaudit(struct auditinfo *)363int getaudit(struct auditinfo *);
375__AUDIT_API_DEPRECATED;364int setaudit(const struct auditinfo *);
376int setaudit(const struct auditinfo *)
377__AUDIT_API_DEPRECATED;
378#endif /* !__APPLE__ */365#endif /* !__APPLE__ */
379366
380#ifdef __APPLE_API_PRIVATE367#ifdef __APPLE_API_PRIVATE
lib/libc/include/x86_64-macos-gnu/dispatch/block.h+2-2
...@@ -323,7 +323,7 @@ dispatch_block_perform(dispatch_block_flags_t flags,...@@ -323,7 +323,7 @@ dispatch_block_perform(dispatch_block_flags_t flags,
323 */323 */
324API_AVAILABLE(macos(10.10), ios(8.0))324API_AVAILABLE(macos(10.10), ios(8.0))
325DISPATCH_EXPORT DISPATCH_NONNULL1 DISPATCH_NOTHROW325DISPATCH_EXPORT DISPATCH_NONNULL1 DISPATCH_NOTHROW
326intptr_t326long
327dispatch_block_wait(dispatch_block_t block, dispatch_time_t timeout);327dispatch_block_wait(dispatch_block_t block, dispatch_time_t timeout);
328328
329/*!329/*!
...@@ -416,7 +416,7 @@ dispatch_block_cancel(dispatch_block_t block);...@@ -416,7 +416,7 @@ dispatch_block_cancel(dispatch_block_t block);
416API_AVAILABLE(macos(10.10), ios(8.0))416API_AVAILABLE(macos(10.10), ios(8.0))
417DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_WARN_RESULT DISPATCH_PURE417DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_WARN_RESULT DISPATCH_PURE
418DISPATCH_NOTHROW418DISPATCH_NOTHROW
419intptr_t419long
420dispatch_block_testcancel(dispatch_block_t block);420dispatch_block_testcancel(dispatch_block_t block);
421421
422__END_DECLS422__END_DECLS
lib/libc/include/x86_64-macos-gnu/dispatch/dispatch.h-5
...@@ -37,14 +37,10 @@...@@ -37,14 +37,10 @@
37#include <stdint.h>37#include <stdint.h>
38#include <stdbool.h>38#include <stdbool.h>
39#include <stdarg.h>39#include <stdarg.h>
40#include <string.h>
41#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))40#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
42#include <unistd.h>41#include <unistd.h>
43#endif42#endif
44#include <fcntl.h>43#include <fcntl.h>
45#if defined(_WIN32)
46#include <time.h>
47#endif
4844
49#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__has_feature)45#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__has_feature)
50#if __has_feature(modules)46#if __has_feature(modules)
...@@ -61,7 +57,6 @@...@@ -61,7 +57,6 @@
61#endif57#endif
6258
63#include <os/object.h>59#include <os/object.h>
64#include <os/workgroup.h>
65#include <dispatch/base.h>60#include <dispatch/base.h>
66#include <dispatch/time.h>61#include <dispatch/time.h>
67#include <dispatch/object.h>62#include <dispatch/object.h>
lib/libc/include/x86_64-macos-gnu/dispatch/group.h+1-1
...@@ -160,7 +160,7 @@ dispatch_group_async_f(dispatch_group_t group,...@@ -160,7 +160,7 @@ dispatch_group_async_f(dispatch_group_t group,
160 */160 */
161API_AVAILABLE(macos(10.6), ios(4.0))161API_AVAILABLE(macos(10.6), ios(4.0))
162DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_NOTHROW162DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_NOTHROW
163intptr_t163long
164dispatch_group_wait(dispatch_group_t group, dispatch_time_t timeout);164dispatch_group_wait(dispatch_group_t group, dispatch_time_t timeout);
165165
166/*!166/*!
lib/libc/include/x86_64-macos-gnu/dispatch/object.h+2-2
...@@ -456,7 +456,7 @@ dispatch_set_qos_class_floor(dispatch_object_t object,...@@ -456,7 +456,7 @@ dispatch_set_qos_class_floor(dispatch_object_t object,
456 */456 */
457DISPATCH_UNAVAILABLE457DISPATCH_UNAVAILABLE
458DISPATCH_EXPORT DISPATCH_NONNULL1 DISPATCH_NOTHROW458DISPATCH_EXPORT DISPATCH_NONNULL1 DISPATCH_NOTHROW
459intptr_t459long
460dispatch_wait(void *object, dispatch_time_t timeout);460dispatch_wait(void *object, dispatch_time_t timeout);
461#if __has_extension(c_generic_selections)461#if __has_extension(c_generic_selections)
462#define dispatch_wait(object, timeout) \462#define dispatch_wait(object, timeout) \
...@@ -554,7 +554,7 @@ dispatch_cancel(void *object);...@@ -554,7 +554,7 @@ dispatch_cancel(void *object);
554DISPATCH_UNAVAILABLE554DISPATCH_UNAVAILABLE
555DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_WARN_RESULT DISPATCH_PURE555DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_WARN_RESULT DISPATCH_PURE
556DISPATCH_NOTHROW556DISPATCH_NOTHROW
557intptr_t557long
558dispatch_testcancel(void *object);558dispatch_testcancel(void *object);
559#if __has_extension(c_generic_selections)559#if __has_extension(c_generic_selections)
560#define dispatch_testcancel(object) \560#define dispatch_testcancel(object) \
lib/libc/include/x86_64-macos-gnu/dispatch/queue.h+1-1
...@@ -661,7 +661,7 @@ typedef long dispatch_queue_priority_t;...@@ -661,7 +661,7 @@ typedef long dispatch_queue_priority_t;
661API_AVAILABLE(macos(10.6), ios(4.0))661API_AVAILABLE(macos(10.6), ios(4.0))
662DISPATCH_EXPORT DISPATCH_CONST DISPATCH_WARN_RESULT DISPATCH_NOTHROW662DISPATCH_EXPORT DISPATCH_CONST DISPATCH_WARN_RESULT DISPATCH_NOTHROW
663dispatch_queue_global_t663dispatch_queue_global_t
664dispatch_get_global_queue(intptr_t identifier, uintptr_t flags);664dispatch_get_global_queue(long identifier, unsigned long flags);
665665
666/*!666/*!
667 * @typedef dispatch_queue_attr_t667 * @typedef dispatch_queue_attr_t
lib/libc/include/x86_64-macos-gnu/dispatch/semaphore.h+3-3
...@@ -61,7 +61,7 @@ API_AVAILABLE(macos(10.6), ios(4.0))...@@ -61,7 +61,7 @@ API_AVAILABLE(macos(10.6), ios(4.0))
61DISPATCH_EXPORT DISPATCH_MALLOC DISPATCH_RETURNS_RETAINED DISPATCH_WARN_RESULT61DISPATCH_EXPORT DISPATCH_MALLOC DISPATCH_RETURNS_RETAINED DISPATCH_WARN_RESULT
62DISPATCH_NOTHROW62DISPATCH_NOTHROW
63dispatch_semaphore_t63dispatch_semaphore_t
64dispatch_semaphore_create(intptr_t value);64dispatch_semaphore_create(long value);
6565
66/*!66/*!
67 * @function dispatch_semaphore_wait67 * @function dispatch_semaphore_wait
...@@ -85,7 +85,7 @@ dispatch_semaphore_create(intptr_t value);...@@ -85,7 +85,7 @@ dispatch_semaphore_create(intptr_t value);
85 */85 */
86API_AVAILABLE(macos(10.6), ios(4.0))86API_AVAILABLE(macos(10.6), ios(4.0))
87DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_NOTHROW87DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_NOTHROW
88intptr_t88long
89dispatch_semaphore_wait(dispatch_semaphore_t dsema, dispatch_time_t timeout);89dispatch_semaphore_wait(dispatch_semaphore_t dsema, dispatch_time_t timeout);
9090
91/*!91/*!
...@@ -107,7 +107,7 @@ dispatch_semaphore_wait(dispatch_semaphore_t dsema, dispatch_time_t timeout);...@@ -107,7 +107,7 @@ dispatch_semaphore_wait(dispatch_semaphore_t dsema, dispatch_time_t timeout);
107 */107 */
108API_AVAILABLE(macos(10.6), ios(4.0))108API_AVAILABLE(macos(10.6), ios(4.0))
109DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_NOTHROW109DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_NOTHROW
110intptr_t110long
111dispatch_semaphore_signal(dispatch_semaphore_t dsema);111dispatch_semaphore_signal(dispatch_semaphore_t dsema);
112112
113__END_DECLS113__END_DECLS
lib/libc/include/x86_64-macos-gnu/dispatch/source.h+5-5
...@@ -389,7 +389,7 @@ DISPATCH_NOTHROW...@@ -389,7 +389,7 @@ DISPATCH_NOTHROW
389dispatch_source_t389dispatch_source_t
390dispatch_source_create(dispatch_source_type_t type,390dispatch_source_create(dispatch_source_type_t type,
391 uintptr_t handle,391 uintptr_t handle,
392 uintptr_t mask,392 unsigned long mask,
393 dispatch_queue_t _Nullable queue);393 dispatch_queue_t _Nullable queue);
394394
395/*!395/*!
...@@ -537,7 +537,7 @@ dispatch_source_cancel(dispatch_source_t source);...@@ -537,7 +537,7 @@ dispatch_source_cancel(dispatch_source_t source);
537API_AVAILABLE(macos(10.6), ios(4.0))537API_AVAILABLE(macos(10.6), ios(4.0))
538DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_WARN_RESULT DISPATCH_PURE538DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_WARN_RESULT DISPATCH_PURE
539DISPATCH_NOTHROW539DISPATCH_NOTHROW
540intptr_t540long
541dispatch_source_testcancel(dispatch_source_t source);541dispatch_source_testcancel(dispatch_source_t source);
542542
543/*!543/*!
...@@ -601,7 +601,7 @@ dispatch_source_get_handle(dispatch_source_t source);...@@ -601,7 +601,7 @@ dispatch_source_get_handle(dispatch_source_t source);
601API_AVAILABLE(macos(10.6), ios(4.0))601API_AVAILABLE(macos(10.6), ios(4.0))
602DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_WARN_RESULT DISPATCH_PURE602DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_WARN_RESULT DISPATCH_PURE
603DISPATCH_NOTHROW603DISPATCH_NOTHROW
604uintptr_t604unsigned long
605dispatch_source_get_mask(dispatch_source_t source);605dispatch_source_get_mask(dispatch_source_t source);
606606
607/*!607/*!
...@@ -640,7 +640,7 @@ dispatch_source_get_mask(dispatch_source_t source);...@@ -640,7 +640,7 @@ dispatch_source_get_mask(dispatch_source_t source);
640API_AVAILABLE(macos(10.6), ios(4.0))640API_AVAILABLE(macos(10.6), ios(4.0))
641DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_WARN_RESULT DISPATCH_PURE641DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_WARN_RESULT DISPATCH_PURE
642DISPATCH_NOTHROW642DISPATCH_NOTHROW
643uintptr_t643unsigned long
644dispatch_source_get_data(dispatch_source_t source);644dispatch_source_get_data(dispatch_source_t source);
645645
646/*!646/*!
...@@ -662,7 +662,7 @@ dispatch_source_get_data(dispatch_source_t source);...@@ -662,7 +662,7 @@ dispatch_source_get_data(dispatch_source_t source);
662API_AVAILABLE(macos(10.6), ios(4.0))662API_AVAILABLE(macos(10.6), ios(4.0))
663DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_NOTHROW663DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_NOTHROW
664void664void
665dispatch_source_merge_data(dispatch_source_t source, uintptr_t value);665dispatch_source_merge_data(dispatch_source_t source, unsigned long value);
666666
667/*!667/*!
668 * @function dispatch_source_set_timer668 * @function dispatch_source_set_timer
lib/libc/include/x86_64-macos-gnu/dispatch/workloop.h-27
...@@ -129,33 +129,6 @@ void...@@ -129,33 +129,6 @@ void
129dispatch_workloop_set_autorelease_frequency(dispatch_workloop_t workloop,129dispatch_workloop_set_autorelease_frequency(dispatch_workloop_t workloop,
130 dispatch_autorelease_frequency_t frequency);130 dispatch_autorelease_frequency_t frequency);
131131
132/*!
133 * @function dispatch_workloop_set_os_workgroup
134 *
135 * @abstract
136 * Associates an os_workgroup_t with the specified dispatch workloop.
137 *
138 * The worker thread will be a member of the specified os_workgroup_t while executing
139 * work items submitted to the workloop.
140 *
141 * @param workloop
142 * The dispatch workloop to modify.
143 *
144 * This workloop must be inactive, passing an activated object is undefined
145 * and will cause the process to be terminated.
146 *
147 * @param workgroup
148 * The workgroup to associate with this workloop.
149 *
150 * The workgroup specified is retained and the previously associated workgroup
151 * (if any) is released.
152 */
153API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))
154DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_NOTHROW
155void
156dispatch_workloop_set_os_workgroup(dispatch_workloop_t workloop,
157 os_workgroup_t workgroup);
158
159__END_DECLS132__END_DECLS
160133
161DISPATCH_ASSUME_NONNULL_END134DISPATCH_ASSUME_NONNULL_END
lib/libc/include/x86_64-macos-gnu/i386/_param.h+2-2
...@@ -37,10 +37,10 @@...@@ -37,10 +37,10 @@
37 * cast to any desired pointer type.37 * cast to any desired pointer type.
38 */38 */
39#define __DARWIN_ALIGNBYTES (sizeof(__darwin_size_t) - 1)39#define __DARWIN_ALIGNBYTES (sizeof(__darwin_size_t) - 1)
40#define __DARWIN_ALIGN(p) ((__darwin_size_t)((__darwin_size_t)(p) + __DARWIN_ALIGNBYTES) &~ __DARWIN_ALIGNBYTES)40#define __DARWIN_ALIGN(p) ((__darwin_size_t)((char *)(__darwin_size_t)(p) + __DARWIN_ALIGNBYTES) &~ __DARWIN_ALIGNBYTES)
4141
42#define __DARWIN_ALIGNBYTES32 (sizeof(__uint32_t) - 1)42#define __DARWIN_ALIGNBYTES32 (sizeof(__uint32_t) - 1)
43#define __DARWIN_ALIGN32(p) ((__darwin_size_t)((__darwin_size_t)(p) + __DARWIN_ALIGNBYTES32) &~ __DARWIN_ALIGNBYTES32)43#define __DARWIN_ALIGN32(p) ((__darwin_size_t)((char *)(__darwin_size_t)(p) + __DARWIN_ALIGNBYTES32) &~ __DARWIN_ALIGNBYTES32)
4444
4545
46#endif /* _I386__PARAM_H_ */46#endif /* _I386__PARAM_H_ */
lib/libc/include/x86_64-macos-gnu/libDER/DERItem.h deleted-47
...@@ -1,47 +0,0 @@
1/*
2 * Copyright (c) 2020 Apple Inc. All Rights Reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23
24#ifndef _DER_ITEM_H_
25#define _DER_ITEM_H_
26
27#if __has_include(<security_libDER/libDER/libDER_config.h>)
28 #include <security_libDER/libDER/libDER_config.h>
29#else
30 #include <libDER/libDER_config.h>
31#endif
32
33__BEGIN_DECLS
34
35/*
36 * Primary representation of a block of memory.
37 */
38typedef struct {
39 DERByte *data;
40 DERSize length;
41} DERItem;
42
43__END_DECLS
44
45#endif /* _DER_ITEM_H_ */
46
47
lib/libc/include/x86_64-macos-gnu/libDER/libDER_config.h deleted-121
...@@ -1,121 +0,0 @@
1/*
2 * Copyright (c) 2005-2007,2011-2012,2014 Apple Inc. All Rights Reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23
24
25/*
26 * libDER_config.h - platform dependent #defines and typedefs for libDER
27 *
28 */
29
30#ifndef _LIB_DER_CONFIG_H_
31#define _LIB_DER_CONFIG_H_
32
33#include <stddef.h>
34#include <stdint.h>
35#include <string.h>
36
37#if defined(WIN32) && defined(__cplusplus)
38
39#if !defined(__BEGIN_DECLS) || !defined(__END_DECLS)
40#define __BEGIN_DECLS extern "C" {
41#define __END_DECLS }
42#endif // __BEGIN_DECLS || __END_DECLS
43
44#else
45#include <sys/cdefs.h>
46#endif // defined(WIN32) && defined(__cplusplus)
47
48__BEGIN_DECLS
49
50/*
51 * Basic data types: unsigned 8-bit integer, unsigned 32-bit integer
52 */
53typedef uint8_t DERByte;
54typedef uint16_t DERShort;
55typedef size_t DERSize;
56
57
58/*
59 * Use these #defines of you have memset, memmove, and memcmp; else
60 * write your own equivalents.
61 */
62
63#define DERMemset(ptr, c, len) memset(ptr, c, len)
64#define DERMemmove(dst, src, len) memmove(dst, src, len)
65#define DERMemcmp(b1, b2, len) memcmp(b1, b2, len)
66
67
68/***
69 *** Compile time options to trim size of the library.
70 ***/
71
72/* enable general DER encode */
73#define DER_ENCODE_ENABLE 1
74
75/* enable general DER decode */
76#define DER_DECODE_ENABLE 1
77
78#ifndef DER_MULTIBYTE_TAGS
79/* enable multibyte tag support. */
80#define DER_MULTIBYTE_TAGS 1
81#endif
82
83#ifndef DER_TAG_SIZE
84/* Iff DER_MULTIBYTE_TAGS is 1 this is the sizeof(DERTag) in bytes. Note that
85 tags are still encoded and decoded from a minimally encoded DER
86 represantation. This value maintains compatibility with libImg4Decode/Encode. */
87#define DER_TAG_SIZE 8
88#endif
89
90
91/* ---------------------- Do not edit below this line ---------------------- */
92
93/*
94 * Logical representation of a tag (the encoded representation is always in
95 * the minimal number of bytes). The top 3 bits encode class and method
96 * The remaining bits encode the tag value. To obtain smaller DERItemSpecs
97 * sizes, choose the smallest type that fits your needs. Most standard ASN.1
98 * usage only needs single byte tags, but ocasionally custom applications
99 * require a larger tag namespace.
100 */
101#if DER_MULTIBYTE_TAGS
102
103#if DER_TAG_SIZE == 1
104typedef uint8_t DERTag;
105#elif DER_TAG_SIZE == 2
106typedef uint16_t DERTag;
107#elif DER_TAG_SIZE == 4
108typedef uint32_t DERTag;
109#elif DER_TAG_SIZE == 8
110typedef uint64_t DERTag;
111#else
112#error DER_TAG_SIZE invalid
113#endif
114
115#else /* DER_MULTIBYTE_TAGS */
116typedef DERByte DERTag;
117#endif /* !DER_MULTIBYTE_TAGS */
118
119__END_DECLS
120
121#endif /* _LIB_DER_CONFIG_H_ */
lib/libc/include/x86_64-macos-gnu/libkern/OSAtomicDeprecated.h+12-101
...@@ -35,14 +35,13 @@...@@ -35,14 +35,13 @@
35 * is preferred.35 * is preferred.
36 */36 */
3737
38#include <Availability.h>
39
40#if !(defined(OSATOMIC_USE_INLINED) && OSATOMIC_USE_INLINED)38#if !(defined(OSATOMIC_USE_INLINED) && OSATOMIC_USE_INLINED)
4139
42#include <sys/cdefs.h>40#include <sys/cdefs.h>
43#include <stddef.h>41#include <stddef.h>
44#include <stdint.h>42#include <stdint.h>
45#include <stdbool.h>43#include <stdbool.h>
44#include <Availability.h>
4645
47#ifndef OSATOMIC_DEPRECATED46#ifndef OSATOMIC_DEPRECATED
48#define OSATOMIC_DEPRECATED 147#define OSATOMIC_DEPRECATED 1
...@@ -162,7 +161,7 @@ __OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)...@@ -162,7 +161,7 @@ __OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
162int32_t OSAtomicAdd32Barrier( int32_t __theAmount, volatile int32_t *__theValue );161int32_t OSAtomicAdd32Barrier( int32_t __theAmount, volatile int32_t *__theValue );
163162
164163
165#if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_10 || __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_7_1 || TARGET_OS_DRIVERKIT164#if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_10 || __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_7_1
166165
167/*! @abstract Atomically increments a 32-bit value.166/*! @abstract Atomically increments a 32-bit value.
168 @result Returns the new value.167 @result Returns the new value.
...@@ -249,7 +248,7 @@ int64_t OSAtomicAdd64Barrier( int64_t __theAmount,...@@ -249,7 +248,7 @@ int64_t OSAtomicAdd64Barrier( int64_t __theAmount,
249 volatile OSAtomic_int64_aligned64_t *__theValue );248 volatile OSAtomic_int64_aligned64_t *__theValue );
250249
251250
252#if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_10 || __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_7_1 || TARGET_OS_DRIVERKIT251#if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_10 || __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_7_1
253252
254/*! @abstract Atomically increments a 64-bit value.253/*! @abstract Atomically increments a 64-bit value.
255 @result Returns the new value.254 @result Returns the new value.
...@@ -362,7 +361,7 @@ int32_t OSAtomicOr32Orig( uint32_t __theMask, volatile uint32_t *__theValue );...@@ -362,7 +361,7 @@ int32_t OSAtomicOr32Orig( uint32_t __theMask, volatile uint32_t *__theValue );
362 This function performs the bitwise OR of the value given by <code>__theMask</code>361 This function performs the bitwise OR of the value given by <code>__theMask</code>
363 with the value in the memory location referenced by <code>__theValue</code>,362 with the value in the memory location referenced by <code>__theValue</code>,
364 storing the result back to that memory location atomically.363 storing the result back to that memory location atomically.
365364
366 This function is equivalent to {@link OSAtomicOr32Orig}365 This function is equivalent to {@link OSAtomicOr32Orig}
367 except that it also introduces a barrier.366 except that it also introduces a barrier.
368 @result Returns the original value referenced by <code>__theValue</code>.367 @result Returns the original value referenced by <code>__theValue</code>.
...@@ -482,7 +481,7 @@ int32_t OSAtomicXor32Orig( uint32_t __theMask, volatile uint32_t *__theValue );...@@ -482,7 +481,7 @@ int32_t OSAtomicXor32Orig( uint32_t __theMask, volatile uint32_t *__theValue );
482OSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_fetch_xor)481OSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_fetch_xor)
483__OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_3_2)482__OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_3_2)
484int32_t OSAtomicXor32OrigBarrier( uint32_t __theMask, volatile uint32_t *__theValue );483int32_t OSAtomicXor32OrigBarrier( uint32_t __theMask, volatile uint32_t *__theValue );
485484
486485
487/*! @group Compare and swap486/*! @group Compare and swap
488 * Functions in this group return true if the swap occured. There are several versions,487 * Functions in this group return true if the swap occured. There are several versions,
...@@ -588,7 +587,7 @@ bool OSAtomicCompareAndSwapIntBarrier( int __oldValue, int __newValue, volatile...@@ -588,7 +587,7 @@ bool OSAtomicCompareAndSwapIntBarrier( int __oldValue, int __newValue, volatile
588 match, this function stores the value from <code>__newValue</code> into587 match, this function stores the value from <code>__newValue</code> into
589 that memory location atomically.588 that memory location atomically.
590589
591 This function is equivalent to {@link OSAtomicCompareAndSwap32} on 32-bit architectures,590 This function is equivalent to {@link OSAtomicCompareAndSwap32} on 32-bit architectures,
592 or {@link OSAtomicCompareAndSwap64} on 64-bit architectures.591 or {@link OSAtomicCompareAndSwap64} on 64-bit architectures.
593 @result Returns TRUE on a match, FALSE otherwise.592 @result Returns TRUE on a match, FALSE otherwise.
594 */593 */
...@@ -607,7 +606,7 @@ bool OSAtomicCompareAndSwapLong( long __oldValue, long __newValue, volatile long...@@ -607,7 +606,7 @@ bool OSAtomicCompareAndSwapLong( long __oldValue, long __newValue, volatile long
607 This function is equivalent to {@link OSAtomicCompareAndSwapLong}606 This function is equivalent to {@link OSAtomicCompareAndSwapLong}
608 except that it also introduces a barrier.607 except that it also introduces a barrier.
609608
610 This function is equivalent to {@link OSAtomicCompareAndSwap32} on 32-bit architectures,609 This function is equivalent to {@link OSAtomicCompareAndSwap32} on 32-bit architectures,
611 or {@link OSAtomicCompareAndSwap64} on 64-bit architectures.610 or {@link OSAtomicCompareAndSwap64} on 64-bit architectures.
612 @result Returns TRUE on a match, FALSE otherwise.611 @result Returns TRUE on a match, FALSE otherwise.
613 */612 */
...@@ -707,7 +706,7 @@ bool OSAtomicTestAndSetBarrier( uint32_t __n, volatile void *__theAddress );...@@ -707,7 +706,7 @@ bool OSAtomicTestAndSetBarrier( uint32_t __n, volatile void *__theAddress );
707 For example, if <code>__theAddress</code> points to a 64-bit value,706 For example, if <code>__theAddress</code> points to a 64-bit value,
708 to compare the value of the most significant bit, you would specify707 to compare the value of the most significant bit, you would specify
709 <code>56</code> for <code>__n</code>.708 <code>56</code> for <code>__n</code>.
710709
711 @result710 @result
712 Returns the original value of the bit being tested.711 Returns the original value of the bit being tested.
713 */712 */
...@@ -720,15 +719,15 @@ bool OSAtomicTestAndClear( uint32_t __n, volatile void *__theAddress );...@@ -720,15 +719,15 @@ bool OSAtomicTestAndClear( uint32_t __n, volatile void *__theAddress );
720 @discussion719 @discussion
721 This function tests a bit in the value referenced by <code>__theAddress</code>720 This function tests a bit in the value referenced by <code>__theAddress</code>
722 and if it is not cleared, clears it.721 and if it is not cleared, clears it.
723722
724 The bit is chosen by the value of <code>__n</code> such that the723 The bit is chosen by the value of <code>__n</code> such that the
725 operation will be performed on bit <code>(0x80 >> (__n & 7))</code>724 operation will be performed on bit <code>(0x80 >> (__n & 7))</code>
726 of byte <code>((char *)__theAddress + (n >> 3))</code>.725 of byte <code>((char *)__theAddress + (n >> 3))</code>.
727726
728 For example, if <code>__theAddress</code> points to a 64-bit value,727 For example, if <code>__theAddress</code> points to a 64-bit value,
729 to compare the value of the most significant bit, you would specify728 to compare the value of the most significant bit, you would specify
730 <code>56</code> for <code>__n</code>.729 <code>56</code> for <code>__n</code>.
731730
732 This function is equivalent to {@link OSAtomicTestAndSet}731 This function is equivalent to {@link OSAtomicTestAndSet}
733 except that it also introduces a barrier.732 except that it also introduces a barrier.
734 @result733 @result
...@@ -737,7 +736,7 @@ bool OSAtomicTestAndClear( uint32_t __n, volatile void *__theAddress );...@@ -737,7 +736,7 @@ bool OSAtomicTestAndClear( uint32_t __n, volatile void *__theAddress );
737OSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_fetch_and)736OSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_fetch_and)
738__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)737__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)
739bool OSAtomicTestAndClearBarrier( uint32_t __n, volatile void *__theAddress );738bool OSAtomicTestAndClearBarrier( uint32_t __n, volatile void *__theAddress );
740739
741740
742/*! @group Memory barriers */741/*! @group Memory barriers */
743742
...@@ -1175,92 +1174,4 @@ __END_DECLS...@@ -1175,92 +1174,4 @@ __END_DECLS
11751174
1176#endif // defined(OSATOMIC_USE_INLINED) && OSATOMIC_USE_INLINED1175#endif // defined(OSATOMIC_USE_INLINED) && OSATOMIC_USE_INLINED
11771176
1178#if TARGET_OS_OSX || TARGET_OS_DRIVERKIT
1179
1180__BEGIN_DECLS
1181
1182/*! @group Lockless atomic fifo enqueue and dequeue
1183 * These routines manipulate singly-linked FIFO lists.
1184 *
1185 * This API is deprecated and no longer recommended
1186 */
1187
1188/*! @abstract The data structure for a fifo queue head.
1189 @discussion
1190 You should always initialize a fifo queue head structure with the
1191 initialization vector {@link OS_ATOMIC_FIFO_QUEUE_INIT} before use.
1192 */
1193#if defined(__LP64__)
1194
1195typedef volatile struct {
1196 void *opaque1;
1197 void *opaque2;
1198 int opaque3;
1199} __attribute__ ((aligned (16))) OSFifoQueueHead;
1200
1201#else
1202
1203typedef volatile struct {
1204 void *opaque1;
1205 void *opaque2;
1206 int opaque3;
1207} OSFifoQueueHead;
1208
1209#endif
1210/*! @abstract The initialization vector for a fifo queue head. */
1211#define OS_ATOMIC_FIFO_QUEUE_INIT { NULL, NULL, 0 }
1212
1213/*! @abstract Enqueue an element onto a list.
1214 @discussion
1215 Memory barriers are incorporated as needed to permit thread-safe access
1216 to the queue element.
1217 @param __list
1218 The list on which you want to enqueue the element.
1219 @param __new
1220 The element to add.
1221 @param __offset
1222 The "offset" parameter is the offset (in bytes) of the link field
1223 from the beginning of the data structure being queued (<code>__new</code>).
1224 The link field should be a pointer type.
1225 The <code>__offset</code> value needs to be same for all enqueuing and
1226 dequeuing operations on the same list, even if different structure types
1227 are enqueued on that list. The use of <code>offsetset()</code>, defined in
1228 <code>stddef.h</code> is the common way to specify the <code>__offset</code>
1229 value.
1230
1231 @note
1232 This API is deprecated and no longer recommended
1233 */
1234__API_DEPRECATED("No longer supported", macos(10.7, 11.0))
1235void OSAtomicFifoEnqueue( OSFifoQueueHead *__list, void *__new, size_t __offset);
1236
1237/*! @abstract Dequeue an element from a list.
1238 @discussion
1239 Memory barriers are incorporated as needed to permit thread-safe access
1240 to the queue element.
1241 @param __list
1242 The list from which you want to dequeue an element.
1243 @param __offset
1244 The "offset" parameter is the offset (in bytes) of the link field
1245 from the beginning of the data structure being dequeued (<code>__new</code>).
1246 The link field should be a pointer type.
1247 The <code>__offset</code> value needs to be same for all enqueuing and
1248 dequeuing operations on the same list, even if different structure types
1249 are enqueued on that list. The use of <code>offsetset()</code>, defined in
1250 <code>stddef.h</code> is the common way to specify the <code>__offset</code>
1251 value.
1252 @result
1253 Returns the oldest enqueued element, or <code>NULL</code> if the
1254 list is empty.
1255
1256 @note
1257 This API is deprecated and no longer recommended
1258 */
1259__API_DEPRECATED("No longer supported", macos(10.7, 11.0))
1260void* OSAtomicFifoDequeue( OSFifoQueueHead *__list, size_t __offset);
1261
1262__END_DECLS
1263
1264#endif /* TARGET_OS_OSX || TARGET_OS_DRIVERKIT */
1265
1266#endif /* _OSATOMIC_DEPRECATED_H_ */1177#endif /* _OSATOMIC_DEPRECATED_H_ */
lib/libc/include/x86_64-macos-gnu/libkern/OSAtomicQueue.h+77-1
...@@ -28,7 +28,6 @@...@@ -28,7 +28,6 @@
28#include <sys/cdefs.h>28#include <sys/cdefs.h>
29#include <stdint.h>29#include <stdint.h>
30#include <stdbool.h>30#include <stdbool.h>
31#include "OSAtomicDeprecated.h"
3231
33#include <Availability.h>32#include <Availability.h>
3433
...@@ -110,6 +109,83 @@ void OSAtomicEnqueue( OSQueueHead *__list, void *__new, size_t __offset);...@@ -110,6 +109,83 @@ void OSAtomicEnqueue( OSQueueHead *__list, void *__new, size_t __offset);
110__OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0)109__OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0)
111void* OSAtomicDequeue( OSQueueHead *__list, size_t __offset);110void* OSAtomicDequeue( OSQueueHead *__list, size_t __offset);
112111
112#if defined(__x86_64__) || defined(__i386__)
113
114/*! @group Lockless atomic fifo enqueue and dequeue
115 * These routines manipulate singly-linked FIFO lists.
116 */
117
118/*! @abstract The data structure for a fifo queue head.
119 @discussion
120 You should always initialize a fifo queue head structure with the
121 initialization vector {@link OS_ATOMIC_FIFO_QUEUE_INIT} before use.
122 */
123#if defined(__x86_64__)
124
125typedef volatile struct {
126 void *opaque1;
127 void *opaque2;
128 int opaque3;
129} __attribute__ ((aligned (16))) OSFifoQueueHead;
130
131#else
132
133typedef volatile struct {
134 void *opaque1;
135 void *opaque2;
136 int opaque3;
137} OSFifoQueueHead;
138
139#endif
140
141/*! @abstract The initialization vector for a fifo queue head. */
142#define OS_ATOMIC_FIFO_QUEUE_INIT { NULL, NULL, 0 }
143
144/*! @abstract Enqueue an element onto a list.
145 @discussion
146 Memory barriers are incorporated as needed to permit thread-safe access
147 to the queue element.
148 @param __list
149 The list on which you want to enqueue the element.
150 @param __new
151 The element to add.
152 @param __offset
153 The "offset" parameter is the offset (in bytes) of the link field
154 from the beginning of the data structure being queued (<code>__new</code>).
155 The link field should be a pointer type.
156 The <code>__offset</code> value needs to be same for all enqueuing and
157 dequeuing operations on the same list, even if different structure types
158 are enqueued on that list. The use of <code>offsetset()</code>, defined in
159 <code>stddef.h</code> is the common way to specify the <code>__offset</code>
160 value.
161 */
162__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_NA)
163void OSAtomicFifoEnqueue( OSFifoQueueHead *__list, void *__new, size_t __offset);
164
165/*! @abstract Dequeue an element from a list.
166 @discussion
167 Memory barriers are incorporated as needed to permit thread-safe access
168 to the queue element.
169 @param __list
170 The list from which you want to dequeue an element.
171 @param __offset
172 The "offset" parameter is the offset (in bytes) of the link field
173 from the beginning of the data structure being dequeued (<code>__new</code>).
174 The link field should be a pointer type.
175 The <code>__offset</code> value needs to be same for all enqueuing and
176 dequeuing operations on the same list, even if different structure types
177 are enqueued on that list. The use of <code>offsetset()</code>, defined in
178 <code>stddef.h</code> is the common way to specify the <code>__offset</code>
179 value.
180 @result
181 Returns the oldest enqueued element, or <code>NULL</code> if the
182 list is empty.
183 */
184__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_NA)
185void* OSAtomicFifoDequeue( OSFifoQueueHead *__list, size_t __offset);
186
187#endif /* __i386__ || __x86_64__ */
188
113__END_DECLS189__END_DECLS
114190
115#endif /* _OSATOMICQUEUE_H_ */191#endif /* _OSATOMICQUEUE_H_ */
lib/libc/include/x86_64-macos-gnu/libkern/OSByteOrder.h+7-19
...@@ -37,22 +37,10 @@...@@ -37,22 +37,10 @@
37#define OSSwapConstInt32(x) __DARWIN_OSSwapConstInt32(x)37#define OSSwapConstInt32(x) __DARWIN_OSSwapConstInt32(x)
38#define OSSwapConstInt64(x) __DARWIN_OSSwapConstInt64(x)38#define OSSwapConstInt64(x) __DARWIN_OSSwapConstInt64(x)
3939
40#if !defined(__DARWIN_OS_INLINE)
41# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
42# define __DARWIN_OS_INLINE static inline
43# elif defined(__MWERKS__) || defined(__cplusplus)
44# define __DARWIN_OS_INLINE static inline
45# else
46# define __DARWIN_OS_INLINE static __inline__
47# endif
48#endif
49
50#if defined(__GNUC__)40#if defined(__GNUC__)
5141
52#if (defined(__i386__) || defined(__x86_64__))42#if (defined(__i386__) || defined(__x86_64__))
53#include <libkern/i386/OSByteOrder.h>43#include <libkern/i386/OSByteOrder.h>
54#elif defined (__arm__) || defined(__arm64__)
55#include <libkern/arm/OSByteOrder.h>
56#else44#else
57#include <libkern/machine/OSByteOrder.h>45#include <libkern/machine/OSByteOrder.h>
58#endif46#endif
...@@ -73,7 +61,7 @@ enum {...@@ -73,7 +61,7 @@ enum {
73 OSBigEndian61 OSBigEndian
74};62};
7563
76__DARWIN_OS_INLINE64OS_INLINE
77int32_t65int32_t
78OSHostByteOrder(void)66OSHostByteOrder(void)
79{67{
...@@ -97,7 +85,7 @@ OSHostByteOrder(void)...@@ -97,7 +85,7 @@ OSHostByteOrder(void)
9785
98/* Functions for loading native endian values. */86/* Functions for loading native endian values. */
9987
100__DARWIN_OS_INLINE88OS_INLINE
101uint16_t89uint16_t
102_OSReadInt16(90_OSReadInt16(
103 const volatile void * base,91 const volatile void * base,
...@@ -107,7 +95,7 @@ _OSReadInt16(...@@ -107,7 +95,7 @@ _OSReadInt16(
107 return *(volatile uint16_t *)((uintptr_t)base + byteOffset);95 return *(volatile uint16_t *)((uintptr_t)base + byteOffset);
108}96}
10997
110__DARWIN_OS_INLINE98OS_INLINE
111uint32_t99uint32_t
112_OSReadInt32(100_OSReadInt32(
113 const volatile void * base,101 const volatile void * base,
...@@ -117,7 +105,7 @@ _OSReadInt32(...@@ -117,7 +105,7 @@ _OSReadInt32(
117 return *(volatile uint32_t *)((uintptr_t)base + byteOffset);105 return *(volatile uint32_t *)((uintptr_t)base + byteOffset);
118}106}
119107
120__DARWIN_OS_INLINE108OS_INLINE
121uint64_t109uint64_t
122_OSReadInt64(110_OSReadInt64(
123 const volatile void * base,111 const volatile void * base,
...@@ -129,7 +117,7 @@ _OSReadInt64(...@@ -129,7 +117,7 @@ _OSReadInt64(
129117
130/* Functions for storing native endian values. */118/* Functions for storing native endian values. */
131119
132__DARWIN_OS_INLINE120OS_INLINE
133void121void
134_OSWriteInt16(122_OSWriteInt16(
135 volatile void * base,123 volatile void * base,
...@@ -140,7 +128,7 @@ _OSWriteInt16(...@@ -140,7 +128,7 @@ _OSWriteInt16(
140 *(volatile uint16_t *)((uintptr_t)base + byteOffset) = data;128 *(volatile uint16_t *)((uintptr_t)base + byteOffset) = data;
141}129}
142130
143__DARWIN_OS_INLINE131OS_INLINE
144void132void
145_OSWriteInt32(133_OSWriteInt32(
146 volatile void * base,134 volatile void * base,
...@@ -151,7 +139,7 @@ _OSWriteInt32(...@@ -151,7 +139,7 @@ _OSWriteInt32(
151 *(volatile uint32_t *)((uintptr_t)base + byteOffset) = data;139 *(volatile uint32_t *)((uintptr_t)base + byteOffset) = data;
152}140}
153141
154__DARWIN_OS_INLINE142OS_INLINE
155void143void
156_OSWriteInt64(144_OSWriteInt64(
157 volatile void * base,145 volatile void * base,
lib/libc/include/x86_64-macos-gnu/libkern/_OSByteOrder.h+16-19
...@@ -41,14 +41,14 @@...@@ -41,14 +41,14 @@
4141
42/* Macros for swapping constant values in the preprocessing stage. */42/* Macros for swapping constant values in the preprocessing stage. */
43#define __DARWIN_OSSwapConstInt16(x) \43#define __DARWIN_OSSwapConstInt16(x) \
44 ((__uint16_t)((((__uint16_t)(x) & 0xff00U) >> 8) | \44 ((__uint16_t)((((__uint16_t)(x) & 0xff00) >> 8) | \
45 (((__uint16_t)(x) & 0x00ffU) << 8)))45 (((__uint16_t)(x) & 0x00ff) << 8)))
4646
47#define __DARWIN_OSSwapConstInt32(x) \47#define __DARWIN_OSSwapConstInt32(x) \
48 ((__uint32_t)((((__uint32_t)(x) & 0xff000000U) >> 24) | \48 ((__uint32_t)((((__uint32_t)(x) & 0xff000000) >> 24) | \
49 (((__uint32_t)(x) & 0x00ff0000U) >> 8) | \49 (((__uint32_t)(x) & 0x00ff0000) >> 8) | \
50 (((__uint32_t)(x) & 0x0000ff00U) << 8) | \50 (((__uint32_t)(x) & 0x0000ff00) << 8) | \
51 (((__uint32_t)(x) & 0x000000ffU) << 24)))51 (((__uint32_t)(x) & 0x000000ff) << 24)))
5252
53#define __DARWIN_OSSwapConstInt64(x) \53#define __DARWIN_OSSwapConstInt64(x) \
54 ((__uint64_t)((((__uint64_t)(x) & 0xff00000000000000ULL) >> 56) | \54 ((__uint64_t)((((__uint64_t)(x) & 0xff00000000000000ULL) >> 56) | \
...@@ -62,23 +62,10 @@...@@ -62,23 +62,10 @@
6262
63#if defined(__GNUC__)63#if defined(__GNUC__)
6464
65#if !defined(__DARWIN_OS_INLINE)
66# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
67# define __DARWIN_OS_INLINE static inline
68# elif defined(__MWERKS__) || defined(__cplusplus)
69# define __DARWIN_OS_INLINE static inline
70# else
71# define __DARWIN_OS_INLINE static __inline__
72# endif
73#endif
74
75#if defined(__i386__) || defined(__x86_64__)65#if defined(__i386__) || defined(__x86_64__)
76#include <libkern/i386/_OSByteOrder.h>66#include <libkern/i386/_OSByteOrder.h>
77#endif67#endif
7868
79#if defined (__arm__) || defined(__arm64__)
80#include <libkern/arm/OSByteOrder.h>
81#endif
8269
8370
84#define __DARWIN_OSSwapInt16(x) \71#define __DARWIN_OSSwapInt16(x) \
...@@ -94,6 +81,16 @@...@@ -94,6 +81,16 @@
9481
95#if defined(__i386__) || defined(__x86_64__)82#if defined(__i386__) || defined(__x86_64__)
9683
84#if !defined(__DARWIN_OS_INLINE)
85# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
86# define __DARWIN_OS_INLINE static inline
87# elif defined(__MWERKS__) || defined(__cplusplus)
88# define __DARWIN_OS_INLINE static inline
89# else
90# define __DARWIN_OS_INLINE static __inline__
91# endif
92#endif
93
97__DARWIN_OS_INLINE94__DARWIN_OS_INLINE
98uint16_t95uint16_t
99_OSSwapInt16(96_OSSwapInt16(
lib/libc/include/x86_64-macos-gnu/mach-o/dyld.h-9
...@@ -112,15 +112,6 @@ extern void _tlv_atexit(void (*termFunc)(void* objAddr), void* objAddr) __O...@@ -112,15 +112,6 @@ extern void _tlv_atexit(void (*termFunc)(void* objAddr), void* objAddr) __O
112 */112 */
113extern void _tlv_bootstrap(void) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0) DYLD_DRIVERKIT_UNAVAILABLE ;113extern void _tlv_bootstrap(void) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0) DYLD_DRIVERKIT_UNAVAILABLE ;
114114
115
116/*
117 * Dylibs that are incorporated into the dyld cache are removed from disk. That means code
118 * cannot stat() the file to see if it "exists". This function is like a stat() call that checks if a
119 * path is to a dylib that was removed from disk and is incorporated into the active dyld cache.
120 */
121extern bool _dyld_shared_cache_contains_path(const char* path) __API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0)) DYLD_DRIVERKIT_UNAVAILABLE;
122
123
124/*115/*
125 * The following dyld API's are deprecated as of Mac OS X 10.5. They are either 116 * The following dyld API's are deprecated as of Mac OS X 10.5. They are either
126 * no longer necessary or are superceeded by dlopen and friends in <dlfcn.h>.117 * no longer necessary or are superceeded by dlopen and friends in <dlfcn.h>.
lib/libc/include/x86_64-macos-gnu/mach-o/loader.h+7-31
...@@ -115,14 +115,11 @@ struct mach_header_64 {...@@ -115,14 +115,11 @@ struct mach_header_64 {
115#define MH_DYLIB 0x6 /* dynamically bound shared library */115#define MH_DYLIB 0x6 /* dynamically bound shared library */
116#define MH_DYLINKER 0x7 /* dynamic link editor */116#define MH_DYLINKER 0x7 /* dynamic link editor */
117#define MH_BUNDLE 0x8 /* dynamically bound bundle file */117#define MH_BUNDLE 0x8 /* dynamically bound bundle file */
118#define MH_DYLIB_STUB 0x9 /* shared library stub for static118#define MH_DYLIB_STUB 0x9 /* shared library stub for static */
119 linking only, no section contents */119 /* linking only, no section contents */
120#define MH_DSYM 0xa /* companion file with only debug120#define MH_DSYM 0xa /* companion file with only debug */
121 sections */121 /* sections */
122#define MH_KEXT_BUNDLE 0xb /* x86_64 kexts */122#define MH_KEXT_BUNDLE 0xb /* x86_64 kexts */
123#define MH_FILESET 0xc /* a file composed of other Mach-Os to
124 be run in the same userspace sharing
125 a single linkedit. */
126123
127/* Constants for the flags field of the mach_header */124/* Constants for the flags field of the mach_header */
128#define MH_NOUNDEFS 0x1 /* the object file has no undefined125#define MH_NOUNDEFS 0x1 /* the object file has no undefined
...@@ -325,7 +322,6 @@ struct load_command {...@@ -325,7 +322,6 @@ struct load_command {
325#define LC_BUILD_VERSION 0x32 /* build for platform min OS version */322#define LC_BUILD_VERSION 0x32 /* build for platform min OS version */
326#define LC_DYLD_EXPORTS_TRIE (0x33 | LC_REQ_DYLD) /* used with linkedit_data_command, payload is trie */323#define LC_DYLD_EXPORTS_TRIE (0x33 | LC_REQ_DYLD) /* used with linkedit_data_command, payload is trie */
327#define LC_DYLD_CHAINED_FIXUPS (0x34 | LC_REQ_DYLD) /* used with linkedit_data_command */324#define LC_DYLD_CHAINED_FIXUPS (0x34 | LC_REQ_DYLD) /* used with linkedit_data_command */
328#define LC_FILESET_ENTRY (0x35 | LC_REQ_DYLD) /* used with fileset_entry_command */
329325
330/*326/*
331 * A variable length string in a load command is represented by an lc_str327 * A variable length string in a load command is represented by an lc_str
...@@ -1269,6 +1265,9 @@ struct build_tool_version {...@@ -1269,6 +1265,9 @@ struct build_tool_version {
1269#define PLATFORM_WATCHOS 41265#define PLATFORM_WATCHOS 4
1270#define PLATFORM_BRIDGEOS 51266#define PLATFORM_BRIDGEOS 5
1271#define PLATFORM_MACCATALYST 61267#define PLATFORM_MACCATALYST 6
1268#if (!defined(PLATFORM_MACCATALYST))
1269#define PLATFORM_MACCATALYST 6
1270#endif
1272#define PLATFORM_IOSSIMULATOR 71271#define PLATFORM_IOSSIMULATOR 7
1273#define PLATFORM_TVOSSIMULATOR 81272#define PLATFORM_TVOSSIMULATOR 8
1274#define PLATFORM_WATCHOSSIMULATOR 91273#define PLATFORM_WATCHOSSIMULATOR 9
...@@ -1575,27 +1574,4 @@ struct note_command {...@@ -1575,27 +1574,4 @@ struct note_command {
1575 uint64_t size; /* length of data region */1574 uint64_t size; /* length of data region */
1576};1575};
15771576
1578/*
1579 * LC_FILESET_ENTRY commands describe constituent Mach-O files that are part
1580 * of a fileset. In one implementation, entries are dylibs with individual
1581 * mach headers and repositionable text and data segments. Each entry is
1582 * further described by its own mach header.
1583 */
1584struct fileset_entry_command {
1585 uint32_t cmd; /* LC_FILESET_ENTRY */
1586 uint32_t cmdsize; /* includes entry_id string */
1587 uint64_t vmaddr; /* memory address of the entry */
1588 uint64_t fileoff; /* file offset of the entry */
1589 union lc_str entry_id; /* contained entry id */
1590 uint32_t reserved; /* reserved */
1591};
1592
1593/*
1594 * These deprecated values may still be used within Apple but are mechanically
1595 * removed from public API. The mechanical process may produce unusual results.
1596 */
1597#if (!defined(PLATFORM_MACCATALYST))
1598#define PLATFORM_MACCATALYST PLATFORM_MACCATALYST
1599#endif
1600
1601#endif /* _MACHO_LOADER_H_ */1577#endif /* _MACHO_LOADER_H_ */
lib/libc/include/x86_64-macos-gnu/mach/i386/_structs.h-80
...@@ -603,48 +603,7 @@ _STRUCT_X86_DEBUG_STATE32...@@ -603,48 +603,7 @@ _STRUCT_X86_DEBUG_STATE32
603 unsigned int __dr6;603 unsigned int __dr6;
604 unsigned int __dr7;604 unsigned int __dr7;
605};605};
606
607#define _STRUCT_X86_INSTRUCTION_STATE struct __x86_instruction_state
608_STRUCT_X86_INSTRUCTION_STATE
609{
610 int __insn_stream_valid_bytes;
611 int __insn_offset;
612 int __out_of_synch; /*
613 * non-zero when the cacheline that includes the insn_offset
614 * is replaced in the insn_bytes array due to a mismatch
615 * detected when comparing it with the same cacheline in memory
616 */
617#define _X86_INSTRUCTION_STATE_MAX_INSN_BYTES (2448 - 64 - 4)
618 __uint8_t __insn_bytes[_X86_INSTRUCTION_STATE_MAX_INSN_BYTES];
619#define _X86_INSTRUCTION_STATE_CACHELINE_SIZE 64
620 __uint8_t __insn_cacheline[_X86_INSTRUCTION_STATE_CACHELINE_SIZE];
621};
622
623#define _STRUCT_LAST_BRANCH_RECORD struct __last_branch_record
624_STRUCT_LAST_BRANCH_RECORD
625{
626 __uint64_t __from_ip;
627 __uint64_t __to_ip;
628 __uint32_t __mispredict : 1,
629 __tsx_abort : 1,
630 __in_tsx : 1,
631 __cycle_count: 16,
632 __reserved : 13;
633};
634
635#define _STRUCT_LAST_BRANCH_STATE struct __last_branch_state
636_STRUCT_LAST_BRANCH_STATE
637{
638 int __lbr_count;
639 __uint32_t __lbr_supported_tsx : 1,
640 __lbr_supported_cycle_count : 1,
641 __reserved : 30;
642#define __LASTBRANCH_MAX 32
643 _STRUCT_LAST_BRANCH_RECORD __lbrs[__LASTBRANCH_MAX];
644};
645
646#else /* !__DARWIN_UNIX03 */606#else /* !__DARWIN_UNIX03 */
647
648#define _STRUCT_X86_DEBUG_STATE32 struct x86_debug_state32607#define _STRUCT_X86_DEBUG_STATE32 struct x86_debug_state32
649_STRUCT_X86_DEBUG_STATE32608_STRUCT_X86_DEBUG_STATE32
650{609{
...@@ -657,45 +616,6 @@ _STRUCT_X86_DEBUG_STATE32...@@ -657,45 +616,6 @@ _STRUCT_X86_DEBUG_STATE32
657 unsigned int dr6;616 unsigned int dr6;
658 unsigned int dr7;617 unsigned int dr7;
659};618};
660
661#define _STRUCT_X86_INSTRUCTION_STATE struct __x86_instruction_state
662_STRUCT_X86_INSTRUCTION_STATE
663{
664 int insn_stream_valid_bytes;
665 int insn_offset;
666 int out_of_synch; /*
667 * non-zero when the cacheline that includes the insn_offset
668 * is replaced in the insn_bytes array due to a mismatch
669 * detected when comparing it with the same cacheline in memory
670 */
671#define x86_INSTRUCTION_STATE_MAX_INSN_BYTES (2448 - 64 - 4)
672 __uint8_t insn_bytes[x86_INSTRUCTION_STATE_MAX_INSN_BYTES];
673#define x86_INSTRUCTION_STATE_CACHELINE_SIZE 64
674 __uint8_t insn_cacheline[x86_INSTRUCTION_STATE_CACHELINE_SIZE];
675};
676
677#define _STRUCT_LAST_BRANCH_RECORD struct __last_branch_record
678_STRUCT_LAST_BRANCH_RECORD
679{
680 __uint64_t from_ip;
681 __uint64_t to_ip;
682 __uint32_t mispredict : 1,
683 tsx_abort : 1,
684 in_tsx : 1,
685 cycle_count: 16,
686 reserved : 13;
687};
688
689#define _STRUCT_LAST_BRANCH_STATE struct __last_branch_state
690_STRUCT_LAST_BRANCH_STATE
691{
692 int lbr_count;
693 __uint32_t lbr_supported_tsx : 1,
694 lbr_supported_cycle_count : 1,
695 reserved : 30;
696#define __LASTBRANCH_MAX 32
697 _STRUCT_LAST_BRANCH_RECORD lbrs[__LASTBRANCH_MAX];
698};
699#endif /* !__DARWIN_UNIX03 */619#endif /* !__DARWIN_UNIX03 */
700620
701#define _STRUCT_X86_PAGEIN_STATE struct __x86_pagein_state621#define _STRUCT_X86_PAGEIN_STATE struct __x86_pagein_state
lib/libc/include/x86_64-macos-gnu/mach/i386/thread_state.h+1-1
...@@ -32,7 +32,7 @@...@@ -32,7 +32,7 @@
32#ifndef _MACH_I386_THREAD_STATE_H_32#ifndef _MACH_I386_THREAD_STATE_H_
33#define _MACH_I386_THREAD_STATE_H_33#define _MACH_I386_THREAD_STATE_H_
3434
35/* Size of maximum exported thread state in 32-bit words */35/* Size of maximum exported thread state in words */
36#define I386_THREAD_STATE_MAX (614) /* Size of biggest state possible */36#define I386_THREAD_STATE_MAX (614) /* Size of biggest state possible */
3737
38#if defined (__i386__) || defined(__x86_64__)38#if defined (__i386__) || defined(__x86_64__)
lib/libc/include/x86_64-macos-gnu/mach/i386/thread_status.h+1-18
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright (c) 2000-2020 Apple Computer, Inc. All rights reserved.2 * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved.
3 *3 *
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 *5 *
...@@ -121,8 +121,6 @@...@@ -121,8 +121,6 @@
121#define x86_AVX512_STATE (x86_AVX512_STATE32 + 2)121#define x86_AVX512_STATE (x86_AVX512_STATE32 + 2)
122#define x86_PAGEIN_STATE 22122#define x86_PAGEIN_STATE 22
123#define x86_THREAD_FULL_STATE64 23123#define x86_THREAD_FULL_STATE64 23
124#define x86_INSTRUCTION_STATE 24
125#define x86_LAST_BRANCH_STATE 25
126124
127/*125/*
128 * Largest state on this machine:126 * Largest state on this machine:
...@@ -157,8 +155,6 @@...@@ -157,8 +155,6 @@
157 (x == x86_AVX512_STATE64) || \155 (x == x86_AVX512_STATE64) || \
158 (x == x86_AVX512_STATE) || \156 (x == x86_AVX512_STATE) || \
159 (x == x86_PAGEIN_STATE) || \157 (x == x86_PAGEIN_STATE) || \
160 (x == x86_INSTRUCTION_STATE) || \
161 (x == x86_LAST_BRANCH_STATE) || \
162 (x == THREAD_STATE_NONE))158 (x == THREAD_STATE_NONE))
163159
164struct x86_state_hdr {160struct x86_state_hdr {
...@@ -263,19 +259,6 @@ typedef _STRUCT_X86_PAGEIN_STATE x86_pagein_state_t;...@@ -263,19 +259,6 @@ typedef _STRUCT_X86_PAGEIN_STATE x86_pagein_state_t;
263259
264#define X86_PAGEIN_STATE_COUNT x86_PAGEIN_STATE_COUNT260#define X86_PAGEIN_STATE_COUNT x86_PAGEIN_STATE_COUNT
265261
266typedef _STRUCT_X86_INSTRUCTION_STATE x86_instruction_state_t;
267#define x86_INSTRUCTION_STATE_COUNT \
268 ((mach_msg_type_number_t)(sizeof(x86_instruction_state_t) / sizeof(int)))
269
270#define X86_INSTRUCTION_STATE_COUNT x86_INSTRUCTION_STATE_COUNT
271
272typedef _STRUCT_LAST_BRANCH_STATE last_branch_state_t;
273#define x86_LAST_BRANCH_STATE_COUNT \
274 ((mach_msg_type_number_t)(sizeof(last_branch_state_t) / sizeof(int)))
275
276#define X86_LAST_BRANCH_STATE_COUNT x86_LAST_BRANCH_STATE_COUNT
277
278
279/*262/*
280 * Combined thread, float and exception states263 * Combined thread, float and exception states
281 */264 */
lib/libc/include/x86_64-macos-gnu/mach/i386/vm_param.h+35-22
...@@ -90,34 +90,47 @@...@@ -90,34 +90,47 @@
90#ifndef _MACH_I386_VM_PARAM_H_90#ifndef _MACH_I386_VM_PARAM_H_
91#define _MACH_I386_VM_PARAM_H_91#define _MACH_I386_VM_PARAM_H_
9292
93#if !defined(KERNEL) && !defined(__ASSEMBLER__)
94
95#include <mach/vm_page_size.h>
96#endif
97
98#define BYTE_SIZE 8 /* byte size in bits */93#define BYTE_SIZE 8 /* byte size in bits */
9994
100#define I386_PGBYTES 4096 /* bytes per 80386 page */95#define I386_PGBYTES 4096 /* bytes per 80386 page */
101#define I386_PGSHIFT 12 /* bitshift for pages */96#define I386_PGSHIFT 12 /* bitshift for pages */
10297
103
104#if !defined(__MAC_OS_X_VERSION_MIN_REQUIRED) || (__MAC_OS_X_VERSION_MIN_REQUIRED < 101600)
105#define PAGE_SHIFT I386_PGSHIFT
106#define PAGE_SIZE I386_PGBYTES98#define PAGE_SIZE I386_PGBYTES
107#define PAGE_MASK (PAGE_SIZE-1)99#define PAGE_SHIFT I386_PGSHIFT
108#else /* !defined(__MAC_OS_X_VERSION_MIN_REQUIRED) || (__MAC_OS_X_VERSION_MIN_REQUIRED < 101600) */100#define PAGE_MASK (PAGE_SIZE - 1)
109#define PAGE_SHIFT vm_page_shift101
110#define PAGE_SIZE vm_page_size102#define PAGE_MAX_SHIFT PAGE_SHIFT
111#define PAGE_MASK vm_page_mask103#define PAGE_MAX_SIZE PAGE_SIZE
112#endif /* !defined(__MAC_OS_X_VERSION_MIN_REQUIRED) || (__MAC_OS_X_VERSION_MIN_REQUIRED < 101600) */104#define PAGE_MAX_MASK PAGE_MASK
113105
114#define PAGE_MAX_SHIFT 14106#define PAGE_MIN_SHIFT PAGE_SHIFT
115#define PAGE_MAX_SIZE (1 << PAGE_MAX_SHIFT)107#define PAGE_MIN_SIZE PAGE_SIZE
116#define PAGE_MAX_MASK (PAGE_MAX_SIZE-1)108#define PAGE_MIN_MASK PAGE_MASK
117109
118#define PAGE_MIN_SHIFT 12110#define I386_LPGBYTES 2*1024*1024 /* bytes per large page */
119#define PAGE_MIN_SIZE (1 << PAGE_MIN_SHIFT)111#define I386_LPGSHIFT 21 /* bitshift for large pages */
120#define PAGE_MIN_MASK (PAGE_MIN_SIZE-1)112#define I386_LPGMASK (I386_LPGBYTES-1)
113
114/*
115 * Convert bytes to pages and convert pages to bytes.
116 * No rounding is used.
117 */
118
119#define i386_btop(x) ((ppnum_t)((x) >> I386_PGSHIFT))
120#define machine_btop(x) i386_btop(x)
121#define i386_ptob(x) (((pmap_paddr_t)(x)) << I386_PGSHIFT)
122#define machine_ptob(x) i386_ptob(x)
123
124/*
125 * Round off or truncate to the nearest page. These will work
126 * for either addresses or counts. (i.e. 1 byte rounds to 1 page
127 * bytes.
128 */
129
130#define i386_round_page(x) ((((pmap_paddr_t)(x)) + I386_PGBYTES - 1) & \
131 ~(I386_PGBYTES-1))
132#define i386_trunc_page(x) (((pmap_paddr_t)(x)) & ~(I386_PGBYTES-1))
133
121134
122135
123#define VM_MIN_ADDRESS64 ((user_addr_t) 0x0000000000000000ULL)136#define VM_MIN_ADDRESS64 ((user_addr_t) 0x0000000000000000ULL)
lib/libc/include/x86_64-macos-gnu/mach/i386/vm_types.h+1
...@@ -70,6 +70,7 @@...@@ -70,6 +70,7 @@
70#ifndef ASSEMBLER70#ifndef ASSEMBLER
7171
72#include <i386/_types.h>72#include <i386/_types.h>
73#include <mach/i386/vm_param.h>
73#include <stdint.h>74#include <stdint.h>
7475
75/*76/*
lib/libc/include/x86_64-macos-gnu/mach/kern_return.h-4
...@@ -323,10 +323,6 @@...@@ -323,10 +323,6 @@
323/* The provided buffer is of insufficient size for the requested data.323/* The provided buffer is of insufficient size for the requested data.
324 */324 */
325325
326#define KERN_DENIED 53
327/* Denied by security policy
328 */
329
330#define KERN_RETURN_MAX 0x100326#define KERN_RETURN_MAX 0x100
331/* Maximum return value allowable327/* Maximum return value allowable
332 */328 */
lib/libc/include/x86_64-macos-gnu/mach/mach_port.h+7-7
...@@ -226,7 +226,7 @@ extern...@@ -226,7 +226,7 @@ extern
226#endif /* mig_external */226#endif /* mig_external */
227kern_return_t mach_port_get_set_status227kern_return_t mach_port_get_set_status
228(228(
229 ipc_space_read_t task,229 ipc_space_inspect_t task,
230 mach_port_name_t name,230 mach_port_name_t name,
231 mach_port_name_array_t *members,231 mach_port_name_array_t *members,
232 mach_msg_type_number_t *membersCnt232 mach_msg_type_number_t *membersCnt
...@@ -312,7 +312,7 @@ extern...@@ -312,7 +312,7 @@ extern
312#endif /* mig_external */312#endif /* mig_external */
313kern_return_t mach_port_get_attributes313kern_return_t mach_port_get_attributes
314(314(
315 ipc_space_read_t task,315 ipc_space_inspect_t task,
316 mach_port_name_t name,316 mach_port_name_t name,
317 mach_port_flavor_t flavor,317 mach_port_flavor_t flavor,
318 mach_port_info_t port_info_out,318 mach_port_info_t port_info_out,
...@@ -398,7 +398,7 @@ extern...@@ -398,7 +398,7 @@ extern
398#endif /* mig_external */398#endif /* mig_external */
399kern_return_t mach_port_space_info399kern_return_t mach_port_space_info
400(400(
401 ipc_space_read_t space,401 ipc_space_inspect_t task,
402 ipc_info_space_t *space_info,402 ipc_info_space_t *space_info,
403 ipc_info_name_array_t *table_info,403 ipc_info_name_array_t *table_info,
404 mach_msg_type_number_t *table_infoCnt,404 mach_msg_type_number_t *table_infoCnt,
...@@ -428,7 +428,7 @@ extern...@@ -428,7 +428,7 @@ extern
428#endif /* mig_external */428#endif /* mig_external */
429kern_return_t mach_port_kernel_object429kern_return_t mach_port_kernel_object
430(430(
431 ipc_space_read_t task,431 ipc_space_inspect_t task,
432 mach_port_name_t name,432 mach_port_name_t name,
433 unsigned *object_type,433 unsigned *object_type,
434 unsigned *object_addr434 unsigned *object_addr
...@@ -468,7 +468,7 @@ extern...@@ -468,7 +468,7 @@ extern
468#endif /* mig_external */468#endif /* mig_external */
469kern_return_t mach_port_get_context469kern_return_t mach_port_get_context
470(470(
471 ipc_space_read_t task,471 ipc_space_inspect_t task,
472 mach_port_name_t name,472 mach_port_name_t name,
473 mach_port_context_t *context473 mach_port_context_t *context
474);474);
...@@ -494,7 +494,7 @@ extern...@@ -494,7 +494,7 @@ extern
494#endif /* mig_external */494#endif /* mig_external */
495kern_return_t mach_port_kobject495kern_return_t mach_port_kobject
496(496(
497 ipc_space_read_t task,497 ipc_space_inspect_t task,
498 mach_port_name_t name,498 mach_port_name_t name,
499 natural_t *object_type,499 natural_t *object_type,
500 mach_vm_address_t *object_addr500 mach_vm_address_t *object_addr
...@@ -603,7 +603,7 @@ extern...@@ -603,7 +603,7 @@ extern
603#endif /* mig_external */603#endif /* mig_external */
604kern_return_t mach_port_kobject_description604kern_return_t mach_port_kobject_description
605(605(
606 ipc_space_read_t task,606 ipc_space_inspect_t task,
607 mach_port_name_t name,607 mach_port_name_t name,
608 natural_t *object_type,608 natural_t *object_type,
609 mach_vm_address_t *object_addr,609 mach_vm_address_t *object_addr,
lib/libc/include/x86_64-macos-gnu/mach/mach_time.h created+73
...@@ -0,0 +1,73 @@
1/*
2 * Copyright (c) 2001-2005 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. The rights granted to you under the License
10 * may not be used to create, or enable the creation or redistribution of,
11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.
14 *
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
17 *
18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and
24 * limitations under the License.
25 *
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
27 */
28
29#ifndef _MACH_MACH_TIME_H_
30#define _MACH_MACH_TIME_H_
31
32#include <mach/mach_types.h>
33#include <sys/cdefs.h>
34#include <Availability.h>
35
36struct mach_timebase_info {
37 uint32_t numer;
38 uint32_t denom;
39};
40
41typedef struct mach_timebase_info *mach_timebase_info_t;
42typedef struct mach_timebase_info mach_timebase_info_data_t;
43
44__BEGIN_DECLS
45
46kern_return_t mach_timebase_info(
47 mach_timebase_info_t info);
48
49kern_return_t mach_wait_until(
50 uint64_t deadline);
51
52
53uint64_t mach_absolute_time(void);
54
55__OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0)
56uint64_t mach_approximate_time(void);
57
58/*
59 * like mach_absolute_time, but advances during sleep
60 */
61__OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0)
62uint64_t mach_continuous_time(void);
63
64/*
65 * like mach_approximate_time, but advances during sleep
66 */
67__OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0)
68uint64_t mach_continuous_approximate_time(void);
69
70
71__END_DECLS
72
73#endif /* _MACH_MACH_TIME_H_ */
lib/libc/include/x86_64-macos-gnu/mach/mach_traps.h+6
...@@ -131,6 +131,12 @@ extern kern_return_t _kernelrpc_mach_port_allocate_trap(...@@ -131,6 +131,12 @@ extern kern_return_t _kernelrpc_mach_port_allocate_trap(
131 mach_port_name_t *name131 mach_port_name_t *name
132 );132 );
133133
134
135extern kern_return_t _kernelrpc_mach_port_destroy_trap(
136 mach_port_name_t target,
137 mach_port_name_t name
138 );
139
134extern kern_return_t _kernelrpc_mach_port_deallocate_trap(140extern kern_return_t _kernelrpc_mach_port_deallocate_trap(
135 mach_port_name_t target,141 mach_port_name_t target,
136 mach_port_name_t name142 mach_port_name_t name
lib/libc/include/x86_64-macos-gnu/mach/mach_types.h+2-31
...@@ -117,17 +117,12 @@...@@ -117,17 +117,12 @@
117 */117 */
118typedef mach_port_t task_t;118typedef mach_port_t task_t;
119typedef mach_port_t task_name_t;119typedef mach_port_t task_name_t;
120typedef mach_port_t task_policy_set_t;
121typedef mach_port_t task_policy_get_t;
122typedef mach_port_t task_inspect_t;120typedef mach_port_t task_inspect_t;
123typedef mach_port_t task_read_t;
124typedef mach_port_t task_suspension_token_t;121typedef mach_port_t task_suspension_token_t;
125typedef mach_port_t thread_t;122typedef mach_port_t thread_t;
126typedef mach_port_t thread_act_t;123typedef mach_port_t thread_act_t;
127typedef mach_port_t thread_inspect_t;124typedef mach_port_t thread_inspect_t;
128typedef mach_port_t thread_read_t;
129typedef mach_port_t ipc_space_t;125typedef mach_port_t ipc_space_t;
130typedef mach_port_t ipc_space_read_t;
131typedef mach_port_t ipc_space_inspect_t;126typedef mach_port_t ipc_space_inspect_t;
132typedef mach_port_t coalition_t;127typedef mach_port_t coalition_t;
133typedef mach_port_t host_t;128typedef mach_port_t host_t;
...@@ -143,8 +138,6 @@ typedef mach_port_t alarm_t;...@@ -143,8 +138,6 @@ typedef mach_port_t alarm_t;
143typedef mach_port_t clock_serv_t;138typedef mach_port_t clock_serv_t;
144typedef mach_port_t clock_ctrl_t;139typedef mach_port_t clock_ctrl_t;
145typedef mach_port_t arcade_register_t;140typedef mach_port_t arcade_register_t;
146typedef mach_port_t ipc_eventlink_t;
147typedef mach_port_t eventlink_port_pair_t[2];
148typedef mach_port_t suid_cred_t;141typedef mach_port_t suid_cred_t;
149142
150143
...@@ -166,7 +159,6 @@ typedef exception_handler_t *exception_handler_array_t;...@@ -166,7 +159,6 @@ typedef exception_handler_t *exception_handler_array_t;
166typedef mach_port_t vm_task_entry_t;159typedef mach_port_t vm_task_entry_t;
167typedef mach_port_t io_master_t;160typedef mach_port_t io_master_t;
168typedef mach_port_t UNDServerRef;161typedef mach_port_t UNDServerRef;
169typedef mach_port_t mach_eventlink_t;
170162
171/*163/*
172 * Mig doesn't translate the components of an array.164 * Mig doesn't translate the components of an array.
...@@ -220,15 +212,12 @@ typedef uint32_t suid_cred_uid_t;...@@ -220,15 +212,12 @@ typedef uint32_t suid_cred_uid_t;
220212
221#define TASK_NULL ((task_t) 0)213#define TASK_NULL ((task_t) 0)
222#define TASK_NAME_NULL ((task_name_t) 0)214#define TASK_NAME_NULL ((task_name_t) 0)
223#define TASK_INSPECT_NULL ((task_inspect_t) 0)215#define TASK_INSPECT_NULL ((task_inspect_t) 0)
224#define TASK_READ_NULL ((task_read_t) 0)
225#define THREAD_NULL ((thread_t) 0)216#define THREAD_NULL ((thread_t) 0)
226#define THREAD_INSPECT_NULL ((thread_inspect_t) 0)217#define THREAD_INSPECT_NULL ((thread_inspect_t) 0)
227#define THREAD_READ_NULL ((thread_read_t) 0)
228#define TID_NULL ((uint64_t) 0)218#define TID_NULL ((uint64_t) 0)
229#define THR_ACT_NULL ((thread_act_t) 0)219#define THR_ACT_NULL ((thread_act_t) 0)
230#define IPC_SPACE_NULL ((ipc_space_t) 0)220#define IPC_SPACE_NULL ((ipc_space_t) 0)
231#define IPC_SPACE_READ_NULL ((ipc_space_read_t) 0)
232#define IPC_SPACE_INSPECT_NULL ((ipc_space_inspect_t) 0)221#define IPC_SPACE_INSPECT_NULL ((ipc_space_inspect_t) 0)
233#define COALITION_NULL ((coalition_t) 0)222#define COALITION_NULL ((coalition_t) 0)
234#define HOST_NULL ((host_t) 0)223#define HOST_NULL ((host_t) 0)
...@@ -243,25 +232,7 @@ typedef uint32_t suid_cred_uid_t;...@@ -243,25 +232,7 @@ typedef uint32_t suid_cred_uid_t;
243#define CLOCK_NULL ((clock_t) 0)232#define CLOCK_NULL ((clock_t) 0)
244#define UND_SERVER_NULL ((UNDServerRef) 0)233#define UND_SERVER_NULL ((UNDServerRef) 0)
245#define ARCADE_REG_NULL ((arcade_register_t) 0)234#define ARCADE_REG_NULL ((arcade_register_t) 0)
246#define MACH_EVENTLINK_NULL ((mach_eventlink_t) 0)235#define SUID_CRED_NULL ((suid_cred_t) 0)
247#define IPC_EVENTLINK_NULL ((ipc_eventlink_t) 0)
248#define SUID_CRED_NULL ((suid_cred_t) 0)
249
250/* capability strictly _DECREASING_.
251 * not ordered the other way around because we want TASK_FLAVOR_CONTROL
252 * to be closest to the itk_lock. see task.h.
253 */
254typedef unsigned int mach_task_flavor_t;
255#define TASK_FLAVOR_CONTROL 0 /* a task_t */
256#define TASK_FLAVOR_READ 1 /* a task_read_t */
257#define TASK_FLAVOR_INSPECT 2 /* a task_inspect_t */
258#define TASK_FLAVOR_NAME 3 /* a task_name_t */
259
260/* capability strictly _DECREASING_ */
261typedef unsigned int mach_thread_flavor_t;
262#define THREAD_FLAVOR_CONTROL 0 /* a thread_t */
263#define THREAD_FLAVOR_READ 1 /* a thread_read_t */
264#define THREAD_FLAVOR_INSPECT 2 /* a thread_inspect_t */
265236
266/* DEPRECATED */237/* DEPRECATED */
267typedef natural_t ledger_item_t;238typedef natural_t ledger_item_t;
lib/libc/include/x86_64-macos-gnu/mach/machine.h+2-18
...@@ -118,9 +118,6 @@ typedef integer_t cpu_threadtype_t;...@@ -118,9 +118,6 @@ typedef integer_t cpu_threadtype_t;
118#define CPU_TYPE_POWERPC ((cpu_type_t) 18)118#define CPU_TYPE_POWERPC ((cpu_type_t) 18)
119#define CPU_TYPE_POWERPC64 (CPU_TYPE_POWERPC | CPU_ARCH_ABI64)119#define CPU_TYPE_POWERPC64 (CPU_TYPE_POWERPC | CPU_ARCH_ABI64)
120/* skip ((cpu_type_t) 19) */120/* skip ((cpu_type_t) 19) */
121/* skip ((cpu_type_t) 20 */
122/* skip ((cpu_type_t) 21 */
123/* skip ((cpu_type_t) 22 */
124121
125/*122/*
126 * Machine subtypes (these are defined here, instead of in a machine123 * Machine subtypes (these are defined here, instead of in a machine
...@@ -133,14 +130,7 @@ typedef integer_t cpu_threadtype_t;...@@ -133,14 +130,7 @@ typedef integer_t cpu_threadtype_t;
133 */130 */
134#define CPU_SUBTYPE_MASK 0xff000000 /* mask for feature flags */131#define CPU_SUBTYPE_MASK 0xff000000 /* mask for feature flags */
135#define CPU_SUBTYPE_LIB64 0x80000000 /* 64 bit libraries */132#define CPU_SUBTYPE_LIB64 0x80000000 /* 64 bit libraries */
136#define CPU_SUBTYPE_PTRAUTH_ABI 0x80000000 /* pointer authentication with versioned ABI */
137133
138/*
139 * When selecting a slice, ANY will pick the slice with the best
140 * grading for the selected cpu_type_t, unlike the "ALL" subtypes,
141 * which are the slices that can run on any hardware for that cpu type.
142 */
143#define CPU_SUBTYPE_ANY ((cpu_subtype_t) -1)
144134
145/*135/*
146 * Object files that are hand-crafted to run on any136 * Object files that are hand-crafted to run on any
...@@ -375,7 +365,9 @@ typedef integer_t cpu_threadtype_t;...@@ -375,7 +365,9 @@ typedef integer_t cpu_threadtype_t;
375#define CPUFAMILY_INTEL_BROADWELL 0x582ed09c365#define CPUFAMILY_INTEL_BROADWELL 0x582ed09c
376#define CPUFAMILY_INTEL_SKYLAKE 0x37fc219f366#define CPUFAMILY_INTEL_SKYLAKE 0x37fc219f
377#define CPUFAMILY_INTEL_KABYLAKE 0x0f817246367#define CPUFAMILY_INTEL_KABYLAKE 0x0f817246
368#if !defined(RC_HIDE_XNU_ICELAKE)
378#define CPUFAMILY_INTEL_ICELAKE 0x38435547369#define CPUFAMILY_INTEL_ICELAKE 0x38435547
370#endif /* not RC_HIDE_XNU_ICELAKE */
379#if !defined(RC_HIDE_XNU_COMETLAKE)371#if !defined(RC_HIDE_XNU_COMETLAKE)
380#define CPUFAMILY_INTEL_COMETLAKE 0x1cf8a03e372#define CPUFAMILY_INTEL_COMETLAKE 0x1cf8a03e
381#endif /* not RC_HIDE_XNU_COMETLAKE */373#endif /* not RC_HIDE_XNU_COMETLAKE */
...@@ -394,14 +386,6 @@ typedef integer_t cpu_threadtype_t;...@@ -394,14 +386,6 @@ typedef integer_t cpu_threadtype_t;
394#define CPUFAMILY_ARM_MONSOON_MISTRAL 0xe81e7ef6386#define CPUFAMILY_ARM_MONSOON_MISTRAL 0xe81e7ef6
395#define CPUFAMILY_ARM_VORTEX_TEMPEST 0x07d34b9f387#define CPUFAMILY_ARM_VORTEX_TEMPEST 0x07d34b9f
396#define CPUFAMILY_ARM_LIGHTNING_THUNDER 0x462504d2388#define CPUFAMILY_ARM_LIGHTNING_THUNDER 0x462504d2
397#define CPUFAMILY_ARM_FIRESTORM_ICESTORM 0x1b588bb3
398
399#define CPUSUBFAMILY_UNKNOWN 0
400#define CPUSUBFAMILY_ARM_HP 1
401#define CPUSUBFAMILY_ARM_HG 2
402#define CPUSUBFAMILY_ARM_M 3
403#define CPUSUBFAMILY_ARM_HS 4
404#define CPUSUBFAMILY_ARM_HC_HD 5
405389
406/* The following synonyms are deprecated: */390/* The following synonyms are deprecated: */
407#define CPUFAMILY_INTEL_6_23 CPUFAMILY_INTEL_PENRYN391#define CPUFAMILY_INTEL_6_23 CPUFAMILY_INTEL_PENRYN
lib/libc/include/x86_64-macos-gnu/mach/machine/_structs.h-2
...@@ -31,8 +31,6 @@...@@ -31,8 +31,6 @@
3131
32#if defined (__i386__) || defined(__x86_64__)32#if defined (__i386__) || defined(__x86_64__)
33#include "mach/i386/_structs.h"33#include "mach/i386/_structs.h"
34#elif defined (__arm__) || defined (__arm64__)
35#include "mach/arm/_structs.h"
36#else34#else
37#error architecture not supported35#error architecture not supported
38#endif36#endif
lib/libc/include/x86_64-macos-gnu/mach/machine/boolean.h-2
...@@ -31,8 +31,6 @@...@@ -31,8 +31,6 @@
3131
32#if defined (__i386__) || defined(__x86_64__)32#if defined (__i386__) || defined(__x86_64__)
33#include "mach/i386/boolean.h"33#include "mach/i386/boolean.h"
34#elif defined (__arm__) || defined (__arm64__)
35#include "mach/arm/boolean.h"
36#else34#else
37#error architecture not supported35#error architecture not supported
38#endif36#endif
lib/libc/include/x86_64-macos-gnu/mach/machine/exception.h-2
...@@ -31,8 +31,6 @@...@@ -31,8 +31,6 @@
3131
32#if defined (__i386__) || defined(__x86_64__)32#if defined (__i386__) || defined(__x86_64__)
33#include "mach/i386/exception.h"33#include "mach/i386/exception.h"
34#elif defined (__arm__) || defined (__arm64__)
35#include "mach/arm/exception.h"
36#else34#else
37#error architecture not supported35#error architecture not supported
38#endif36#endif
lib/libc/include/x86_64-macos-gnu/mach/machine/kern_return.h-2
...@@ -31,8 +31,6 @@...@@ -31,8 +31,6 @@
3131
32#if defined (__i386__) || defined(__x86_64__)32#if defined (__i386__) || defined(__x86_64__)
33#include "mach/i386/kern_return.h"33#include "mach/i386/kern_return.h"
34#elif defined (__arm__) || defined (__arm64__)
35#include "mach/arm/kern_return.h"
36#else34#else
37#error architecture not supported35#error architecture not supported
38#endif36#endif
lib/libc/include/x86_64-macos-gnu/mach/machine/processor_info.h-2
...@@ -31,8 +31,6 @@...@@ -31,8 +31,6 @@
3131
32#if defined (__i386__) || defined(__x86_64__)32#if defined (__i386__) || defined(__x86_64__)
33#include "mach/i386/processor_info.h"33#include "mach/i386/processor_info.h"
34#elif defined (__arm__) || defined (__arm64__)
35#include "mach/arm/processor_info.h"
36#else34#else
37#error architecture not supported35#error architecture not supported
38#endif36#endif
lib/libc/include/x86_64-macos-gnu/mach/machine/rpc.h-2
...@@ -31,8 +31,6 @@...@@ -31,8 +31,6 @@
3131
32#if defined (__i386__) || defined(__x86_64__)32#if defined (__i386__) || defined(__x86_64__)
33#include "mach/i386/rpc.h"33#include "mach/i386/rpc.h"
34#elif defined (__arm__) || defined (__arm64__)
35#include "mach/arm/rpc.h"
36#else34#else
37#error architecture not supported35#error architecture not supported
38#endif36#endif
lib/libc/include/x86_64-macos-gnu/mach/machine/thread_state.h-2
...@@ -31,8 +31,6 @@...@@ -31,8 +31,6 @@
3131
32#if defined (__i386__) || defined(__x86_64__)32#if defined (__i386__) || defined(__x86_64__)
33#include "mach/i386/thread_state.h"33#include "mach/i386/thread_state.h"
34#elif defined (__arm__) || defined (__arm64__)
35#include "mach/arm/thread_state.h"
36#else34#else
37#error architecture not supported35#error architecture not supported
38#endif36#endif
lib/libc/include/x86_64-macos-gnu/mach/machine/thread_status.h-2
...@@ -31,8 +31,6 @@...@@ -31,8 +31,6 @@
3131
32#if defined (__i386__) || defined(__x86_64__)32#if defined (__i386__) || defined(__x86_64__)
33#include "mach/i386/thread_status.h"33#include "mach/i386/thread_status.h"
34#elif defined (__arm__) || defined (__arm64__)
35#include "mach/arm/thread_status.h"
36#else34#else
37#error architecture not supported35#error architecture not supported
38#endif36#endif
lib/libc/include/x86_64-macos-gnu/mach/machine/vm_param.h-2
...@@ -31,8 +31,6 @@...@@ -31,8 +31,6 @@
3131
32#if defined (__i386__) || defined(__x86_64__)32#if defined (__i386__) || defined(__x86_64__)
33#include "mach/i386/vm_param.h"33#include "mach/i386/vm_param.h"
34#elif defined (__arm__) || defined (__arm64__)
35#include "mach/arm/vm_param.h"
36#else34#else
37#error architecture not supported35#error architecture not supported
38#endif36#endif
lib/libc/include/x86_64-macos-gnu/mach/machine/vm_types.h-2
...@@ -31,8 +31,6 @@...@@ -31,8 +31,6 @@
3131
32#if defined (__i386__) || defined(__x86_64__)32#if defined (__i386__) || defined(__x86_64__)
33#include "mach/i386/vm_types.h"33#include "mach/i386/vm_types.h"
34#elif defined (__arm__) || defined (__arm64__)
35#include "mach/arm/vm_types.h"
36#else34#else
37#error architecture not supported35#error architecture not supported
38#endif36#endif
lib/libc/include/x86_64-macos-gnu/mach/message.h+1-7
...@@ -228,7 +228,6 @@ typedef unsigned int mach_msg_priority_t;...@@ -228,7 +228,6 @@ typedef unsigned int mach_msg_priority_t;
228228
229#define MACH_MSG_PRIORITY_UNSPECIFIED (mach_msg_priority_t) 0229#define MACH_MSG_PRIORITY_UNSPECIFIED (mach_msg_priority_t) 0
230230
231
232typedef unsigned int mach_msg_type_name_t;231typedef unsigned int mach_msg_type_name_t;
233232
234#define MACH_MSG_TYPE_MOVE_RECEIVE 16 /* Must hold receive right */233#define MACH_MSG_TYPE_MOVE_RECEIVE 16 /* Must hold receive right */
...@@ -500,9 +499,6 @@ typedef struct{...@@ -500,9 +499,6 @@ typedef struct{
500 mach_port_name_t sender;499 mach_port_name_t sender;
501} msg_labels_t;500} msg_labels_t;
502501
503typedef int mach_msg_filter_id;
504#define MACH_MSG_FILTER_POLICY_ALLOW (mach_msg_filter_id)0
505
506/*502/*
507 * Trailer type to pass MAC policy label info as a mach message trailer.503 * Trailer type to pass MAC policy label info as a mach message trailer.
508 *504 *
...@@ -515,7 +511,7 @@ typedef struct{...@@ -515,7 +511,7 @@ typedef struct{
515 security_token_t msgh_sender;511 security_token_t msgh_sender;
516 audit_token_t msgh_audit;512 audit_token_t msgh_audit;
517 mach_port_context_t msgh_context;513 mach_port_context_t msgh_context;
518 mach_msg_filter_id msgh_ad;514 int msgh_ad;
519 msg_labels_t msgh_labels;515 msg_labels_t msgh_labels;
520} mach_msg_mac_trailer_t;516} mach_msg_mac_trailer_t;
521517
...@@ -803,8 +799,6 @@ typedef kern_return_t mach_msg_return_t;...@@ -803,8 +799,6 @@ typedef kern_return_t mach_msg_return_t;
803/* compatibility: no longer a returned error */799/* compatibility: no longer a returned error */
804#define MACH_SEND_NO_GRANT_DEST 0x10000016800#define MACH_SEND_NO_GRANT_DEST 0x10000016
805/* The destination port doesn't accept ports in body */801/* The destination port doesn't accept ports in body */
806#define MACH_SEND_MSG_FILTERED 0x10000017
807/* Message send was rejected by message filter */
808802
809#define MACH_RCV_IN_PROGRESS 0x10004001803#define MACH_RCV_IN_PROGRESS 0x10004001
810/* Thread is waiting for receive. (Internal use only.) */804/* Thread is waiting for receive. (Internal use only.) */
lib/libc/include/x86_64-macos-gnu/mach/port.h+1-8
...@@ -339,9 +339,6 @@ typedef struct mach_port_qos {...@@ -339,9 +339,6 @@ typedef struct mach_port_qos {
339#define MPO_STRICT 0x20 /* Apply strict guarding for port */339#define MPO_STRICT 0x20 /* Apply strict guarding for port */
340#define MPO_DENAP_RECEIVER 0x40 /* Mark the port as App de-nap receiver */340#define MPO_DENAP_RECEIVER 0x40 /* Mark the port as App de-nap receiver */
341#define MPO_IMMOVABLE_RECEIVE 0x80 /* Mark the port as immovable; protected by the guard context */341#define MPO_IMMOVABLE_RECEIVE 0x80 /* Mark the port as immovable; protected by the guard context */
342#define MPO_FILTER_MSG 0x100 /* Allow message filtering */
343#define MPO_TG_BLOCK_TRACKING 0x200 /* Track blocking relationship for thread group during sync IPC */
344
345/*342/*
346 * Structure to define optional attributes for a newly343 * Structure to define optional attributes for a newly
347 * constructed port.344 * constructed port.
...@@ -349,10 +346,7 @@ typedef struct mach_port_qos {...@@ -349,10 +346,7 @@ typedef struct mach_port_qos {
349typedef struct mach_port_options {346typedef struct mach_port_options {
350 uint32_t flags; /* Flags defining attributes for port */347 uint32_t flags; /* Flags defining attributes for port */
351 mach_port_limits_t mpl; /* Message queue limit for port */348 mach_port_limits_t mpl; /* Message queue limit for port */
352 union {349 uint64_t reserved[2]; /* Reserved */
353 uint64_t reserved[2]; /* Reserved */
354 mach_port_name_t work_interval_port; /* Work interval port */
355 };
356}mach_port_options_t;350}mach_port_options_t;
357351
358typedef mach_port_options_t *mach_port_options_ptr_t;352typedef mach_port_options_t *mach_port_options_ptr_t;
...@@ -373,7 +367,6 @@ enum mach_port_guard_exception_codes {...@@ -373,7 +367,6 @@ enum mach_port_guard_exception_codes {
373 kGUARD_EXC_INCORRECT_GUARD = 1u << 4,367 kGUARD_EXC_INCORRECT_GUARD = 1u << 4,
374 kGUARD_EXC_IMMOVABLE = 1u << 5,368 kGUARD_EXC_IMMOVABLE = 1u << 5,
375 kGUARD_EXC_STRICT_REPLY = 1u << 6,369 kGUARD_EXC_STRICT_REPLY = 1u << 6,
376 kGUARD_EXC_MSG_FILTERED = 1u << 7,
377 /* start of [optionally] non-fatal guards */370 /* start of [optionally] non-fatal guards */
378 kGUARD_EXC_INVALID_RIGHT = 1u << 8,371 kGUARD_EXC_INVALID_RIGHT = 1u << 8,
379 kGUARD_EXC_INVALID_NAME = 1u << 9,372 kGUARD_EXC_INVALID_NAME = 1u << 9,
lib/libc/include/x86_64-macos-gnu/mach/processor_set.h+2-47
...@@ -49,7 +49,7 @@ typedef function_table_entry *function_table_t;...@@ -49,7 +49,7 @@ typedef function_table_entry *function_table_t;
49#endif /* AUTOTEST */49#endif /* AUTOTEST */
5050
51#ifndef processor_set_MSG_COUNT51#ifndef processor_set_MSG_COUNT
52#define processor_set_MSG_COUNT 1152#define processor_set_MSG_COUNT 10
53#endif /* processor_set_MSG_COUNT */53#endif /* processor_set_MSG_COUNT */
5454
55#include <mach/std_types.h>55#include <mach/std_types.h>
...@@ -200,20 +200,6 @@ kern_return_t processor_set_info...@@ -200,20 +200,6 @@ kern_return_t processor_set_info
200 mach_msg_type_number_t *info_outCnt200 mach_msg_type_number_t *info_outCnt
201);201);
202202
203/* Routine processor_set_tasks_with_flavor */
204#ifdef mig_external
205mig_external
206#else
207extern
208#endif /* mig_external */
209kern_return_t processor_set_tasks_with_flavor
210(
211 processor_set_t processor_set,
212 mach_task_flavor_t flavor,
213 task_array_t *task_list,
214 mach_msg_type_number_t *task_listCnt
215);
216
217__END_DECLS203__END_DECLS
218204
219/********************** Caution **************************/205/********************** Caution **************************/
...@@ -350,18 +336,6 @@ __END_DECLS...@@ -350,18 +336,6 @@ __END_DECLS
350#ifdef __MigPackStructs336#ifdef __MigPackStructs
351#pragma pack(pop)337#pragma pack(pop)
352#endif338#endif
353
354#ifdef __MigPackStructs
355#pragma pack(push, 4)
356#endif
357 typedef struct {
358 mach_msg_header_t Head;
359 NDR_record_t NDR;
360 mach_task_flavor_t flavor;
361 } __Request__processor_set_tasks_with_flavor_t __attribute__((unused));
362#ifdef __MigPackStructs
363#pragma pack(pop)
364#endif
365#endif /* !__Request__processor_set_subsystem__defined */339#endif /* !__Request__processor_set_subsystem__defined */
366340
367/* union of all requests */341/* union of all requests */
...@@ -379,7 +353,6 @@ union __RequestUnion__processor_set_subsystem {...@@ -379,7 +353,6 @@ union __RequestUnion__processor_set_subsystem {
379 __Request__processor_set_policy_control_t Request_processor_set_policy_control;353 __Request__processor_set_policy_control_t Request_processor_set_policy_control;
380 __Request__processor_set_stack_usage_t Request_processor_set_stack_usage;354 __Request__processor_set_stack_usage_t Request_processor_set_stack_usage;
381 __Request__processor_set_info_t Request_processor_set_info;355 __Request__processor_set_info_t Request_processor_set_info;
382 __Request__processor_set_tasks_with_flavor_t Request_processor_set_tasks_with_flavor;
383};356};
384#endif /* !__RequestUnion__processor_set_subsystem__defined */357#endif /* !__RequestUnion__processor_set_subsystem__defined */
385/* typedefs for all replies */358/* typedefs for all replies */
...@@ -526,22 +499,6 @@ union __RequestUnion__processor_set_subsystem {...@@ -526,22 +499,6 @@ union __RequestUnion__processor_set_subsystem {
526#ifdef __MigPackStructs499#ifdef __MigPackStructs
527#pragma pack(pop)500#pragma pack(pop)
528#endif501#endif
529
530#ifdef __MigPackStructs
531#pragma pack(push, 4)
532#endif
533 typedef struct {
534 mach_msg_header_t Head;
535 /* start of the kernel processed data */
536 mach_msg_body_t msgh_body;
537 mach_msg_ool_ports_descriptor_t task_list;
538 /* end of the kernel processed data */
539 NDR_record_t NDR;
540 mach_msg_type_number_t task_listCnt;
541 } __Reply__processor_set_tasks_with_flavor_t __attribute__((unused));
542#ifdef __MigPackStructs
543#pragma pack(pop)
544#endif
545#endif /* !__Reply__processor_set_subsystem__defined */502#endif /* !__Reply__processor_set_subsystem__defined */
546503
547/* union of all replies */504/* union of all replies */
...@@ -559,7 +516,6 @@ union __ReplyUnion__processor_set_subsystem {...@@ -559,7 +516,6 @@ union __ReplyUnion__processor_set_subsystem {
559 __Reply__processor_set_policy_control_t Reply_processor_set_policy_control;516 __Reply__processor_set_policy_control_t Reply_processor_set_policy_control;
560 __Reply__processor_set_stack_usage_t Reply_processor_set_stack_usage;517 __Reply__processor_set_stack_usage_t Reply_processor_set_stack_usage;
561 __Reply__processor_set_info_t Reply_processor_set_info;518 __Reply__processor_set_info_t Reply_processor_set_info;
562 __Reply__processor_set_tasks_with_flavor_t Reply_processor_set_tasks_with_flavor;
563};519};
564#endif /* !__RequestUnion__processor_set_subsystem__defined */520#endif /* !__RequestUnion__processor_set_subsystem__defined */
565521
...@@ -574,8 +530,7 @@ union __ReplyUnion__processor_set_subsystem {...@@ -574,8 +530,7 @@ union __ReplyUnion__processor_set_subsystem {
574 { "processor_set_threads", 4006 },\530 { "processor_set_threads", 4006 },\
575 { "processor_set_policy_control", 4007 },\531 { "processor_set_policy_control", 4007 },\
576 { "processor_set_stack_usage", 4008 },\532 { "processor_set_stack_usage", 4008 },\
577 { "processor_set_info", 4009 },\533 { "processor_set_info", 4009 }
578 { "processor_set_tasks_with_flavor", 4010 }
579#endif534#endif
580535
581#ifdef __AfterMigUserHeader536#ifdef __AfterMigUserHeader
lib/libc/include/x86_64-macos-gnu/mach/task.h+14-14
...@@ -279,7 +279,7 @@ __WATCHOS_PROHIBITED...@@ -279,7 +279,7 @@ __WATCHOS_PROHIBITED
279__TVOS_PROHIBITED279__TVOS_PROHIBITED
280kern_return_t task_get_exception_ports280kern_return_t task_get_exception_ports
281(281(
282 task_t task,282 task_inspect_t task,
283 exception_mask_t exception_mask,283 exception_mask_t exception_mask,
284 exception_mask_array_t masks,284 exception_mask_array_t masks,
285 mach_msg_type_number_t *masksCnt,285 mach_msg_type_number_t *masksCnt,
...@@ -372,7 +372,7 @@ __WATCHOS_PROHIBITED...@@ -372,7 +372,7 @@ __WATCHOS_PROHIBITED
372__TVOS_PROHIBITED372__TVOS_PROHIBITED
373kern_return_t task_policy_set373kern_return_t task_policy_set
374(374(
375 task_policy_set_t task,375 task_t task,
376 task_policy_flavor_t flavor,376 task_policy_flavor_t flavor,
377 task_policy_t policy_info,377 task_policy_t policy_info,
378 mach_msg_type_number_t policy_infoCnt378 mach_msg_type_number_t policy_infoCnt
...@@ -388,7 +388,7 @@ __WATCHOS_PROHIBITED...@@ -388,7 +388,7 @@ __WATCHOS_PROHIBITED
388__TVOS_PROHIBITED388__TVOS_PROHIBITED
389kern_return_t task_policy_get389kern_return_t task_policy_get
390(390(
391 task_policy_get_t task,391 task_t task,
392 task_policy_flavor_t flavor,392 task_policy_flavor_t flavor,
393 task_policy_t policy_info,393 task_policy_t policy_info,
394 mach_msg_type_number_t *policy_infoCnt,394 mach_msg_type_number_t *policy_infoCnt,
...@@ -487,7 +487,7 @@ __WATCHOS_PROHIBITED...@@ -487,7 +487,7 @@ __WATCHOS_PROHIBITED
487__TVOS_PROHIBITED487__TVOS_PROHIBITED
488kern_return_t task_zone_info488kern_return_t task_zone_info
489(489(
490 task_inspect_t target_task,490 task_t target_task,
491 mach_zone_name_array_t *names,491 mach_zone_name_array_t *names,
492 mach_msg_type_number_t *namesCnt,492 mach_msg_type_number_t *namesCnt,
493 task_zone_info_array_t *info,493 task_zone_info_array_t *info,
...@@ -527,7 +527,7 @@ extern...@@ -527,7 +527,7 @@ extern
527#endif /* mig_external */527#endif /* mig_external */
528kern_return_t task_get_assignment528kern_return_t task_get_assignment
529(529(
530 task_inspect_t task,530 task_t task,
531 processor_set_name_t *assigned_set531 processor_set_name_t *assigned_set
532);532);
533533
...@@ -559,7 +559,7 @@ __WATCHOS_PROHIBITED...@@ -559,7 +559,7 @@ __WATCHOS_PROHIBITED
559__TVOS_PROHIBITED559__TVOS_PROHIBITED
560kern_return_t task_get_state560kern_return_t task_get_state
561(561(
562 task_read_t task,562 task_t task,
563 thread_state_flavor_t flavor,563 thread_state_flavor_t flavor,
564 thread_state_t old_state,564 thread_state_t old_state,
565 mach_msg_type_number_t *old_stateCnt565 mach_msg_type_number_t *old_stateCnt
...@@ -631,7 +631,7 @@ extern...@@ -631,7 +631,7 @@ extern
631#endif /* mig_external */631#endif /* mig_external */
632kern_return_t task_purgable_info632kern_return_t task_purgable_info
633(633(
634 task_inspect_t task,634 task_t task,
635 task_purgable_info_t *stats635 task_purgable_info_t *stats
636);636);
637637
...@@ -645,7 +645,7 @@ __WATCHOS_PROHIBITED...@@ -645,7 +645,7 @@ __WATCHOS_PROHIBITED
645__TVOS_PROHIBITED645__TVOS_PROHIBITED
646kern_return_t task_get_mach_voucher646kern_return_t task_get_mach_voucher
647(647(
648 task_read_t task,648 task_t task,
649 mach_voucher_selector_t which,649 mach_voucher_selector_t which,
650 ipc_voucher_t *voucher650 ipc_voucher_t *voucher
651);651);
...@@ -700,7 +700,7 @@ extern...@@ -700,7 +700,7 @@ extern
700kern_return_t task_map_corpse_info700kern_return_t task_map_corpse_info
701(701(
702 task_t task,702 task_t task,
703 task_read_t corspe_task,703 task_t corspe_task,
704 vm_address_t *kcd_addr_begin,704 vm_address_t *kcd_addr_begin,
705 uint32_t *kcd_size705 uint32_t *kcd_size
706);706);
...@@ -739,7 +739,7 @@ extern...@@ -739,7 +739,7 @@ extern
739#endif /* mig_external */739#endif /* mig_external */
740kern_return_t task_get_dyld_image_infos740kern_return_t task_get_dyld_image_infos
741(741(
742 task_read_t task,742 task_inspect_t task,
743 dyld_kernel_image_info_array_t *dyld_images,743 dyld_kernel_image_info_array_t *dyld_images,
744 mach_msg_type_number_t *dyld_imagesCnt744 mach_msg_type_number_t *dyld_imagesCnt
745);745);
...@@ -791,7 +791,7 @@ extern...@@ -791,7 +791,7 @@ extern
791kern_return_t task_map_corpse_info_64791kern_return_t task_map_corpse_info_64
792(792(
793 task_t task,793 task_t task,
794 task_read_t corspe_task,794 task_t corspe_task,
795 mach_vm_address_t *kcd_addr_begin,795 mach_vm_address_t *kcd_addr_begin,
796 mach_vm_size_t *kcd_size796 mach_vm_size_t *kcd_size
797);797);
...@@ -1022,7 +1022,7 @@ __END_DECLS...@@ -1022,7 +1022,7 @@ __END_DECLS
1022 NDR_record_t NDR;1022 NDR_record_t NDR;
1023 thread_state_flavor_t flavor;1023 thread_state_flavor_t flavor;
1024 mach_msg_type_number_t new_stateCnt;1024 mach_msg_type_number_t new_stateCnt;
1025 natural_t new_state[1296];1025 natural_t new_state[614];
1026 } __Request__thread_create_running_t __attribute__((unused));1026 } __Request__thread_create_running_t __attribute__((unused));
1027#ifdef __MigPackStructs1027#ifdef __MigPackStructs
1028#pragma pack(pop)1028#pragma pack(pop)
...@@ -1331,7 +1331,7 @@ __END_DECLS...@@ -1331,7 +1331,7 @@ __END_DECLS
1331 NDR_record_t NDR;1331 NDR_record_t NDR;
1332 thread_state_flavor_t flavor;1332 thread_state_flavor_t flavor;
1333 mach_msg_type_number_t new_stateCnt;1333 mach_msg_type_number_t new_stateCnt;
1334 natural_t new_state[1296];1334 natural_t new_state[614];
1335 } __Request__task_set_state_t __attribute__((unused));1335 } __Request__task_set_state_t __attribute__((unused));
1336#ifdef __MigPackStructs1336#ifdef __MigPackStructs
1337#pragma pack(pop)1337#pragma pack(pop)
...@@ -2111,7 +2111,7 @@ union __RequestUnion__task_subsystem {...@@ -2111,7 +2111,7 @@ union __RequestUnion__task_subsystem {
2111 NDR_record_t NDR;2111 NDR_record_t NDR;
2112 kern_return_t RetCode;2112 kern_return_t RetCode;
2113 mach_msg_type_number_t old_stateCnt;2113 mach_msg_type_number_t old_stateCnt;
2114 natural_t old_state[1296];2114 natural_t old_state[614];
2115 } __Reply__task_get_state_t __attribute__((unused));2115 } __Reply__task_get_state_t __attribute__((unused));
2116#ifdef __MigPackStructs2116#ifdef __MigPackStructs
2117#pragma pack(pop)2117#pragma pack(pop)
lib/libc/include/x86_64-macos-gnu/mach/task_info.h+1-47
...@@ -112,13 +112,8 @@ typedef struct task_basic_info_32 *task_basic_info_32_t;...@@ -112,13 +112,8 @@ typedef struct task_basic_info_32 *task_basic_info_32_t;
112/* Don't use this, use MACH_TASK_BASIC_INFO instead */112/* Don't use this, use MACH_TASK_BASIC_INFO instead */
113struct task_basic_info_64 {113struct task_basic_info_64 {
114 integer_t suspend_count; /* suspend count for task */114 integer_t suspend_count; /* suspend count for task */
115#if defined(__arm__) || defined(__arm64__)
116 mach_vm_size_t virtual_size; /* virtual memory size (bytes) */115 mach_vm_size_t virtual_size; /* virtual memory size (bytes) */
117 mach_vm_size_t resident_size; /* resident memory size (bytes) */116 mach_vm_size_t resident_size; /* resident memory size (bytes) */
118#else /* defined(__arm__) || defined(__arm64__) */
119 mach_vm_size_t virtual_size; /* virtual memory size (bytes) */
120 mach_vm_size_t resident_size; /* resident memory size (bytes) */
121#endif /* defined(__arm__) || defined(__arm64__) */
122 time_value_t user_time; /* total user run time for117 time_value_t user_time; /* total user run time for
123 * terminated threads */118 * terminated threads */
124 time_value_t system_time; /* total system run time for119 time_value_t system_time; /* total system run time for
...@@ -128,26 +123,9 @@ struct task_basic_info_64 {...@@ -128,26 +123,9 @@ struct task_basic_info_64 {
128typedef struct task_basic_info_64 task_basic_info_64_data_t;123typedef struct task_basic_info_64 task_basic_info_64_data_t;
129typedef struct task_basic_info_64 *task_basic_info_64_t;124typedef struct task_basic_info_64 *task_basic_info_64_t;
130125
131#if defined(__arm__) || defined(__arm64__)
132 #if defined(__arm__) && defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_5_0)
133/*
134 * Note: arm64 can't use the old flavor. If you somehow manage to,
135 * you can cope with the nonsense data yourself.
136 */
137 #define TASK_BASIC_INFO_64 5
138 #define TASK_BASIC_INFO_64_COUNT \
139 (sizeof(task_basic_info_64_data_t) / sizeof(natural_t))
140
141 #else
142
143 #define TASK_BASIC_INFO_64 TASK_BASIC_INFO_64_2
144 #define TASK_BASIC_INFO_64_COUNT TASK_BASIC_INFO_64_2_COUNT
145 #endif
146#else /* defined(__arm__) || defined(__arm64__) */
147#define TASK_BASIC_INFO_64 5 /* 64-bit capable basic info */126#define TASK_BASIC_INFO_64 5 /* 64-bit capable basic info */
148#define TASK_BASIC_INFO_64_COUNT \127#define TASK_BASIC_INFO_64_COUNT \
149 (sizeof(task_basic_info_64_data_t) / sizeof(natural_t))128 (sizeof(task_basic_info_64_data_t) / sizeof(natural_t))
150#endif
151129
152130
153/* localized structure - cannot be safely passed between tasks of differing sizes */131/* localized structure - cannot be safely passed between tasks of differing sizes */
...@@ -271,27 +249,6 @@ typedef struct task_dyld_info *task_dyld_info_t;...@@ -271,27 +249,6 @@ typedef struct task_dyld_info *task_dyld_info_t;
271#define TASK_DYLD_ALL_IMAGE_INFO_32 0 /* format value */249#define TASK_DYLD_ALL_IMAGE_INFO_32 0 /* format value */
272#define TASK_DYLD_ALL_IMAGE_INFO_64 1 /* format value */250#define TASK_DYLD_ALL_IMAGE_INFO_64 1 /* format value */
273251
274#if defined(__arm__) || defined(__arm64__)
275
276/* Don't use this, use MACH_TASK_BASIC_INFO instead */
277/* Compatibility for old 32-bit mach_vm_*_t */
278#define TASK_BASIC_INFO_64_2 18 /* 64-bit capable basic info */
279
280struct task_basic_info_64_2 {
281 integer_t suspend_count; /* suspend count for task */
282 mach_vm_size_t virtual_size; /* virtual memory size (bytes) */
283 mach_vm_size_t resident_size; /* resident memory size (bytes) */
284 time_value_t user_time; /* total user run time for
285 * terminated threads */
286 time_value_t system_time; /* total system run time for
287 * terminated threads */
288 policy_t policy; /* default policy for new threads */
289};
290typedef struct task_basic_info_64_2 task_basic_info_64_2_data_t;
291typedef struct task_basic_info_64_2 *task_basic_info_64_2_t;
292#define TASK_BASIC_INFO_64_2_COUNT \
293 (sizeof(task_basic_info_64_2_data_t) / sizeof(natural_t))
294#endif
295252
296#define TASK_EXTMOD_INFO 19253#define TASK_EXTMOD_INFO 19
297254
...@@ -420,7 +377,7 @@ typedef struct task_vm_info *task_vm_info_t;...@@ -420,7 +377,7 @@ typedef struct task_vm_info *task_vm_info_t;
420typedef struct vm_purgeable_info task_purgable_info_t;377typedef struct vm_purgeable_info task_purgable_info_t;
421378
422379
423#define TASK_TRACE_MEMORY_INFO 24 /* no longer supported */380#define TASK_TRACE_MEMORY_INFO 24
424struct task_trace_memory_info {381struct task_trace_memory_info {
425 uint64_t user_memory_address; /* address of start of trace memory buffer */382 uint64_t user_memory_address; /* address of start of trace memory buffer */
426 uint64_t buffer_size; /* size of buffer in bytes */383 uint64_t buffer_size; /* size of buffer in bytes */
...@@ -455,9 +412,6 @@ typedef gpu_energy_data *gpu_energy_data_t;...@@ -455,9 +412,6 @@ typedef gpu_energy_data *gpu_energy_data_t;
455struct task_power_info_v2 {412struct task_power_info_v2 {
456 task_power_info_data_t cpu_energy;413 task_power_info_data_t cpu_energy;
457 gpu_energy_data gpu_energy;414 gpu_energy_data gpu_energy;
458#if defined(__arm__) || defined(__arm64__)
459 uint64_t task_energy;
460#endif /* defined(__arm__) || defined(__arm64__) */
461 uint64_t task_ptime;415 uint64_t task_ptime;
462 uint64_t task_pset_switches;416 uint64_t task_pset_switches;
463};417};
lib/libc/include/x86_64-macos-gnu/mach/task_policy.h+5-2
...@@ -110,7 +110,8 @@ typedef integer_t *task_policy_t;...@@ -110,7 +110,8 @@ typedef integer_t *task_policy_t;
110#define TASK_BASE_LATENCY_QOS_POLICY 10110#define TASK_BASE_LATENCY_QOS_POLICY 10
111#define TASK_BASE_THROUGHPUT_QOS_POLICY 11111#define TASK_BASE_THROUGHPUT_QOS_POLICY 11
112112
113typedef enum task_role {113
114enum task_role {
114 TASK_RENICED = -1,115 TASK_RENICED = -1,
115 TASK_UNSPECIFIED = 0,116 TASK_UNSPECIFIED = 0,
116 TASK_FOREGROUND_APPLICATION = 1,117 TASK_FOREGROUND_APPLICATION = 1,
...@@ -121,7 +122,9 @@ typedef enum task_role {...@@ -121,7 +122,9 @@ typedef enum task_role {
121 TASK_NONUI_APPLICATION = 6,122 TASK_NONUI_APPLICATION = 6,
122 TASK_DEFAULT_APPLICATION = 7,123 TASK_DEFAULT_APPLICATION = 7,
123 TASK_DARWINBG_APPLICATION = 8,124 TASK_DARWINBG_APPLICATION = 8,
124} task_role_t;125};
126
127typedef integer_t task_role_t;
125128
126struct task_category_policy {129struct task_category_policy {
127 task_role_t role;130 task_role_t role;
lib/libc/include/x86_64-macos-gnu/mach/task_special_ports.h+6-7
...@@ -69,19 +69,18 @@...@@ -69,19 +69,18 @@
6969
70typedef int task_special_port_t;70typedef int task_special_port_t;
7171
72#define TASK_KERNEL_PORT 1 /* The full task port for task. */72#define TASK_KERNEL_PORT 1 /* Represents task to the outside
73 * world.*/
7374
74#define TASK_HOST_PORT 2 /* The host (priv) port for task. */75#define TASK_HOST_PORT 2 /* The host (priv) port for task. */
7576
76#define TASK_NAME_PORT 3 /* The name port for task. */77#define TASK_NAME_PORT 3 /* the name (unpriv) port for task */
7778
78#define TASK_BOOTSTRAP_PORT 4 /* Bootstrap environment for task. */79#define TASK_BOOTSTRAP_PORT 4 /* Bootstrap environment for task. */
7980
80#define TASK_INSPECT_PORT 5 /* The inspect port for task. */81/*
8182 * Evolving and likely to change.
82#define TASK_READ_PORT 6 /* The read port for task. */83 */
83
84
8584
86#define TASK_SEATBELT_PORT 7 /* Seatbelt compiler/DEM port for task. */85#define TASK_SEATBELT_PORT 7 /* Seatbelt compiler/DEM port for task. */
8786
lib/libc/include/x86_64-macos-gnu/mach/thread_act.h+12-62
...@@ -49,7 +49,7 @@ typedef function_table_entry *function_table_t;...@@ -49,7 +49,7 @@ typedef function_table_entry *function_table_t;
49#endif /* AUTOTEST */49#endif /* AUTOTEST */
5050
51#ifndef thread_act_MSG_COUNT51#ifndef thread_act_MSG_COUNT
52#define thread_act_MSG_COUNT 2952#define thread_act_MSG_COUNT 28
53#endif /* thread_act_MSG_COUNT */53#endif /* thread_act_MSG_COUNT */
5454
55#include <mach/std_types.h>55#include <mach/std_types.h>
...@@ -88,7 +88,7 @@ __WATCHOS_PROHIBITED...@@ -88,7 +88,7 @@ __WATCHOS_PROHIBITED
88__TVOS_PROHIBITED88__TVOS_PROHIBITED
89kern_return_t act_get_state89kern_return_t act_get_state
90(90(
91 thread_read_t target_act,91 thread_act_t target_act,
92 int flavor,92 int flavor,
93 thread_state_t old_state,93 thread_state_t old_state,
94 mach_msg_type_number_t *old_stateCnt94 mach_msg_type_number_t *old_stateCnt
...@@ -119,7 +119,7 @@ extern...@@ -119,7 +119,7 @@ extern
119__WATCHOS_PROHIBITED119__WATCHOS_PROHIBITED
120kern_return_t thread_get_state120kern_return_t thread_get_state
121(121(
122 thread_read_t target_act,122 thread_act_t target_act,
123 thread_state_flavor_t flavor,123 thread_state_flavor_t flavor,
124 thread_state_t old_state,124 thread_state_t old_state,
125 mach_msg_type_number_t *old_stateCnt125 mach_msg_type_number_t *old_stateCnt
...@@ -211,7 +211,7 @@ __WATCHOS_PROHIBITED...@@ -211,7 +211,7 @@ __WATCHOS_PROHIBITED
211__TVOS_PROHIBITED211__TVOS_PROHIBITED
212kern_return_t thread_get_special_port212kern_return_t thread_get_special_port
213(213(
214 thread_inspect_t thr_act,214 thread_act_t thr_act,
215 int which_port,215 int which_port,
216 mach_port_t *special_port216 mach_port_t *special_port
217);217);
...@@ -272,7 +272,7 @@ __WATCHOS_PROHIBITED...@@ -272,7 +272,7 @@ __WATCHOS_PROHIBITED
272__TVOS_PROHIBITED272__TVOS_PROHIBITED
273kern_return_t thread_get_exception_ports273kern_return_t thread_get_exception_ports
274(274(
275 thread_act_t thread,275 thread_inspect_t thread,
276 exception_mask_t exception_mask,276 exception_mask_t exception_mask,
277 exception_mask_array_t masks,277 exception_mask_array_t masks,
278 mach_msg_type_number_t *masksCnt,278 mach_msg_type_number_t *masksCnt,
...@@ -402,7 +402,7 @@ extern...@@ -402,7 +402,7 @@ extern
402#endif /* mig_external */402#endif /* mig_external */
403kern_return_t thread_get_assignment403kern_return_t thread_get_assignment
404(404(
405 thread_inspect_t thread,405 thread_act_t thread,
406 processor_set_name_t *assigned_set406 processor_set_name_t *assigned_set
407);407);
408408
...@@ -433,7 +433,7 @@ __WATCHOS_PROHIBITED...@@ -433,7 +433,7 @@ __WATCHOS_PROHIBITED
433__TVOS_PROHIBITED433__TVOS_PROHIBITED
434kern_return_t thread_get_mach_voucher434kern_return_t thread_get_mach_voucher
435(435(
436 thread_read_t thr_act,436 thread_act_t thr_act,
437 mach_voucher_selector_t which,437 mach_voucher_selector_t which,
438 ipc_voucher_t *voucher438 ipc_voucher_t *voucher
439);439);
...@@ -467,23 +467,6 @@ kern_return_t thread_swap_mach_voucher...@@ -467,23 +467,6 @@ kern_return_t thread_swap_mach_voucher
467 ipc_voucher_t *old_voucher467 ipc_voucher_t *old_voucher
468);468);
469469
470/* Routine thread_convert_thread_state */
471#ifdef mig_external
472mig_external
473#else
474extern
475#endif /* mig_external */
476kern_return_t thread_convert_thread_state
477(
478 thread_act_t thread,
479 int direction,
480 thread_state_flavor_t flavor,
481 thread_state_t in_state,
482 mach_msg_type_number_t in_stateCnt,
483 thread_state_t out_state,
484 mach_msg_type_number_t *out_stateCnt
485);
486
487__END_DECLS470__END_DECLS
488471
489/********************** Caution **************************/472/********************** Caution **************************/
...@@ -533,7 +516,7 @@ __END_DECLS...@@ -533,7 +516,7 @@ __END_DECLS
533 NDR_record_t NDR;516 NDR_record_t NDR;
534 int flavor;517 int flavor;
535 mach_msg_type_number_t new_stateCnt;518 mach_msg_type_number_t new_stateCnt;
536 natural_t new_state[1296];519 natural_t new_state[614];
537 } __Request__act_set_state_t __attribute__((unused));520 } __Request__act_set_state_t __attribute__((unused));
538#ifdef __MigPackStructs521#ifdef __MigPackStructs
539#pragma pack(pop)522#pragma pack(pop)
...@@ -560,7 +543,7 @@ __END_DECLS...@@ -560,7 +543,7 @@ __END_DECLS
560 NDR_record_t NDR;543 NDR_record_t NDR;
561 thread_state_flavor_t flavor;544 thread_state_flavor_t flavor;
562 mach_msg_type_number_t new_stateCnt;545 mach_msg_type_number_t new_stateCnt;
563 natural_t new_state[1296];546 natural_t new_state[614];
564 } __Request__thread_set_state_t __attribute__((unused));547 } __Request__thread_set_state_t __attribute__((unused));
565#ifdef __MigPackStructs548#ifdef __MigPackStructs
566#pragma pack(pop)549#pragma pack(pop)
...@@ -868,22 +851,6 @@ __END_DECLS...@@ -868,22 +851,6 @@ __END_DECLS
868#ifdef __MigPackStructs851#ifdef __MigPackStructs
869#pragma pack(pop)852#pragma pack(pop)
870#endif853#endif
871
872#ifdef __MigPackStructs
873#pragma pack(push, 4)
874#endif
875 typedef struct {
876 mach_msg_header_t Head;
877 NDR_record_t NDR;
878 int direction;
879 thread_state_flavor_t flavor;
880 mach_msg_type_number_t in_stateCnt;
881 natural_t in_state[1296];
882 mach_msg_type_number_t out_stateCnt;
883 } __Request__thread_convert_thread_state_t __attribute__((unused));
884#ifdef __MigPackStructs
885#pragma pack(pop)
886#endif
887#endif /* !__Request__thread_act_subsystem__defined */854#endif /* !__Request__thread_act_subsystem__defined */
888855
889/* union of all requests */856/* union of all requests */
...@@ -919,7 +886,6 @@ union __RequestUnion__thread_act_subsystem {...@@ -919,7 +886,6 @@ union __RequestUnion__thread_act_subsystem {
919 __Request__thread_get_mach_voucher_t Request_thread_get_mach_voucher;886 __Request__thread_get_mach_voucher_t Request_thread_get_mach_voucher;
920 __Request__thread_set_mach_voucher_t Request_thread_set_mach_voucher;887 __Request__thread_set_mach_voucher_t Request_thread_set_mach_voucher;
921 __Request__thread_swap_mach_voucher_t Request_thread_swap_mach_voucher;888 __Request__thread_swap_mach_voucher_t Request_thread_swap_mach_voucher;
922 __Request__thread_convert_thread_state_t Request_thread_convert_thread_state;
923};889};
924#endif /* !__RequestUnion__thread_act_subsystem__defined */890#endif /* !__RequestUnion__thread_act_subsystem__defined */
925/* typedefs for all replies */891/* typedefs for all replies */
...@@ -947,7 +913,7 @@ union __RequestUnion__thread_act_subsystem {...@@ -947,7 +913,7 @@ union __RequestUnion__thread_act_subsystem {
947 NDR_record_t NDR;913 NDR_record_t NDR;
948 kern_return_t RetCode;914 kern_return_t RetCode;
949 mach_msg_type_number_t old_stateCnt;915 mach_msg_type_number_t old_stateCnt;
950 natural_t old_state[1296];916 natural_t old_state[614];
951 } __Reply__act_get_state_t __attribute__((unused));917 } __Reply__act_get_state_t __attribute__((unused));
952#ifdef __MigPackStructs918#ifdef __MigPackStructs
953#pragma pack(pop)919#pragma pack(pop)
...@@ -973,7 +939,7 @@ union __RequestUnion__thread_act_subsystem {...@@ -973,7 +939,7 @@ union __RequestUnion__thread_act_subsystem {
973 NDR_record_t NDR;939 NDR_record_t NDR;
974 kern_return_t RetCode;940 kern_return_t RetCode;
975 mach_msg_type_number_t old_stateCnt;941 mach_msg_type_number_t old_stateCnt;
976 natural_t old_state[1296];942 natural_t old_state[614];
977 } __Reply__thread_get_state_t __attribute__((unused));943 } __Reply__thread_get_state_t __attribute__((unused));
978#ifdef __MigPackStructs944#ifdef __MigPackStructs
979#pragma pack(pop)945#pragma pack(pop)
...@@ -1293,20 +1259,6 @@ union __RequestUnion__thread_act_subsystem {...@@ -1293,20 +1259,6 @@ union __RequestUnion__thread_act_subsystem {
1293#ifdef __MigPackStructs1259#ifdef __MigPackStructs
1294#pragma pack(pop)1260#pragma pack(pop)
1295#endif1261#endif
1296
1297#ifdef __MigPackStructs
1298#pragma pack(push, 4)
1299#endif
1300 typedef struct {
1301 mach_msg_header_t Head;
1302 NDR_record_t NDR;
1303 kern_return_t RetCode;
1304 mach_msg_type_number_t out_stateCnt;
1305 natural_t out_state[1296];
1306 } __Reply__thread_convert_thread_state_t __attribute__((unused));
1307#ifdef __MigPackStructs
1308#pragma pack(pop)
1309#endif
1310#endif /* !__Reply__thread_act_subsystem__defined */1262#endif /* !__Reply__thread_act_subsystem__defined */
13111263
1312/* union of all replies */1264/* union of all replies */
...@@ -1342,7 +1294,6 @@ union __ReplyUnion__thread_act_subsystem {...@@ -1342,7 +1294,6 @@ union __ReplyUnion__thread_act_subsystem {
1342 __Reply__thread_get_mach_voucher_t Reply_thread_get_mach_voucher;1294 __Reply__thread_get_mach_voucher_t Reply_thread_get_mach_voucher;
1343 __Reply__thread_set_mach_voucher_t Reply_thread_set_mach_voucher;1295 __Reply__thread_set_mach_voucher_t Reply_thread_set_mach_voucher;
1344 __Reply__thread_swap_mach_voucher_t Reply_thread_swap_mach_voucher;1296 __Reply__thread_swap_mach_voucher_t Reply_thread_swap_mach_voucher;
1345 __Reply__thread_convert_thread_state_t Reply_thread_convert_thread_state;
1346};1297};
1347#endif /* !__RequestUnion__thread_act_subsystem__defined */1298#endif /* !__RequestUnion__thread_act_subsystem__defined */
13481299
...@@ -1375,8 +1326,7 @@ union __ReplyUnion__thread_act_subsystem {...@@ -1375,8 +1326,7 @@ union __ReplyUnion__thread_act_subsystem {
1375 { "thread_set_policy", 3624 },\1326 { "thread_set_policy", 3624 },\
1376 { "thread_get_mach_voucher", 3625 },\1327 { "thread_get_mach_voucher", 3625 },\
1377 { "thread_set_mach_voucher", 3626 },\1328 { "thread_set_mach_voucher", 3626 },\
1378 { "thread_swap_mach_voucher", 3627 },\1329 { "thread_swap_mach_voucher", 3627 }
1379 { "thread_convert_thread_state", 3628 }
1380#endif1330#endif
13811331
1382#ifdef __AfterMigUserHeader1332#ifdef __AfterMigUserHeader
lib/libc/include/x86_64-macos-gnu/mach/thread_special_ports.h+2-5
...@@ -67,11 +67,8 @@...@@ -67,11 +67,8 @@
67#ifndef _MACH_THREAD_SPECIAL_PORTS_H_67#ifndef _MACH_THREAD_SPECIAL_PORTS_H_
68#define _MACH_THREAD_SPECIAL_PORTS_H_68#define _MACH_THREAD_SPECIAL_PORTS_H_
6969
70#define THREAD_KERNEL_PORT 1 /* The full thread port for thread. */70#define THREAD_KERNEL_PORT 1 /* Represents the thread to the outside
7171 * world.*/
72#define THREAD_INSPECT_PORT 2 /* The inspect port for thread. */
73
74#define THREAD_READ_PORT 3 /* The read port for thread. */
7572
76/*73/*
77 * Definitions for ease of use74 * Definitions for ease of use
lib/libc/include/x86_64-macos-gnu/mach/thread_status.h-3
...@@ -94,7 +94,4 @@ typedef natural_t thread_state_data_t[THREAD_STATE_MAX];...@@ -94,7 +94,4 @@ typedef natural_t thread_state_data_t[THREAD_STATE_MAX];
94typedef int thread_state_flavor_t;94typedef int thread_state_flavor_t;
95typedef thread_state_flavor_t *thread_state_flavor_array_t;95typedef thread_state_flavor_t *thread_state_flavor_array_t;
9696
97#define THREAD_CONVERT_THREAD_STATE_TO_SELF 1
98#define THREAD_CONVERT_THREAD_STATE_FROM_SELF 2
99
100#endif /* _MACH_THREAD_STATUS_H_ */97#endif /* _MACH_THREAD_STATUS_H_ */
lib/libc/include/x86_64-macos-gnu/mach/vm_prot.h-1
...@@ -149,5 +149,4 @@ typedef int vm_prot_t;...@@ -149,5 +149,4 @@ typedef int vm_prot_t;
149#define VM_PROT_STRIP_READ ((vm_prot_t) 0x80)149#define VM_PROT_STRIP_READ ((vm_prot_t) 0x80)
150#define VM_PROT_EXECUTE_ONLY (VM_PROT_EXECUTE|VM_PROT_STRIP_READ)150#define VM_PROT_EXECUTE_ONLY (VM_PROT_EXECUTE|VM_PROT_STRIP_READ)
151151
152
153#endif /* _MACH_VM_PROT_H_ */152#endif /* _MACH_VM_PROT_H_ */
lib/libc/include/x86_64-macos-gnu/mach/vm_statistics.h+2-29
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright (c) 2000-2020 Apple Inc. All rights reserved.2 * Copyright (c) 2000-2019 Apple Inc. All rights reserved.
3 *3 *
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 *5 *
...@@ -66,12 +66,8 @@...@@ -66,12 +66,8 @@
66#ifndef _MACH_VM_STATISTICS_H_66#ifndef _MACH_VM_STATISTICS_H_
67#define _MACH_VM_STATISTICS_H_67#define _MACH_VM_STATISTICS_H_
6868
69#ifdef __cplusplus
70extern "C" {
71#endif
72
73#include <mach/machine/vm_types.h>69#include <mach/machine/vm_types.h>
74#include <mach/machine/kern_return.h>70
7571
76/*72/*
77 * vm_statistics73 * vm_statistics
...@@ -171,8 +167,6 @@ struct vm_statistics64 {...@@ -171,8 +167,6 @@ struct vm_statistics64 {
171typedef struct vm_statistics64 *vm_statistics64_t;167typedef struct vm_statistics64 *vm_statistics64_t;
172typedef struct vm_statistics64 vm_statistics64_data_t;168typedef struct vm_statistics64 vm_statistics64_data_t;
173169
174kern_return_t vm_stats(void *info, unsigned int *count);
175
176/*170/*
177 * VM_STATISTICS_TRUNCATE_TO_32_BIT171 * VM_STATISTICS_TRUNCATE_TO_32_BIT
178 *172 *
...@@ -358,7 +352,6 @@ enum virtual_memory_guard_exception_codes {...@@ -358,7 +352,6 @@ enum virtual_memory_guard_exception_codes {
358352
359#define VM_MEMORY_MALLOC_NANO 11353#define VM_MEMORY_MALLOC_NANO 11
360#define VM_MEMORY_MALLOC_MEDIUM 12354#define VM_MEMORY_MALLOC_MEDIUM 12
361#define VM_MEMORY_MALLOC_PGUARD 13
362355
363#define VM_MEMORY_MACH_MSG 20356#define VM_MEMORY_MACH_MSG 20
364#define VM_MEMORY_IOKIT 21357#define VM_MEMORY_IOKIT 21
...@@ -519,22 +512,6 @@ enum virtual_memory_guard_exception_codes {...@@ -519,22 +512,6 @@ enum virtual_memory_guard_exception_codes {
519/* memory allocated by CoreMedia for global image registration of frames */512/* memory allocated by CoreMedia for global image registration of frames */
520#define VM_MEMORY_CM_REGWARP 101513#define VM_MEMORY_CM_REGWARP 101
521514
522/* memory allocated by EmbeddedAcousticRecognition for speech decoder */
523#define VM_MEMORY_EAR_DECODER 102
524
525/* CoreUI cached image data */
526#define VM_MEMORY_COREUI_CACHED_IMAGE_DATA 103
527
528/* Reserve 230-239 for Rosetta */
529#define VM_MEMORY_ROSETTA 230
530#define VM_MEMORY_ROSETTA_THREAD_CONTEXT 231
531#define VM_MEMORY_ROSETTA_INDIRECT_BRANCH_MAP 232
532#define VM_MEMORY_ROSETTA_RETURN_STACK 233
533#define VM_MEMORY_ROSETTA_EXECUTABLE_HEAP 234
534#define VM_MEMORY_ROSETTA_USER_LDT 235
535#define VM_MEMORY_ROSETTA_ARENA 236
536#define VM_MEMORY_ROSETTA_10 239
537
538/* Reserve 240-255 for application */515/* Reserve 240-255 for application */
539#define VM_MEMORY_APPLICATION_SPECIFIC_1 240516#define VM_MEMORY_APPLICATION_SPECIFIC_1 240
540#define VM_MEMORY_APPLICATION_SPECIFIC_16 255517#define VM_MEMORY_APPLICATION_SPECIFIC_16 255
...@@ -543,8 +520,4 @@ enum virtual_memory_guard_exception_codes {...@@ -543,8 +520,4 @@ enum virtual_memory_guard_exception_codes {
543520
544521
545522
546#ifdef __cplusplus
547}
548#endif
549
550#endif /* _MACH_VM_STATISTICS_H_ */523#endif /* _MACH_VM_STATISTICS_H_ */
lib/libc/include/x86_64-macos-gnu/mach/vm_types.h+1-3
...@@ -70,12 +70,10 @@ typedef uint32_t ppnum_t; /* Physical page number */...@@ -70,12 +70,10 @@ typedef uint32_t ppnum_t; /* Physical page number */
7070
7171
7272
73typedef mach_port_t vm_map_t, vm_map_read_t, vm_map_inspect_t;73typedef mach_port_t vm_map_t;
7474
7575
76#define VM_MAP_NULL ((vm_map_t) 0)76#define VM_MAP_NULL ((vm_map_t) 0)
77#define VM_MAP_INSPECT_NULL ((vm_map_inspect_t) 0)
78#define VM_MAP_READ_NULL ((vm_map_read_t) 0)
7977
80/*78/*
81 * Evolving definitions, likely to change.79 * Evolving definitions, likely to change.
lib/libc/include/x86_64-macos-gnu/machine/_mcontext.h-2
...@@ -27,8 +27,6 @@...@@ -27,8 +27,6 @@
27 */27 */
28#if defined (__i386__) || defined (__x86_64__)28#if defined (__i386__) || defined (__x86_64__)
29#include "i386/_mcontext.h"29#include "i386/_mcontext.h"
30#elif defined (__arm__) || defined (__arm64__)
31#include "arm/_mcontext.h"
32#else30#else
33#error architecture not supported31#error architecture not supported
34#endif32#endif
lib/libc/include/x86_64-macos-gnu/machine/_param.h+1-3
...@@ -26,9 +26,7 @@...@@ -26,9 +26,7 @@
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
27 */27 */
28#if defined (__i386__) || defined (__x86_64__)28#if defined (__i386__) || defined (__x86_64__)
29#include <i386/_param.h>29#include "i386/_param.h"
30#elif defined (__arm__) || defined (__arm64__)
31#include <arm/_param.h>
32#else30#else
33#error architecture not supported31#error architecture not supported
34#endif32#endif
lib/libc/include/x86_64-macos-gnu/machine/_types.h-2
...@@ -30,8 +30,6 @@...@@ -30,8 +30,6 @@
3030
31#if defined (__i386__) || defined(__x86_64__)31#if defined (__i386__) || defined(__x86_64__)
32#include "i386/_types.h"32#include "i386/_types.h"
33#elif defined (__arm__) || defined (__arm64__)
34#include "arm/_types.h"
35#else33#else
36#error architecture not supported34#error architecture not supported
37#endif35#endif
lib/libc/include/x86_64-macos-gnu/machine/endian.h-2
...@@ -33,8 +33,6 @@...@@ -33,8 +33,6 @@
3333
34#if defined (__i386__) || defined(__x86_64__)34#if defined (__i386__) || defined(__x86_64__)
35#include "i386/endian.h"35#include "i386/endian.h"
36#elif defined (__arm__) || defined (__arm64__)
37#include "arm/endian.h"
38#else36#else
39#error architecture not supported37#error architecture not supported
40#endif38#endif
lib/libc/include/x86_64-macos-gnu/machine/limits.h-2
...@@ -4,8 +4,6 @@...@@ -4,8 +4,6 @@
4 * This file is public domain. */4 * This file is public domain. */
5#if defined (__i386__) || defined(__x86_64__)5#if defined (__i386__) || defined(__x86_64__)
6#include <i386/limits.h>6#include <i386/limits.h>
7#elif defined (__arm__) || defined (__arm64__)
8#include <arm/limits.h>
9#else7#else
10#error architecture not supported8#error architecture not supported
11#endif9#endif
lib/libc/include/x86_64-macos-gnu/machine/param.h+1-3
...@@ -32,9 +32,7 @@...@@ -32,9 +32,7 @@
32#define _BSD_MACHINE_PARAM_H_32#define _BSD_MACHINE_PARAM_H_
3333
34#if defined (__i386__) || defined(__x86_64__)34#if defined (__i386__) || defined(__x86_64__)
35#include <i386/param.h>35#include "i386/param.h"
36#elif defined (__arm__) || defined (__arm64__)
37#include <arm/param.h>
38#else36#else
39#error architecture not supported37#error architecture not supported
40#endif38#endif
lib/libc/include/x86_64-macos-gnu/machine/signal.h-2
...@@ -30,8 +30,6 @@...@@ -30,8 +30,6 @@
3030
31#if defined (__i386__) || defined(__x86_64__)31#if defined (__i386__) || defined(__x86_64__)
32#include "i386/signal.h"32#include "i386/signal.h"
33#elif defined (__arm__) || defined (__arm64__)
34#include "arm/signal.h"
35#else33#else
36#error architecture not supported34#error architecture not supported
37#endif35#endif
lib/libc/include/x86_64-macos-gnu/machine/types.h-2
...@@ -33,8 +33,6 @@...@@ -33,8 +33,6 @@
3333
34#if defined (__i386__) || defined(__x86_64__)34#if defined (__i386__) || defined(__x86_64__)
35#include "i386/types.h"35#include "i386/types.h"
36#elif defined (__arm__) || defined (__arm64__)
37#include "arm/types.h"
38#else36#else
39#error architecture not supported37#error architecture not supported
40#endif38#endif
lib/libc/include/x86_64-macos-gnu/malloc/_malloc.h+3-3
...@@ -44,9 +44,9 @@ void *realloc(void *__ptr, size_t __size) __result_use_check __alloc_size(2);...@@ -44,9 +44,9 @@ void *realloc(void *__ptr, size_t __size) __result_use_check __alloc_size(2);
44#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))44#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
45void *valloc(size_t) __alloc_size(1);45void *valloc(size_t) __alloc_size(1);
46#endif // !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))46#endif // !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
47#if (__DARWIN_C_LEVEL >= __DARWIN_C_FULL) || \47#if (__DARWIN_C_LEVEL >= __DARWIN_C_FULL) && \
48 (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \48 ((defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \
49 (defined(__cplusplus) && __cplusplus >= 201703L)49 (defined(__cplusplus) && __cplusplus >= 201703L))
50void *aligned_alloc(size_t __alignment, size_t __size) __result_use_check __alloc_size(2) __OSX_AVAILABLE(10.15) __IOS_AVAILABLE(13.0) __TVOS_AVAILABLE(13.0) __WATCHOS_AVAILABLE(6.0);50void *aligned_alloc(size_t __alignment, size_t __size) __result_use_check __alloc_size(2) __OSX_AVAILABLE(10.15) __IOS_AVAILABLE(13.0) __TVOS_AVAILABLE(13.0) __WATCHOS_AVAILABLE(6.0);
51#endif51#endif
52int posix_memalign(void **__memptr, size_t __alignment, size_t __size) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0);52int posix_memalign(void **__memptr, size_t __alignment, size_t __size) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0);
lib/libc/include/x86_64-macos-gnu/math.h-4
...@@ -547,7 +547,6 @@ extern long double fmal(long double, long double, long double);...@@ -547,7 +547,6 @@ extern long double fmal(long double, long double, long double);
547#define islessgreater(x, y) __builtin_islessgreater((x),(y))547#define islessgreater(x, y) __builtin_islessgreater((x),(y))
548#define isunordered(x, y) __builtin_isunordered((x),(y))548#define isunordered(x, y) __builtin_isunordered((x),(y))
549549
550#if defined __i386__ || defined __x86_64__
551/* Deprecated functions; use the INFINITY and NAN macros instead. */550/* Deprecated functions; use the INFINITY and NAN macros instead. */
552extern float __inff(void)551extern float __inff(void)
553__API_DEPRECATED("use `(float)INFINITY` instead", macos(10.0, 10.9)) __API_UNAVAILABLE(ios, watchos, tvos);552__API_DEPRECATED("use `(float)INFINITY` instead", macos(10.0, 10.9)) __API_UNAVAILABLE(ios, watchos, tvos);
...@@ -557,7 +556,6 @@ extern long double __infl(void)...@@ -557,7 +556,6 @@ extern long double __infl(void)
557__API_DEPRECATED("use `(long double)INFINITY` instead", macos(10.0, 10.9)) __API_UNAVAILABLE(ios, watchos, tvos);556__API_DEPRECATED("use `(long double)INFINITY` instead", macos(10.0, 10.9)) __API_UNAVAILABLE(ios, watchos, tvos);
558extern float __nan(void)557extern float __nan(void)
559__API_DEPRECATED("use `NAN` instead", macos(10.0, 10.14)) __API_UNAVAILABLE(ios, watchos, tvos);558__API_DEPRECATED("use `NAN` instead", macos(10.0, 10.14)) __API_UNAVAILABLE(ios, watchos, tvos);
560#endif
561559
562/******************************************************************************560/******************************************************************************
563 * Reentrant variants of lgamma[fl] *561 * Reentrant variants of lgamma[fl] *
...@@ -738,7 +736,6 @@ extern int signgam;...@@ -738,7 +736,6 @@ extern int signgam;
738#define TLOSS 5736#define TLOSS 5
739#define PLOSS 6737#define PLOSS 6
740738
741#if defined __i386__ || defined __x86_64__
742/* Legacy BSD API; use the C99 `lrint( )` function instead. */739/* Legacy BSD API; use the C99 `lrint( )` function instead. */
743extern long int rinttol(double)740extern long int rinttol(double)
744__API_DEPRECATED_WITH_REPLACEMENT("lrint", macos(10.0, 10.9)) __API_UNAVAILABLE(ios, watchos, tvos);741__API_DEPRECATED_WITH_REPLACEMENT("lrint", macos(10.0, 10.9)) __API_UNAVAILABLE(ios, watchos, tvos);
...@@ -757,7 +754,6 @@ __API_DEPRECATED_WITH_REPLACEMENT("tgamma", macos(10.0, 10.9)) __API_UNAVAILABLE...@@ -757,7 +754,6 @@ __API_DEPRECATED_WITH_REPLACEMENT("tgamma", macos(10.0, 10.9)) __API_UNAVAILABLE
757/* Legacy BSD API; use `2*frexp( )` or `scalbn(x, -ilogb(x))` instead. */754/* Legacy BSD API; use `2*frexp( )` or `scalbn(x, -ilogb(x))` instead. */
758extern double significand(double)755extern double significand(double)
759__API_DEPRECATED("Use `2*frexp( )` or `scalbn(x, -ilogb(x))` instead.", macos(10.0, 10.9)) __API_UNAVAILABLE(ios, watchos, tvos);756__API_DEPRECATED("Use `2*frexp( )` or `scalbn(x, -ilogb(x))` instead.", macos(10.0, 10.9)) __API_UNAVAILABLE(ios, watchos, tvos);
760#endif
761757
762#if !defined __cplusplus758#if !defined __cplusplus
763struct exception {759struct exception {
lib/libc/include/x86_64-macos-gnu/net/if.h+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright (c) 2000-2020 Apple Inc. All rights reserved.2 * Copyright (c) 2000-2019 Apple Inc. All rights reserved.
3 *3 *
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 *5 *
lib/libc/include/x86_64-macos-gnu/net/if_var.h+1-2
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright (c) 2000-2020 Apple Inc. All rights reserved.2 * Copyright (c) 2000-2019 Apple Inc. All rights reserved.
3 *3 *
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 *5 *
...@@ -70,7 +70,6 @@...@@ -70,7 +70,6 @@
70#include <sys/time.h>70#include <sys/time.h>
71#include <sys/queue.h> /* get TAILQ macros */71#include <sys/queue.h> /* get TAILQ macros */
72#ifdef BSD_KERN_PRIVATE72#ifdef BSD_KERN_PRIVATE
73#include <net/pktsched/pktsched.h>
74#include <sys/eventhandler.h>73#include <sys/eventhandler.h>
75#endif74#endif
7675
lib/libc/include/x86_64-macos-gnu/netinet/in.h+2-3
...@@ -63,14 +63,14 @@...@@ -63,14 +63,14 @@
6363
64#ifndef _NETINET_IN_H_64#ifndef _NETINET_IN_H_
65#define _NETINET_IN_H_65#define _NETINET_IN_H_
66
67#include <sys/appleapiopts.h>66#include <sys/appleapiopts.h>
67#include <sys/_types.h>
68#include <stdint.h> /* uint(8|16|32)_t */68#include <stdint.h> /* uint(8|16|32)_t */
6969
70#include <Availability.h>70#include <Availability.h>
7171
72
73#include <sys/_types/_in_addr_t.h>72#include <sys/_types/_in_addr_t.h>
73
74#include <sys/_types/_in_port_t.h>74#include <sys/_types/_in_port_t.h>
7575
76/*76/*
...@@ -435,7 +435,6 @@ struct ip_opts {...@@ -435,7 +435,6 @@ struct ip_opts {
435#define IP_PKTINFO 26 /* get pktinfo on recv socket, set src on sent dgram */435#define IP_PKTINFO 26 /* get pktinfo on recv socket, set src on sent dgram */
436#define IP_RECVPKTINFO IP_PKTINFO /* receive pktinfo w/dgram */436#define IP_RECVPKTINFO IP_PKTINFO /* receive pktinfo w/dgram */
437#define IP_RECVTOS 27 /* bool; receive IP TOS w/dgram */437#define IP_RECVTOS 27 /* bool; receive IP TOS w/dgram */
438#define IP_DONTFRAG 28 /* don't fragment packet */
439438
440#define IP_FW_ADD 40 /* add a firewall rule to chain */439#define IP_FW_ADD 40 /* add a firewall rule to chain */
441#define IP_FW_DEL 41 /* delete a firewall rule from chain */440#define IP_FW_DEL 41 /* delete a firewall rule from chain */
lib/libc/include/x86_64-macos-gnu/netinet/tcp.h+1-3
...@@ -63,13 +63,11 @@...@@ -63,13 +63,11 @@
6363
64#ifndef _NETINET_TCP_H_64#ifndef _NETINET_TCP_H_
65#define _NETINET_TCP_H_65#define _NETINET_TCP_H_
66#include <sys/types.h>
66#include <sys/appleapiopts.h>67#include <sys/appleapiopts.h>
67
68#include <machine/endian.h>68#include <machine/endian.h>
69#include <machine/types.h> /* __uint32_t */69#include <machine/types.h> /* __uint32_t */
7070
71#include <sys/types.h>
72
73#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)71#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
74typedef __uint32_t tcp_seq;72typedef __uint32_t tcp_seq;
75typedef __uint32_t tcp_cc; /* connection count per rfc1644 */73typedef __uint32_t tcp_cc; /* connection count per rfc1644 */
lib/libc/include/x86_64-macos-gnu/netinet6/in6.h+7-21
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright (c) 2008-2020 Apple Inc. All rights reserved.2 * Copyright (c) 2008-2018 Apple Inc. All rights reserved.
3 *3 *
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 *5 *
...@@ -98,7 +98,6 @@...@@ -98,7 +98,6 @@
98#ifndef _NETINET6_IN6_H_98#ifndef _NETINET6_IN6_H_
99#define _NETINET6_IN6_H_99#define _NETINET6_IN6_H_
100#include <sys/appleapiopts.h>100#include <sys/appleapiopts.h>
101
102#include <sys/_types.h>101#include <sys/_types.h>
103#include <sys/_types/_sa_family_t.h>102#include <sys/_types/_sa_family_t.h>
104103
...@@ -179,7 +178,6 @@ struct sockaddr_in6 {...@@ -179,7 +178,6 @@ struct sockaddr_in6 {
179178
180179
181180
182
183/*181/*
184 * Definition of some useful macros to handle IP6 addresses182 * Definition of some useful macros to handle IP6 addresses
185 */183 */
...@@ -208,7 +206,6 @@ struct sockaddr_in6 {...@@ -208,7 +206,6 @@ struct sockaddr_in6 {
208#define IN6ADDR_V4MAPPED_INIT \206#define IN6ADDR_V4MAPPED_INIT \
209 {{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \207 {{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
210 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }}}208 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }}}
211#define IN6ADDR_MULTICAST_PREFIX IN6MASK8
212#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */209#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */
213210
214extern const struct in6_addr in6addr_any;211extern const struct in6_addr in6addr_any;
...@@ -300,16 +297,6 @@ extern const struct in6_addr in6addr_linklocal_allv2routers;...@@ -300,16 +297,6 @@ extern const struct in6_addr in6addr_linklocal_allv2routers;
300 */297 */
301#define IN6_IS_ADDR_MULTICAST(a) ((a)->s6_addr[0] == 0xff)298#define IN6_IS_ADDR_MULTICAST(a) ((a)->s6_addr[0] == 0xff)
302299
303#define IPV6_ADDR_MC_FLAGS(a) ((a)->s6_addr[1] & 0xf0)
304
305#define IPV6_ADDR_MC_FLAGS_TRANSIENT 0x10
306#define IPV6_ADDR_MC_FLAGS_PREFIX 0x20
307#define IPV6_ADDR_MC_FLAGS_UNICAST_BASED (IPV6_ADDR_MC_FLAGS_TRANSIENT | IPV6_ADDR_MC_FLAGS_PREFIX)
308
309#define IN6_IS_ADDR_UNICAST_BASED_MULTICAST(a) \
310 (IN6_IS_ADDR_MULTICAST(a) && \
311 (IPV6_ADDR_MC_FLAGS(a) == IPV6_ADDR_MC_FLAGS_UNICAST_BASED))
312
313/*300/*
314 * Unique Local IPv6 Unicast Addresses (per RFC 4193)301 * Unique Local IPv6 Unicast Addresses (per RFC 4193)
315 */302 */
...@@ -324,9 +311,8 @@ extern const struct in6_addr in6addr_linklocal_allv2routers;...@@ -324,9 +311,8 @@ extern const struct in6_addr in6addr_linklocal_allv2routers;
324#define IN6_IS_ADDR_MC_NODELOCAL(a) \311#define IN6_IS_ADDR_MC_NODELOCAL(a) \
325 (IN6_IS_ADDR_MULTICAST(a) && \312 (IN6_IS_ADDR_MULTICAST(a) && \
326 (__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_NODELOCAL))313 (__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_NODELOCAL))
327#define IN6_IS_ADDR_MC_LINKLOCAL(a) \314#define IN6_IS_ADDR_MC_LINKLOCAL(a) \
328 (IN6_IS_ADDR_MULTICAST(a) && \315 (IN6_IS_ADDR_MULTICAST(a) && \
329 (IPV6_ADDR_MC_FLAGS(a) != IPV6_ADDR_MC_FLAGS_UNICAST_BASED) && \
330 (__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_LINKLOCAL))316 (__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_LINKLOCAL))
331#define IN6_IS_ADDR_MC_SITELOCAL(a) \317#define IN6_IS_ADDR_MC_SITELOCAL(a) \
332 (IN6_IS_ADDR_MULTICAST(a) && \318 (IN6_IS_ADDR_MULTICAST(a) && \
...@@ -383,9 +369,9 @@ extern const struct in6_addr in6addr_linklocal_allv2routers;...@@ -383,9 +369,9 @@ extern const struct in6_addr in6addr_linklocal_allv2routers;
383#define IPV6_SOCKOPT_RESERVED1 3 /* reserved for future use */369#define IPV6_SOCKOPT_RESERVED1 3 /* reserved for future use */
384#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */370#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */
385#define IPV6_UNICAST_HOPS 4 /* int; IP6 hops */371#define IPV6_UNICAST_HOPS 4 /* int; IP6 hops */
386#define IPV6_MULTICAST_IF 9 /* u_int; set/get IP6 multicast i/f */372#define IPV6_MULTICAST_IF 9 /* __uint8_t; set/get IP6 multicast i/f */
387#define IPV6_MULTICAST_HOPS 10 /* int; set/get IP6 multicast hops */373#define IPV6_MULTICAST_HOPS 10 /* __uint8_t; set/get IP6 multicast hops */
388#define IPV6_MULTICAST_LOOP 11 /* u_int; set/get IP6 mcast loopback */374#define IPV6_MULTICAST_LOOP 11 /* __uint8_t; set/get IP6 mcast loopback */
389#define IPV6_JOIN_GROUP 12 /* ip6_mreq; join a group membership */375#define IPV6_JOIN_GROUP 12 /* ip6_mreq; join a group membership */
390#define IPV6_LEAVE_GROUP 13 /* ip6_mreq; leave a group membership */376#define IPV6_LEAVE_GROUP 13 /* ip6_mreq; leave a group membership */
391377
...@@ -677,5 +663,5 @@ extern int inet6_rth_segments(const void *);...@@ -677,5 +663,5 @@ extern int inet6_rth_segments(const void *);
677extern struct in6_addr *inet6_rth_getaddr(const void *, int);663extern struct in6_addr *inet6_rth_getaddr(const void *, int);
678664
679__END_DECLS665__END_DECLS
680#endif /* PLATFORM_DriverKit */666#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */
681#endif /* !_NETINET6_IN6_H_ */667#endif /* !_NETINET6_IN6_H_ */
lib/libc/include/x86_64-macos-gnu/objc/objc-api.h-6
...@@ -96,12 +96,6 @@...@@ -96,12 +96,6 @@
96# define NS_ENFORCE_NSOBJECT_DESIGNATED_INITIALIZER 196# define NS_ENFORCE_NSOBJECT_DESIGNATED_INITIALIZER 1
97#endif97#endif
9898
99/* The arm64 ABI requires proper casting to ensure arguments are passed
100 * * correctly. */
101#if defined(__arm64__) && !__swift__
102# undef OBJC_OLD_DISPATCH_PROTOTYPES
103# define OBJC_OLD_DISPATCH_PROTOTYPES 0
104#endif
10599
106/* OBJC_OLD_DISPATCH_PROTOTYPES == 0 enforces the rule that the dispatch 100/* OBJC_OLD_DISPATCH_PROTOTYPES == 0 enforces the rule that the dispatch
107 * functions must be cast to an appropriate function pointer type. */101 * functions must be cast to an appropriate function pointer type. */
lib/libc/include/x86_64-macos-gnu/objc/runtime.h+38-33
...@@ -1765,6 +1765,43 @@ OBJC_EXPORT void objc_setHook_getClass(objc_hook_getClass _Nonnull newValue,...@@ -1765,6 +1765,43 @@ OBJC_EXPORT void objc_setHook_getClass(objc_hook_getClass _Nonnull newValue,
1765 OBJC_AVAILABLE(10.14.4, 12.2, 12.2, 5.2, 3.2);1765 OBJC_AVAILABLE(10.14.4, 12.2, 12.2, 5.2, 3.2);
1766#endif1766#endif
17671767
1768/**
1769 * Function type for a hook that assists objc_setAssociatedObject().
1770 *
1771 * @param object The source object for the association.
1772 * @param key The key for the association.
1773 * @param value The value to associate with the key key for object. Pass nil to clear an existing association.
1774 * @param policy The policy for the association. For possible values, see “Associative Object Behaviors.”
1775 *
1776 * @see objc_setAssociatedObject
1777 * @see objc_setHook_setAssociatedObject
1778 */
1779typedef void (*objc_hook_setAssociatedObject)(id _Nonnull object, const void * _Nonnull key,
1780 id _Nullable value, objc_AssociationPolicy policy);
1781
1782/**
1783 * Install a hook for objc_setAssociatedObject().
1784 *
1785 * @param newValue The hook function to install.
1786 * @param outOldValue The address of a function pointer variable. On return,
1787 * the old hook function is stored in the variable.
1788 *
1789 * @note The store to *outOldValue is thread-safe: the variable will be
1790 * updated before objc_setAssociatedObject() calls your new hook to read it,
1791 * even if your new hook is called from another thread before this
1792 * setter completes.
1793 * @note Your hook should always call the previous hook.
1794 *
1795 * @see objc_setAssociatedObject
1796 * @see objc_hook_setAssociatedObject
1797 */
1798#if !(TARGET_OS_OSX && __i386__)
1799#define OBJC_SETASSOCIATEDOBJECTHOOK_DEFINED 1
1800OBJC_EXPORT void objc_setHook_setAssociatedObject(objc_hook_setAssociatedObject _Nonnull newValue,
1801 objc_hook_setAssociatedObject _Nullable * _Nonnull outOldValue)
1802 OBJC_AVAILABLE(10.15, 13.0, 13.0, 6.0, 4.0);
1803#endif
1804
1768/**1805/**
1769 * Function type for a function that is called when an image is loaded.1806 * Function type for a function that is called when an image is loaded.
1770 *1807 *
...@@ -1792,39 +1829,7 @@ typedef void (*objc_func_loadImage)(const struct mach_header * _Nonnull header);...@@ -1792,39 +1829,7 @@ typedef void (*objc_func_loadImage)(const struct mach_header * _Nonnull header);
1792OBJC_EXPORT void objc_addLoadImageFunc(objc_func_loadImage _Nonnull func)1829OBJC_EXPORT void objc_addLoadImageFunc(objc_func_loadImage _Nonnull func)
1793 OBJC_AVAILABLE(10.15, 13.0, 13.0, 6.0, 4.0);1830 OBJC_AVAILABLE(10.15, 13.0, 13.0, 6.0, 4.0);
17941831
1795/**1832/**
1796 * Function type for a hook that provides a name for lazily named classes.
1797 *
1798 * @param cls The class to generate a name for.
1799 * @return The name of the class, or NULL if the name isn't known or can't me generated.
1800 *
1801 * @see objc_setHook_lazyClassNamer
1802 */
1803typedef const char * _Nullable (*objc_hook_lazyClassNamer)(_Nonnull Class cls);
1804
1805/**
1806 * Install a hook to provide a name for lazily-named classes.
1807 *
1808 * @param newValue The hook function to install.
1809 * @param outOldValue The address of a function pointer variable. On return,
1810 * the old hook function is stored in the variable.
1811 *
1812 * @note The store to *outOldValue is thread-safe: the variable will be
1813 * updated before objc_getClass() calls your new hook to read it,
1814 * even if your new hook is called from another thread before this
1815 * setter completes.
1816 * @note Your hook must call the previous hook for class names
1817 * that you do not recognize.
1818 */
1819#if !(TARGET_OS_OSX && __i386__)
1820#define OBJC_SETHOOK_LAZYCLASSNAMER_DEFINED 1
1821OBJC_EXPORT
1822void objc_setHook_lazyClassNamer(_Nonnull objc_hook_lazyClassNamer newValue,
1823 _Nonnull objc_hook_lazyClassNamer * _Nonnull oldOutValue)
1824 OBJC_AVAILABLE(11.0, 14.0, 14.0, 7.0, 5.0);
1825#endif
1826
1827/**
1828 * Callback from Objective-C to Swift to perform Swift class initialization.1833 * Callback from Objective-C to Swift to perform Swift class initialization.
1829 */1834 */
1830#if !(TARGET_OS_OSX && __i386__)1835#if !(TARGET_OS_OSX && __i386__)
lib/libc/include/x86_64-macos-gnu/os/base.h+30-27
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright (c) 2008-2020 Apple Inc. All rights reserved.2 * Copyright (c) 2008-2013 Apple Inc. All rights reserved.
3 *3 *
4 * @APPLE_APACHE_LICENSE_HEADER_START@4 * @APPLE_APACHE_LICENSE_HEADER_START@
5 *5 *
...@@ -23,7 +23,6 @@...@@ -23,7 +23,6 @@
2323
24#include <sys/cdefs.h>24#include <sys/cdefs.h>
2525
26
27#ifndef __has_builtin26#ifndef __has_builtin
28#define __has_builtin(x) 027#define __has_builtin(x) 0
29#endif28#endif
...@@ -74,7 +73,7 @@...@@ -74,7 +73,7 @@
74#define OS_ALWAYS_INLINE __attribute__((__always_inline__))73#define OS_ALWAYS_INLINE __attribute__((__always_inline__))
75#define OS_TRANSPARENT_UNION __attribute__((__transparent_union__))74#define OS_TRANSPARENT_UNION __attribute__((__transparent_union__))
76#define OS_ALIGNED(n) __attribute__((__aligned__((n))))75#define OS_ALIGNED(n) __attribute__((__aligned__((n))))
77#define OS_FORMAT_PRINTF(x, y) __attribute__((__format__(printf,x,y)))76#define OS_FORMAT_PRINTF(x,y) __attribute__((__format__(printf,x,y)))
78#define OS_EXPORT extern __attribute__((__visibility__("default")))77#define OS_EXPORT extern __attribute__((__visibility__("default")))
79#define OS_INLINE static __inline__78#define OS_INLINE static __inline__
80#define OS_EXPECT(x, v) __builtin_expect((x), (v))79#define OS_EXPECT(x, v) __builtin_expect((x), (v))
...@@ -111,7 +110,7 @@...@@ -111,7 +110,7 @@
111#define OS_ALWAYS_INLINE110#define OS_ALWAYS_INLINE
112#define OS_TRANSPARENT_UNION111#define OS_TRANSPARENT_UNION
113#define OS_ALIGNED(n)112#define OS_ALIGNED(n)
114#define OS_FORMAT_PRINTF(x, y)113#define OS_FORMAT_PRINTF(x,y)
115#define OS_EXPORT extern114#define OS_EXPORT extern
116#define OS_INLINE static inline115#define OS_INLINE static inline
117#define OS_EXPECT(x, v) (x)116#define OS_EXPECT(x, v) (x)
...@@ -125,8 +124,6 @@...@@ -125,8 +124,6 @@
125124
126#if defined(__cplusplus) && defined(__clang__)125#if defined(__cplusplus) && defined(__clang__)
127#define OS_FALLTHROUGH [[clang::fallthrough]]126#define OS_FALLTHROUGH [[clang::fallthrough]]
128#elif __has_attribute(fallthrough)
129#define OS_FALLTHROUGH __attribute__((__fallthrough__))
130#else127#else
131#define OS_FALLTHROUGH128#define OS_FALLTHROUGH
132#endif129#endif
...@@ -167,21 +164,30 @@...@@ -167,21 +164,30 @@
167 * -Wassign-enum prevents you from assigning illegal values to a variable of the164 * -Wassign-enum prevents you from assigning illegal values to a variable of the
168 * enum type.165 * enum type.
169 */166 */
167#ifndef __OPEN_SOURCE__
168/*!
169 * @internal
170 * <rdar://problem/37799789>
171 */
172#endif // __OPEN_SOURCE__
170#define __OS_OPTIONS_ATTR __attribute__((flag_enum))173#define __OS_OPTIONS_ATTR __attribute__((flag_enum))
171#else174#else
172#define __OS_OPTIONS_ATTR175#define __OS_OPTIONS_ATTR
173#endif // __has_attribute(flag_enum)176#endif // __has_attribute(flag_enum)
174177
175#if __has_feature(objc_fixed_enum) || __has_extension(cxx_fixed_enum) || \178#if __has_feature(objc_fixed_enum) || __has_extension(cxx_fixed_enum) || \
176 __has_extension(cxx_strong_enums)179 __has_extension(cxx_strong_enums)
177#define OS_ENUM(_name, _type, ...) \180#define OS_ENUM(_name, _type, ...) \
178 typedef enum : _type { __VA_ARGS__ } _name##_t181 typedef enum : _type { __VA_ARGS__ } _name##_t
179#define OS_CLOSED_ENUM(_name, _type, ...) \182#define OS_CLOSED_ENUM(_name, _type, ...) \
180 typedef enum : _type { __VA_ARGS__ } __OS_ENUM_ATTR_CLOSED _name##_t183 typedef enum : _type { __VA_ARGS__ } \
184 __OS_ENUM_ATTR_CLOSED _name##_t
181#define OS_OPTIONS(_name, _type, ...) \185#define OS_OPTIONS(_name, _type, ...) \
182 typedef enum : _type { __VA_ARGS__ } __OS_ENUM_ATTR __OS_OPTIONS_ATTR _name##_t186 typedef enum : _type { __VA_ARGS__ } \
187 __OS_ENUM_ATTR __OS_OPTIONS_ATTR _name##_t
183#define OS_CLOSED_OPTIONS(_name, _type, ...) \188#define OS_CLOSED_OPTIONS(_name, _type, ...) \
184 typedef enum : _type { __VA_ARGS__ } __OS_ENUM_ATTR_CLOSED __OS_OPTIONS_ATTR _name##_t189 typedef enum : _type { __VA_ARGS__ } \
190 __OS_ENUM_ATTR_CLOSED __OS_OPTIONS_ATTR _name##_t
185#else191#else
186/*!192/*!
187 * There is unfortunately no good way in plain C to have both fixed-type enums193 * There is unfortunately no good way in plain C to have both fixed-type enums
...@@ -214,25 +220,25 @@...@@ -214,25 +220,25 @@
214 * When compiling in ObjC or C++, both of the above assignments are illegal.220 * When compiling in ObjC or C++, both of the above assignments are illegal.
215 */221 */
216#define __OS_ENUM_C_FALLBACK(_name, _type, ...) \222#define __OS_ENUM_C_FALLBACK(_name, _type, ...) \
217 typedef _type _name##_t; enum _name { __VA_ARGS__ }223 typedef _type _name##_t; enum _name { __VA_ARGS__ }
218224
219#define OS_ENUM(_name, _type, ...) \225#define OS_ENUM(_name, _type, ...) \
220 typedef _type _name##_t; enum { __VA_ARGS__ }226 typedef _type _name##_t; enum { __VA_ARGS__ }
221#define OS_CLOSED_ENUM(_name, _type, ...) \227#define OS_CLOSED_ENUM(_name, _type, ...) \
222 __OS_ENUM_C_FALLBACK(_name, _type, ## __VA_ARGS__) \228 __OS_ENUM_C_FALLBACK(_name, _type, ## __VA_ARGS__) \
223 __OS_ENUM_ATTR_CLOSED229 __OS_ENUM_ATTR_CLOSED
224#define OS_OPTIONS(_name, _type, ...) \230#define OS_OPTIONS(_name, _type, ...) \
225 __OS_ENUM_C_FALLBACK(_name, _type, ## __VA_ARGS__) \231 __OS_ENUM_C_FALLBACK(_name, _type, ## __VA_ARGS__) \
226 __OS_ENUM_ATTR __OS_OPTIONS_ATTR232 __OS_ENUM_ATTR __OS_OPTIONS_ATTR
227#define OS_CLOSED_OPTIONS(_name, _type, ...) \233#define OS_CLOSED_OPTIONS(_name, _type, ...) \
228 __OS_ENUM_C_FALLBACK(_name, _type, ## __VA_ARGS__) \234 __OS_ENUM_C_FALLBACK(_name, _type, ## __VA_ARGS__) \
229 __OS_ENUM_ATTR_CLOSED __OS_OPTIONS_ATTR235 __OS_ENUM_ATTR_CLOSED __OS_OPTIONS_ATTR
230#endif // __has_feature(objc_fixed_enum) || __has_extension(cxx_strong_enums)236#endif // __has_feature(objc_fixed_enum) || __has_extension(cxx_strong_enums)
231237
232#if __has_feature(attribute_availability_swift)238#if __has_feature(attribute_availability_swift)
233// equivalent to __SWIFT_UNAVAILABLE from Availability.h239// equivalent to __SWIFT_UNAVAILABLE from Availability.h
234#define OS_SWIFT_UNAVAILABLE(_msg) \240#define OS_SWIFT_UNAVAILABLE(_msg) \
235 __attribute__((__availability__(swift, unavailable, message=_msg)))241 __attribute__((__availability__(swift, unavailable, message=_msg)))
236#else242#else
237#define OS_SWIFT_UNAVAILABLE(_msg)243#define OS_SWIFT_UNAVAILABLE(_msg)
238#endif244#endif
...@@ -256,12 +262,12 @@...@@ -256,12 +262,12 @@
256262
257#ifdef __GNUC__263#ifdef __GNUC__
258#define os_prevent_tail_call_optimization() __asm__("")264#define os_prevent_tail_call_optimization() __asm__("")
259#define os_is_compile_time_constant(expr) __builtin_constant_p(expr)265#define os_is_compile_time_constant(expr) __builtin_constant_p(expr)
260#define os_compiler_barrier() __asm__ __volatile__("" ::: "memory")266#define os_compiler_barrier() __asm__ __volatile__("" ::: "memory")
261#else267#else
262#define os_prevent_tail_call_optimization() do { } while (0)268#define os_prevent_tail_call_optimization() do { } while (0)
263#define os_is_compile_time_constant(expr) 0269#define os_is_compile_time_constant(expr) 0
264#define os_compiler_barrier() do { } while (0)270#define os_compiler_barrier() do { } while (0)
265#endif271#endif
266272
267#if __has_attribute(not_tail_called)273#if __has_attribute(not_tail_called)
...@@ -270,7 +276,6 @@...@@ -270,7 +276,6 @@
270#define OS_NOT_TAIL_CALLED276#define OS_NOT_TAIL_CALLED
271#endif277#endif
272278
273
274typedef void (*os_function_t)(void *_Nullable);279typedef void (*os_function_t)(void *_Nullable);
275280
276#ifdef __BLOCKS__281#ifdef __BLOCKS__
...@@ -317,6 +322,4 @@ typedef void (*os_function_t)(void *_Nullable);...@@ -317,6 +322,4 @@ typedef void (*os_function_t)(void *_Nullable);
317typedef void (^os_block_t)(void);322typedef void (^os_block_t)(void);
318#endif323#endif
319324
320
321
322#endif // __OS_BASE__325#endif // __OS_BASE__
lib/libc/include/x86_64-macos-gnu/os/clock.h deleted-18
...@@ -1,18 +0,0 @@
1#ifndef __OS_CLOCK__
2#define __OS_CLOCK__
3
4#include <os/base.h>
5#include <stdint.h>
6
7/*
8 * @typedef os_clockid_t
9 *
10 * @abstract
11 * Describes the kind of clock that the workgroup timestamp parameters are
12 * specified in
13 */
14OS_ENUM(os_clockid, uint32_t,
15 OS_CLOCK_MACH_ABSOLUTE_TIME = 32,
16);
17
18#endif /* __OS_CLOCK__ */
lib/libc/include/x86_64-macos-gnu/os/object.h+6-38
...@@ -98,15 +98,6 @@...@@ -98,15 +98,6 @@
98#endif // __swift__98#endif // __swift__
99#endif // OS_OBJECT_SWIFT399#endif // OS_OBJECT_SWIFT3
100100
101#if __has_feature(assume_nonnull)
102#define OS_OBJECT_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin")
103#define OS_OBJECT_ASSUME_NONNULL_END _Pragma("clang assume_nonnull end")
104#else
105#define OS_OBJECT_ASSUME_NONNULL_BEGIN
106#define OS_OBJECT_ASSUME_NONNULL_END
107#endif
108#define OS_OBJECT_WARN_UNUSED_RESULT __attribute__((__warn_unused_result__))
109
110#if OS_OBJECT_USE_OBJC101#if OS_OBJECT_USE_OBJC
111#import <objc/NSObject.h>102#import <objc/NSObject.h>
112#if __has_attribute(objc_independent_class)103#if __has_attribute(objc_independent_class)
...@@ -125,9 +116,9 @@...@@ -125,9 +116,9 @@
125#define OS_OBJECT_CLASS_IMPLEMENTS_PROTOCOL(name, proto) \116#define OS_OBJECT_CLASS_IMPLEMENTS_PROTOCOL(name, proto) \
126 OS_OBJECT_CLASS_IMPLEMENTS_PROTOCOL_IMPL( \117 OS_OBJECT_CLASS_IMPLEMENTS_PROTOCOL_IMPL( \
127 OS_OBJECT_CLASS(name), OS_OBJECT_CLASS(proto))118 OS_OBJECT_CLASS(name), OS_OBJECT_CLASS(proto))
128#define OS_OBJECT_DECL_IMPL(name, adhere, ...) \119#define OS_OBJECT_DECL_IMPL(name, ...) \
129 OS_OBJECT_DECL_PROTOCOL(name, __VA_ARGS__) \120 OS_OBJECT_DECL_PROTOCOL(name, __VA_ARGS__) \
130 typedef adhere<OS_OBJECT_CLASS(name)> \121 typedef NSObject<OS_OBJECT_CLASS(name)> \
131 * OS_OBJC_INDEPENDENT_CLASS name##_t122 * OS_OBJC_INDEPENDENT_CLASS name##_t
132#define OS_OBJECT_DECL_BASE(name, ...) \123#define OS_OBJECT_DECL_BASE(name, ...) \
133 @interface OS_OBJECT_CLASS(name) : __VA_ARGS__ \124 @interface OS_OBJECT_CLASS(name) : __VA_ARGS__ \
...@@ -138,9 +129,9 @@...@@ -138,9 +129,9 @@
138 typedef OS_OBJECT_CLASS(name) \129 typedef OS_OBJECT_CLASS(name) \
139 * OS_OBJC_INDEPENDENT_CLASS name##_t130 * OS_OBJC_INDEPENDENT_CLASS name##_t
140#define OS_OBJECT_DECL(name, ...) \131#define OS_OBJECT_DECL(name, ...) \
141 OS_OBJECT_DECL_IMPL(name, NSObject, <NSObject>)132 OS_OBJECT_DECL_IMPL(name, <NSObject>)
142#define OS_OBJECT_DECL_SUBCLASS(name, super) \133#define OS_OBJECT_DECL_SUBCLASS(name, super) \
143 OS_OBJECT_DECL_IMPL(name, NSObject, <OS_OBJECT_CLASS(super)>)134 OS_OBJECT_DECL_IMPL(name, <OS_OBJECT_CLASS(super)>)
144#if __has_attribute(ns_returns_retained)135#if __has_attribute(ns_returns_retained)
145#define OS_OBJECT_RETURNS_RETAINED __attribute__((__ns_returns_retained__))136#define OS_OBJECT_RETURNS_RETAINED __attribute__((__ns_returns_retained__))
146#else137#else
...@@ -158,8 +149,6 @@...@@ -158,8 +149,6 @@
158#define OS_OBJECT_BRIDGE149#define OS_OBJECT_BRIDGE
159#define OS_WARN_RESULT_NEEDS_RELEASE OS_WARN_RESULT150#define OS_WARN_RESULT_NEEDS_RELEASE OS_WARN_RESULT
160#endif151#endif
161
162
163#if __has_attribute(objc_runtime_visible) && \152#if __has_attribute(objc_runtime_visible) && \
164 ((defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && \153 ((defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && \
165 __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_12) || \154 __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_12) || \
...@@ -174,7 +163,7 @@...@@ -174,7 +163,7 @@
174/*163/*
175 * To provide backward deployment of ObjC objects in Swift on pre-10.12164 * To provide backward deployment of ObjC objects in Swift on pre-10.12
176 * SDKs, OS_object classes can be marked as OS_OBJECT_OBJC_RUNTIME_VISIBLE.165 * SDKs, OS_object classes can be marked as OS_OBJECT_OBJC_RUNTIME_VISIBLE.
177 * When compiling with a deployment target earlier than OS X 10.12 (iOS 10.0,166 * When compiling with a deployment target earlier than OS X 10.12 (iOS 10.0,
178 * tvOS 10.0, watchOS 3.0) the Swift compiler will only refer to this type at167 * tvOS 10.0, watchOS 3.0) the Swift compiler will only refer to this type at
179 * runtime (using the ObjC runtime).168 * runtime (using the ObjC runtime).
180 */169 */
...@@ -198,9 +187,9 @@...@@ -198,9 +187,9 @@
198#define OS_OBJECT_DECL_SUBCLASS_SWIFT(name, super) \187#define OS_OBJECT_DECL_SUBCLASS_SWIFT(name, super) \
199 OS_EXPORT OS_OBJECT_OBJC_RUNTIME_VISIBLE \188 OS_EXPORT OS_OBJECT_OBJC_RUNTIME_VISIBLE \
200 OS_OBJECT_DECL_IMPL_CLASS(name, OS_OBJECT_CLASS(super))189 OS_OBJECT_DECL_IMPL_CLASS(name, OS_OBJECT_CLASS(super))
201#endif // OS_OBJECT_SWIFT3
202OS_EXPORT OS_OBJECT_OBJC_RUNTIME_VISIBLE190OS_EXPORT OS_OBJECT_OBJC_RUNTIME_VISIBLE
203OS_OBJECT_DECL_BASE(object, NSObject);191OS_OBJECT_DECL_BASE(object, NSObject);
192#endif // OS_OBJECT_SWIFT3
204#else193#else
205/*! @parseOnly */194/*! @parseOnly */
206#define OS_OBJECT_RETURNS_RETAINED195#define OS_OBJECT_RETURNS_RETAINED
...@@ -226,27 +215,6 @@ OS_OBJECT_DECL_BASE(object, NSObject);...@@ -226,27 +215,6 @@ OS_OBJECT_DECL_BASE(object, NSObject);
226 typedef struct name##_s *name##_t215 typedef struct name##_s *name##_t
227#endif216#endif
228217
229#if OS_OBJECT_USE_OBJC
230/* Declares a class of the specific name and exposes the interface and typedefs
231 * name##_t to the pointer to the class */
232#define OS_OBJECT_SHOW_CLASS(name, ...) \
233 OS_EXPORT OS_OBJECT_OBJC_RUNTIME_VISIBLE \
234 OS_OBJECT_DECL_IMPL_CLASS(name, ## __VA_ARGS__ )
235/* Declares a subclass of the same name, and
236 * subclass adheres to protocol specified. Typedefs baseclass<proto> * to subclass##_t */
237#define OS_OBJECT_SHOW_SUBCLASS(subclass_name, super, proto_name) \
238 OS_EXPORT OS_OBJECT_OBJC_RUNTIME_VISIBLE \
239 OS_OBJECT_DECL_BASE(subclass_name, OS_OBJECT_CLASS(super)<OS_OBJECT_CLASS(proto_name)>); \
240 typedef OS_OBJECT_CLASS(super)<OS_OBJECT_CLASS(proto_name)> \
241 * OS_OBJC_INDEPENDENT_CLASS subclass_name##_t
242#else /* Plain C */
243#define OS_OBJECT_DECL_PROTOCOL(name, ...)
244#define OS_OBJECT_SHOW_CLASS(name, ...) \
245 typedef struct name##_s *name##_t
246#define OS_OBJECT_SHOW_SUBCLASS(name, super, ...) \
247 typedef super##_t name##_t
248#endif
249
250#define OS_OBJECT_GLOBAL_OBJECT(type, object) ((OS_OBJECT_BRIDGE type)&(object))218#define OS_OBJECT_GLOBAL_OBJECT(type, object) ((OS_OBJECT_BRIDGE type)&(object))
251219
252__BEGIN_DECLS220__BEGIN_DECLS
lib/libc/include/x86_64-macos-gnu/os/workgroup.h deleted-37
...@@ -1,37 +0,0 @@
1/*
2 * Copyright (c) 2020 Apple Inc. All rights reserved.
3 *
4 * @APPLE_APACHE_LICENSE_HEADER_START@
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 * @APPLE_APACHE_LICENSE_HEADER_END@
19 */
20
21#ifndef __OS_WORKGROUP__
22#define __OS_WORKGROUP__
23
24#ifndef __DISPATCH_BUILDING_DISPATCH__
25#ifndef __OS_WORKGROUP_INDIRECT__
26#define __OS_WORKGROUP_INDIRECT__
27#endif /* __OS_WORKGROUP_INDIRECT__ */
28
29#include <os/workgroup_base.h>
30#include <os/workgroup_object.h>
31#include <os/workgroup_interval.h>
32#include <os/workgroup_parallel.h>
33
34#undef __OS_WORKGROUP_INDIRECT__
35#endif /* __DISPATCH_BUILDING_DISPATCH__ */
36
37#endif /* __OS_WORKGROUP__ */
lib/libc/include/x86_64-macos-gnu/os/workgroup_base.h deleted-78
...@@ -1,78 +0,0 @@
1#ifndef __OS_WORKGROUP_BASE__
2#define __OS_WORKGROUP_BASE__
3
4#ifndef __OS_WORKGROUP_INDIRECT__
5#error "Please #include <os/workgroup.h> instead of this file directly."
6#endif
7
8#include <sys/types.h>
9#include <stddef.h>
10#include <stdint.h>
11#include <stdbool.h>
12#include <string.h>
13#include <stdlib.h>
14
15#include <mach/port.h>
16
17#include <Availability.h>
18#include <os/base.h>
19#include <os/object.h>
20#include <os/clock.h>
21
22#if __has_feature(assume_nonnull)
23#define OS_WORKGROUP_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin")
24#define OS_WORKGROUP_ASSUME_NONNULL_END _Pragma("clang assume_nonnull end")
25#else
26#define OS_WORKGROUP_ASSUME_NONNULL_BEGIN
27#define OS_WORKGROUP_ASSUME_NONNULL_END
28#endif
29#define OS_WORKGROUP_WARN_RESULT __attribute__((__warn_unused_result__))
30#define OS_WORKGROUP_EXPORT OS_EXPORT
31#define OS_WORKGROUP_RETURNS_RETAINED OS_OBJECT_RETURNS_RETAINED
32
33#define OS_WORKGROUP_DECL(name, swift_name) \
34 OS_SWIFT_NAME(swift_name) \
35 OS_OBJECT_SHOW_CLASS(name, OS_OBJECT_CLASS(object))
36
37#if OS_OBJECT_USE_OBJC
38#define OS_WORKGROUP_SUBCLASS_DECL_PROTO(name, swift_name, ...) \
39 OS_SWIFT_NAME(swift_name) \
40 OS_OBJECT_DECL_PROTOCOL(name ## __VA_ARGS__ )
41#else
42#define OS_WORKGROUP_SUBCLASS_DECL_PROTO(name, swift_name, ...)
43#endif
44
45#define OS_WORKGROUP_SUBCLASS_DECL(name, super, swift_name, ...) \
46 OS_SWIFT_NAME(swift_name) \
47 OS_OBJECT_SHOW_SUBCLASS(name, super, name, ## __VA_ARGS__)
48
49#if defined(__LP64__)
50#define __OS_WORKGROUP_ATTR_SIZE__ 60
51#define __OS_WORKGROUP_INTERVAL_DATA_SIZE__ 56
52#define __OS_WORKGROUP_JOIN_TOKEN_SIZE__ 36
53#else
54#define __OS_WORKGROUP_ATTR_SIZE__ 60
55#define __OS_WORKGROUP_INTERVAL_DATA_SIZE__ 56
56#define __OS_WORKGROUP_JOIN_TOKEN_SIZE__ 28
57#endif
58
59#define _OS_WORKGROUP_ATTR_SIG_DEFAULT_INIT 0x2FA863B4
60#define _OS_WORKGROUP_ATTR_SIG_EMPTY_INIT 0x2FA863C4
61
62struct OS_REFINED_FOR_SWIFT os_workgroup_attr_opaque_s {
63 uint32_t sig;
64 char opaque[__OS_WORKGROUP_ATTR_SIZE__];
65};
66
67#define _OS_WORKGROUP_INTERVAL_DATA_SIG_INIT 0x52A74C4D
68struct OS_REFINED_FOR_SWIFT os_workgroup_interval_data_opaque_s {
69 uint32_t sig;
70 char opaque[__OS_WORKGROUP_INTERVAL_DATA_SIZE__];
71};
72
73struct OS_REFINED_FOR_SWIFT os_workgroup_join_token_opaque_s {
74 uint32_t sig;
75 char opaque[__OS_WORKGROUP_JOIN_TOKEN_SIZE__];
76};
77
78#endif /* __OS_WORKGROUP_BASE__ */
lib/libc/include/x86_64-macos-gnu/os/workgroup_interval.h deleted-155
...@@ -1,155 +0,0 @@
1/*
2 * Copyright (c) 2020 Apple Inc. All rights reserved.
3 *
4 * @APPLE_APACHE_LICENSE_HEADER_START@
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 * @APPLE_APACHE_LICENSE_HEADER_END@
19 */
20
21#ifndef __OS_WORKGROUP_INTERVAL__
22#define __OS_WORKGROUP_INTERVAL__
23
24#ifndef __OS_WORKGROUP_INDIRECT__
25#error "Please #include <os/workgroup.h> instead of this file directly."
26#include <os/workgroup_base.h> // For header doc
27#endif
28
29__BEGIN_DECLS
30
31OS_WORKGROUP_ASSUME_NONNULL_BEGIN
32
33/*!
34 * @typedef os_workgroup_interval_t
35 *
36 * @abstract
37 * A subclass of an os_workgroup_t for tracking work performed as part of
38 * a repeating interval-driven workload.
39 */
40OS_WORKGROUP_SUBCLASS_DECL_PROTO(os_workgroup_interval, Repeatable);
41OS_WORKGROUP_SUBCLASS_DECL(os_workgroup_interval, os_workgroup, WorkGroupInterval);
42
43/* During the first instance of this API, the only supported interval
44 * workgroups are for audio workloads. Please refer to the AudioToolbox
45 * framework for more information.
46 */
47
48/*
49 * @typedef os_workgroup_interval_data, os_workgroup_interval_data_t
50 *
51 * @abstract
52 * An opaque structure containing additional configuration for the workgroup
53 * interval.
54 */
55typedef struct os_workgroup_interval_data_opaque_s os_workgroup_interval_data_s;
56typedef struct os_workgroup_interval_data_opaque_s *os_workgroup_interval_data_t;
57#define OS_WORKGROUP_INTERVAL_DATA_INITIALIZER \
58 { .sig = _OS_WORKGROUP_INTERVAL_DATA_SIG_INIT }
59
60/*!
61 * @function os_workgroup_interval_start
62 *
63 * @abstract
64 * Indicates to the system that the member threads of this
65 * os_workgroup_interval_t have begun working on an instance of the repeatable
66 * interval workload with the specified timestamps. This function is real time
67 * safe.
68 *
69 * This function will set and return an errno in the following cases:
70 *
71 * - The current thread is not a member of the os_workgroup_interval_t
72 * - The os_workgroup_interval_t has been cancelled
73 * - The timestamps passed in are malformed
74 * - os_workgroup_interval_start() was previously called on the
75 * os_workgroup_interval_t without an intervening os_workgroup_interval_finish()
76 * - A concurrent workgroup interval configuration operation is taking place.
77 *
78 * @param start
79 * Start timestamp specified in the os_clockid_t with which the
80 * os_workgroup_interval_t was created. This is generally a time in the past and
81 * indicates when the workgroup started working on an interval period
82 *
83 * @param deadline
84 * Deadline timestamp specified in the os_clockid_t with which the
85 * os_workgroup_interval_t was created. This specifies the deadline which the
86 * interval period would like to meet.
87 *
88 * @param data
89 * This field is currently unused and should be NULL
90 */
91API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))
92OS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT OS_WORKGROUP_WARN_RESULT
93int
94os_workgroup_interval_start(os_workgroup_interval_t wg, uint64_t start, uint64_t
95 deadline, os_workgroup_interval_data_t _Nullable data);
96
97/*!
98 * @function os_workgroup_interval_update
99 *
100 * @abstract
101 * Updates an already started interval workgroup to have the new
102 * deadline specified. This function is real time safe.
103 *
104 * This function will return an error in the following cases:
105 * - The current thread is not a member of the os_workgroup_interval_t
106 * - The os_workgroup_interval_t has been cancelled
107 * - The timestamp passed in is malformed
108 * - os_workgroup_interval_start() was not previously called on the
109 * os_workgroup_interval_t or was already matched with an
110 * os_workgroup_interval_finish()
111 * - A concurrent workgroup interval configuration operation is taking place
112 *
113 * @param deadline
114 * Timestamp specified in the os_clockid_t with
115 * which the os_workgroup_interval_t was created.
116 *
117 * @param data
118 * This field is currently unused and should be NULL
119 */
120API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))
121OS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT OS_WORKGROUP_WARN_RESULT
122int
123os_workgroup_interval_update(os_workgroup_interval_t wg, uint64_t deadline,
124 os_workgroup_interval_data_t _Nullable data);
125
126/*!
127 * @function os_workgroup_interval_finish
128 *
129 * @abstract
130 * Indicates to the system that the member threads of
131 * this os_workgroup_interval_t have finished working on the current instance
132 * of the interval workload. This function is real time safe.
133 *
134 * This function will return an error in the following cases:
135 * - The current thread is not a member of the os_workgroup_interval_t
136 * - os_workgroup_interval_start() was not previously called on the
137 * os_workgroup_interval_t or was already matched with an
138 * os_workgroup_interval_finish()
139 * - A concurrent workgroup interval configuration operation is taking place.
140 *
141 * @param data
142 * This field is currently unused and should be NULL
143 *
144 */
145API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))
146OS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT OS_WORKGROUP_WARN_RESULT
147int
148os_workgroup_interval_finish(os_workgroup_interval_t wg,
149 os_workgroup_interval_data_t _Nullable data);
150
151OS_WORKGROUP_ASSUME_NONNULL_END
152
153__END_DECLS
154
155#endif /* __OS_WORKGROUP_INTERVAL__ */
lib/libc/include/x86_64-macos-gnu/os/workgroup_object.h deleted-357
...@@ -1,357 +0,0 @@
1/*
2 * Copyright (c) 2020 Apple Inc. All rights reserved.
3 *
4 * @APPLE_APACHE_LICENSE_HEADER_START@
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 * @APPLE_APACHE_LICENSE_HEADER_END@
19 */
20
21#ifndef __OS_WORKGROUP_OBJECT__
22#define __OS_WORKGROUP_OBJECT__
23
24#ifndef __OS_WORKGROUP_INDIRECT__
25#error "Please #include <os/workgroup.h> instead of this file directly."
26#include <os/workgroup_base.h> // For header doc
27#endif
28
29__BEGIN_DECLS
30
31OS_WORKGROUP_ASSUME_NONNULL_BEGIN
32
33/*!
34 * @typedef os_workgroup_t
35 *
36 * @abstract
37 * A reference counted os object representing a workload that needs to
38 * be distinctly recognized and tracked by the system. The workgroup
39 * tracks a collection of threads all working cooperatively. An os_workgroup
40 * object - when not an instance of a specific os_workgroup_t subclass -
41 * represents a generic workload and makes no assumptions about the kind of
42 * work done.
43 *
44 * @discussion
45 * Threads can explicitly join an os_workgroup_t to mark themselves as
46 * participants in the workload.
47 */
48OS_WORKGROUP_DECL(os_workgroup, WorkGroup);
49
50
51/* Attribute creation and specification */
52
53/*!
54 * @typedef os_workgroup_attr_t
55 *
56 * @abstract
57 * Pointer to an opaque structure for describing attributes that can be
58 * configured on a workgroup at creation.
59 */
60typedef struct os_workgroup_attr_opaque_s os_workgroup_attr_s;
61typedef struct os_workgroup_attr_opaque_s *os_workgroup_attr_t;
62
63/* os_workgroup_t attributes need to be initialized before use. This initializer
64 * allows you to create a workgroup with the system default attributes. */
65#define OS_WORKGROUP_ATTR_INITIALIZER_DEFAULT \
66 { .sig = _OS_WORKGROUP_ATTR_SIG_DEFAULT_INIT }
67
68
69
70/* The main use of the workgroup API is through instantiations of the concrete
71 * subclasses - please refer to os/workgroup_interval.h and
72 * os/workgroup_parallel.h for more information on creating workgroups.
73 *
74 * The functions below operate on all subclasses of os_workgroup_t.
75 */
76
77/*!
78 * @function os_workgroup_copy_port
79 *
80 * @abstract
81 * Returns a reference to a send right representing this workgroup that is to be
82 * sent to other processes. This port is to be passed to
83 * os_workgroup_create_with_port() to create a workgroup object.
84 *
85 * It is the client's responsibility to release the send right reference.
86 *
87 * If an error is encountered, errno is set and returned.
88 */
89API_AVAILABLE(macos(11.0))
90API_UNAVAILABLE(ios, tvos, watchos)
91OS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT OS_WORKGROUP_WARN_RESULT
92int
93os_workgroup_copy_port(os_workgroup_t wg, mach_port_t *mach_port_out);
94
95/*!
96 * @function os_workgroup_create_with_port
97 *
98 * @abstract
99 * Create an os_workgroup_t object from a send right returned by a previous
100 * call to os_workgroup_copy_port, potentially in a different process.
101 *
102 * A newly created os_workgroup_t has no initial member threads - in particular
103 * the creating thread does not join the os_workgroup_t implicitly.
104 *
105 * @param name
106 * A client specified string for labelling the workgroup. This parameter is
107 * optional and can be NULL.
108 *
109 * @param mach_port
110 * The send right to create the workgroup from. No reference is consumed
111 * on the specified send right.
112 */
113API_AVAILABLE(macos(11.0))
114API_UNAVAILABLE(ios, tvos, watchos)
115OS_SWIFT_NAME(WorkGroup.init(__name:port:)) OS_WORKGROUP_EXPORT OS_WORKGROUP_RETURNS_RETAINED
116os_workgroup_t _Nullable
117os_workgroup_create_with_port(const char *_Nullable name, mach_port_t mach_port);
118
119/*!
120 * @function os_workgroup_create_with_workgroup
121 *
122 * @abstract
123 * Create a new os_workgroup object from an existing os_workgroup.
124 *
125 * The newly created os_workgroup has no initial member threads - in particular
126 * the creating threaad does not join the os_workgroup_t implicitly.
127 *
128 * @param name
129 * A client specified string for labelling the workgroup. This parameter is
130 * optional and can be NULL.
131 *
132 * @param wg
133 * The existing workgroup to create a new workgroup object from.
134 */
135API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))
136OS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT OS_WORKGROUP_RETURNS_RETAINED
137os_workgroup_t _Nullable
138os_workgroup_create_with_workgroup(const char * _Nullable name, os_workgroup_t wg);
139
140/*!
141 * @typedef os_workgroup_join_token, os_workgroup_join_token_t
142 *
143 * @abstract
144 * An opaque join token which the client needs to pass to os_workgroup_join
145 * and os_workgroup_leave
146 */
147OS_REFINED_FOR_SWIFT
148typedef struct os_workgroup_join_token_opaque_s os_workgroup_join_token_s;
149OS_REFINED_FOR_SWIFT
150typedef struct os_workgroup_join_token_opaque_s *os_workgroup_join_token_t;
151
152
153/*!
154 * @function os_workgroup_join
155 *
156 * @abstract
157 * Joins the current thread to the specified workgroup and populates the join
158 * token that has been passed in. This API is real-time safe.
159 *
160 * @param wg
161 * The workgroup that the current thread would like to join
162 *
163 * @param token_out
164 * Pointer to a client allocated struct which the function will populate
165 * with the join token. This token must be passed in by the thread when it calls
166 * os_workgroup_leave().
167 *
168 * Errors will be returned in the following cases:
169 *
170 * EALREADY The thread is already part of a workgroup that the specified
171 * workgroup does not nest with
172 * EINVAL The workgroup has been cancelled
173 */
174API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))
175OS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT OS_WORKGROUP_WARN_RESULT
176int
177os_workgroup_join(os_workgroup_t wg, os_workgroup_join_token_t token_out);
178
179/*!
180 * @function os_workgroup_leave
181 *
182 * @abstract
183 * This removes the current thread from a workgroup it has previously
184 * joined. Threads must leave all workgroups in the reverse order that they
185 * have joined them. Failing to do so before exiting will result in undefined
186 * behavior.
187 *
188 * If the join token is malformed, the process will be aborted.
189 *
190 * This API is real time safe.
191 *
192 * @param wg
193 * The workgroup that the current thread would like to leave.
194 *
195 * @param token
196 * This is the join token populated by the most recent call to
197 * os_workgroup_join().
198 */
199API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))
200OS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT
201void
202os_workgroup_leave(os_workgroup_t wg, os_workgroup_join_token_t token);
203
204/* Working Arena index of a thread in a workgroup */
205typedef uint32_t os_workgroup_index;
206/* Destructor for Working Arena */
207typedef void (*os_workgroup_working_arena_destructor_t)(void * _Nullable);
208
209/*!
210 * @function os_workgroup_set_working_arena
211 *
212 * @abstract
213 * Associates a client defined working arena with the workgroup. The arena
214 * is local to the workgroup object in the process. This is intended for
215 * distributing a manually managed memory allocation between member threads
216 * of the workgroup.
217 *
218 * This function can be called multiple times and the client specified
219 * destructor will be called on the previously assigned arena, if any. This
220 * function can only be called when no threads have currently joined the
221 * workgroup and all workloops associated with the workgroup are idle.
222 *
223 * @param wg
224 * The workgroup to associate the working arena with
225 *
226 * @param arena
227 * The client managed arena to associate with the workgroup. This value can
228 * be NULL.
229 *
230 * @param max_workers
231 * The maximum number of threads that will ever query the workgroup for the
232 * arena and request an index into it. If the arena is not used to partition
233 * work amongst member threads, then this field can be 0.
234 *
235 * @param destructor
236 * A destructor to call on the previously assigned working arena, if any
237 */
238API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))
239OS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT OS_WORKGROUP_WARN_RESULT
240int
241os_workgroup_set_working_arena(os_workgroup_t wg, void * _Nullable arena,
242 uint32_t max_workers, os_workgroup_working_arena_destructor_t destructor);
243
244/*!
245 * @function os_workgroup_get_working_arena
246 *
247 * @abstract
248 * Returns the working arena associated with the workgroup and the current
249 * thread's index in the workgroup. This function can only be called by a member
250 * of the workgroup. Multiple calls to this API by a member thread will return
251 * the same arena and index until the thread leaves the workgroup.
252 *
253 * For workloops with an associated workgroup, every work item on the workloop
254 * will receive the same index in the arena.
255 *
256 * This method returns NULL if no arena is set on the workgroup. The index
257 * returned by this function is zero-based and is namespaced per workgroup
258 * object in the process. The indices provided are strictly monotonic and never
259 * reused until a future call to os_workgroup_set_working_arena.
260 *
261 * @param wg
262 * The workgroup to get the working arena from.
263 *
264 * @param index_out
265 * A pointer to a os_workgroup_index which will be populated by the caller's
266 * index in the workgroup.
267 */
268API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))
269OS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT
270void * _Nullable
271os_workgroup_get_working_arena(os_workgroup_t wg,
272 os_workgroup_index * _Nullable index_out);
273
274/*!
275 * @function os_workgroup_cancel
276 *
277 * @abstract
278 * This API invalidates a workgroup and indicates to the system that the
279 * workload is no longer relevant to the caller.
280 *
281 * No new work should be initiated for a cancelled workgroup and
282 * work that is already underway should periodically check for
283 * cancellation with os_workgroup_testcancel and initiate cleanup if needed.
284 *
285 * Threads currently in the workgroup continue to be tracked together but no
286 * new threads may join this workgroup - the only possible operation allowed is
287 * to leave the workgroup. Other actions may have undefined behavior or
288 * otherwise fail.
289 *
290 * This API is idempotent. Cancellation is local to the workgroup object
291 * it is called on and does not affect other workgroups.
292 *
293 * @param wg
294 * The workgroup that that the thread would like to cancel
295 */
296API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))
297OS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT
298void
299os_workgroup_cancel(os_workgroup_t wg);
300
301/*!
302 * @function os_workgroup_testcancel
303 *
304 * @abstract
305 * Returns true if the workgroup object has been cancelled. See also
306 * os_workgroup_cancel
307 */
308API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))
309OS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT
310bool
311os_workgroup_testcancel(os_workgroup_t wg);
312
313/*!
314 * @typedef os_workgroup_max_parallel_threads_attr_t
315 *
316 * @abstract
317 * A pointer to a structure describing the set of properties of a workgroup to
318 * override with the explicitly specified values in the structure.
319 *
320 * See also os_workgroup_max_parallel_threads.
321 */
322OS_REFINED_FOR_SWIFT
323typedef struct os_workgroup_max_parallel_threads_attr_s os_workgroup_mpt_attr_s;
324OS_REFINED_FOR_SWIFT
325typedef struct os_workgroup_max_parallel_threads_attr_s *os_workgroup_mpt_attr_t;
326
327/*!
328 * @function os_workgroup_max_parallel_threads
329 *
330 * @abstract
331 * Returns the system's recommendation for maximum number of threads the client
332 * should make for a multi-threaded workload in a given workgroup.
333 *
334 * This API takes into consideration the current hardware the code is running on
335 * and the attributes of the workgroup. It does not take into consideration the
336 * current load of the system and therefore always provides the most optimal
337 * recommendation for the workload.
338 *
339 * @param wg
340 * The workgroup in which the multi-threaded workload will be performed in. The
341 * threads performing the multi-threaded workload are expected to join this
342 * workgroup.
343 *
344 * @param attr
345 * This value is currently unused and should be NULL.
346 */
347API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))
348OS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT
349int
350os_workgroup_max_parallel_threads(os_workgroup_t wg, os_workgroup_mpt_attr_t
351 _Nullable attr);
352
353OS_WORKGROUP_ASSUME_NONNULL_END
354
355__END_DECLS
356
357#endif /* __OS_WORKGROUP_OBJECT__ */
lib/libc/include/x86_64-macos-gnu/os/workgroup_parallel.h deleted-74
...@@ -1,74 +0,0 @@
1/*
2 * Copyright (c) 2020 Apple Inc. All rights reserved.
3 *
4 * @APPLE_APACHE_LICENSE_HEADER_START@
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 * @APPLE_APACHE_LICENSE_HEADER_END@
19 */
20
21#ifndef __OS_WORKGROUP_PARALLEL__
22#define __OS_WORKGROUP_PARALLEL__
23
24#ifndef __OS_WORKGROUP_INDIRECT__
25#error "Please #include <os/workgroup.h> instead of this file directly."
26#include <os/workgroup_base.h> // For header doc
27#endif
28
29#include <os/workgroup_object.h>
30
31__BEGIN_DECLS
32
33OS_WORKGROUP_ASSUME_NONNULL_BEGIN
34
35/*!
36 * @typedef os_workgroup_parallel_t
37 *
38 * @abstract
39 * A subclass of an os_workgroup_t for tracking parallel work.
40 */
41OS_WORKGROUP_SUBCLASS_DECL_PROTO(os_workgroup_parallel, Parallelizable);
42OS_WORKGROUP_SUBCLASS_DECL(os_workgroup_parallel, os_workgroup, WorkGroupParallel);
43
44/*!
45 * @function os_workgroup_parallel_create
46 *
47 * @abstract
48 * Creates an os_workgroup_t which tracks a parallel workload.
49 * A newly created os_workgroup_interval_t has no initial member threads -
50 * in particular the creating thread does not join the os_workgroup_parallel_t
51 * implicitly.
52 *
53 * See also os_workgroup_max_parallel_threads().
54 *
55 * @param name
56 * A client specified string for labelling the workgroup. This parameter is
57 * optional and can be NULL.
58 *
59 * @param attr
60 * The requested set of workgroup attributes. NULL is to be specified for the
61 * default set of attributes.
62 */
63API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))
64OS_WORKGROUP_EXPORT OS_WORKGROUP_RETURNS_RETAINED
65OS_SWIFT_NAME(WorkGroupParallel.init(__name:attr:))
66os_workgroup_parallel_t _Nullable
67os_workgroup_parallel_create(const char * _Nullable name,
68 os_workgroup_attr_t _Nullable attr);
69
70OS_WORKGROUP_ASSUME_NONNULL_END
71
72__END_DECLS
73
74#endif /* __OS_WORKGROUP_PARALLEL__ */
lib/libc/include/x86_64-macos-gnu/pthread.h+3-27
...@@ -53,6 +53,9 @@...@@ -53,6 +53,9 @@
53#define _PTHREAD_H53#define _PTHREAD_H
5454
55#include <_types.h>55#include <_types.h>
56#ifndef __POSIX_LIB__
57#include <pthread/pthread_impl.h>
58#endif
56#include <pthread/sched.h>59#include <pthread/sched.h>
57#include <time.h>60#include <time.h>
58#include <sys/_pthread/_pthread_types.h>61#include <sys/_pthread/_pthread_types.h>
...@@ -556,33 +559,6 @@ int pthread_sigmask(int, const sigset_t * _Nullable, sigset_t * _Nullable)...@@ -556,33 +559,6 @@ int pthread_sigmask(int, const sigset_t * _Nullable, sigset_t * _Nullable)
556__API_AVAILABLE(macos(10.4), ios(2.0))559__API_AVAILABLE(macos(10.4), ios(2.0))
557void pthread_yield_np(void);560void pthread_yield_np(void);
558561
559__API_AVAILABLE(macos(11.0))
560__API_UNAVAILABLE(ios, tvos, watchos)
561void pthread_jit_write_protect_np(int enabled);
562
563__API_AVAILABLE(macos(11.0))
564__API_UNAVAILABLE(ios, tvos, watchos)
565int pthread_jit_write_protect_supported_np(void);
566
567/*!
568 * @function pthread_cpu_number_np
569 *
570 * @param cpu_number_out
571 * The CPU number that the thread was running on at the time of query.
572 * This cpu number is in the interval [0, ncpus) (from sysctlbyname("hw.ncpu"))
573 *
574 * @result
575 * This function returns 0 or the value of errno if an error occurred.
576 *
577 * @note
578 * Optimizations of per-CPU datastructures based on the result of this function
579 * still require synchronization since it is not guaranteed that the thread will
580 * still be on the same CPU by the time the function returns.
581 */
582__API_AVAILABLE(macos(11.0), ios(14.2), tvos(14.2), watchos(7.1))
583int
584pthread_cpu_number_np(size_t *cpu_number_out);
585
586#endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || _DARWIN_C_SOURCE || __cplusplus */562#endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || _DARWIN_C_SOURCE || __cplusplus */
587__END_DECLS563__END_DECLS
588#if __has_feature(assume_nonnull)564#if __has_feature(assume_nonnull)
lib/libc/include/x86_64-macos-gnu/pthread/sched.h+1-3
...@@ -25,7 +25,7 @@...@@ -25,7 +25,7 @@
25#define _SCHED_H_25#define _SCHED_H_
2626
27#include <sys/cdefs.h>27#include <sys/cdefs.h>
28#include <pthread/pthread_impl.h>28#include <pthread_impl.h>
2929
30__BEGIN_DECLS30__BEGIN_DECLS
31/*31/*
...@@ -33,8 +33,6 @@ __BEGIN_DECLS...@@ -33,8 +33,6 @@ __BEGIN_DECLS
33 */33 */
34#ifndef __POSIX_LIB__34#ifndef __POSIX_LIB__
35struct sched_param { int sched_priority; char __opaque[__SCHED_PARAM_SIZE__]; };35struct sched_param { int sched_priority; char __opaque[__SCHED_PARAM_SIZE__]; };
36#else
37struct sched_param;
38#endif36#endif
3937
40extern int sched_yield(void);38extern int sched_yield(void);
lib/libc/include/x86_64-macos-gnu/pthread_impl.h created+66
...@@ -0,0 +1,66 @@
1/*
2 * Copyright (c) 2000-2003 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23
24#ifndef _PTHREAD_IMPL_H_
25#define _PTHREAD_IMPL_H_
26/*
27 * Internal implementation details
28 */
29
30/* This whole header file will disappear, so don't depend on it... */
31
32#if __has_feature(assume_nonnull)
33_Pragma("clang assume_nonnull begin")
34#endif
35
36#ifndef __POSIX_LIB__
37
38/*
39 * [Internal] data structure signatures
40 */
41#define _PTHREAD_MUTEX_SIG_init 0x32AAABA7
42
43#define _PTHREAD_ERRORCHECK_MUTEX_SIG_init 0x32AAABA1
44#define _PTHREAD_RECURSIVE_MUTEX_SIG_init 0x32AAABA2
45#define _PTHREAD_FIRSTFIT_MUTEX_SIG_init 0x32AAABA3
46
47#define _PTHREAD_COND_SIG_init 0x3CB0B1BB
48#define _PTHREAD_ONCE_SIG_init 0x30B1BCBA
49#define _PTHREAD_RWLOCK_SIG_init 0x2DA8B3B4
50
51/*
52 * POSIX scheduling policies
53 */
54#define SCHED_OTHER 1
55#define SCHED_FIFO 4
56#define SCHED_RR 2
57
58#define __SCHED_PARAM_SIZE__ 4
59
60#endif /* __POSIX_LIB__ */
61
62#if __has_feature(assume_nonnull)
63_Pragma("clang assume_nonnull end")
64#endif
65
66#endif /* _PTHREAD_IMPL_H_ */
lib/libc/include/x86_64-macos-gnu/sched.h+1-3
...@@ -25,7 +25,7 @@...@@ -25,7 +25,7 @@
25#define _SCHED_H_25#define _SCHED_H_
2626
27#include <sys/cdefs.h>27#include <sys/cdefs.h>
28#include <pthread/pthread_impl.h>28#include <pthread_impl.h>
2929
30__BEGIN_DECLS30__BEGIN_DECLS
31/*31/*
...@@ -33,8 +33,6 @@ __BEGIN_DECLS...@@ -33,8 +33,6 @@ __BEGIN_DECLS
33 */33 */
34#ifndef __POSIX_LIB__34#ifndef __POSIX_LIB__
35struct sched_param { int sched_priority; char __opaque[__SCHED_PARAM_SIZE__]; };35struct sched_param { int sched_priority; char __opaque[__SCHED_PARAM_SIZE__]; };
36#else
37struct sched_param;
38#endif36#endif
3937
40extern int sched_yield(void);38extern int sched_yield(void);
lib/libc/include/x86_64-macos-gnu/signal.h+5
...@@ -108,11 +108,16 @@ int sigvec(int, struct sigvec *, struct sigvec *);...@@ -108,11 +108,16 @@ int sigvec(int, struct sigvec *, struct sigvec *);
108__END_DECLS108__END_DECLS
109109
110/* List definitions after function declarations, or Reiser cpp gets upset. */110/* List definitions after function declarations, or Reiser cpp gets upset. */
111#if defined(__i386__) || defined(__x86_64__)
112/* The left shift operator on intel is modulo 32 */
111__header_always_inline int113__header_always_inline int
112__sigbits(int __signo)114__sigbits(int __signo)
113{115{
114 return __signo > __DARWIN_NSIG ? 0 : (1 << (__signo - 1));116 return __signo > __DARWIN_NSIG ? 0 : (1 << (__signo - 1));
115}117}
118#else /* !__i386__ && !__x86_64__ */
119#define __sigbits(signo) (1 << ((signo) - 1))
120#endif /* __i386__ || __x86_64__ */
116121
117#define sigaddset(set, signo) (*(set) |= __sigbits(signo), 0)122#define sigaddset(set, signo) (*(set) |= __sigbits(signo), 0)
118#define sigdelset(set, signo) (*(set) &= ~__sigbits(signo), 0)123#define sigdelset(set, signo) (*(set) &= ~__sigbits(signo), 0)
lib/libc/include/x86_64-macos-gnu/simd/common.h+18-18
...@@ -1977,7 +1977,7 @@ static inline SIMD_CFUNC simd_char16 simd_abs(simd_char16 x) {...@@ -1977,7 +1977,7 @@ static inline SIMD_CFUNC simd_char16 simd_abs(simd_char16 x) {
1977#if defined __arm__ || defined __arm64__1977#if defined __arm__ || defined __arm64__
1978 return vabsq_s8(x);1978 return vabsq_s8(x);
1979#elif defined __SSE4_1__1979#elif defined __SSE4_1__
1980 return (simd_char16) _mm_abs_epi8((__m128i)x);1980 return _mm_abs_epi8(x);
1981#else1981#else
1982 simd_char16 mask = x >> 7; return (x ^ mask) - mask;1982 simd_char16 mask = x >> 7; return (x ^ mask) - mask;
1983#endif1983#endif
...@@ -2019,7 +2019,7 @@ static inline SIMD_CFUNC simd_short8 simd_abs(simd_short8 x) {...@@ -2019,7 +2019,7 @@ static inline SIMD_CFUNC simd_short8 simd_abs(simd_short8 x) {
2019#if defined __arm__ || defined __arm64__2019#if defined __arm__ || defined __arm64__
2020 return vabsq_s16(x);2020 return vabsq_s16(x);
2021#elif defined __SSE4_1__2021#elif defined __SSE4_1__
2022 return (simd_short8) _mm_abs_epi16((__m128i)x);2022 return _mm_abs_epi16(x);
2023#else2023#else
2024 simd_short8 mask = x >> 15; return (x ^ mask) - mask;2024 simd_short8 mask = x >> 15; return (x ^ mask) - mask;
2025#endif2025#endif
...@@ -2057,7 +2057,7 @@ static inline SIMD_CFUNC simd_int4 simd_abs(simd_int4 x) {...@@ -2057,7 +2057,7 @@ static inline SIMD_CFUNC simd_int4 simd_abs(simd_int4 x) {
2057#if defined __arm__ || defined __arm64__2057#if defined __arm__ || defined __arm64__
2058 return vabsq_s32(x);2058 return vabsq_s32(x);
2059#elif defined __SSE4_1__2059#elif defined __SSE4_1__
2060 return (simd_int4) _mm_abs_epi32((__m128i)x);2060 return _mm_abs_epi32(x);
2061#else2061#else
2062 simd_int4 mask = x >> 31; return (x ^ mask) - mask;2062 simd_int4 mask = x >> 31; return (x ^ mask) - mask;
2063#endif2063#endif
...@@ -2103,7 +2103,7 @@ static inline SIMD_CFUNC simd_long2 simd_abs(simd_long2 x) {...@@ -2103,7 +2103,7 @@ static inline SIMD_CFUNC simd_long2 simd_abs(simd_long2 x) {
2103#if defined __arm64__2103#if defined __arm64__
2104 return vabsq_s64(x);2104 return vabsq_s64(x);
2105#elif defined __SSE4_1__2105#elif defined __SSE4_1__
2106 return (simd_long2) _mm_abs_epi64((__m128i)x);2106 return _mm_abs_epi64(x);
2107#else2107#else
2108 simd_long2 mask = x >> 63; return (x ^ mask) - mask;2108 simd_long2 mask = x >> 63; return (x ^ mask) - mask;
2109#endif2109#endif
...@@ -2170,7 +2170,7 @@ static inline SIMD_CFUNC simd_char16 simd_min(simd_char16 x, simd_char16 y) {...@@ -2170,7 +2170,7 @@ static inline SIMD_CFUNC simd_char16 simd_min(simd_char16 x, simd_char16 y) {
2170#if defined __arm__ || defined __arm64__2170#if defined __arm__ || defined __arm64__
2171 return vminq_s8(x, y);2171 return vminq_s8(x, y);
2172#elif defined __SSE4_1__2172#elif defined __SSE4_1__
2173 return (simd_char16) _mm_min_epi8((__m128i)x, (__m128i)y);2173 return _mm_min_epi8(x, y);
2174#else2174#else
2175 return simd_bitselect(x, y, y < x);2175 return simd_bitselect(x, y, y < x);
2176#endif2176#endif
...@@ -2217,7 +2217,7 @@ static inline SIMD_CFUNC simd_uchar16 simd_min(simd_uchar16 x, simd_uchar16 y) {...@@ -2217,7 +2217,7 @@ static inline SIMD_CFUNC simd_uchar16 simd_min(simd_uchar16 x, simd_uchar16 y) {
2217#if defined __arm__ || defined __arm64__2217#if defined __arm__ || defined __arm64__
2218 return vminq_u8(x, y);2218 return vminq_u8(x, y);
2219#elif defined __SSE4_1__2219#elif defined __SSE4_1__
2220 return (simd_uchar16) _mm_min_epu8((__m128i)x, (__m128i)y);2220 return _mm_min_epu8(x, y);
2221#else2221#else
2222 return simd_bitselect(x, y, y < x);2222 return simd_bitselect(x, y, y < x);
2223#endif2223#endif
...@@ -2260,7 +2260,7 @@ static inline SIMD_CFUNC simd_short8 simd_min(simd_short8 x, simd_short8 y) {...@@ -2260,7 +2260,7 @@ static inline SIMD_CFUNC simd_short8 simd_min(simd_short8 x, simd_short8 y) {
2260#if defined __arm__ || defined __arm64__2260#if defined __arm__ || defined __arm64__
2261 return vminq_s16(x, y);2261 return vminq_s16(x, y);
2262#elif defined __SSE4_1__2262#elif defined __SSE4_1__
2263 return (simd_short8) _mm_min_epi16((__m128i)x, (__m128i)y);2263 return _mm_min_epi16(x, y);
2264#else2264#else
2265 return simd_bitselect(x, y, y < x);2265 return simd_bitselect(x, y, y < x);
2266#endif2266#endif
...@@ -2303,7 +2303,7 @@ static inline SIMD_CFUNC simd_ushort8 simd_min(simd_ushort8 x, simd_ushort8 y) {...@@ -2303,7 +2303,7 @@ static inline SIMD_CFUNC simd_ushort8 simd_min(simd_ushort8 x, simd_ushort8 y) {
2303#if defined __arm__ || defined __arm64__2303#if defined __arm__ || defined __arm64__
2304 return vminq_u16(x, y);2304 return vminq_u16(x, y);
2305#elif defined __SSE4_1__2305#elif defined __SSE4_1__
2306 return (simd_ushort8) _mm_min_epu16((__m128i)x, (__m128i)y);2306 return _mm_min_epu16(x, y);
2307#else2307#else
2308 return simd_bitselect(x, y, y < x);2308 return simd_bitselect(x, y, y < x);
2309#endif2309#endif
...@@ -2342,7 +2342,7 @@ static inline SIMD_CFUNC simd_int4 simd_min(simd_int4 x, simd_int4 y) {...@@ -2342,7 +2342,7 @@ static inline SIMD_CFUNC simd_int4 simd_min(simd_int4 x, simd_int4 y) {
2342#if defined __arm__ || defined __arm64__2342#if defined __arm__ || defined __arm64__
2343 return vminq_s32(x, y);2343 return vminq_s32(x, y);
2344#elif defined __SSE4_1__2344#elif defined __SSE4_1__
2345 return (simd_int4) _mm_min_epi32((__m128i)x, (__m128i)y);2345 return _mm_min_epi32(x, y);
2346#else2346#else
2347 return simd_bitselect(x, y, y < x);2347 return simd_bitselect(x, y, y < x);
2348#endif2348#endif
...@@ -2381,7 +2381,7 @@ static inline SIMD_CFUNC simd_uint4 simd_min(simd_uint4 x, simd_uint4 y) {...@@ -2381,7 +2381,7 @@ static inline SIMD_CFUNC simd_uint4 simd_min(simd_uint4 x, simd_uint4 y) {
2381#if defined __arm__ || defined __arm64__2381#if defined __arm__ || defined __arm64__
2382 return vminq_u32(x, y);2382 return vminq_u32(x, y);
2383#elif defined __SSE4_1__2383#elif defined __SSE4_1__
2384 return (simd_uint4) _mm_min_epu32((__m128i)x, (__m128i)y);2384 return _mm_min_epu32(x, y);
2385#else2385#else
2386 return simd_bitselect(x, y, y < x);2386 return simd_bitselect(x, y, y < x);
2387#endif2387#endif
...@@ -2528,7 +2528,7 @@ static inline SIMD_CFUNC simd_char16 simd_max(simd_char16 x, simd_char16 y) {...@@ -2528,7 +2528,7 @@ static inline SIMD_CFUNC simd_char16 simd_max(simd_char16 x, simd_char16 y) {
2528#if defined __arm__ || defined __arm64__2528#if defined __arm__ || defined __arm64__
2529 return vmaxq_s8(x, y);2529 return vmaxq_s8(x, y);
2530#elif defined __SSE4_1__2530#elif defined __SSE4_1__
2531 return (simd_char16) _mm_max_epi8((__m128i)x, (__m128i)y);2531 return _mm_max_epi8(x, y);
2532#else2532#else
2533 return simd_bitselect(x, y, x < y);2533 return simd_bitselect(x, y, x < y);
2534#endif2534#endif
...@@ -2575,7 +2575,7 @@ static inline SIMD_CFUNC simd_uchar16 simd_max(simd_uchar16 x, simd_uchar16 y) {...@@ -2575,7 +2575,7 @@ static inline SIMD_CFUNC simd_uchar16 simd_max(simd_uchar16 x, simd_uchar16 y) {
2575#if defined __arm__ || defined __arm64__2575#if defined __arm__ || defined __arm64__
2576 return vmaxq_u8(x, y);2576 return vmaxq_u8(x, y);
2577#elif defined __SSE4_1__2577#elif defined __SSE4_1__
2578 return (simd_uchar16) _mm_max_epu8((__m128i)x, (__m128i)y);2578 return _mm_max_epu8(x, y);
2579#else2579#else
2580 return simd_bitselect(x, y, x < y);2580 return simd_bitselect(x, y, x < y);
2581#endif2581#endif
...@@ -2618,7 +2618,7 @@ static inline SIMD_CFUNC simd_short8 simd_max(simd_short8 x, simd_short8 y) {...@@ -2618,7 +2618,7 @@ static inline SIMD_CFUNC simd_short8 simd_max(simd_short8 x, simd_short8 y) {
2618#if defined __arm__ || defined __arm64__2618#if defined __arm__ || defined __arm64__
2619 return vmaxq_s16(x, y);2619 return vmaxq_s16(x, y);
2620#elif defined __SSE4_1__2620#elif defined __SSE4_1__
2621 return (simd_short8) _mm_max_epi16((__m128i)x, (__m128i)y);2621 return _mm_max_epi16(x, y);
2622#else2622#else
2623 return simd_bitselect(x, y, x < y);2623 return simd_bitselect(x, y, x < y);
2624#endif2624#endif
...@@ -2661,7 +2661,7 @@ static inline SIMD_CFUNC simd_ushort8 simd_max(simd_ushort8 x, simd_ushort8 y) {...@@ -2661,7 +2661,7 @@ static inline SIMD_CFUNC simd_ushort8 simd_max(simd_ushort8 x, simd_ushort8 y) {
2661#if defined __arm__ || defined __arm64__2661#if defined __arm__ || defined __arm64__
2662 return vmaxq_u16(x, y);2662 return vmaxq_u16(x, y);
2663#elif defined __SSE4_1__2663#elif defined __SSE4_1__
2664 return (simd_ushort8) _mm_max_epu16((__m128i)x, (__m128i)y);2664 return _mm_max_epu16(x, y);
2665#else2665#else
2666 return simd_bitselect(x, y, x < y);2666 return simd_bitselect(x, y, x < y);
2667#endif2667#endif
...@@ -2700,7 +2700,7 @@ static inline SIMD_CFUNC simd_int4 simd_max(simd_int4 x, simd_int4 y) {...@@ -2700,7 +2700,7 @@ static inline SIMD_CFUNC simd_int4 simd_max(simd_int4 x, simd_int4 y) {
2700#if defined __arm__ || defined __arm64__2700#if defined __arm__ || defined __arm64__
2701 return vmaxq_s32(x, y);2701 return vmaxq_s32(x, y);
2702#elif defined __SSE4_1__2702#elif defined __SSE4_1__
2703 return (simd_int4) _mm_max_epi32((__m128i)x, (__m128i)y);2703 return _mm_max_epi32(x, y);
2704#else2704#else
2705 return simd_bitselect(x, y, x < y);2705 return simd_bitselect(x, y, x < y);
2706#endif2706#endif
...@@ -2739,7 +2739,7 @@ static inline SIMD_CFUNC simd_uint4 simd_max(simd_uint4 x, simd_uint4 y) {...@@ -2739,7 +2739,7 @@ static inline SIMD_CFUNC simd_uint4 simd_max(simd_uint4 x, simd_uint4 y) {
2739#if defined __arm__ || defined __arm64__2739#if defined __arm__ || defined __arm64__
2740 return vmaxq_u32(x, y);2740 return vmaxq_u32(x, y);
2741#elif defined __SSE4_1__2741#elif defined __SSE4_1__
2742 return (simd_uint4) _mm_max_epu32((__m128i)x, (__m128i)y);2742 return _mm_max_epu32(x, y);
2743#else2743#else
2744 return simd_bitselect(x, y, x < y);2744 return simd_bitselect(x, y, x < y);
2745#endif2745#endif
...@@ -3083,7 +3083,7 @@ static inline SIMD_CFUNC simd_double8 simd_clamp(simd_double8 x, simd_double8 mi...@@ -3083,7 +3083,7 @@ static inline SIMD_CFUNC simd_double8 simd_clamp(simd_double8 x, simd_double8 mi
30833083
3084 3084
3085static inline SIMD_CFUNC float simd_sign(float x) {3085static inline SIMD_CFUNC float simd_sign(float x) {
3086 return (x == 0 | x != x) ? 0 : copysign(1,x);3086 return x == 0 | x != x ? 0 : copysign(1,x);
3087}3087}
30883088
3089static inline SIMD_CFUNC simd_float2 simd_sign(simd_float2 x) {3089static inline SIMD_CFUNC simd_float2 simd_sign(simd_float2 x) {
...@@ -3107,7 +3107,7 @@ static inline SIMD_CFUNC simd_float16 simd_sign(simd_float16 x) {...@@ -3107,7 +3107,7 @@ static inline SIMD_CFUNC simd_float16 simd_sign(simd_float16 x) {
3107}3107}
31083108
3109static inline SIMD_CFUNC double simd_sign(double x) {3109static inline SIMD_CFUNC double simd_sign(double x) {
3110 return (x == 0 | x != x) ? 0 : copysign(1,x);3110 return x == 0 | x != x ? 0 : copysign(1,x);
3111}3111}
31123112
3113static inline SIMD_CFUNC simd_double2 simd_sign(simd_double2 x) {3113static inline SIMD_CFUNC simd_double2 simd_sign(simd_double2 x) {
lib/libc/include/x86_64-macos-gnu/simd/conversion.h-91
...@@ -559,11 +559,6 @@ static simd_int2 SIMD_CFUNC simd_int_sat(simd_ulong2 __x);...@@ -559,11 +559,6 @@ static simd_int2 SIMD_CFUNC simd_int_sat(simd_ulong2 __x);
559static simd_int3 SIMD_CFUNC simd_int_sat(simd_ulong3 __x);559static simd_int3 SIMD_CFUNC simd_int_sat(simd_ulong3 __x);
560static simd_int4 SIMD_CFUNC simd_int_sat(simd_ulong4 __x);560static simd_int4 SIMD_CFUNC simd_int_sat(simd_ulong4 __x);
561static simd_int8 SIMD_CFUNC simd_int_sat(simd_ulong8 __x);561static simd_int8 SIMD_CFUNC simd_int_sat(simd_ulong8 __x);
562static simd_int2 SIMD_CFUNC simd_int_rte(simd_float2 __x);
563static simd_int3 SIMD_CFUNC simd_int_rte(simd_float3 __x);
564static simd_int4 SIMD_CFUNC simd_int_rte(simd_float4 __x);
565static simd_int8 SIMD_CFUNC simd_int_rte(simd_float8 __x);
566static simd_int16 SIMD_CFUNC simd_int_rte(simd_float16 __x);
567#define vector_int simd_int562#define vector_int simd_int
568#define vector_int_sat simd_int_sat563#define vector_int_sat simd_int_sat
569564
...@@ -793,10 +788,6 @@ static simd_long2 SIMD_CFUNC simd_long_sat(simd_ulong2 __x);...@@ -793,10 +788,6 @@ static simd_long2 SIMD_CFUNC simd_long_sat(simd_ulong2 __x);
793static simd_long3 SIMD_CFUNC simd_long_sat(simd_ulong3 __x);788static simd_long3 SIMD_CFUNC simd_long_sat(simd_ulong3 __x);
794static simd_long4 SIMD_CFUNC simd_long_sat(simd_ulong4 __x);789static simd_long4 SIMD_CFUNC simd_long_sat(simd_ulong4 __x);
795static simd_long8 SIMD_CFUNC simd_long_sat(simd_ulong8 __x);790static simd_long8 SIMD_CFUNC simd_long_sat(simd_ulong8 __x);
796static simd_long2 SIMD_CFUNC simd_long_rte(simd_double2 __x);
797static simd_long3 SIMD_CFUNC simd_long_rte(simd_double3 __x);
798static simd_long4 SIMD_CFUNC simd_long_rte(simd_double4 __x);
799static simd_long8 SIMD_CFUNC simd_long_rte(simd_double8 __x);
800#define vector_long simd_long791#define vector_long simd_long
801#define vector_long_sat simd_long_sat792#define vector_long_sat simd_long_sat
802793
...@@ -1120,7 +1111,6 @@ static simd_char2 SIMD_CFUNC simd_char_sat(simd_ulong2 __x) { return simd_cha...@@ -1120,7 +1111,6 @@ static simd_char2 SIMD_CFUNC simd_char_sat(simd_ulong2 __x) { return simd_cha
1120static simd_char3 SIMD_CFUNC simd_char_sat(simd_ulong3 __x) { return simd_char(simd_min(__x,0x7f)); }1111static simd_char3 SIMD_CFUNC simd_char_sat(simd_ulong3 __x) { return simd_char(simd_min(__x,0x7f)); }
1121static simd_char4 SIMD_CFUNC simd_char_sat(simd_ulong4 __x) { return simd_char(simd_min(__x,0x7f)); }1112static simd_char4 SIMD_CFUNC simd_char_sat(simd_ulong4 __x) { return simd_char(simd_min(__x,0x7f)); }
1122static simd_char8 SIMD_CFUNC simd_char_sat(simd_ulong8 __x) { return simd_char(simd_min(__x,0x7f)); }1113static simd_char8 SIMD_CFUNC simd_char_sat(simd_ulong8 __x) { return simd_char(simd_min(__x,0x7f)); }
1123
11241114
1125static simd_uchar2 SIMD_CFUNC simd_uchar(simd_char2 __x) { return (simd_uchar2)__x; }1115static simd_uchar2 SIMD_CFUNC simd_uchar(simd_char2 __x) { return (simd_uchar2)__x; }
1126static simd_uchar3 SIMD_CFUNC simd_uchar(simd_char3 __x) { return (simd_uchar3)__x; }1116static simd_uchar3 SIMD_CFUNC simd_uchar(simd_char3 __x) { return (simd_uchar3)__x; }
...@@ -1225,7 +1215,6 @@ static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_ulong2 __x) { return simd_u...@@ -1225,7 +1215,6 @@ static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_ulong2 __x) { return simd_u
1225static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_ulong3 __x) { return simd_uchar(simd_min(__x,0xff)); }1215static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_ulong3 __x) { return simd_uchar(simd_min(__x,0xff)); }
1226static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_ulong4 __x) { return simd_uchar(simd_min(__x,0xff)); }1216static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_ulong4 __x) { return simd_uchar(simd_min(__x,0xff)); }
1227static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_ulong8 __x) { return simd_uchar(simd_min(__x,0xff)); }1217static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_ulong8 __x) { return simd_uchar(simd_min(__x,0xff)); }
1228
12291218
1230static simd_short2 SIMD_CFUNC simd_short(simd_char2 __x) { return __builtin_convertvector(__x, simd_short2); }1219static simd_short2 SIMD_CFUNC simd_short(simd_char2 __x) { return __builtin_convertvector(__x, simd_short2); }
1231static simd_short3 SIMD_CFUNC simd_short(simd_char3 __x) { return __builtin_convertvector(__x, simd_short3); }1220static simd_short3 SIMD_CFUNC simd_short(simd_char3 __x) { return __builtin_convertvector(__x, simd_short3); }
...@@ -1330,7 +1319,6 @@ static simd_short2 SIMD_CFUNC simd_short_sat(simd_ulong2 __x) { return simd_s...@@ -1330,7 +1319,6 @@ static simd_short2 SIMD_CFUNC simd_short_sat(simd_ulong2 __x) { return simd_s
1330static simd_short3 SIMD_CFUNC simd_short_sat(simd_ulong3 __x) { return simd_short(simd_min(__x,0x7fff)); }1319static simd_short3 SIMD_CFUNC simd_short_sat(simd_ulong3 __x) { return simd_short(simd_min(__x,0x7fff)); }
1331static simd_short4 SIMD_CFUNC simd_short_sat(simd_ulong4 __x) { return simd_short(simd_min(__x,0x7fff)); }1320static simd_short4 SIMD_CFUNC simd_short_sat(simd_ulong4 __x) { return simd_short(simd_min(__x,0x7fff)); }
1332static simd_short8 SIMD_CFUNC simd_short_sat(simd_ulong8 __x) { return simd_short(simd_min(__x,0x7fff)); }1321static simd_short8 SIMD_CFUNC simd_short_sat(simd_ulong8 __x) { return simd_short(simd_min(__x,0x7fff)); }
1333
13341322
1335static simd_ushort2 SIMD_CFUNC simd_ushort(simd_char2 __x) { return simd_ushort(simd_short(__x)); }1323static simd_ushort2 SIMD_CFUNC simd_ushort(simd_char2 __x) { return simd_ushort(simd_short(__x)); }
1336static simd_ushort3 SIMD_CFUNC simd_ushort(simd_char3 __x) { return simd_ushort(simd_short(__x)); }1324static simd_ushort3 SIMD_CFUNC simd_ushort(simd_char3 __x) { return simd_ushort(simd_short(__x)); }
...@@ -1435,7 +1423,6 @@ static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_ulong2 __x) { return simd...@@ -1435,7 +1423,6 @@ static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_ulong2 __x) { return simd
1435static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_ulong3 __x) { return simd_ushort(simd_min(__x, 0xffff)); }1423static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_ulong3 __x) { return simd_ushort(simd_min(__x, 0xffff)); }
1436static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_ulong4 __x) { return simd_ushort(simd_min(__x, 0xffff)); }1424static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_ulong4 __x) { return simd_ushort(simd_min(__x, 0xffff)); }
1437static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_ulong8 __x) { return simd_ushort(simd_min(__x, 0xffff)); }1425static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_ulong8 __x) { return simd_ushort(simd_min(__x, 0xffff)); }
1438
14391426
1440static simd_int2 SIMD_CFUNC simd_int(simd_char2 __x) { return __builtin_convertvector(__x, simd_int2); }1427static simd_int2 SIMD_CFUNC simd_int(simd_char2 __x) { return __builtin_convertvector(__x, simd_int2); }
1441static simd_int3 SIMD_CFUNC simd_int(simd_char3 __x) { return __builtin_convertvector(__x, simd_int3); }1428static simd_int3 SIMD_CFUNC simd_int(simd_char3 __x) { return __builtin_convertvector(__x, simd_int3); }
...@@ -1532,46 +1519,6 @@ static simd_int2 SIMD_CFUNC simd_int_sat(simd_ulong2 __x) { return simd_int(s...@@ -1532,46 +1519,6 @@ static simd_int2 SIMD_CFUNC simd_int_sat(simd_ulong2 __x) { return simd_int(s
1532static simd_int3 SIMD_CFUNC simd_int_sat(simd_ulong3 __x) { return simd_int(simd_min(__x,0x7fffffff)); }1519static simd_int3 SIMD_CFUNC simd_int_sat(simd_ulong3 __x) { return simd_int(simd_min(__x,0x7fffffff)); }
1533static simd_int4 SIMD_CFUNC simd_int_sat(simd_ulong4 __x) { return simd_int(simd_min(__x,0x7fffffff)); }1520static simd_int4 SIMD_CFUNC simd_int_sat(simd_ulong4 __x) { return simd_int(simd_min(__x,0x7fffffff)); }
1534static simd_int8 SIMD_CFUNC simd_int_sat(simd_ulong8 __x) { return simd_int(simd_min(__x,0x7fffffff)); }1521static simd_int8 SIMD_CFUNC simd_int_sat(simd_ulong8 __x) { return simd_int(simd_min(__x,0x7fffffff)); }
1535
1536static simd_int2 SIMD_CFUNC simd_int_rte(simd_float2 __x) {
1537#if defined __arm64__
1538 return vcvtn_s32_f32(__x);
1539#else
1540 return simd_make_int2(simd_int_rte(simd_make_float4_undef(__x)));
1541#endif
1542}
1543
1544static simd_int3 SIMD_CFUNC simd_int_rte(simd_float3 __x) {
1545 return simd_make_int3(simd_int_rte(simd_make_float4_undef(__x)));
1546}
1547
1548static simd_int4 SIMD_CFUNC simd_int_rte(simd_float4 __x) {
1549#if defined __SSE2__
1550 return _mm_cvtps_epi32(__x);
1551#elif defined __arm64__
1552 return vcvtnq_s32_f32(__x);
1553#else
1554 simd_float4 magic = __tg_copysign(0x1.0p23, __x);
1555 simd_int4 x_is_small = __tg_fabs(__x) < 0x1.0p23;
1556 return __builtin_convertvector(simd_bitselect(__x, (__x + magic) - magic, x_is_small & 0x7fffffff), simd_int4);
1557#endif
1558}
1559
1560static simd_int8 SIMD_CFUNC simd_int_rte(simd_float8 __x) {
1561#if defined __AVX__
1562 return _mm256_cvtps_epi32(__x);
1563#else
1564 return simd_make_int8(simd_int_rte(__x.lo), simd_int_rte(__x.hi));
1565#endif
1566}
1567
1568static simd_int16 SIMD_CFUNC simd_int_rte(simd_float16 __x) {
1569#if defined __AVX512F__
1570 return _mm512_cvt_roundps_epi32(__x, _MM_FROUND_RINT);
1571#else
1572 return simd_make_int16(simd_int_rte(__x.lo), simd_int_rte(__x.hi));
1573#endif
1574}
15751522
1576static simd_uint2 SIMD_CFUNC simd_uint(simd_char2 __x) { return simd_uint(simd_int(__x)); }1523static simd_uint2 SIMD_CFUNC simd_uint(simd_char2 __x) { return simd_uint(simd_int(__x)); }
1577static simd_uint3 SIMD_CFUNC simd_uint(simd_char3 __x) { return simd_uint(simd_int(__x)); }1524static simd_uint3 SIMD_CFUNC simd_uint(simd_char3 __x) { return simd_uint(simd_int(__x)); }
...@@ -1668,7 +1615,6 @@ static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_ulong2 __x) { return simd_uin...@@ -1668,7 +1615,6 @@ static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_ulong2 __x) { return simd_uin
1668static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_ulong3 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); }1615static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_ulong3 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); }
1669static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_ulong4 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); }1616static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_ulong4 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); }
1670static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_ulong8 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); }1617static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_ulong8 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); }
1671
16721618
1673static simd_float2 SIMD_CFUNC simd_float(simd_char2 __x) { return (simd_float2)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; }1619static simd_float2 SIMD_CFUNC simd_float(simd_char2 __x) { return (simd_float2)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; }
1674static simd_float3 SIMD_CFUNC simd_float(simd_char3 __x) { return (simd_float3)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; }1620static simd_float3 SIMD_CFUNC simd_float(simd_char3 __x) { return (simd_float3)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; }
...@@ -1717,7 +1663,6 @@ static simd_float2 SIMD_CFUNC simd_float(simd_double2 __x) { return __builtin_...@@ -1717,7 +1663,6 @@ static simd_float2 SIMD_CFUNC simd_float(simd_double2 __x) { return __builtin_
1717static simd_float3 SIMD_CFUNC simd_float(simd_double3 __x) { return __builtin_convertvector(__x,simd_float3); }1663static simd_float3 SIMD_CFUNC simd_float(simd_double3 __x) { return __builtin_convertvector(__x,simd_float3); }
1718static simd_float4 SIMD_CFUNC simd_float(simd_double4 __x) { return __builtin_convertvector(__x,simd_float4); }1664static simd_float4 SIMD_CFUNC simd_float(simd_double4 __x) { return __builtin_convertvector(__x,simd_float4); }
1719static simd_float8 SIMD_CFUNC simd_float(simd_double8 __x) { return __builtin_convertvector(__x,simd_float8); }1665static simd_float8 SIMD_CFUNC simd_float(simd_double8 __x) { return __builtin_convertvector(__x,simd_float8); }
1720
17211666
1722static simd_long2 SIMD_CFUNC simd_long(simd_char2 __x) { return __builtin_convertvector(__x,simd_long2); }1667static simd_long2 SIMD_CFUNC simd_long(simd_char2 __x) { return __builtin_convertvector(__x,simd_long2); }
1723static simd_long3 SIMD_CFUNC simd_long(simd_char3 __x) { return __builtin_convertvector(__x,simd_long3); }1668static simd_long3 SIMD_CFUNC simd_long(simd_char3 __x) { return __builtin_convertvector(__x,simd_long3); }
...@@ -1800,39 +1745,6 @@ static simd_long2 SIMD_CFUNC simd_long_sat(simd_ulong2 __x) { return simd_lon...@@ -1800,39 +1745,6 @@ static simd_long2 SIMD_CFUNC simd_long_sat(simd_ulong2 __x) { return simd_lon
1800static simd_long3 SIMD_CFUNC simd_long_sat(simd_ulong3 __x) { return simd_long(simd_min(__x,0x7fffffffffffffff)); }1745static simd_long3 SIMD_CFUNC simd_long_sat(simd_ulong3 __x) { return simd_long(simd_min(__x,0x7fffffffffffffff)); }
1801static simd_long4 SIMD_CFUNC simd_long_sat(simd_ulong4 __x) { return simd_long(simd_min(__x,0x7fffffffffffffff)); }1746static simd_long4 SIMD_CFUNC simd_long_sat(simd_ulong4 __x) { return simd_long(simd_min(__x,0x7fffffffffffffff)); }
1802static simd_long8 SIMD_CFUNC simd_long_sat(simd_ulong8 __x) { return simd_long(simd_min(__x,0x7fffffffffffffff)); }1747static simd_long8 SIMD_CFUNC simd_long_sat(simd_ulong8 __x) { return simd_long(simd_min(__x,0x7fffffffffffffff)); }
1803
1804static simd_long2 SIMD_CFUNC simd_long_rte(simd_double2 __x) {
1805#if defined __AVX512F__
1806 return _mm_cvtpd_epi64(__x);
1807#elif defined __arm64__
1808 return vcvtnq_s64_f64(__x);
1809#else
1810 simd_double2 magic = __tg_copysign(0x1.0p52, __x);
1811 simd_long2 x_is_small = __tg_fabs(__x) < 0x1.0p52;
1812 return __builtin_convertvector(simd_bitselect(__x, (__x + magic) - magic, x_is_small & 0x7fffffffffffffff), simd_long2);
1813#endif
1814}
1815
1816static simd_long3 SIMD_CFUNC simd_long_rte(simd_double3 __x) {
1817 return simd_make_long3(simd_long_rte(simd_make_double4_undef(__x)));
1818}
1819
1820static simd_long4 SIMD_CFUNC simd_long_rte(simd_double4 __x) {
1821#if defined __AVX512F__
1822 return _mm256_cvtpd_epi64(__x);
1823#else
1824 return simd_make_long4(simd_long_rte(__x.lo), simd_long_rte(__x.hi));
1825#endif
1826}
1827
1828static simd_long8 SIMD_CFUNC simd_long_rte(simd_double8 __x) {
1829#if defined __AVX512F__
1830 return _mm512_cvt_roundpd_epi64(__x, _MM_FROUND_RINT);
1831#else
1832 return simd_make_long8(simd_long_rte(__x.lo), simd_long_rte(__x.hi));
1833#endif
1834}
1835
18361748
1837static simd_ulong2 SIMD_CFUNC simd_ulong(simd_char2 __x) { return simd_ulong(simd_long(__x)); }1749static simd_ulong2 SIMD_CFUNC simd_ulong(simd_char2 __x) { return simd_ulong(simd_long(__x)); }
1838static simd_ulong3 SIMD_CFUNC simd_ulong(simd_char3 __x) { return simd_ulong(simd_long(__x)); }1750static simd_ulong3 SIMD_CFUNC simd_ulong(simd_char3 __x) { return simd_ulong(simd_long(__x)); }
...@@ -1915,7 +1827,6 @@ static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_ulong2 __x) { return __x; }...@@ -1915,7 +1827,6 @@ static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_ulong2 __x) { return __x; }
1915static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_ulong3 __x) { return __x; }1827static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_ulong3 __x) { return __x; }
1916static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_ulong4 __x) { return __x; }1828static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_ulong4 __x) { return __x; }
1917static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_ulong8 __x) { return __x; }1829static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_ulong8 __x) { return __x; }
1918
19191830
1920static simd_double2 SIMD_CFUNC simd_double(simd_char2 __x) { return simd_double(simd_int(__x)); }1831static simd_double2 SIMD_CFUNC simd_double(simd_char2 __x) { return simd_double(simd_int(__x)); }
1921static simd_double3 SIMD_CFUNC simd_double(simd_char3 __x) { return simd_double(simd_int(__x)); }1832static simd_double3 SIMD_CFUNC simd_double(simd_char3 __x) { return simd_double(simd_int(__x)); }
...@@ -1957,11 +1868,9 @@ static simd_double2 SIMD_CFUNC simd_double(simd_double2 __x) { return __builti...@@ -1957,11 +1868,9 @@ static simd_double2 SIMD_CFUNC simd_double(simd_double2 __x) { return __builti
1957static simd_double3 SIMD_CFUNC simd_double(simd_double3 __x) { return __builtin_convertvector(__x, simd_double3); }1868static simd_double3 SIMD_CFUNC simd_double(simd_double3 __x) { return __builtin_convertvector(__x, simd_double3); }
1958static simd_double4 SIMD_CFUNC simd_double(simd_double4 __x) { return __builtin_convertvector(__x, simd_double4); }1869static simd_double4 SIMD_CFUNC simd_double(simd_double4 __x) { return __builtin_convertvector(__x, simd_double4); }
1959static simd_double8 SIMD_CFUNC simd_double(simd_double8 __x) { return __builtin_convertvector(__x, simd_double8); }1870static simd_double8 SIMD_CFUNC simd_double(simd_double8 __x) { return __builtin_convertvector(__x, simd_double8); }
1960
19611871
1962#ifdef __cplusplus1872#ifdef __cplusplus
1963}1873}
1964#endif1874#endif
1965#endif // SIMD_COMPILER_HAS_REQUIRED_FEATURES1875#endif // SIMD_COMPILER_HAS_REQUIRED_FEATURES
1966#endif // __SIMD_CONVERSION_HEADER__1876#endif // __SIMD_CONVERSION_HEADER__
1967
lib/libc/include/x86_64-macos-gnu/simd/logic.h+28-28
...@@ -628,7 +628,7 @@ extern "C" {...@@ -628,7 +628,7 @@ extern "C" {
628628
629static inline SIMD_CFUNC simd_bool simd_any(simd_char2 x) {629static inline SIMD_CFUNC simd_bool simd_any(simd_char2 x) {
630#if defined __SSE2__630#if defined __SSE2__
631 return (_mm_movemask_epi8((__m128i)simd_make_char16_undef(x)) & 0x3);631 return (_mm_movemask_epi8(simd_make_char16_undef(x)) & 0x3);
632#elif defined __arm64__632#elif defined __arm64__
633 return simd_any(x.xyxy);633 return simd_any(x.xyxy);
634#else634#else
...@@ -638,7 +638,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_char2 x) {...@@ -638,7 +638,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_char2 x) {
638}638}
639static inline SIMD_CFUNC simd_bool simd_any(simd_char3 x) {639static inline SIMD_CFUNC simd_bool simd_any(simd_char3 x) {
640#if defined __SSE2__640#if defined __SSE2__
641 return (_mm_movemask_epi8((__m128i)simd_make_char16_undef(x)) & 0x7);641 return (_mm_movemask_epi8(simd_make_char16_undef(x)) & 0x7);
642#elif defined __arm64__642#elif defined __arm64__
643 return simd_any(x.xyzz);643 return simd_any(x.xyzz);
644#else644#else
...@@ -648,7 +648,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_char3 x) {...@@ -648,7 +648,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_char3 x) {
648}648}
649static inline SIMD_CFUNC simd_bool simd_any(simd_char4 x) {649static inline SIMD_CFUNC simd_bool simd_any(simd_char4 x) {
650#if defined __SSE2__650#if defined __SSE2__
651 return (_mm_movemask_epi8((__m128i)simd_make_char16_undef(x)) & 0xf);651 return (_mm_movemask_epi8(simd_make_char16_undef(x)) & 0xf);
652#elif defined __arm64__652#elif defined __arm64__
653 return simd_any(x.xyzwxyzw);653 return simd_any(x.xyzwxyzw);
654#else654#else
...@@ -658,7 +658,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_char4 x) {...@@ -658,7 +658,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_char4 x) {
658}658}
659static inline SIMD_CFUNC simd_bool simd_any(simd_char8 x) {659static inline SIMD_CFUNC simd_bool simd_any(simd_char8 x) {
660#if defined __SSE2__660#if defined __SSE2__
661 return (_mm_movemask_epi8((__m128i)simd_make_char16_undef(x)) & 0xff);661 return (_mm_movemask_epi8(simd_make_char16_undef(x)) & 0xff);
662#elif defined __arm64__662#elif defined __arm64__
663 return vmaxv_u8(x) & 0x80;663 return vmaxv_u8(x) & 0x80;
664#else664#else
...@@ -668,7 +668,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_char8 x) {...@@ -668,7 +668,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_char8 x) {
668}668}
669static inline SIMD_CFUNC simd_bool simd_any(simd_char16 x) {669static inline SIMD_CFUNC simd_bool simd_any(simd_char16 x) {
670#if defined __SSE2__670#if defined __SSE2__
671 return _mm_movemask_epi8((__m128i)x);671 return _mm_movemask_epi8(x);
672#elif defined __arm64__672#elif defined __arm64__
673 return vmaxvq_u8(x) & 0x80;673 return vmaxvq_u8(x) & 0x80;
674#else674#else
...@@ -708,7 +708,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_uchar64 x) {...@@ -708,7 +708,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_uchar64 x) {
708}708}
709static inline SIMD_CFUNC simd_bool simd_any(simd_short2 x) {709static inline SIMD_CFUNC simd_bool simd_any(simd_short2 x) {
710#if defined __SSE2__710#if defined __SSE2__
711 return (_mm_movemask_epi8((__m128i)simd_make_short8_undef(x)) & 0xa);711 return (_mm_movemask_epi8(simd_make_short8_undef(x)) & 0xa);
712#elif defined __arm64__712#elif defined __arm64__
713 return simd_any(x.xyxy);713 return simd_any(x.xyxy);
714#else714#else
...@@ -718,7 +718,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_short2 x) {...@@ -718,7 +718,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_short2 x) {
718}718}
719static inline SIMD_CFUNC simd_bool simd_any(simd_short3 x) {719static inline SIMD_CFUNC simd_bool simd_any(simd_short3 x) {
720#if defined __SSE2__720#if defined __SSE2__
721 return (_mm_movemask_epi8((__m128i)simd_make_short8_undef(x)) & 0x2a);721 return (_mm_movemask_epi8(simd_make_short8_undef(x)) & 0x2a);
722#elif defined __arm64__722#elif defined __arm64__
723 return simd_any(x.xyzz);723 return simd_any(x.xyzz);
724#else724#else
...@@ -728,7 +728,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_short3 x) {...@@ -728,7 +728,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_short3 x) {
728}728}
729static inline SIMD_CFUNC simd_bool simd_any(simd_short4 x) {729static inline SIMD_CFUNC simd_bool simd_any(simd_short4 x) {
730#if defined __SSE2__730#if defined __SSE2__
731 return (_mm_movemask_epi8((__m128i)simd_make_short8_undef(x)) & 0xaa);731 return (_mm_movemask_epi8(simd_make_short8_undef(x)) & 0xaa);
732#elif defined __arm64__732#elif defined __arm64__
733 return vmaxv_u16(x) & 0x8000;733 return vmaxv_u16(x) & 0x8000;
734#else734#else
...@@ -738,7 +738,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_short4 x) {...@@ -738,7 +738,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_short4 x) {
738}738}
739static inline SIMD_CFUNC simd_bool simd_any(simd_short8 x) {739static inline SIMD_CFUNC simd_bool simd_any(simd_short8 x) {
740#if defined __SSE2__740#if defined __SSE2__
741 return (_mm_movemask_epi8((__m128i)x) & 0xaaaa);741 return (_mm_movemask_epi8(x) & 0xaaaa);
742#elif defined __arm64__742#elif defined __arm64__
743 return vmaxvq_u16(x) & 0x8000;743 return vmaxvq_u16(x) & 0x8000;
744#else744#else
...@@ -775,7 +775,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_ushort32 x) {...@@ -775,7 +775,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_ushort32 x) {
775}775}
776static inline SIMD_CFUNC simd_bool simd_any(simd_int2 x) {776static inline SIMD_CFUNC simd_bool simd_any(simd_int2 x) {
777#if defined __SSE2__777#if defined __SSE2__
778 return (_mm_movemask_ps((__m128)simd_make_int4_undef(x)) & 0x3);778 return (_mm_movemask_ps(simd_make_int4_undef(x)) & 0x3);
779#elif defined __arm64__779#elif defined __arm64__
780 return vmaxv_u32(x) & 0x80000000;780 return vmaxv_u32(x) & 0x80000000;
781#else781#else
...@@ -785,7 +785,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_int2 x) {...@@ -785,7 +785,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_int2 x) {
785}785}
786static inline SIMD_CFUNC simd_bool simd_any(simd_int3 x) {786static inline SIMD_CFUNC simd_bool simd_any(simd_int3 x) {
787#if defined __SSE2__787#if defined __SSE2__
788 return (_mm_movemask_ps((__m128)simd_make_int4_undef(x)) & 0x7);788 return (_mm_movemask_ps(simd_make_int4_undef(x)) & 0x7);
789#elif defined __arm64__789#elif defined __arm64__
790 return simd_any(x.xyzz);790 return simd_any(x.xyzz);
791#else791#else
...@@ -794,7 +794,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_int3 x) {...@@ -794,7 +794,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_int3 x) {
794}794}
795static inline SIMD_CFUNC simd_bool simd_any(simd_int4 x) {795static inline SIMD_CFUNC simd_bool simd_any(simd_int4 x) {
796#if defined __SSE2__796#if defined __SSE2__
797 return _mm_movemask_ps((__m128)x);797 return _mm_movemask_ps(x);
798#elif defined __arm64__798#elif defined __arm64__
799 return vmaxvq_u32(x) & 0x80000000;799 return vmaxvq_u32(x) & 0x80000000;
800#else800#else
...@@ -828,7 +828,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_uint16 x) {...@@ -828,7 +828,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_uint16 x) {
828}828}
829static inline SIMD_CFUNC simd_bool simd_any(simd_long2 x) {829static inline SIMD_CFUNC simd_bool simd_any(simd_long2 x) {
830#if defined __SSE2__830#if defined __SSE2__
831 return _mm_movemask_pd((__m128d)x);831 return _mm_movemask_pd(x);
832#elif defined __arm64__832#elif defined __arm64__
833 return (x.x | x.y) & 0x8000000000000000U;833 return (x.x | x.y) & 0x8000000000000000U;
834#else834#else
...@@ -867,7 +867,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_ulong8 x) {...@@ -867,7 +867,7 @@ static inline SIMD_CFUNC simd_bool simd_any(simd_ulong8 x) {
867 867
868static inline SIMD_CFUNC simd_bool simd_all(simd_char2 x) {868static inline SIMD_CFUNC simd_bool simd_all(simd_char2 x) {
869#if defined __SSE2__869#if defined __SSE2__
870 return (_mm_movemask_epi8((__m128i)simd_make_char16_undef(x)) & 0x3) == 0x3;870 return (_mm_movemask_epi8(simd_make_char16_undef(x)) & 0x3) == 0x3;
871#elif defined __arm64__871#elif defined __arm64__
872 return simd_all(x.xyxy);872 return simd_all(x.xyxy);
873#else873#else
...@@ -877,7 +877,7 @@ static inline SIMD_CFUNC simd_bool simd_all(simd_char2 x) {...@@ -877,7 +877,7 @@ static inline SIMD_CFUNC simd_bool simd_all(simd_char2 x) {
877}877}
878static inline SIMD_CFUNC simd_bool simd_all(simd_char3 x) {878static inline SIMD_CFUNC simd_bool simd_all(simd_char3 x) {
879#if defined __SSE2__879#if defined __SSE2__
880 return (_mm_movemask_epi8((__m128i)simd_make_char16_undef(x)) & 0x7) == 0x7;880 return (_mm_movemask_epi8(simd_make_char16_undef(x)) & 0x7) == 0x7;
881#elif defined __arm64__881#elif defined __arm64__
882 return simd_all(x.xyzz);882 return simd_all(x.xyzz);
883#else883#else
...@@ -887,7 +887,7 @@ static inline SIMD_CFUNC simd_bool simd_all(simd_char3 x) {...@@ -887,7 +887,7 @@ static inline SIMD_CFUNC simd_bool simd_all(simd_char3 x) {
887}887}
888static inline SIMD_CFUNC simd_bool simd_all(simd_char4 x) {888static inline SIMD_CFUNC simd_bool simd_all(simd_char4 x) {
889#if defined __SSE2__889#if defined __SSE2__
890 return (_mm_movemask_epi8((__m128i)simd_make_char16_undef(x)) & 0xf) == 0xf;890 return (_mm_movemask_epi8(simd_make_char16_undef(x)) & 0xf) == 0xf;
891#elif defined __arm64__891#elif defined __arm64__
892 return simd_all(x.xyzwxyzw);892 return simd_all(x.xyzwxyzw);
893#else893#else
...@@ -897,7 +897,7 @@ static inline SIMD_CFUNC simd_bool simd_all(simd_char4 x) {...@@ -897,7 +897,7 @@ static inline SIMD_CFUNC simd_bool simd_all(simd_char4 x) {
897}897}
898static inline SIMD_CFUNC simd_bool simd_all(simd_char8 x) {898static inline SIMD_CFUNC simd_bool simd_all(simd_char8 x) {
899#if defined __SSE2__899#if defined __SSE2__
900 return (_mm_movemask_epi8((__m128i)simd_make_char16_undef(x)) & 0xff) == 0xff;900 return (_mm_movemask_epi8(simd_make_char16_undef(x)) & 0xff) == 0xff;
901#elif defined __arm64__901#elif defined __arm64__
902 return vminv_u8(x) & 0x80;902 return vminv_u8(x) & 0x80;
903#else903#else
...@@ -907,7 +907,7 @@ static inline SIMD_CFUNC simd_bool simd_all(simd_char8 x) {...@@ -907,7 +907,7 @@ static inline SIMD_CFUNC simd_bool simd_all(simd_char8 x) {
907}907}
908static inline SIMD_CFUNC simd_bool simd_all(simd_char16 x) {908static inline SIMD_CFUNC simd_bool simd_all(simd_char16 x) {
909#if defined __SSE2__909#if defined __SSE2__
910 return _mm_movemask_epi8((__m128i)x) == 0xffff;910 return _mm_movemask_epi8(x) == 0xffff;
911#elif defined __arm64__911#elif defined __arm64__
912 return vminvq_u8(x) & 0x80;912 return vminvq_u8(x) & 0x80;
913#else913#else
...@@ -947,7 +947,7 @@ static inline SIMD_CFUNC simd_bool simd_all(simd_uchar64 x) {...@@ -947,7 +947,7 @@ static inline SIMD_CFUNC simd_bool simd_all(simd_uchar64 x) {
947}947}
948static inline SIMD_CFUNC simd_bool simd_all(simd_short2 x) {948static inline SIMD_CFUNC simd_bool simd_all(simd_short2 x) {
949#if defined __SSE2__949#if defined __SSE2__
950 return (_mm_movemask_epi8((__m128i)simd_make_short8_undef(x)) & 0xa) == 0xa;950 return (_mm_movemask_epi8(simd_make_short8_undef(x)) & 0xa) == 0xa;
951#elif defined __arm64__951#elif defined __arm64__
952 return simd_all(x.xyxy);952 return simd_all(x.xyxy);
953#else953#else
...@@ -957,7 +957,7 @@ static inline SIMD_CFUNC simd_bool simd_all(simd_short2 x) {...@@ -957,7 +957,7 @@ static inline SIMD_CFUNC simd_bool simd_all(simd_short2 x) {
957}957}
958static inline SIMD_CFUNC simd_bool simd_all(simd_short3 x) {958static inline SIMD_CFUNC simd_bool simd_all(simd_short3 x) {
959#if defined __SSE2__959#if defined __SSE2__
960 return (_mm_movemask_epi8((__m128i)simd_make_short8_undef(x)) & 0x2a) == 0x2a;960 return (_mm_movemask_epi8(simd_make_short8_undef(x)) & 0x2a) == 0x2a;
961#elif defined __arm64__961#elif defined __arm64__
962 return simd_all(x.xyzz);962 return simd_all(x.xyzz);
963#else963#else
...@@ -967,7 +967,7 @@ static inline SIMD_CFUNC simd_bool simd_all(simd_short3 x) {...@@ -967,7 +967,7 @@ static inline SIMD_CFUNC simd_bool simd_all(simd_short3 x) {
967}967}
968static inline SIMD_CFUNC simd_bool simd_all(simd_short4 x) {968static inline SIMD_CFUNC simd_bool simd_all(simd_short4 x) {
969#if defined __SSE2__969#if defined __SSE2__
970 return (_mm_movemask_epi8((__m128i)simd_make_short8_undef(x)) & 0xaa) == 0xaa;970 return (_mm_movemask_epi8(simd_make_short8_undef(x)) & 0xaa) == 0xaa;
971#elif defined __arm64__971#elif defined __arm64__
972 return vminv_u16(x) & 0x8000;972 return vminv_u16(x) & 0x8000;
973#else973#else
...@@ -977,7 +977,7 @@ static inline SIMD_CFUNC simd_bool simd_all(simd_short4 x) {...@@ -977,7 +977,7 @@ static inline SIMD_CFUNC simd_bool simd_all(simd_short4 x) {
977}977}
978static inline SIMD_CFUNC simd_bool simd_all(simd_short8 x) {978static inline SIMD_CFUNC simd_bool simd_all(simd_short8 x) {
979#if defined __SSE2__979#if defined __SSE2__
980 return (_mm_movemask_epi8((__m128i)x) & 0xaaaa) == 0xaaaa;980 return (_mm_movemask_epi8(x) & 0xaaaa) == 0xaaaa;
981#elif defined __arm64__981#elif defined __arm64__
982 return vminvq_u16(x) & 0x8000;982 return vminvq_u16(x) & 0x8000;
983#else983#else
...@@ -1014,7 +1014,7 @@ static inline SIMD_CFUNC simd_bool simd_all(simd_ushort32 x) {...@@ -1014,7 +1014,7 @@ static inline SIMD_CFUNC simd_bool simd_all(simd_ushort32 x) {
1014}1014}
1015static inline SIMD_CFUNC simd_bool simd_all(simd_int2 x) {1015static inline SIMD_CFUNC simd_bool simd_all(simd_int2 x) {
1016#if defined __SSE2__1016#if defined __SSE2__
1017 return (_mm_movemask_ps((__m128)simd_make_int4_undef(x)) & 0x3) == 0x3;1017 return (_mm_movemask_ps(simd_make_int4_undef(x)) & 0x3) == 0x3;
1018#elif defined __arm64__1018#elif defined __arm64__
1019 return vminv_u32(x) & 0x80000000;1019 return vminv_u32(x) & 0x80000000;
1020#else1020#else
...@@ -1024,7 +1024,7 @@ static inline SIMD_CFUNC simd_bool simd_all(simd_int2 x) {...@@ -1024,7 +1024,7 @@ static inline SIMD_CFUNC simd_bool simd_all(simd_int2 x) {
1024}1024}
1025static inline SIMD_CFUNC simd_bool simd_all(simd_int3 x) {1025static inline SIMD_CFUNC simd_bool simd_all(simd_int3 x) {
1026#if defined __SSE2__1026#if defined __SSE2__
1027 return (_mm_movemask_ps((__m128)simd_make_int4_undef(x)) & 0x7) == 0x7;1027 return (_mm_movemask_ps(simd_make_int4_undef(x)) & 0x7) == 0x7;
1028#elif defined __arm64__1028#elif defined __arm64__
1029 return simd_all(x.xyzz);1029 return simd_all(x.xyzz);
1030#else1030#else
...@@ -1033,7 +1033,7 @@ static inline SIMD_CFUNC simd_bool simd_all(simd_int3 x) {...@@ -1033,7 +1033,7 @@ static inline SIMD_CFUNC simd_bool simd_all(simd_int3 x) {
1033}1033}
1034static inline SIMD_CFUNC simd_bool simd_all(simd_int4 x) {1034static inline SIMD_CFUNC simd_bool simd_all(simd_int4 x) {
1035#if defined __SSE2__1035#if defined __SSE2__
1036 return _mm_movemask_ps((__m128)x) == 0xf;1036 return _mm_movemask_ps(x) == 0xf;
1037#elif defined __arm64__1037#elif defined __arm64__
1038 return vminvq_u32(x) & 0x80000000;1038 return vminvq_u32(x) & 0x80000000;
1039#else1039#else
...@@ -1067,7 +1067,7 @@ static inline SIMD_CFUNC simd_bool simd_all(simd_uint16 x) {...@@ -1067,7 +1067,7 @@ static inline SIMD_CFUNC simd_bool simd_all(simd_uint16 x) {
1067}1067}
1068static inline SIMD_CFUNC simd_bool simd_all(simd_long2 x) {1068static inline SIMD_CFUNC simd_bool simd_all(simd_long2 x) {
1069#if defined __SSE2__1069#if defined __SSE2__
1070 return _mm_movemask_pd((__m128d)x) == 0x3;1070 return _mm_movemask_pd(x) == 0x3;
1071#elif defined __arm64__1071#elif defined __arm64__
1072 return (x.x & x.y) & 0x8000000000000000U;1072 return (x.x & x.y) & 0x8000000000000000U;
1073#else1073#else
...@@ -1112,7 +1112,7 @@ static inline SIMD_CFUNC simd_float3 simd_select(simd_float3 x, simd_float3 y, s...@@ -1112,7 +1112,7 @@ static inline SIMD_CFUNC simd_float3 simd_select(simd_float3 x, simd_float3 y, s
1112}1112}
1113static inline SIMD_CFUNC simd_float4 simd_select(simd_float4 x, simd_float4 y, simd_int4 mask) {1113static inline SIMD_CFUNC simd_float4 simd_select(simd_float4 x, simd_float4 y, simd_int4 mask) {
1114#if defined __SSE4_1__1114#if defined __SSE4_1__
1115 return _mm_blendv_ps(x, y, (__m128)mask);1115 return _mm_blendv_ps(x, y, mask);
1116#else1116#else
1117 return simd_bitselect(x, y, mask >> 31);1117 return simd_bitselect(x, y, mask >> 31);
1118#endif1118#endif
...@@ -1129,7 +1129,7 @@ static inline SIMD_CFUNC simd_float16 simd_select(simd_float16 x, simd_float16 y...@@ -1129,7 +1129,7 @@ static inline SIMD_CFUNC simd_float16 simd_select(simd_float16 x, simd_float16 y
1129}1129}
1130static inline SIMD_CFUNC simd_double2 simd_select(simd_double2 x, simd_double2 y, simd_long2 mask) {1130static inline SIMD_CFUNC simd_double2 simd_select(simd_double2 x, simd_double2 y, simd_long2 mask) {
1131#if defined __SSE4_1__1131#if defined __SSE4_1__
1132 return _mm_blendv_pd(x, y, (__m128d)mask);1132 return _mm_blendv_pd(x, y, mask);
1133#else1133#else
1134 return simd_bitselect(x, y, mask >> 63);1134 return simd_bitselect(x, y, mask >> 63);
1135#endif1135#endif
lib/libc/include/x86_64-macos-gnu/simd/math.h+160-161
...@@ -1886,7 +1886,6 @@ static inline SIMD_CFUNC double __tg_exp10(double x) { return __exp10(x); }...@@ -1886,7 +1886,6 @@ static inline SIMD_CFUNC double __tg_exp10(double x) { return __exp10(x); }
1886 * and doubles as provided by `<simd/simd.h>`. */1886 * and doubles as provided by `<simd/simd.h>`. */
1887#define exp10(__x) __tg_exp10(__tg_promote1((__x))(__x))1887#define exp10(__x) __tg_exp10(__tg_promote1((__x))(__x))
1888#endif1888#endif
1889
1890 1889
1891#endif /* !__cplusplus */1890#endif /* !__cplusplus */
1892 1891
...@@ -1947,11 +1946,11 @@ static SIMD_CFUNC simd_float8 __tg_fmin(simd_float8 x, simd_float8 y) {...@@ -1947,11 +1946,11 @@ static SIMD_CFUNC simd_float8 __tg_fmin(simd_float8 x, simd_float8 y) {
1947}1946}
1948 1947
1949static SIMD_CFUNC simd_float16 __tg_fmin(simd_float16 x, simd_float16 y) {1948static SIMD_CFUNC simd_float16 __tg_fmin(simd_float16 x, simd_float16 y) {
1950#if defined __x86_64__ && defined __AVX512DQ__ && !__FINITE_MATH_ONLY__1949#if defined __AVX512DQ__ && !__FINITE_MATH_ONLY__
1951 return _mm512_range_ps(x, y, 4);1950 return _mm512_range_ps(x, y, 4);
1952#elif defined __x86_64__ && defined __AVX512F__ && __FINITE_MATH_ONLY__1951#elif defined __AVX512F__ && __FINITE_MATH_ONLY__
1953 return _mm512_min_ps(x, y);1952 return _mm512_min_ps(x, y);
1954#elif defined __x86_64__ && defined __AVX512F__1953#elif defined __AVX512F__
1955 return simd_bitselect(_mm512_min_ps(x, y), x, y != y);1954 return simd_bitselect(_mm512_min_ps(x, y), x, y != y);
1956#else1955#else
1957 return simd_make_float16(__tg_fmin(x.lo, y.lo), __tg_fmin(x.hi, y.hi));1956 return simd_make_float16(__tg_fmin(x.lo, y.lo), __tg_fmin(x.hi, y.hi));
...@@ -1989,11 +1988,11 @@ static SIMD_CFUNC simd_double4 __tg_fmin(simd_double4 x, simd_double4 y) {...@@ -1989,11 +1988,11 @@ static SIMD_CFUNC simd_double4 __tg_fmin(simd_double4 x, simd_double4 y) {
1989}1988}
19901989
1991static SIMD_CFUNC simd_double8 __tg_fmin(simd_double8 x, simd_double8 y) {1990static SIMD_CFUNC simd_double8 __tg_fmin(simd_double8 x, simd_double8 y) {
1992#if defined __x86_64__ && defined __AVX512DQ__1991#if defined __AVX512DQ__
1993 return _mm512_range_pd(x, y, 4);1992 return _mm512_range_pd(x, y, 4);
1994#elif defined __x86_64__ && defined __AVX512F__ && __FINITE_MATH_ONLY__1993#elif defined __AVX512F__ && __FINITE_MATH_ONLY__
1995 return _mm512_min_pd(x, y);1994 return _mm512_min_pd(x, y);
1996#elif defined __x86_64__ && defined __AVX512F__1995#elif defined __AVX512F__
1997 return simd_bitselect(_mm512_min_pd(x, y), x, y != y);1996 return simd_bitselect(_mm512_min_pd(x, y), x, y != y);
1998#else1997#else
1999 return simd_make_double8(__tg_fmin(x.lo, y.lo), __tg_fmin(x.hi, y.hi));1998 return simd_make_double8(__tg_fmin(x.lo, y.lo), __tg_fmin(x.hi, y.hi));
...@@ -2045,11 +2044,11 @@ static SIMD_CFUNC simd_float8 __tg_fmax(simd_float8 x, simd_float8 y) {...@@ -2045,11 +2044,11 @@ static SIMD_CFUNC simd_float8 __tg_fmax(simd_float8 x, simd_float8 y) {
2045}2044}
2046 2045
2047static SIMD_CFUNC simd_float16 __tg_fmax(simd_float16 x, simd_float16 y) {2046static SIMD_CFUNC simd_float16 __tg_fmax(simd_float16 x, simd_float16 y) {
2048#if defined __x86_64__ && defined __AVX512DQ__ && !__FINITE_MATH_ONLY__2047#if defined __AVX512DQ__ && !__FINITE_MATH_ONLY__
2049 return _mm512_range_ps(x, y, 5);2048 return _mm512_range_ps(x, y, 5);
2050#elif defined __x86_64__ && defined __AVX512F__ && __FINITE_MATH_ONLY__2049#elif defined __AVX512F__ && __FINITE_MATH_ONLY__
2051 return _mm512_max_ps(x, y);2050 return _mm512_max_ps(x, y);
2052#elif defined __x86_64__ && defined __AVX512F__2051#elif defined __AVX512F__
2053 return simd_bitselect(_mm512_max_ps(x, y), x, y != y);2052 return simd_bitselect(_mm512_max_ps(x, y), x, y != y);
2054#else2053#else
2055 return simd_make_float16(__tg_fmax(x.lo, y.lo), __tg_fmax(x.hi, y.hi));2054 return simd_make_float16(__tg_fmax(x.lo, y.lo), __tg_fmax(x.hi, y.hi));
...@@ -2087,11 +2086,11 @@ static SIMD_CFUNC simd_double4 __tg_fmax(simd_double4 x, simd_double4 y) {...@@ -2087,11 +2086,11 @@ static SIMD_CFUNC simd_double4 __tg_fmax(simd_double4 x, simd_double4 y) {
2087}2086}
20882087
2089static SIMD_CFUNC simd_double8 __tg_fmax(simd_double8 x, simd_double8 y) {2088static SIMD_CFUNC simd_double8 __tg_fmax(simd_double8 x, simd_double8 y) {
2090#if defined __x86_64__ && defined __AVX512DQ__2089#if defined __AVX512DQ__
2091 return _mm512_range_pd(x, y, 5);2090 return _mm512_range_pd(x, y, 5);
2092#elif defined __x86_64__ && defined __AVX512F__ && __FINITE_MATH_ONLY__2091#elif defined __AVX512F__ && __FINITE_MATH_ONLY__
2093 return _mm512_max_pd(x, y);2092 return _mm512_max_pd(x, y);
2094#elif defined __x86_64__ && defined __AVX512F__2093#elif defined __AVX512F__
2095 return simd_bitselect(_mm512_max_pd(x, y), x, y != y);2094 return simd_bitselect(_mm512_max_pd(x, y), x, y != y);
2096#else2095#else
2097 return simd_make_double8(__tg_fmax(x.lo, y.lo), __tg_fmax(x.hi, y.hi));2096 return simd_make_double8(__tg_fmax(x.lo, y.lo), __tg_fmax(x.hi, y.hi));
...@@ -2143,7 +2142,7 @@ static SIMD_CFUNC simd_float8 __tg_sqrt(simd_float8 x) {...@@ -2143,7 +2142,7 @@ static SIMD_CFUNC simd_float8 __tg_sqrt(simd_float8 x) {
2143}2142}
2144 2143
2145static SIMD_CFUNC simd_float16 __tg_sqrt(simd_float16 x) {2144static SIMD_CFUNC simd_float16 __tg_sqrt(simd_float16 x) {
2146#if defined __x86_64__ && defined __AVX512F__2145#if defined __AVX512F__
2147 return _mm512_sqrt_ps(x);2146 return _mm512_sqrt_ps(x);
2148#else2147#else
2149 return simd_make_float16(__tg_sqrt(x.lo), __tg_sqrt(x.hi));2148 return simd_make_float16(__tg_sqrt(x.lo), __tg_sqrt(x.hi));
...@@ -2173,7 +2172,7 @@ static SIMD_CFUNC simd_double4 __tg_sqrt(simd_double4 x) {...@@ -2173,7 +2172,7 @@ static SIMD_CFUNC simd_double4 __tg_sqrt(simd_double4 x) {
2173}2172}
2174 2173
2175static SIMD_CFUNC simd_double8 __tg_sqrt(simd_double8 x) {2174static SIMD_CFUNC simd_double8 __tg_sqrt(simd_double8 x) {
2176#if defined __x86_64__ && defined __AVX512F__2175#if defined __AVX512F__
2177 return _mm512_sqrt_pd(x);2176 return _mm512_sqrt_pd(x);
2178#else2177#else
2179 return simd_make_double8(__tg_sqrt(x.lo), __tg_sqrt(x.hi));2178 return simd_make_double8(__tg_sqrt(x.lo), __tg_sqrt(x.hi));
...@@ -2220,7 +2219,7 @@ static SIMD_CFUNC simd_float8 __tg_ceil(simd_float8 x) {...@@ -2220,7 +2219,7 @@ static SIMD_CFUNC simd_float8 __tg_ceil(simd_float8 x) {
2220}2219}
2221 2220
2222static SIMD_CFUNC simd_float16 __tg_ceil(simd_float16 x) {2221static SIMD_CFUNC simd_float16 __tg_ceil(simd_float16 x) {
2223#if defined __x86_64__ && defined __AVX512F__2222#if defined __AVX512F__
2224 return _mm512_roundscale_ps(x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);2223 return _mm512_roundscale_ps(x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
2225#else2224#else
2226 return simd_make_float16(__tg_ceil(x.lo), __tg_ceil(x.hi));2225 return simd_make_float16(__tg_ceil(x.lo), __tg_ceil(x.hi));
...@@ -2258,7 +2257,7 @@ static SIMD_CFUNC simd_double4 __tg_ceil(simd_double4 x) {...@@ -2258,7 +2257,7 @@ static SIMD_CFUNC simd_double4 __tg_ceil(simd_double4 x) {
2258}2257}
2259 2258
2260static SIMD_CFUNC simd_double8 __tg_ceil(simd_double8 x) {2259static SIMD_CFUNC simd_double8 __tg_ceil(simd_double8 x) {
2261#if defined __x86_64__ && defined __AVX512F__2260#if defined __AVX512F__
2262 return _mm512_roundscale_pd(x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);2261 return _mm512_roundscale_pd(x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
2263#else2262#else
2264 return simd_make_double8(__tg_ceil(x.lo), __tg_ceil(x.hi));2263 return simd_make_double8(__tg_ceil(x.lo), __tg_ceil(x.hi));
...@@ -2304,7 +2303,7 @@ static SIMD_CFUNC simd_float8 __tg_floor(simd_float8 x) {...@@ -2304,7 +2303,7 @@ static SIMD_CFUNC simd_float8 __tg_floor(simd_float8 x) {
2304}2303}
2305 2304
2306static SIMD_CFUNC simd_float16 __tg_floor(simd_float16 x) {2305static SIMD_CFUNC simd_float16 __tg_floor(simd_float16 x) {
2307#if defined __x86_64__ && defined __AVX512F__2306#if defined __AVX512F__
2308 return _mm512_roundscale_ps(x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);2307 return _mm512_roundscale_ps(x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
2309#else2308#else
2310 return simd_make_float16(__tg_floor(x.lo), __tg_floor(x.hi));2309 return simd_make_float16(__tg_floor(x.lo), __tg_floor(x.hi));
...@@ -2342,7 +2341,7 @@ static SIMD_CFUNC simd_double4 __tg_floor(simd_double4 x) {...@@ -2342,7 +2341,7 @@ static SIMD_CFUNC simd_double4 __tg_floor(simd_double4 x) {
2342}2341}
2343 2342
2344static SIMD_CFUNC simd_double8 __tg_floor(simd_double8 x) {2343static SIMD_CFUNC simd_double8 __tg_floor(simd_double8 x) {
2345#if defined __x86_64__ && defined __AVX512F__2344#if defined __AVX512F__
2346 return _mm512_roundscale_pd(x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);2345 return _mm512_roundscale_pd(x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
2347#else2346#else
2348 return simd_make_double8(__tg_floor(x.lo), __tg_floor(x.hi));2347 return simd_make_double8(__tg_floor(x.lo), __tg_floor(x.hi));
...@@ -2388,7 +2387,7 @@ static SIMD_CFUNC simd_float8 __tg_rint(simd_float8 x) {...@@ -2388,7 +2387,7 @@ static SIMD_CFUNC simd_float8 __tg_rint(simd_float8 x) {
2388}2387}
2389 2388
2390static SIMD_CFUNC simd_float16 __tg_rint(simd_float16 x) {2389static SIMD_CFUNC simd_float16 __tg_rint(simd_float16 x) {
2391#if defined __x86_64__ && defined __AVX512F__2390#if defined __AVX512F__
2392 return _mm512_roundscale_ps(x, _MM_FROUND_RINT);2391 return _mm512_roundscale_ps(x, _MM_FROUND_RINT);
2393#else2392#else
2394 return simd_make_float16(__tg_rint(x.lo), __tg_rint(x.hi));2393 return simd_make_float16(__tg_rint(x.lo), __tg_rint(x.hi));
...@@ -2426,7 +2425,7 @@ static SIMD_CFUNC simd_double4 __tg_rint(simd_double4 x) {...@@ -2426,7 +2425,7 @@ static SIMD_CFUNC simd_double4 __tg_rint(simd_double4 x) {
2426}2425}
2427 2426
2428static SIMD_CFUNC simd_double8 __tg_rint(simd_double8 x) {2427static SIMD_CFUNC simd_double8 __tg_rint(simd_double8 x) {
2429#if defined __x86_64__ && defined __AVX512F__2428#if defined __AVX512F__
2430 return _mm512_roundscale_pd(x, _MM_FROUND_RINT);2429 return _mm512_roundscale_pd(x, _MM_FROUND_RINT);
2431#else2430#else
2432 return simd_make_double8(__tg_rint(x.lo), __tg_rint(x.hi));2431 return simd_make_double8(__tg_rint(x.lo), __tg_rint(x.hi));
...@@ -2473,7 +2472,7 @@ static SIMD_CFUNC simd_float8 __tg_trunc(simd_float8 x) {...@@ -2473,7 +2472,7 @@ static SIMD_CFUNC simd_float8 __tg_trunc(simd_float8 x) {
2473}2472}
2474 2473
2475static SIMD_CFUNC simd_float16 __tg_trunc(simd_float16 x) {2474static SIMD_CFUNC simd_float16 __tg_trunc(simd_float16 x) {
2476#if defined __x86_64__ && defined __AVX512F__2475#if defined __AVX512F__
2477 return _mm512_roundscale_ps(x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);2476 return _mm512_roundscale_ps(x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
2478#else2477#else
2479 return simd_make_float16(__tg_trunc(x.lo), __tg_trunc(x.hi));2478 return simd_make_float16(__tg_trunc(x.lo), __tg_trunc(x.hi));
...@@ -2512,7 +2511,7 @@ static SIMD_CFUNC simd_double4 __tg_trunc(simd_double4 x) {...@@ -2512,7 +2511,7 @@ static SIMD_CFUNC simd_double4 __tg_trunc(simd_double4 x) {
2512}2511}
2513 2512
2514static SIMD_CFUNC simd_double8 __tg_trunc(simd_double8 x) {2513static SIMD_CFUNC simd_double8 __tg_trunc(simd_double8 x) {
2515#if defined __x86_64__ && defined __AVX512F__2514#if defined __AVX512F__
2516 return _mm512_roundscale_pd(x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);2515 return _mm512_roundscale_pd(x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
2517#else2516#else
2518 return simd_make_double8(__tg_trunc(x.lo), __tg_trunc(x.hi));2517 return simd_make_double8(__tg_trunc(x.lo), __tg_trunc(x.hi));
...@@ -2544,7 +2543,7 @@ static inline SIMD_CFUNC simd_float4 __tg_sin(simd_float4 x) {...@@ -2544,7 +2543,7 @@ static inline SIMD_CFUNC simd_float4 __tg_sin(simd_float4 x) {
2544}2543}
2545#endif2544#endif
25462545
2547#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__2546#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
2548extern simd_float8 _simd_sin_f8(simd_float8 x);2547extern simd_float8 _simd_sin_f8(simd_float8 x);
2549static inline SIMD_CFUNC simd_float8 __tg_sin(simd_float8 x) {2548static inline SIMD_CFUNC simd_float8 __tg_sin(simd_float8 x) {
2550 return _simd_sin_f8(x);2549 return _simd_sin_f8(x);
...@@ -2555,7 +2554,7 @@ static inline SIMD_CFUNC simd_float8 __tg_sin(simd_float8 x) {...@@ -2555,7 +2554,7 @@ static inline SIMD_CFUNC simd_float8 __tg_sin(simd_float8 x) {
2555}2554}
2556#endif2555#endif
25572556
2558#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__2557#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
2559extern simd_float16 _simd_sin_f16(simd_float16 x);2558extern simd_float16 _simd_sin_f16(simd_float16 x);
2560static inline SIMD_CFUNC simd_float16 __tg_sin(simd_float16 x) {2559static inline SIMD_CFUNC simd_float16 __tg_sin(simd_float16 x) {
2561 return _simd_sin_f16(x);2560 return _simd_sin_f16(x);
...@@ -2586,7 +2585,7 @@ static inline SIMD_CFUNC simd_double3 __tg_sin(simd_double3 x) {...@@ -2586,7 +2585,7 @@ static inline SIMD_CFUNC simd_double3 __tg_sin(simd_double3 x) {
2586 return simd_make_double3(__tg_sin(simd_make_double4(x)));2585 return simd_make_double3(__tg_sin(simd_make_double4(x)));
2587}2586}
2588 2587
2589#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__2588#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
2590extern simd_double4 _simd_sin_d4(simd_double4 x);2589extern simd_double4 _simd_sin_d4(simd_double4 x);
2591static inline SIMD_CFUNC simd_double4 __tg_sin(simd_double4 x) {2590static inline SIMD_CFUNC simd_double4 __tg_sin(simd_double4 x) {
2592 return _simd_sin_d4(x);2591 return _simd_sin_d4(x);
...@@ -2597,7 +2596,7 @@ static inline SIMD_CFUNC simd_double4 __tg_sin(simd_double4 x) {...@@ -2597,7 +2596,7 @@ static inline SIMD_CFUNC simd_double4 __tg_sin(simd_double4 x) {
2597}2596}
2598#endif2597#endif
25992598
2600#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__2599#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
2601extern simd_double8 _simd_sin_d8(simd_double8 x);2600extern simd_double8 _simd_sin_d8(simd_double8 x);
2602static inline SIMD_CFUNC simd_double8 __tg_sin(simd_double8 x) {2601static inline SIMD_CFUNC simd_double8 __tg_sin(simd_double8 x) {
2603 return _simd_sin_d8(x);2602 return _simd_sin_d8(x);
...@@ -2632,7 +2631,7 @@ static inline SIMD_CFUNC simd_float4 __tg_cos(simd_float4 x) {...@@ -2632,7 +2631,7 @@ static inline SIMD_CFUNC simd_float4 __tg_cos(simd_float4 x) {
2632}2631}
2633#endif2632#endif
26342633
2635#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__2634#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
2636extern simd_float8 _simd_cos_f8(simd_float8 x);2635extern simd_float8 _simd_cos_f8(simd_float8 x);
2637static inline SIMD_CFUNC simd_float8 __tg_cos(simd_float8 x) {2636static inline SIMD_CFUNC simd_float8 __tg_cos(simd_float8 x) {
2638 return _simd_cos_f8(x);2637 return _simd_cos_f8(x);
...@@ -2643,7 +2642,7 @@ static inline SIMD_CFUNC simd_float8 __tg_cos(simd_float8 x) {...@@ -2643,7 +2642,7 @@ static inline SIMD_CFUNC simd_float8 __tg_cos(simd_float8 x) {
2643}2642}
2644#endif2643#endif
26452644
2646#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__2645#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
2647extern simd_float16 _simd_cos_f16(simd_float16 x);2646extern simd_float16 _simd_cos_f16(simd_float16 x);
2648static inline SIMD_CFUNC simd_float16 __tg_cos(simd_float16 x) {2647static inline SIMD_CFUNC simd_float16 __tg_cos(simd_float16 x) {
2649 return _simd_cos_f16(x);2648 return _simd_cos_f16(x);
...@@ -2674,7 +2673,7 @@ static inline SIMD_CFUNC simd_double3 __tg_cos(simd_double3 x) {...@@ -2674,7 +2673,7 @@ static inline SIMD_CFUNC simd_double3 __tg_cos(simd_double3 x) {
2674 return simd_make_double3(__tg_cos(simd_make_double4(x)));2673 return simd_make_double3(__tg_cos(simd_make_double4(x)));
2675}2674}
2676 2675
2677#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__2676#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
2678extern simd_double4 _simd_cos_d4(simd_double4 x);2677extern simd_double4 _simd_cos_d4(simd_double4 x);
2679static inline SIMD_CFUNC simd_double4 __tg_cos(simd_double4 x) {2678static inline SIMD_CFUNC simd_double4 __tg_cos(simd_double4 x) {
2680 return _simd_cos_d4(x);2679 return _simd_cos_d4(x);
...@@ -2685,7 +2684,7 @@ static inline SIMD_CFUNC simd_double4 __tg_cos(simd_double4 x) {...@@ -2685,7 +2684,7 @@ static inline SIMD_CFUNC simd_double4 __tg_cos(simd_double4 x) {
2685}2684}
2686#endif2685#endif
26872686
2688#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__2687#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
2689extern simd_double8 _simd_cos_d8(simd_double8 x);2688extern simd_double8 _simd_cos_d8(simd_double8 x);
2690static inline SIMD_CFUNC simd_double8 __tg_cos(simd_double8 x) {2689static inline SIMD_CFUNC simd_double8 __tg_cos(simd_double8 x) {
2691 return _simd_cos_d8(x);2690 return _simd_cos_d8(x);
...@@ -2717,7 +2716,7 @@ static inline SIMD_CFUNC simd_float4 __tg_acos(simd_float4 x) {...@@ -2717,7 +2716,7 @@ static inline SIMD_CFUNC simd_float4 __tg_acos(simd_float4 x) {
2717}2716}
2718#endif2717#endif
27192718
2720#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__2719#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
2721extern simd_float8 _simd_acos_f8(simd_float8 x);2720extern simd_float8 _simd_acos_f8(simd_float8 x);
2722static inline SIMD_CFUNC simd_float8 __tg_acos(simd_float8 x) {2721static inline SIMD_CFUNC simd_float8 __tg_acos(simd_float8 x) {
2723 return _simd_acos_f8(x);2722 return _simd_acos_f8(x);
...@@ -2728,7 +2727,7 @@ static inline SIMD_CFUNC simd_float8 __tg_acos(simd_float8 x) {...@@ -2728,7 +2727,7 @@ static inline SIMD_CFUNC simd_float8 __tg_acos(simd_float8 x) {
2728}2727}
2729#endif2728#endif
27302729
2731#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__2730#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
2732extern simd_float16 _simd_acos_f16(simd_float16 x);2731extern simd_float16 _simd_acos_f16(simd_float16 x);
2733static inline SIMD_CFUNC simd_float16 __tg_acos(simd_float16 x) {2732static inline SIMD_CFUNC simd_float16 __tg_acos(simd_float16 x) {
2734 return _simd_acos_f16(x);2733 return _simd_acos_f16(x);
...@@ -2754,7 +2753,7 @@ static inline SIMD_CFUNC simd_double3 __tg_acos(simd_double3 x) {...@@ -2754,7 +2753,7 @@ static inline SIMD_CFUNC simd_double3 __tg_acos(simd_double3 x) {
2754 return simd_make_double3(__tg_acos(simd_make_double4(x)));2753 return simd_make_double3(__tg_acos(simd_make_double4(x)));
2755}2754}
27562755
2757#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__2756#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
2758extern simd_double4 _simd_acos_d4(simd_double4 x);2757extern simd_double4 _simd_acos_d4(simd_double4 x);
2759static inline SIMD_CFUNC simd_double4 __tg_acos(simd_double4 x) {2758static inline SIMD_CFUNC simd_double4 __tg_acos(simd_double4 x) {
2760 return _simd_acos_d4(x);2759 return _simd_acos_d4(x);
...@@ -2765,7 +2764,7 @@ static inline SIMD_CFUNC simd_double4 __tg_acos(simd_double4 x) {...@@ -2765,7 +2764,7 @@ static inline SIMD_CFUNC simd_double4 __tg_acos(simd_double4 x) {
2765}2764}
2766#endif2765#endif
27672766
2768#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__2767#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
2769extern simd_double8 _simd_acos_d8(simd_double8 x);2768extern simd_double8 _simd_acos_d8(simd_double8 x);
2770static inline SIMD_CFUNC simd_double8 __tg_acos(simd_double8 x) {2769static inline SIMD_CFUNC simd_double8 __tg_acos(simd_double8 x) {
2771 return _simd_acos_d8(x);2770 return _simd_acos_d8(x);
...@@ -2796,7 +2795,7 @@ static inline SIMD_CFUNC simd_float4 __tg_asin(simd_float4 x) {...@@ -2796,7 +2795,7 @@ static inline SIMD_CFUNC simd_float4 __tg_asin(simd_float4 x) {
2796}2795}
2797#endif2796#endif
27982797
2799#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__2798#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
2800extern simd_float8 _simd_asin_f8(simd_float8 x);2799extern simd_float8 _simd_asin_f8(simd_float8 x);
2801static inline SIMD_CFUNC simd_float8 __tg_asin(simd_float8 x) {2800static inline SIMD_CFUNC simd_float8 __tg_asin(simd_float8 x) {
2802 return _simd_asin_f8(x);2801 return _simd_asin_f8(x);
...@@ -2807,7 +2806,7 @@ static inline SIMD_CFUNC simd_float8 __tg_asin(simd_float8 x) {...@@ -2807,7 +2806,7 @@ static inline SIMD_CFUNC simd_float8 __tg_asin(simd_float8 x) {
2807}2806}
2808#endif2807#endif
28092808
2810#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__2809#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
2811extern simd_float16 _simd_asin_f16(simd_float16 x);2810extern simd_float16 _simd_asin_f16(simd_float16 x);
2812static inline SIMD_CFUNC simd_float16 __tg_asin(simd_float16 x) {2811static inline SIMD_CFUNC simd_float16 __tg_asin(simd_float16 x) {
2813 return _simd_asin_f16(x);2812 return _simd_asin_f16(x);
...@@ -2833,7 +2832,7 @@ static inline SIMD_CFUNC simd_double3 __tg_asin(simd_double3 x) {...@@ -2833,7 +2832,7 @@ static inline SIMD_CFUNC simd_double3 __tg_asin(simd_double3 x) {
2833 return simd_make_double3(__tg_asin(simd_make_double4(x)));2832 return simd_make_double3(__tg_asin(simd_make_double4(x)));
2834}2833}
28352834
2836#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__2835#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
2837extern simd_double4 _simd_asin_d4(simd_double4 x);2836extern simd_double4 _simd_asin_d4(simd_double4 x);
2838static inline SIMD_CFUNC simd_double4 __tg_asin(simd_double4 x) {2837static inline SIMD_CFUNC simd_double4 __tg_asin(simd_double4 x) {
2839 return _simd_asin_d4(x);2838 return _simd_asin_d4(x);
...@@ -2844,7 +2843,7 @@ static inline SIMD_CFUNC simd_double4 __tg_asin(simd_double4 x) {...@@ -2844,7 +2843,7 @@ static inline SIMD_CFUNC simd_double4 __tg_asin(simd_double4 x) {
2844}2843}
2845#endif2844#endif
28462845
2847#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__2846#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
2848extern simd_double8 _simd_asin_d8(simd_double8 x);2847extern simd_double8 _simd_asin_d8(simd_double8 x);
2849static inline SIMD_CFUNC simd_double8 __tg_asin(simd_double8 x) {2848static inline SIMD_CFUNC simd_double8 __tg_asin(simd_double8 x) {
2850 return _simd_asin_d8(x);2849 return _simd_asin_d8(x);
...@@ -2875,7 +2874,7 @@ static inline SIMD_CFUNC simd_float4 __tg_atan(simd_float4 x) {...@@ -2875,7 +2874,7 @@ static inline SIMD_CFUNC simd_float4 __tg_atan(simd_float4 x) {
2875}2874}
2876#endif2875#endif
28772876
2878#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__2877#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
2879extern simd_float8 _simd_atan_f8(simd_float8 x);2878extern simd_float8 _simd_atan_f8(simd_float8 x);
2880static inline SIMD_CFUNC simd_float8 __tg_atan(simd_float8 x) {2879static inline SIMD_CFUNC simd_float8 __tg_atan(simd_float8 x) {
2881 return _simd_atan_f8(x);2880 return _simd_atan_f8(x);
...@@ -2886,7 +2885,7 @@ static inline SIMD_CFUNC simd_float8 __tg_atan(simd_float8 x) {...@@ -2886,7 +2885,7 @@ static inline SIMD_CFUNC simd_float8 __tg_atan(simd_float8 x) {
2886}2885}
2887#endif2886#endif
28882887
2889#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__2888#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
2890extern simd_float16 _simd_atan_f16(simd_float16 x);2889extern simd_float16 _simd_atan_f16(simd_float16 x);
2891static inline SIMD_CFUNC simd_float16 __tg_atan(simd_float16 x) {2890static inline SIMD_CFUNC simd_float16 __tg_atan(simd_float16 x) {
2892 return _simd_atan_f16(x);2891 return _simd_atan_f16(x);
...@@ -2912,7 +2911,7 @@ static inline SIMD_CFUNC simd_double3 __tg_atan(simd_double3 x) {...@@ -2912,7 +2911,7 @@ static inline SIMD_CFUNC simd_double3 __tg_atan(simd_double3 x) {
2912 return simd_make_double3(__tg_atan(simd_make_double4(x)));2911 return simd_make_double3(__tg_atan(simd_make_double4(x)));
2913}2912}
29142913
2915#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__2914#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
2916extern simd_double4 _simd_atan_d4(simd_double4 x);2915extern simd_double4 _simd_atan_d4(simd_double4 x);
2917static inline SIMD_CFUNC simd_double4 __tg_atan(simd_double4 x) {2916static inline SIMD_CFUNC simd_double4 __tg_atan(simd_double4 x) {
2918 return _simd_atan_d4(x);2917 return _simd_atan_d4(x);
...@@ -2923,7 +2922,7 @@ static inline SIMD_CFUNC simd_double4 __tg_atan(simd_double4 x) {...@@ -2923,7 +2922,7 @@ static inline SIMD_CFUNC simd_double4 __tg_atan(simd_double4 x) {
2923}2922}
2924#endif2923#endif
29252924
2926#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__2925#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
2927extern simd_double8 _simd_atan_d8(simd_double8 x);2926extern simd_double8 _simd_atan_d8(simd_double8 x);
2928static inline SIMD_CFUNC simd_double8 __tg_atan(simd_double8 x) {2927static inline SIMD_CFUNC simd_double8 __tg_atan(simd_double8 x) {
2929 return _simd_atan_d8(x);2928 return _simd_atan_d8(x);
...@@ -2954,7 +2953,7 @@ static inline SIMD_CFUNC simd_float4 __tg_tan(simd_float4 x) {...@@ -2954,7 +2953,7 @@ static inline SIMD_CFUNC simd_float4 __tg_tan(simd_float4 x) {
2954}2953}
2955#endif2954#endif
29562955
2957#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__2956#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
2958extern simd_float8 _simd_tan_f8(simd_float8 x);2957extern simd_float8 _simd_tan_f8(simd_float8 x);
2959static inline SIMD_CFUNC simd_float8 __tg_tan(simd_float8 x) {2958static inline SIMD_CFUNC simd_float8 __tg_tan(simd_float8 x) {
2960 return _simd_tan_f8(x);2959 return _simd_tan_f8(x);
...@@ -2965,7 +2964,7 @@ static inline SIMD_CFUNC simd_float8 __tg_tan(simd_float8 x) {...@@ -2965,7 +2964,7 @@ static inline SIMD_CFUNC simd_float8 __tg_tan(simd_float8 x) {
2965}2964}
2966#endif2965#endif
29672966
2968#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__2967#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
2969extern simd_float16 _simd_tan_f16(simd_float16 x);2968extern simd_float16 _simd_tan_f16(simd_float16 x);
2970static inline SIMD_CFUNC simd_float16 __tg_tan(simd_float16 x) {2969static inline SIMD_CFUNC simd_float16 __tg_tan(simd_float16 x) {
2971 return _simd_tan_f16(x);2970 return _simd_tan_f16(x);
...@@ -2991,7 +2990,7 @@ static inline SIMD_CFUNC simd_double3 __tg_tan(simd_double3 x) {...@@ -2991,7 +2990,7 @@ static inline SIMD_CFUNC simd_double3 __tg_tan(simd_double3 x) {
2991 return simd_make_double3(__tg_tan(simd_make_double4(x)));2990 return simd_make_double3(__tg_tan(simd_make_double4(x)));
2992}2991}
29932992
2994#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__2993#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
2995extern simd_double4 _simd_tan_d4(simd_double4 x);2994extern simd_double4 _simd_tan_d4(simd_double4 x);
2996static inline SIMD_CFUNC simd_double4 __tg_tan(simd_double4 x) {2995static inline SIMD_CFUNC simd_double4 __tg_tan(simd_double4 x) {
2997 return _simd_tan_d4(x);2996 return _simd_tan_d4(x);
...@@ -3002,7 +3001,7 @@ static inline SIMD_CFUNC simd_double4 __tg_tan(simd_double4 x) {...@@ -3002,7 +3001,7 @@ static inline SIMD_CFUNC simd_double4 __tg_tan(simd_double4 x) {
3002}3001}
3003#endif3002#endif
30043003
3005#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__3004#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
3006extern simd_double8 _simd_tan_d8(simd_double8 x);3005extern simd_double8 _simd_tan_d8(simd_double8 x);
3007static inline SIMD_CFUNC simd_double8 __tg_tan(simd_double8 x) {3006static inline SIMD_CFUNC simd_double8 __tg_tan(simd_double8 x) {
3008 return _simd_tan_d8(x);3007 return _simd_tan_d8(x);
...@@ -3034,7 +3033,7 @@ static inline SIMD_CFUNC simd_float4 __tg_cospi(simd_float4 x) {...@@ -3034,7 +3033,7 @@ static inline SIMD_CFUNC simd_float4 __tg_cospi(simd_float4 x) {
3034}3033}
3035#endif3034#endif
30363035
3037#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__3036#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
3038extern simd_float8 _simd_cospi_f8(simd_float8 x);3037extern simd_float8 _simd_cospi_f8(simd_float8 x);
3039static inline SIMD_CFUNC simd_float8 __tg_cospi(simd_float8 x) {3038static inline SIMD_CFUNC simd_float8 __tg_cospi(simd_float8 x) {
3040 return _simd_cospi_f8(x);3039 return _simd_cospi_f8(x);
...@@ -3045,7 +3044,7 @@ static inline SIMD_CFUNC simd_float8 __tg_cospi(simd_float8 x) {...@@ -3045,7 +3044,7 @@ static inline SIMD_CFUNC simd_float8 __tg_cospi(simd_float8 x) {
3045}3044}
3046#endif3045#endif
30473046
3048#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__3047#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
3049extern simd_float16 _simd_cospi_f16(simd_float16 x);3048extern simd_float16 _simd_cospi_f16(simd_float16 x);
3050static inline SIMD_CFUNC simd_float16 __tg_cospi(simd_float16 x) {3049static inline SIMD_CFUNC simd_float16 __tg_cospi(simd_float16 x) {
3051 return _simd_cospi_f16(x);3050 return _simd_cospi_f16(x);
...@@ -3071,7 +3070,7 @@ static inline SIMD_CFUNC simd_double3 __tg_cospi(simd_double3 x) {...@@ -3071,7 +3070,7 @@ static inline SIMD_CFUNC simd_double3 __tg_cospi(simd_double3 x) {
3071 return simd_make_double3(__tg_cospi(simd_make_double4(x)));3070 return simd_make_double3(__tg_cospi(simd_make_double4(x)));
3072}3071}
30733072
3074#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__3073#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
3075extern simd_double4 _simd_cospi_d4(simd_double4 x);3074extern simd_double4 _simd_cospi_d4(simd_double4 x);
3076static inline SIMD_CFUNC simd_double4 __tg_cospi(simd_double4 x) {3075static inline SIMD_CFUNC simd_double4 __tg_cospi(simd_double4 x) {
3077 return _simd_cospi_d4(x);3076 return _simd_cospi_d4(x);
...@@ -3082,7 +3081,7 @@ static inline SIMD_CFUNC simd_double4 __tg_cospi(simd_double4 x) {...@@ -3082,7 +3081,7 @@ static inline SIMD_CFUNC simd_double4 __tg_cospi(simd_double4 x) {
3082}3081}
3083#endif3082#endif
30843083
3085#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__3084#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
3086extern simd_double8 _simd_cospi_d8(simd_double8 x);3085extern simd_double8 _simd_cospi_d8(simd_double8 x);
3087static inline SIMD_CFUNC simd_double8 __tg_cospi(simd_double8 x) {3086static inline SIMD_CFUNC simd_double8 __tg_cospi(simd_double8 x) {
3088 return _simd_cospi_d8(x);3087 return _simd_cospi_d8(x);
...@@ -3115,7 +3114,7 @@ static inline SIMD_CFUNC simd_float4 __tg_sinpi(simd_float4 x) {...@@ -3115,7 +3114,7 @@ static inline SIMD_CFUNC simd_float4 __tg_sinpi(simd_float4 x) {
3115}3114}
3116#endif3115#endif
31173116
3118#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__3117#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
3119extern simd_float8 _simd_sinpi_f8(simd_float8 x);3118extern simd_float8 _simd_sinpi_f8(simd_float8 x);
3120static inline SIMD_CFUNC simd_float8 __tg_sinpi(simd_float8 x) {3119static inline SIMD_CFUNC simd_float8 __tg_sinpi(simd_float8 x) {
3121 return _simd_sinpi_f8(x);3120 return _simd_sinpi_f8(x);
...@@ -3126,7 +3125,7 @@ static inline SIMD_CFUNC simd_float8 __tg_sinpi(simd_float8 x) {...@@ -3126,7 +3125,7 @@ static inline SIMD_CFUNC simd_float8 __tg_sinpi(simd_float8 x) {
3126}3125}
3127#endif3126#endif
31283127
3129#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__3128#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
3130extern simd_float16 _simd_sinpi_f16(simd_float16 x);3129extern simd_float16 _simd_sinpi_f16(simd_float16 x);
3131static inline SIMD_CFUNC simd_float16 __tg_sinpi(simd_float16 x) {3130static inline SIMD_CFUNC simd_float16 __tg_sinpi(simd_float16 x) {
3132 return _simd_sinpi_f16(x);3131 return _simd_sinpi_f16(x);
...@@ -3152,7 +3151,7 @@ static inline SIMD_CFUNC simd_double3 __tg_sinpi(simd_double3 x) {...@@ -3152,7 +3151,7 @@ static inline SIMD_CFUNC simd_double3 __tg_sinpi(simd_double3 x) {
3152 return simd_make_double3(__tg_sinpi(simd_make_double4(x)));3151 return simd_make_double3(__tg_sinpi(simd_make_double4(x)));
3153}3152}
31543153
3155#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__3154#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
3156extern simd_double4 _simd_sinpi_d4(simd_double4 x);3155extern simd_double4 _simd_sinpi_d4(simd_double4 x);
3157static inline SIMD_CFUNC simd_double4 __tg_sinpi(simd_double4 x) {3156static inline SIMD_CFUNC simd_double4 __tg_sinpi(simd_double4 x) {
3158 return _simd_sinpi_d4(x);3157 return _simd_sinpi_d4(x);
...@@ -3163,7 +3162,7 @@ static inline SIMD_CFUNC simd_double4 __tg_sinpi(simd_double4 x) {...@@ -3163,7 +3162,7 @@ static inline SIMD_CFUNC simd_double4 __tg_sinpi(simd_double4 x) {
3163}3162}
3164#endif3163#endif
31653164
3166#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__3165#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
3167extern simd_double8 _simd_sinpi_d8(simd_double8 x);3166extern simd_double8 _simd_sinpi_d8(simd_double8 x);
3168static inline SIMD_CFUNC simd_double8 __tg_sinpi(simd_double8 x) {3167static inline SIMD_CFUNC simd_double8 __tg_sinpi(simd_double8 x) {
3169 return _simd_sinpi_d8(x);3168 return _simd_sinpi_d8(x);
...@@ -3196,7 +3195,7 @@ static inline SIMD_CFUNC simd_float4 __tg_tanpi(simd_float4 x) {...@@ -3196,7 +3195,7 @@ static inline SIMD_CFUNC simd_float4 __tg_tanpi(simd_float4 x) {
3196}3195}
3197#endif3196#endif
31983197
3199#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__3198#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
3200extern simd_float8 _simd_tanpi_f8(simd_float8 x);3199extern simd_float8 _simd_tanpi_f8(simd_float8 x);
3201static inline SIMD_CFUNC simd_float8 __tg_tanpi(simd_float8 x) {3200static inline SIMD_CFUNC simd_float8 __tg_tanpi(simd_float8 x) {
3202 return _simd_tanpi_f8(x);3201 return _simd_tanpi_f8(x);
...@@ -3207,7 +3206,7 @@ static inline SIMD_CFUNC simd_float8 __tg_tanpi(simd_float8 x) {...@@ -3207,7 +3206,7 @@ static inline SIMD_CFUNC simd_float8 __tg_tanpi(simd_float8 x) {
3207}3206}
3208#endif3207#endif
32093208
3210#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__3209#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
3211extern simd_float16 _simd_tanpi_f16(simd_float16 x);3210extern simd_float16 _simd_tanpi_f16(simd_float16 x);
3212static inline SIMD_CFUNC simd_float16 __tg_tanpi(simd_float16 x) {3211static inline SIMD_CFUNC simd_float16 __tg_tanpi(simd_float16 x) {
3213 return _simd_tanpi_f16(x);3212 return _simd_tanpi_f16(x);
...@@ -3233,7 +3232,7 @@ static inline SIMD_CFUNC simd_double3 __tg_tanpi(simd_double3 x) {...@@ -3233,7 +3232,7 @@ static inline SIMD_CFUNC simd_double3 __tg_tanpi(simd_double3 x) {
3233 return simd_make_double3(__tg_tanpi(simd_make_double4(x)));3232 return simd_make_double3(__tg_tanpi(simd_make_double4(x)));
3234}3233}
32353234
3236#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__3235#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
3237extern simd_double4 _simd_tanpi_d4(simd_double4 x);3236extern simd_double4 _simd_tanpi_d4(simd_double4 x);
3238static inline SIMD_CFUNC simd_double4 __tg_tanpi(simd_double4 x) {3237static inline SIMD_CFUNC simd_double4 __tg_tanpi(simd_double4 x) {
3239 return _simd_tanpi_d4(x);3238 return _simd_tanpi_d4(x);
...@@ -3244,7 +3243,7 @@ static inline SIMD_CFUNC simd_double4 __tg_tanpi(simd_double4 x) {...@@ -3244,7 +3243,7 @@ static inline SIMD_CFUNC simd_double4 __tg_tanpi(simd_double4 x) {
3244}3243}
3245#endif3244#endif
32463245
3247#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__3246#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
3248extern simd_double8 _simd_tanpi_d8(simd_double8 x);3247extern simd_double8 _simd_tanpi_d8(simd_double8 x);
3249static inline SIMD_CFUNC simd_double8 __tg_tanpi(simd_double8 x) {3248static inline SIMD_CFUNC simd_double8 __tg_tanpi(simd_double8 x) {
3250 return _simd_tanpi_d8(x);3249 return _simd_tanpi_d8(x);
...@@ -3276,7 +3275,7 @@ static inline SIMD_CFUNC simd_float4 __tg_acosh(simd_float4 x) {...@@ -3276,7 +3275,7 @@ static inline SIMD_CFUNC simd_float4 __tg_acosh(simd_float4 x) {
3276}3275}
3277#endif3276#endif
32783277
3279#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__3278#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
3280extern simd_float8 _simd_acosh_f8(simd_float8 x);3279extern simd_float8 _simd_acosh_f8(simd_float8 x);
3281static inline SIMD_CFUNC simd_float8 __tg_acosh(simd_float8 x) {3280static inline SIMD_CFUNC simd_float8 __tg_acosh(simd_float8 x) {
3282 return _simd_acosh_f8(x);3281 return _simd_acosh_f8(x);
...@@ -3287,7 +3286,7 @@ static inline SIMD_CFUNC simd_float8 __tg_acosh(simd_float8 x) {...@@ -3287,7 +3286,7 @@ static inline SIMD_CFUNC simd_float8 __tg_acosh(simd_float8 x) {
3287}3286}
3288#endif3287#endif
32893288
3290#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__3289#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
3291extern simd_float16 _simd_acosh_f16(simd_float16 x);3290extern simd_float16 _simd_acosh_f16(simd_float16 x);
3292static inline SIMD_CFUNC simd_float16 __tg_acosh(simd_float16 x) {3291static inline SIMD_CFUNC simd_float16 __tg_acosh(simd_float16 x) {
3293 return _simd_acosh_f16(x);3292 return _simd_acosh_f16(x);
...@@ -3313,7 +3312,7 @@ static inline SIMD_CFUNC simd_double3 __tg_acosh(simd_double3 x) {...@@ -3313,7 +3312,7 @@ static inline SIMD_CFUNC simd_double3 __tg_acosh(simd_double3 x) {
3313 return simd_make_double3(__tg_acosh(simd_make_double4(x)));3312 return simd_make_double3(__tg_acosh(simd_make_double4(x)));
3314}3313}
33153314
3316#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__3315#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
3317extern simd_double4 _simd_acosh_d4(simd_double4 x);3316extern simd_double4 _simd_acosh_d4(simd_double4 x);
3318static inline SIMD_CFUNC simd_double4 __tg_acosh(simd_double4 x) {3317static inline SIMD_CFUNC simd_double4 __tg_acosh(simd_double4 x) {
3319 return _simd_acosh_d4(x);3318 return _simd_acosh_d4(x);
...@@ -3324,7 +3323,7 @@ static inline SIMD_CFUNC simd_double4 __tg_acosh(simd_double4 x) {...@@ -3324,7 +3323,7 @@ static inline SIMD_CFUNC simd_double4 __tg_acosh(simd_double4 x) {
3324}3323}
3325#endif3324#endif
33263325
3327#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__3326#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
3328extern simd_double8 _simd_acosh_d8(simd_double8 x);3327extern simd_double8 _simd_acosh_d8(simd_double8 x);
3329static inline SIMD_CFUNC simd_double8 __tg_acosh(simd_double8 x) {3328static inline SIMD_CFUNC simd_double8 __tg_acosh(simd_double8 x) {
3330 return _simd_acosh_d8(x);3329 return _simd_acosh_d8(x);
...@@ -3355,7 +3354,7 @@ static inline SIMD_CFUNC simd_float4 __tg_asinh(simd_float4 x) {...@@ -3355,7 +3354,7 @@ static inline SIMD_CFUNC simd_float4 __tg_asinh(simd_float4 x) {
3355}3354}
3356#endif3355#endif
33573356
3358#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__3357#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
3359extern simd_float8 _simd_asinh_f8(simd_float8 x);3358extern simd_float8 _simd_asinh_f8(simd_float8 x);
3360static inline SIMD_CFUNC simd_float8 __tg_asinh(simd_float8 x) {3359static inline SIMD_CFUNC simd_float8 __tg_asinh(simd_float8 x) {
3361 return _simd_asinh_f8(x);3360 return _simd_asinh_f8(x);
...@@ -3366,7 +3365,7 @@ static inline SIMD_CFUNC simd_float8 __tg_asinh(simd_float8 x) {...@@ -3366,7 +3365,7 @@ static inline SIMD_CFUNC simd_float8 __tg_asinh(simd_float8 x) {
3366}3365}
3367#endif3366#endif
33683367
3369#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__3368#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
3370extern simd_float16 _simd_asinh_f16(simd_float16 x);3369extern simd_float16 _simd_asinh_f16(simd_float16 x);
3371static inline SIMD_CFUNC simd_float16 __tg_asinh(simd_float16 x) {3370static inline SIMD_CFUNC simd_float16 __tg_asinh(simd_float16 x) {
3372 return _simd_asinh_f16(x);3371 return _simd_asinh_f16(x);
...@@ -3392,7 +3391,7 @@ static inline SIMD_CFUNC simd_double3 __tg_asinh(simd_double3 x) {...@@ -3392,7 +3391,7 @@ static inline SIMD_CFUNC simd_double3 __tg_asinh(simd_double3 x) {
3392 return simd_make_double3(__tg_asinh(simd_make_double4(x)));3391 return simd_make_double3(__tg_asinh(simd_make_double4(x)));
3393}3392}
33943393
3395#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__3394#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
3396extern simd_double4 _simd_asinh_d4(simd_double4 x);3395extern simd_double4 _simd_asinh_d4(simd_double4 x);
3397static inline SIMD_CFUNC simd_double4 __tg_asinh(simd_double4 x) {3396static inline SIMD_CFUNC simd_double4 __tg_asinh(simd_double4 x) {
3398 return _simd_asinh_d4(x);3397 return _simd_asinh_d4(x);
...@@ -3403,7 +3402,7 @@ static inline SIMD_CFUNC simd_double4 __tg_asinh(simd_double4 x) {...@@ -3403,7 +3402,7 @@ static inline SIMD_CFUNC simd_double4 __tg_asinh(simd_double4 x) {
3403}3402}
3404#endif3403#endif
34053404
3406#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__3405#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
3407extern simd_double8 _simd_asinh_d8(simd_double8 x);3406extern simd_double8 _simd_asinh_d8(simd_double8 x);
3408static inline SIMD_CFUNC simd_double8 __tg_asinh(simd_double8 x) {3407static inline SIMD_CFUNC simd_double8 __tg_asinh(simd_double8 x) {
3409 return _simd_asinh_d8(x);3408 return _simd_asinh_d8(x);
...@@ -3434,7 +3433,7 @@ static inline SIMD_CFUNC simd_float4 __tg_atanh(simd_float4 x) {...@@ -3434,7 +3433,7 @@ static inline SIMD_CFUNC simd_float4 __tg_atanh(simd_float4 x) {
3434}3433}
3435#endif3434#endif
34363435
3437#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__3436#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
3438extern simd_float8 _simd_atanh_f8(simd_float8 x);3437extern simd_float8 _simd_atanh_f8(simd_float8 x);
3439static inline SIMD_CFUNC simd_float8 __tg_atanh(simd_float8 x) {3438static inline SIMD_CFUNC simd_float8 __tg_atanh(simd_float8 x) {
3440 return _simd_atanh_f8(x);3439 return _simd_atanh_f8(x);
...@@ -3445,7 +3444,7 @@ static inline SIMD_CFUNC simd_float8 __tg_atanh(simd_float8 x) {...@@ -3445,7 +3444,7 @@ static inline SIMD_CFUNC simd_float8 __tg_atanh(simd_float8 x) {
3445}3444}
3446#endif3445#endif
34473446
3448#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__3447#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
3449extern simd_float16 _simd_atanh_f16(simd_float16 x);3448extern simd_float16 _simd_atanh_f16(simd_float16 x);
3450static inline SIMD_CFUNC simd_float16 __tg_atanh(simd_float16 x) {3449static inline SIMD_CFUNC simd_float16 __tg_atanh(simd_float16 x) {
3451 return _simd_atanh_f16(x);3450 return _simd_atanh_f16(x);
...@@ -3471,7 +3470,7 @@ static inline SIMD_CFUNC simd_double3 __tg_atanh(simd_double3 x) {...@@ -3471,7 +3470,7 @@ static inline SIMD_CFUNC simd_double3 __tg_atanh(simd_double3 x) {
3471 return simd_make_double3(__tg_atanh(simd_make_double4(x)));3470 return simd_make_double3(__tg_atanh(simd_make_double4(x)));
3472}3471}
34733472
3474#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__3473#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
3475extern simd_double4 _simd_atanh_d4(simd_double4 x);3474extern simd_double4 _simd_atanh_d4(simd_double4 x);
3476static inline SIMD_CFUNC simd_double4 __tg_atanh(simd_double4 x) {3475static inline SIMD_CFUNC simd_double4 __tg_atanh(simd_double4 x) {
3477 return _simd_atanh_d4(x);3476 return _simd_atanh_d4(x);
...@@ -3482,7 +3481,7 @@ static inline SIMD_CFUNC simd_double4 __tg_atanh(simd_double4 x) {...@@ -3482,7 +3481,7 @@ static inline SIMD_CFUNC simd_double4 __tg_atanh(simd_double4 x) {
3482}3481}
3483#endif3482#endif
34843483
3485#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__3484#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
3486extern simd_double8 _simd_atanh_d8(simd_double8 x);3485extern simd_double8 _simd_atanh_d8(simd_double8 x);
3487static inline SIMD_CFUNC simd_double8 __tg_atanh(simd_double8 x) {3486static inline SIMD_CFUNC simd_double8 __tg_atanh(simd_double8 x) {
3488 return _simd_atanh_d8(x);3487 return _simd_atanh_d8(x);
...@@ -3513,7 +3512,7 @@ static inline SIMD_CFUNC simd_float4 __tg_cosh(simd_float4 x) {...@@ -3513,7 +3512,7 @@ static inline SIMD_CFUNC simd_float4 __tg_cosh(simd_float4 x) {
3513}3512}
3514#endif3513#endif
35153514
3516#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__3515#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
3517extern simd_float8 _simd_cosh_f8(simd_float8 x);3516extern simd_float8 _simd_cosh_f8(simd_float8 x);
3518static inline SIMD_CFUNC simd_float8 __tg_cosh(simd_float8 x) {3517static inline SIMD_CFUNC simd_float8 __tg_cosh(simd_float8 x) {
3519 return _simd_cosh_f8(x);3518 return _simd_cosh_f8(x);
...@@ -3524,7 +3523,7 @@ static inline SIMD_CFUNC simd_float8 __tg_cosh(simd_float8 x) {...@@ -3524,7 +3523,7 @@ static inline SIMD_CFUNC simd_float8 __tg_cosh(simd_float8 x) {
3524}3523}
3525#endif3524#endif
35263525
3527#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__3526#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
3528extern simd_float16 _simd_cosh_f16(simd_float16 x);3527extern simd_float16 _simd_cosh_f16(simd_float16 x);
3529static inline SIMD_CFUNC simd_float16 __tg_cosh(simd_float16 x) {3528static inline SIMD_CFUNC simd_float16 __tg_cosh(simd_float16 x) {
3530 return _simd_cosh_f16(x);3529 return _simd_cosh_f16(x);
...@@ -3550,7 +3549,7 @@ static inline SIMD_CFUNC simd_double3 __tg_cosh(simd_double3 x) {...@@ -3550,7 +3549,7 @@ static inline SIMD_CFUNC simd_double3 __tg_cosh(simd_double3 x) {
3550 return simd_make_double3(__tg_cosh(simd_make_double4(x)));3549 return simd_make_double3(__tg_cosh(simd_make_double4(x)));
3551}3550}
35523551
3553#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__3552#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
3554extern simd_double4 _simd_cosh_d4(simd_double4 x);3553extern simd_double4 _simd_cosh_d4(simd_double4 x);
3555static inline SIMD_CFUNC simd_double4 __tg_cosh(simd_double4 x) {3554static inline SIMD_CFUNC simd_double4 __tg_cosh(simd_double4 x) {
3556 return _simd_cosh_d4(x);3555 return _simd_cosh_d4(x);
...@@ -3561,7 +3560,7 @@ static inline SIMD_CFUNC simd_double4 __tg_cosh(simd_double4 x) {...@@ -3561,7 +3560,7 @@ static inline SIMD_CFUNC simd_double4 __tg_cosh(simd_double4 x) {
3561}3560}
3562#endif3561#endif
35633562
3564#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__3563#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
3565extern simd_double8 _simd_cosh_d8(simd_double8 x);3564extern simd_double8 _simd_cosh_d8(simd_double8 x);
3566static inline SIMD_CFUNC simd_double8 __tg_cosh(simd_double8 x) {3565static inline SIMD_CFUNC simd_double8 __tg_cosh(simd_double8 x) {
3567 return _simd_cosh_d8(x);3566 return _simd_cosh_d8(x);
...@@ -3592,7 +3591,7 @@ static inline SIMD_CFUNC simd_float4 __tg_sinh(simd_float4 x) {...@@ -3592,7 +3591,7 @@ static inline SIMD_CFUNC simd_float4 __tg_sinh(simd_float4 x) {
3592}3591}
3593#endif3592#endif
35943593
3595#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__3594#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
3596extern simd_float8 _simd_sinh_f8(simd_float8 x);3595extern simd_float8 _simd_sinh_f8(simd_float8 x);
3597static inline SIMD_CFUNC simd_float8 __tg_sinh(simd_float8 x) {3596static inline SIMD_CFUNC simd_float8 __tg_sinh(simd_float8 x) {
3598 return _simd_sinh_f8(x);3597 return _simd_sinh_f8(x);
...@@ -3603,7 +3602,7 @@ static inline SIMD_CFUNC simd_float8 __tg_sinh(simd_float8 x) {...@@ -3603,7 +3602,7 @@ static inline SIMD_CFUNC simd_float8 __tg_sinh(simd_float8 x) {
3603}3602}
3604#endif3603#endif
36053604
3606#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__3605#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
3607extern simd_float16 _simd_sinh_f16(simd_float16 x);3606extern simd_float16 _simd_sinh_f16(simd_float16 x);
3608static inline SIMD_CFUNC simd_float16 __tg_sinh(simd_float16 x) {3607static inline SIMD_CFUNC simd_float16 __tg_sinh(simd_float16 x) {
3609 return _simd_sinh_f16(x);3608 return _simd_sinh_f16(x);
...@@ -3629,7 +3628,7 @@ static inline SIMD_CFUNC simd_double3 __tg_sinh(simd_double3 x) {...@@ -3629,7 +3628,7 @@ static inline SIMD_CFUNC simd_double3 __tg_sinh(simd_double3 x) {
3629 return simd_make_double3(__tg_sinh(simd_make_double4(x)));3628 return simd_make_double3(__tg_sinh(simd_make_double4(x)));
3630}3629}
36313630
3632#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__3631#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
3633extern simd_double4 _simd_sinh_d4(simd_double4 x);3632extern simd_double4 _simd_sinh_d4(simd_double4 x);
3634static inline SIMD_CFUNC simd_double4 __tg_sinh(simd_double4 x) {3633static inline SIMD_CFUNC simd_double4 __tg_sinh(simd_double4 x) {
3635 return _simd_sinh_d4(x);3634 return _simd_sinh_d4(x);
...@@ -3640,7 +3639,7 @@ static inline SIMD_CFUNC simd_double4 __tg_sinh(simd_double4 x) {...@@ -3640,7 +3639,7 @@ static inline SIMD_CFUNC simd_double4 __tg_sinh(simd_double4 x) {
3640}3639}
3641#endif3640#endif
36423641
3643#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__3642#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
3644extern simd_double8 _simd_sinh_d8(simd_double8 x);3643extern simd_double8 _simd_sinh_d8(simd_double8 x);
3645static inline SIMD_CFUNC simd_double8 __tg_sinh(simd_double8 x) {3644static inline SIMD_CFUNC simd_double8 __tg_sinh(simd_double8 x) {
3646 return _simd_sinh_d8(x);3645 return _simd_sinh_d8(x);
...@@ -3671,7 +3670,7 @@ static inline SIMD_CFUNC simd_float4 __tg_tanh(simd_float4 x) {...@@ -3671,7 +3670,7 @@ static inline SIMD_CFUNC simd_float4 __tg_tanh(simd_float4 x) {
3671}3670}
3672#endif3671#endif
36733672
3674#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__3673#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
3675extern simd_float8 _simd_tanh_f8(simd_float8 x);3674extern simd_float8 _simd_tanh_f8(simd_float8 x);
3676static inline SIMD_CFUNC simd_float8 __tg_tanh(simd_float8 x) {3675static inline SIMD_CFUNC simd_float8 __tg_tanh(simd_float8 x) {
3677 return _simd_tanh_f8(x);3676 return _simd_tanh_f8(x);
...@@ -3682,7 +3681,7 @@ static inline SIMD_CFUNC simd_float8 __tg_tanh(simd_float8 x) {...@@ -3682,7 +3681,7 @@ static inline SIMD_CFUNC simd_float8 __tg_tanh(simd_float8 x) {
3682}3681}
3683#endif3682#endif
36843683
3685#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__3684#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
3686extern simd_float16 _simd_tanh_f16(simd_float16 x);3685extern simd_float16 _simd_tanh_f16(simd_float16 x);
3687static inline SIMD_CFUNC simd_float16 __tg_tanh(simd_float16 x) {3686static inline SIMD_CFUNC simd_float16 __tg_tanh(simd_float16 x) {
3688 return _simd_tanh_f16(x);3687 return _simd_tanh_f16(x);
...@@ -3708,7 +3707,7 @@ static inline SIMD_CFUNC simd_double3 __tg_tanh(simd_double3 x) {...@@ -3708,7 +3707,7 @@ static inline SIMD_CFUNC simd_double3 __tg_tanh(simd_double3 x) {
3708 return simd_make_double3(__tg_tanh(simd_make_double4(x)));3707 return simd_make_double3(__tg_tanh(simd_make_double4(x)));
3709}3708}
37103709
3711#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__3710#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
3712extern simd_double4 _simd_tanh_d4(simd_double4 x);3711extern simd_double4 _simd_tanh_d4(simd_double4 x);
3713static inline SIMD_CFUNC simd_double4 __tg_tanh(simd_double4 x) {3712static inline SIMD_CFUNC simd_double4 __tg_tanh(simd_double4 x) {
3714 return _simd_tanh_d4(x);3713 return _simd_tanh_d4(x);
...@@ -3719,7 +3718,7 @@ static inline SIMD_CFUNC simd_double4 __tg_tanh(simd_double4 x) {...@@ -3719,7 +3718,7 @@ static inline SIMD_CFUNC simd_double4 __tg_tanh(simd_double4 x) {
3719}3718}
3720#endif3719#endif
37213720
3722#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__3721#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
3723extern simd_double8 _simd_tanh_d8(simd_double8 x);3722extern simd_double8 _simd_tanh_d8(simd_double8 x);
3724static inline SIMD_CFUNC simd_double8 __tg_tanh(simd_double8 x) {3723static inline SIMD_CFUNC simd_double8 __tg_tanh(simd_double8 x) {
3725 return _simd_tanh_d8(x);3724 return _simd_tanh_d8(x);
...@@ -3750,7 +3749,7 @@ static inline SIMD_CFUNC simd_float4 __tg_exp(simd_float4 x) {...@@ -3750,7 +3749,7 @@ static inline SIMD_CFUNC simd_float4 __tg_exp(simd_float4 x) {
3750}3749}
3751#endif3750#endif
37523751
3753#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__3752#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
3754extern simd_float8 _simd_exp_f8(simd_float8 x);3753extern simd_float8 _simd_exp_f8(simd_float8 x);
3755static inline SIMD_CFUNC simd_float8 __tg_exp(simd_float8 x) {3754static inline SIMD_CFUNC simd_float8 __tg_exp(simd_float8 x) {
3756 return _simd_exp_f8(x);3755 return _simd_exp_f8(x);
...@@ -3761,7 +3760,7 @@ static inline SIMD_CFUNC simd_float8 __tg_exp(simd_float8 x) {...@@ -3761,7 +3760,7 @@ static inline SIMD_CFUNC simd_float8 __tg_exp(simd_float8 x) {
3761}3760}
3762#endif3761#endif
37633762
3764#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__3763#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
3765extern simd_float16 _simd_exp_f16(simd_float16 x);3764extern simd_float16 _simd_exp_f16(simd_float16 x);
3766static inline SIMD_CFUNC simd_float16 __tg_exp(simd_float16 x) {3765static inline SIMD_CFUNC simd_float16 __tg_exp(simd_float16 x) {
3767 return _simd_exp_f16(x);3766 return _simd_exp_f16(x);
...@@ -3787,7 +3786,7 @@ static inline SIMD_CFUNC simd_double3 __tg_exp(simd_double3 x) {...@@ -3787,7 +3786,7 @@ static inline SIMD_CFUNC simd_double3 __tg_exp(simd_double3 x) {
3787 return simd_make_double3(__tg_exp(simd_make_double4(x)));3786 return simd_make_double3(__tg_exp(simd_make_double4(x)));
3788}3787}
37893788
3790#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__3789#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
3791extern simd_double4 _simd_exp_d4(simd_double4 x);3790extern simd_double4 _simd_exp_d4(simd_double4 x);
3792static inline SIMD_CFUNC simd_double4 __tg_exp(simd_double4 x) {3791static inline SIMD_CFUNC simd_double4 __tg_exp(simd_double4 x) {
3793 return _simd_exp_d4(x);3792 return _simd_exp_d4(x);
...@@ -3798,7 +3797,7 @@ static inline SIMD_CFUNC simd_double4 __tg_exp(simd_double4 x) {...@@ -3798,7 +3797,7 @@ static inline SIMD_CFUNC simd_double4 __tg_exp(simd_double4 x) {
3798}3797}
3799#endif3798#endif
38003799
3801#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__3800#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
3802extern simd_double8 _simd_exp_d8(simd_double8 x);3801extern simd_double8 _simd_exp_d8(simd_double8 x);
3803static inline SIMD_CFUNC simd_double8 __tg_exp(simd_double8 x) {3802static inline SIMD_CFUNC simd_double8 __tg_exp(simd_double8 x) {
3804 return _simd_exp_d8(x);3803 return _simd_exp_d8(x);
...@@ -3829,7 +3828,7 @@ static inline SIMD_CFUNC simd_float4 __tg_exp2(simd_float4 x) {...@@ -3829,7 +3828,7 @@ static inline SIMD_CFUNC simd_float4 __tg_exp2(simd_float4 x) {
3829}3828}
3830#endif3829#endif
38313830
3832#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__3831#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
3833extern simd_float8 _simd_exp2_f8(simd_float8 x);3832extern simd_float8 _simd_exp2_f8(simd_float8 x);
3834static inline SIMD_CFUNC simd_float8 __tg_exp2(simd_float8 x) {3833static inline SIMD_CFUNC simd_float8 __tg_exp2(simd_float8 x) {
3835 return _simd_exp2_f8(x);3834 return _simd_exp2_f8(x);
...@@ -3840,7 +3839,7 @@ static inline SIMD_CFUNC simd_float8 __tg_exp2(simd_float8 x) {...@@ -3840,7 +3839,7 @@ static inline SIMD_CFUNC simd_float8 __tg_exp2(simd_float8 x) {
3840}3839}
3841#endif3840#endif
38423841
3843#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__3842#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
3844extern simd_float16 _simd_exp2_f16(simd_float16 x);3843extern simd_float16 _simd_exp2_f16(simd_float16 x);
3845static inline SIMD_CFUNC simd_float16 __tg_exp2(simd_float16 x) {3844static inline SIMD_CFUNC simd_float16 __tg_exp2(simd_float16 x) {
3846 return _simd_exp2_f16(x);3845 return _simd_exp2_f16(x);
...@@ -3866,7 +3865,7 @@ static inline SIMD_CFUNC simd_double3 __tg_exp2(simd_double3 x) {...@@ -3866,7 +3865,7 @@ static inline SIMD_CFUNC simd_double3 __tg_exp2(simd_double3 x) {
3866 return simd_make_double3(__tg_exp2(simd_make_double4(x)));3865 return simd_make_double3(__tg_exp2(simd_make_double4(x)));
3867}3866}
38683867
3869#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__3868#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
3870extern simd_double4 _simd_exp2_d4(simd_double4 x);3869extern simd_double4 _simd_exp2_d4(simd_double4 x);
3871static inline SIMD_CFUNC simd_double4 __tg_exp2(simd_double4 x) {3870static inline SIMD_CFUNC simd_double4 __tg_exp2(simd_double4 x) {
3872 return _simd_exp2_d4(x);3871 return _simd_exp2_d4(x);
...@@ -3877,7 +3876,7 @@ static inline SIMD_CFUNC simd_double4 __tg_exp2(simd_double4 x) {...@@ -3877,7 +3876,7 @@ static inline SIMD_CFUNC simd_double4 __tg_exp2(simd_double4 x) {
3877}3876}
3878#endif3877#endif
38793878
3880#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__3879#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
3881extern simd_double8 _simd_exp2_d8(simd_double8 x);3880extern simd_double8 _simd_exp2_d8(simd_double8 x);
3882static inline SIMD_CFUNC simd_double8 __tg_exp2(simd_double8 x) {3881static inline SIMD_CFUNC simd_double8 __tg_exp2(simd_double8 x) {
3883 return _simd_exp2_d8(x);3882 return _simd_exp2_d8(x);
...@@ -3909,7 +3908,7 @@ static inline SIMD_CFUNC simd_float4 __tg_exp10(simd_float4 x) {...@@ -3909,7 +3908,7 @@ static inline SIMD_CFUNC simd_float4 __tg_exp10(simd_float4 x) {
3909}3908}
3910#endif3909#endif
39113910
3912#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__3911#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
3913extern simd_float8 _simd_exp10_f8(simd_float8 x);3912extern simd_float8 _simd_exp10_f8(simd_float8 x);
3914static inline SIMD_CFUNC simd_float8 __tg_exp10(simd_float8 x) {3913static inline SIMD_CFUNC simd_float8 __tg_exp10(simd_float8 x) {
3915 return _simd_exp10_f8(x);3914 return _simd_exp10_f8(x);
...@@ -3920,7 +3919,7 @@ static inline SIMD_CFUNC simd_float8 __tg_exp10(simd_float8 x) {...@@ -3920,7 +3919,7 @@ static inline SIMD_CFUNC simd_float8 __tg_exp10(simd_float8 x) {
3920}3919}
3921#endif3920#endif
39223921
3923#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__3922#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
3924extern simd_float16 _simd_exp10_f16(simd_float16 x);3923extern simd_float16 _simd_exp10_f16(simd_float16 x);
3925static inline SIMD_CFUNC simd_float16 __tg_exp10(simd_float16 x) {3924static inline SIMD_CFUNC simd_float16 __tg_exp10(simd_float16 x) {
3926 return _simd_exp10_f16(x);3925 return _simd_exp10_f16(x);
...@@ -3946,7 +3945,7 @@ static inline SIMD_CFUNC simd_double3 __tg_exp10(simd_double3 x) {...@@ -3946,7 +3945,7 @@ static inline SIMD_CFUNC simd_double3 __tg_exp10(simd_double3 x) {
3946 return simd_make_double3(__tg_exp10(simd_make_double4(x)));3945 return simd_make_double3(__tg_exp10(simd_make_double4(x)));
3947}3946}
39483947
3949#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__3948#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
3950extern simd_double4 _simd_exp10_d4(simd_double4 x);3949extern simd_double4 _simd_exp10_d4(simd_double4 x);
3951static inline SIMD_CFUNC simd_double4 __tg_exp10(simd_double4 x) {3950static inline SIMD_CFUNC simd_double4 __tg_exp10(simd_double4 x) {
3952 return _simd_exp10_d4(x);3951 return _simd_exp10_d4(x);
...@@ -3957,7 +3956,7 @@ static inline SIMD_CFUNC simd_double4 __tg_exp10(simd_double4 x) {...@@ -3957,7 +3956,7 @@ static inline SIMD_CFUNC simd_double4 __tg_exp10(simd_double4 x) {
3957}3956}
3958#endif3957#endif
39593958
3960#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__3959#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
3961extern simd_double8 _simd_exp10_d8(simd_double8 x);3960extern simd_double8 _simd_exp10_d8(simd_double8 x);
3962static inline SIMD_CFUNC simd_double8 __tg_exp10(simd_double8 x) {3961static inline SIMD_CFUNC simd_double8 __tg_exp10(simd_double8 x) {
3963 return _simd_exp10_d8(x);3962 return _simd_exp10_d8(x);
...@@ -3989,7 +3988,7 @@ static inline SIMD_CFUNC simd_float4 __tg_expm1(simd_float4 x) {...@@ -3989,7 +3988,7 @@ static inline SIMD_CFUNC simd_float4 __tg_expm1(simd_float4 x) {
3989}3988}
3990#endif3989#endif
39913990
3992#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__3991#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
3993extern simd_float8 _simd_expm1_f8(simd_float8 x);3992extern simd_float8 _simd_expm1_f8(simd_float8 x);
3994static inline SIMD_CFUNC simd_float8 __tg_expm1(simd_float8 x) {3993static inline SIMD_CFUNC simd_float8 __tg_expm1(simd_float8 x) {
3995 return _simd_expm1_f8(x);3994 return _simd_expm1_f8(x);
...@@ -4000,7 +3999,7 @@ static inline SIMD_CFUNC simd_float8 __tg_expm1(simd_float8 x) {...@@ -4000,7 +3999,7 @@ static inline SIMD_CFUNC simd_float8 __tg_expm1(simd_float8 x) {
4000}3999}
4001#endif4000#endif
40024001
4003#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__4002#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
4004extern simd_float16 _simd_expm1_f16(simd_float16 x);4003extern simd_float16 _simd_expm1_f16(simd_float16 x);
4005static inline SIMD_CFUNC simd_float16 __tg_expm1(simd_float16 x) {4004static inline SIMD_CFUNC simd_float16 __tg_expm1(simd_float16 x) {
4006 return _simd_expm1_f16(x);4005 return _simd_expm1_f16(x);
...@@ -4026,7 +4025,7 @@ static inline SIMD_CFUNC simd_double3 __tg_expm1(simd_double3 x) {...@@ -4026,7 +4025,7 @@ static inline SIMD_CFUNC simd_double3 __tg_expm1(simd_double3 x) {
4026 return simd_make_double3(__tg_expm1(simd_make_double4(x)));4025 return simd_make_double3(__tg_expm1(simd_make_double4(x)));
4027}4026}
40284027
4029#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__4028#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
4030extern simd_double4 _simd_expm1_d4(simd_double4 x);4029extern simd_double4 _simd_expm1_d4(simd_double4 x);
4031static inline SIMD_CFUNC simd_double4 __tg_expm1(simd_double4 x) {4030static inline SIMD_CFUNC simd_double4 __tg_expm1(simd_double4 x) {
4032 return _simd_expm1_d4(x);4031 return _simd_expm1_d4(x);
...@@ -4037,7 +4036,7 @@ static inline SIMD_CFUNC simd_double4 __tg_expm1(simd_double4 x) {...@@ -4037,7 +4036,7 @@ static inline SIMD_CFUNC simd_double4 __tg_expm1(simd_double4 x) {
4037}4036}
4038#endif4037#endif
40394038
4040#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__4039#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
4041extern simd_double8 _simd_expm1_d8(simd_double8 x);4040extern simd_double8 _simd_expm1_d8(simd_double8 x);
4042static inline SIMD_CFUNC simd_double8 __tg_expm1(simd_double8 x) {4041static inline SIMD_CFUNC simd_double8 __tg_expm1(simd_double8 x) {
4043 return _simd_expm1_d8(x);4042 return _simd_expm1_d8(x);
...@@ -4068,7 +4067,7 @@ static inline SIMD_CFUNC simd_float4 __tg_log(simd_float4 x) {...@@ -4068,7 +4067,7 @@ static inline SIMD_CFUNC simd_float4 __tg_log(simd_float4 x) {
4068}4067}
4069#endif4068#endif
40704069
4071#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__4070#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
4072extern simd_float8 _simd_log_f8(simd_float8 x);4071extern simd_float8 _simd_log_f8(simd_float8 x);
4073static inline SIMD_CFUNC simd_float8 __tg_log(simd_float8 x) {4072static inline SIMD_CFUNC simd_float8 __tg_log(simd_float8 x) {
4074 return _simd_log_f8(x);4073 return _simd_log_f8(x);
...@@ -4079,7 +4078,7 @@ static inline SIMD_CFUNC simd_float8 __tg_log(simd_float8 x) {...@@ -4079,7 +4078,7 @@ static inline SIMD_CFUNC simd_float8 __tg_log(simd_float8 x) {
4079}4078}
4080#endif4079#endif
40814080
4082#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__4081#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
4083extern simd_float16 _simd_log_f16(simd_float16 x);4082extern simd_float16 _simd_log_f16(simd_float16 x);
4084static inline SIMD_CFUNC simd_float16 __tg_log(simd_float16 x) {4083static inline SIMD_CFUNC simd_float16 __tg_log(simd_float16 x) {
4085 return _simd_log_f16(x);4084 return _simd_log_f16(x);
...@@ -4105,7 +4104,7 @@ static inline SIMD_CFUNC simd_double3 __tg_log(simd_double3 x) {...@@ -4105,7 +4104,7 @@ static inline SIMD_CFUNC simd_double3 __tg_log(simd_double3 x) {
4105 return simd_make_double3(__tg_log(simd_make_double4(x)));4104 return simd_make_double3(__tg_log(simd_make_double4(x)));
4106}4105}
41074106
4108#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__4107#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
4109extern simd_double4 _simd_log_d4(simd_double4 x);4108extern simd_double4 _simd_log_d4(simd_double4 x);
4110static inline SIMD_CFUNC simd_double4 __tg_log(simd_double4 x) {4109static inline SIMD_CFUNC simd_double4 __tg_log(simd_double4 x) {
4111 return _simd_log_d4(x);4110 return _simd_log_d4(x);
...@@ -4116,7 +4115,7 @@ static inline SIMD_CFUNC simd_double4 __tg_log(simd_double4 x) {...@@ -4116,7 +4115,7 @@ static inline SIMD_CFUNC simd_double4 __tg_log(simd_double4 x) {
4116}4115}
4117#endif4116#endif
41184117
4119#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__4118#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
4120extern simd_double8 _simd_log_d8(simd_double8 x);4119extern simd_double8 _simd_log_d8(simd_double8 x);
4121static inline SIMD_CFUNC simd_double8 __tg_log(simd_double8 x) {4120static inline SIMD_CFUNC simd_double8 __tg_log(simd_double8 x) {
4122 return _simd_log_d8(x);4121 return _simd_log_d8(x);
...@@ -4147,7 +4146,7 @@ static inline SIMD_CFUNC simd_float4 __tg_log2(simd_float4 x) {...@@ -4147,7 +4146,7 @@ static inline SIMD_CFUNC simd_float4 __tg_log2(simd_float4 x) {
4147}4146}
4148#endif4147#endif
41494148
4150#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__4149#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
4151extern simd_float8 _simd_log2_f8(simd_float8 x);4150extern simd_float8 _simd_log2_f8(simd_float8 x);
4152static inline SIMD_CFUNC simd_float8 __tg_log2(simd_float8 x) {4151static inline SIMD_CFUNC simd_float8 __tg_log2(simd_float8 x) {
4153 return _simd_log2_f8(x);4152 return _simd_log2_f8(x);
...@@ -4158,7 +4157,7 @@ static inline SIMD_CFUNC simd_float8 __tg_log2(simd_float8 x) {...@@ -4158,7 +4157,7 @@ static inline SIMD_CFUNC simd_float8 __tg_log2(simd_float8 x) {
4158}4157}
4159#endif4158#endif
41604159
4161#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__4160#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
4162extern simd_float16 _simd_log2_f16(simd_float16 x);4161extern simd_float16 _simd_log2_f16(simd_float16 x);
4163static inline SIMD_CFUNC simd_float16 __tg_log2(simd_float16 x) {4162static inline SIMD_CFUNC simd_float16 __tg_log2(simd_float16 x) {
4164 return _simd_log2_f16(x);4163 return _simd_log2_f16(x);
...@@ -4184,7 +4183,7 @@ static inline SIMD_CFUNC simd_double3 __tg_log2(simd_double3 x) {...@@ -4184,7 +4183,7 @@ static inline SIMD_CFUNC simd_double3 __tg_log2(simd_double3 x) {
4184 return simd_make_double3(__tg_log2(simd_make_double4(x)));4183 return simd_make_double3(__tg_log2(simd_make_double4(x)));
4185}4184}
41864185
4187#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__4186#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
4188extern simd_double4 _simd_log2_d4(simd_double4 x);4187extern simd_double4 _simd_log2_d4(simd_double4 x);
4189static inline SIMD_CFUNC simd_double4 __tg_log2(simd_double4 x) {4188static inline SIMD_CFUNC simd_double4 __tg_log2(simd_double4 x) {
4190 return _simd_log2_d4(x);4189 return _simd_log2_d4(x);
...@@ -4195,7 +4194,7 @@ static inline SIMD_CFUNC simd_double4 __tg_log2(simd_double4 x) {...@@ -4195,7 +4194,7 @@ static inline SIMD_CFUNC simd_double4 __tg_log2(simd_double4 x) {
4195}4194}
4196#endif4195#endif
41974196
4198#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__4197#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
4199extern simd_double8 _simd_log2_d8(simd_double8 x);4198extern simd_double8 _simd_log2_d8(simd_double8 x);
4200static inline SIMD_CFUNC simd_double8 __tg_log2(simd_double8 x) {4199static inline SIMD_CFUNC simd_double8 __tg_log2(simd_double8 x) {
4201 return _simd_log2_d8(x);4200 return _simd_log2_d8(x);
...@@ -4226,7 +4225,7 @@ static inline SIMD_CFUNC simd_float4 __tg_log10(simd_float4 x) {...@@ -4226,7 +4225,7 @@ static inline SIMD_CFUNC simd_float4 __tg_log10(simd_float4 x) {
4226}4225}
4227#endif4226#endif
42284227
4229#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__4228#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
4230extern simd_float8 _simd_log10_f8(simd_float8 x);4229extern simd_float8 _simd_log10_f8(simd_float8 x);
4231static inline SIMD_CFUNC simd_float8 __tg_log10(simd_float8 x) {4230static inline SIMD_CFUNC simd_float8 __tg_log10(simd_float8 x) {
4232 return _simd_log10_f8(x);4231 return _simd_log10_f8(x);
...@@ -4237,7 +4236,7 @@ static inline SIMD_CFUNC simd_float8 __tg_log10(simd_float8 x) {...@@ -4237,7 +4236,7 @@ static inline SIMD_CFUNC simd_float8 __tg_log10(simd_float8 x) {
4237}4236}
4238#endif4237#endif
42394238
4240#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__4239#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
4241extern simd_float16 _simd_log10_f16(simd_float16 x);4240extern simd_float16 _simd_log10_f16(simd_float16 x);
4242static inline SIMD_CFUNC simd_float16 __tg_log10(simd_float16 x) {4241static inline SIMD_CFUNC simd_float16 __tg_log10(simd_float16 x) {
4243 return _simd_log10_f16(x);4242 return _simd_log10_f16(x);
...@@ -4263,7 +4262,7 @@ static inline SIMD_CFUNC simd_double3 __tg_log10(simd_double3 x) {...@@ -4263,7 +4262,7 @@ static inline SIMD_CFUNC simd_double3 __tg_log10(simd_double3 x) {
4263 return simd_make_double3(__tg_log10(simd_make_double4(x)));4262 return simd_make_double3(__tg_log10(simd_make_double4(x)));
4264}4263}
42654264
4266#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__4265#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
4267extern simd_double4 _simd_log10_d4(simd_double4 x);4266extern simd_double4 _simd_log10_d4(simd_double4 x);
4268static inline SIMD_CFUNC simd_double4 __tg_log10(simd_double4 x) {4267static inline SIMD_CFUNC simd_double4 __tg_log10(simd_double4 x) {
4269 return _simd_log10_d4(x);4268 return _simd_log10_d4(x);
...@@ -4274,7 +4273,7 @@ static inline SIMD_CFUNC simd_double4 __tg_log10(simd_double4 x) {...@@ -4274,7 +4273,7 @@ static inline SIMD_CFUNC simd_double4 __tg_log10(simd_double4 x) {
4274}4273}
4275#endif4274#endif
42764275
4277#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__4276#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
4278extern simd_double8 _simd_log10_d8(simd_double8 x);4277extern simd_double8 _simd_log10_d8(simd_double8 x);
4279static inline SIMD_CFUNC simd_double8 __tg_log10(simd_double8 x) {4278static inline SIMD_CFUNC simd_double8 __tg_log10(simd_double8 x) {
4280 return _simd_log10_d8(x);4279 return _simd_log10_d8(x);
...@@ -4305,7 +4304,7 @@ static inline SIMD_CFUNC simd_float4 __tg_log1p(simd_float4 x) {...@@ -4305,7 +4304,7 @@ static inline SIMD_CFUNC simd_float4 __tg_log1p(simd_float4 x) {
4305}4304}
4306#endif4305#endif
43074306
4308#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__4307#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
4309extern simd_float8 _simd_log1p_f8(simd_float8 x);4308extern simd_float8 _simd_log1p_f8(simd_float8 x);
4310static inline SIMD_CFUNC simd_float8 __tg_log1p(simd_float8 x) {4309static inline SIMD_CFUNC simd_float8 __tg_log1p(simd_float8 x) {
4311 return _simd_log1p_f8(x);4310 return _simd_log1p_f8(x);
...@@ -4316,7 +4315,7 @@ static inline SIMD_CFUNC simd_float8 __tg_log1p(simd_float8 x) {...@@ -4316,7 +4315,7 @@ static inline SIMD_CFUNC simd_float8 __tg_log1p(simd_float8 x) {
4316}4315}
4317#endif4316#endif
43184317
4319#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__4318#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
4320extern simd_float16 _simd_log1p_f16(simd_float16 x);4319extern simd_float16 _simd_log1p_f16(simd_float16 x);
4321static inline SIMD_CFUNC simd_float16 __tg_log1p(simd_float16 x) {4320static inline SIMD_CFUNC simd_float16 __tg_log1p(simd_float16 x) {
4322 return _simd_log1p_f16(x);4321 return _simd_log1p_f16(x);
...@@ -4342,7 +4341,7 @@ static inline SIMD_CFUNC simd_double3 __tg_log1p(simd_double3 x) {...@@ -4342,7 +4341,7 @@ static inline SIMD_CFUNC simd_double3 __tg_log1p(simd_double3 x) {
4342 return simd_make_double3(__tg_log1p(simd_make_double4(x)));4341 return simd_make_double3(__tg_log1p(simd_make_double4(x)));
4343}4342}
43444343
4345#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__4344#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
4346extern simd_double4 _simd_log1p_d4(simd_double4 x);4345extern simd_double4 _simd_log1p_d4(simd_double4 x);
4347static inline SIMD_CFUNC simd_double4 __tg_log1p(simd_double4 x) {4346static inline SIMD_CFUNC simd_double4 __tg_log1p(simd_double4 x) {
4348 return _simd_log1p_d4(x);4347 return _simd_log1p_d4(x);
...@@ -4353,7 +4352,7 @@ static inline SIMD_CFUNC simd_double4 __tg_log1p(simd_double4 x) {...@@ -4353,7 +4352,7 @@ static inline SIMD_CFUNC simd_double4 __tg_log1p(simd_double4 x) {
4353}4352}
4354#endif4353#endif
43554354
4356#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__4355#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
4357extern simd_double8 _simd_log1p_d8(simd_double8 x);4356extern simd_double8 _simd_log1p_d8(simd_double8 x);
4358static inline SIMD_CFUNC simd_double8 __tg_log1p(simd_double8 x) {4357static inline SIMD_CFUNC simd_double8 __tg_log1p(simd_double8 x) {
4359 return _simd_log1p_d8(x);4358 return _simd_log1p_d8(x);
...@@ -4384,7 +4383,7 @@ static inline SIMD_CFUNC simd_float4 __tg_cbrt(simd_float4 x) {...@@ -4384,7 +4383,7 @@ static inline SIMD_CFUNC simd_float4 __tg_cbrt(simd_float4 x) {
4384}4383}
4385#endif4384#endif
43864385
4387#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__4386#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
4388extern simd_float8 _simd_cbrt_f8(simd_float8 x);4387extern simd_float8 _simd_cbrt_f8(simd_float8 x);
4389static inline SIMD_CFUNC simd_float8 __tg_cbrt(simd_float8 x) {4388static inline SIMD_CFUNC simd_float8 __tg_cbrt(simd_float8 x) {
4390 return _simd_cbrt_f8(x);4389 return _simd_cbrt_f8(x);
...@@ -4395,7 +4394,7 @@ static inline SIMD_CFUNC simd_float8 __tg_cbrt(simd_float8 x) {...@@ -4395,7 +4394,7 @@ static inline SIMD_CFUNC simd_float8 __tg_cbrt(simd_float8 x) {
4395}4394}
4396#endif4395#endif
43974396
4398#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__4397#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
4399extern simd_float16 _simd_cbrt_f16(simd_float16 x);4398extern simd_float16 _simd_cbrt_f16(simd_float16 x);
4400static inline SIMD_CFUNC simd_float16 __tg_cbrt(simd_float16 x) {4399static inline SIMD_CFUNC simd_float16 __tg_cbrt(simd_float16 x) {
4401 return _simd_cbrt_f16(x);4400 return _simd_cbrt_f16(x);
...@@ -4421,7 +4420,7 @@ static inline SIMD_CFUNC simd_double3 __tg_cbrt(simd_double3 x) {...@@ -4421,7 +4420,7 @@ static inline SIMD_CFUNC simd_double3 __tg_cbrt(simd_double3 x) {
4421 return simd_make_double3(__tg_cbrt(simd_make_double4(x)));4420 return simd_make_double3(__tg_cbrt(simd_make_double4(x)));
4422}4421}
44234422
4424#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__4423#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
4425extern simd_double4 _simd_cbrt_d4(simd_double4 x);4424extern simd_double4 _simd_cbrt_d4(simd_double4 x);
4426static inline SIMD_CFUNC simd_double4 __tg_cbrt(simd_double4 x) {4425static inline SIMD_CFUNC simd_double4 __tg_cbrt(simd_double4 x) {
4427 return _simd_cbrt_d4(x);4426 return _simd_cbrt_d4(x);
...@@ -4432,7 +4431,7 @@ static inline SIMD_CFUNC simd_double4 __tg_cbrt(simd_double4 x) {...@@ -4432,7 +4431,7 @@ static inline SIMD_CFUNC simd_double4 __tg_cbrt(simd_double4 x) {
4432}4431}
4433#endif4432#endif
44344433
4435#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__4434#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
4436extern simd_double8 _simd_cbrt_d8(simd_double8 x);4435extern simd_double8 _simd_cbrt_d8(simd_double8 x);
4437static inline SIMD_CFUNC simd_double8 __tg_cbrt(simd_double8 x) {4436static inline SIMD_CFUNC simd_double8 __tg_cbrt(simd_double8 x) {
4438 return _simd_cbrt_d8(x);4437 return _simd_cbrt_d8(x);
...@@ -4463,7 +4462,7 @@ static inline SIMD_CFUNC simd_float4 __tg_erf(simd_float4 x) {...@@ -4463,7 +4462,7 @@ static inline SIMD_CFUNC simd_float4 __tg_erf(simd_float4 x) {
4463}4462}
4464#endif4463#endif
44654464
4466#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__4465#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
4467extern simd_float8 _simd_erf_f8(simd_float8 x);4466extern simd_float8 _simd_erf_f8(simd_float8 x);
4468static inline SIMD_CFUNC simd_float8 __tg_erf(simd_float8 x) {4467static inline SIMD_CFUNC simd_float8 __tg_erf(simd_float8 x) {
4469 return _simd_erf_f8(x);4468 return _simd_erf_f8(x);
...@@ -4474,7 +4473,7 @@ static inline SIMD_CFUNC simd_float8 __tg_erf(simd_float8 x) {...@@ -4474,7 +4473,7 @@ static inline SIMD_CFUNC simd_float8 __tg_erf(simd_float8 x) {
4474}4473}
4475#endif4474#endif
44764475
4477#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__4476#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
4478extern simd_float16 _simd_erf_f16(simd_float16 x);4477extern simd_float16 _simd_erf_f16(simd_float16 x);
4479static inline SIMD_CFUNC simd_float16 __tg_erf(simd_float16 x) {4478static inline SIMD_CFUNC simd_float16 __tg_erf(simd_float16 x) {
4480 return _simd_erf_f16(x);4479 return _simd_erf_f16(x);
...@@ -4500,7 +4499,7 @@ static inline SIMD_CFUNC simd_double3 __tg_erf(simd_double3 x) {...@@ -4500,7 +4499,7 @@ static inline SIMD_CFUNC simd_double3 __tg_erf(simd_double3 x) {
4500 return simd_make_double3(__tg_erf(simd_make_double4(x)));4499 return simd_make_double3(__tg_erf(simd_make_double4(x)));
4501}4500}
45024501
4503#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__4502#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
4504extern simd_double4 _simd_erf_d4(simd_double4 x);4503extern simd_double4 _simd_erf_d4(simd_double4 x);
4505static inline SIMD_CFUNC simd_double4 __tg_erf(simd_double4 x) {4504static inline SIMD_CFUNC simd_double4 __tg_erf(simd_double4 x) {
4506 return _simd_erf_d4(x);4505 return _simd_erf_d4(x);
...@@ -4511,7 +4510,7 @@ static inline SIMD_CFUNC simd_double4 __tg_erf(simd_double4 x) {...@@ -4511,7 +4510,7 @@ static inline SIMD_CFUNC simd_double4 __tg_erf(simd_double4 x) {
4511}4510}
4512#endif4511#endif
45134512
4514#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__4513#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
4515extern simd_double8 _simd_erf_d8(simd_double8 x);4514extern simd_double8 _simd_erf_d8(simd_double8 x);
4516static inline SIMD_CFUNC simd_double8 __tg_erf(simd_double8 x) {4515static inline SIMD_CFUNC simd_double8 __tg_erf(simd_double8 x) {
4517 return _simd_erf_d8(x);4516 return _simd_erf_d8(x);
...@@ -4542,7 +4541,7 @@ static inline SIMD_CFUNC simd_float4 __tg_erfc(simd_float4 x) {...@@ -4542,7 +4541,7 @@ static inline SIMD_CFUNC simd_float4 __tg_erfc(simd_float4 x) {
4542}4541}
4543#endif4542#endif
45444543
4545#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__4544#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
4546extern simd_float8 _simd_erfc_f8(simd_float8 x);4545extern simd_float8 _simd_erfc_f8(simd_float8 x);
4547static inline SIMD_CFUNC simd_float8 __tg_erfc(simd_float8 x) {4546static inline SIMD_CFUNC simd_float8 __tg_erfc(simd_float8 x) {
4548 return _simd_erfc_f8(x);4547 return _simd_erfc_f8(x);
...@@ -4553,7 +4552,7 @@ static inline SIMD_CFUNC simd_float8 __tg_erfc(simd_float8 x) {...@@ -4553,7 +4552,7 @@ static inline SIMD_CFUNC simd_float8 __tg_erfc(simd_float8 x) {
4553}4552}
4554#endif4553#endif
45554554
4556#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__4555#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
4557extern simd_float16 _simd_erfc_f16(simd_float16 x);4556extern simd_float16 _simd_erfc_f16(simd_float16 x);
4558static inline SIMD_CFUNC simd_float16 __tg_erfc(simd_float16 x) {4557static inline SIMD_CFUNC simd_float16 __tg_erfc(simd_float16 x) {
4559 return _simd_erfc_f16(x);4558 return _simd_erfc_f16(x);
...@@ -4579,7 +4578,7 @@ static inline SIMD_CFUNC simd_double3 __tg_erfc(simd_double3 x) {...@@ -4579,7 +4578,7 @@ static inline SIMD_CFUNC simd_double3 __tg_erfc(simd_double3 x) {
4579 return simd_make_double3(__tg_erfc(simd_make_double4(x)));4578 return simd_make_double3(__tg_erfc(simd_make_double4(x)));
4580}4579}
45814580
4582#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__4581#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
4583extern simd_double4 _simd_erfc_d4(simd_double4 x);4582extern simd_double4 _simd_erfc_d4(simd_double4 x);
4584static inline SIMD_CFUNC simd_double4 __tg_erfc(simd_double4 x) {4583static inline SIMD_CFUNC simd_double4 __tg_erfc(simd_double4 x) {
4585 return _simd_erfc_d4(x);4584 return _simd_erfc_d4(x);
...@@ -4590,7 +4589,7 @@ static inline SIMD_CFUNC simd_double4 __tg_erfc(simd_double4 x) {...@@ -4590,7 +4589,7 @@ static inline SIMD_CFUNC simd_double4 __tg_erfc(simd_double4 x) {
4590}4589}
4591#endif4590#endif
45924591
4593#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__4592#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
4594extern simd_double8 _simd_erfc_d8(simd_double8 x);4593extern simd_double8 _simd_erfc_d8(simd_double8 x);
4595static inline SIMD_CFUNC simd_double8 __tg_erfc(simd_double8 x) {4594static inline SIMD_CFUNC simd_double8 __tg_erfc(simd_double8 x) {
4596 return _simd_erfc_d8(x);4595 return _simd_erfc_d8(x);
...@@ -4621,7 +4620,7 @@ static inline SIMD_CFUNC simd_float4 __tg_tgamma(simd_float4 x) {...@@ -4621,7 +4620,7 @@ static inline SIMD_CFUNC simd_float4 __tg_tgamma(simd_float4 x) {
4621}4620}
4622#endif4621#endif
46234622
4624#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__4623#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
4625extern simd_float8 _simd_tgamma_f8(simd_float8 x);4624extern simd_float8 _simd_tgamma_f8(simd_float8 x);
4626static inline SIMD_CFUNC simd_float8 __tg_tgamma(simd_float8 x) {4625static inline SIMD_CFUNC simd_float8 __tg_tgamma(simd_float8 x) {
4627 return _simd_tgamma_f8(x);4626 return _simd_tgamma_f8(x);
...@@ -4632,7 +4631,7 @@ static inline SIMD_CFUNC simd_float8 __tg_tgamma(simd_float8 x) {...@@ -4632,7 +4631,7 @@ static inline SIMD_CFUNC simd_float8 __tg_tgamma(simd_float8 x) {
4632}4631}
4633#endif4632#endif
46344633
4635#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__4634#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
4636extern simd_float16 _simd_tgamma_f16(simd_float16 x);4635extern simd_float16 _simd_tgamma_f16(simd_float16 x);
4637static inline SIMD_CFUNC simd_float16 __tg_tgamma(simd_float16 x) {4636static inline SIMD_CFUNC simd_float16 __tg_tgamma(simd_float16 x) {
4638 return _simd_tgamma_f16(x);4637 return _simd_tgamma_f16(x);
...@@ -4658,7 +4657,7 @@ static inline SIMD_CFUNC simd_double3 __tg_tgamma(simd_double3 x) {...@@ -4658,7 +4657,7 @@ static inline SIMD_CFUNC simd_double3 __tg_tgamma(simd_double3 x) {
4658 return simd_make_double3(__tg_tgamma(simd_make_double4(x)));4657 return simd_make_double3(__tg_tgamma(simd_make_double4(x)));
4659}4658}
46604659
4661#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__4660#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
4662extern simd_double4 _simd_tgamma_d4(simd_double4 x);4661extern simd_double4 _simd_tgamma_d4(simd_double4 x);
4663static inline SIMD_CFUNC simd_double4 __tg_tgamma(simd_double4 x) {4662static inline SIMD_CFUNC simd_double4 __tg_tgamma(simd_double4 x) {
4664 return _simd_tgamma_d4(x);4663 return _simd_tgamma_d4(x);
...@@ -4669,7 +4668,7 @@ static inline SIMD_CFUNC simd_double4 __tg_tgamma(simd_double4 x) {...@@ -4669,7 +4668,7 @@ static inline SIMD_CFUNC simd_double4 __tg_tgamma(simd_double4 x) {
4669}4668}
4670#endif4669#endif
46714670
4672#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__4671#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
4673extern simd_double8 _simd_tgamma_d8(simd_double8 x);4672extern simd_double8 _simd_tgamma_d8(simd_double8 x);
4674static inline SIMD_CFUNC simd_double8 __tg_tgamma(simd_double8 x) {4673static inline SIMD_CFUNC simd_double8 __tg_tgamma(simd_double8 x) {
4675 return _simd_tgamma_d8(x);4674 return _simd_tgamma_d8(x);
...@@ -4704,7 +4703,7 @@ static inline SIMD_CFUNC simd_float4 __tg_round(simd_float4 x) {...@@ -4704,7 +4703,7 @@ static inline SIMD_CFUNC simd_float4 __tg_round(simd_float4 x) {
4704}4703}
4705#endif4704#endif
47064705
4707#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__4706#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
4708extern simd_float8 _simd_round_f8(simd_float8 x);4707extern simd_float8 _simd_round_f8(simd_float8 x);
4709static inline SIMD_CFUNC simd_float8 __tg_round(simd_float8 x) {4708static inline SIMD_CFUNC simd_float8 __tg_round(simd_float8 x) {
4710 return _simd_round_f8(x);4709 return _simd_round_f8(x);
...@@ -4715,7 +4714,7 @@ static inline SIMD_CFUNC simd_float8 __tg_round(simd_float8 x) {...@@ -4715,7 +4714,7 @@ static inline SIMD_CFUNC simd_float8 __tg_round(simd_float8 x) {
4715}4714}
4716#endif4715#endif
47174716
4718#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__4717#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
4719extern simd_float16 _simd_round_f16(simd_float16 x);4718extern simd_float16 _simd_round_f16(simd_float16 x);
4720static inline SIMD_CFUNC simd_float16 __tg_round(simd_float16 x) {4719static inline SIMD_CFUNC simd_float16 __tg_round(simd_float16 x) {
4721 return _simd_round_f16(x);4720 return _simd_round_f16(x);
...@@ -4745,7 +4744,7 @@ static inline SIMD_CFUNC simd_double3 __tg_round(simd_double3 x) {...@@ -4745,7 +4744,7 @@ static inline SIMD_CFUNC simd_double3 __tg_round(simd_double3 x) {
4745 return simd_make_double3(__tg_round(simd_make_double4(x)));4744 return simd_make_double3(__tg_round(simd_make_double4(x)));
4746}4745}
47474746
4748#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__4747#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
4749extern simd_double4 _simd_round_d4(simd_double4 x);4748extern simd_double4 _simd_round_d4(simd_double4 x);
4750static inline SIMD_CFUNC simd_double4 __tg_round(simd_double4 x) {4749static inline SIMD_CFUNC simd_double4 __tg_round(simd_double4 x) {
4751 return _simd_round_d4(x);4750 return _simd_round_d4(x);
...@@ -4756,7 +4755,7 @@ static inline SIMD_CFUNC simd_double4 __tg_round(simd_double4 x) {...@@ -4756,7 +4755,7 @@ static inline SIMD_CFUNC simd_double4 __tg_round(simd_double4 x) {
4756}4755}
4757#endif4756#endif
47584757
4759#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__4758#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
4760extern simd_double8 _simd_round_d8(simd_double8 x);4759extern simd_double8 _simd_round_d8(simd_double8 x);
4761static inline SIMD_CFUNC simd_double8 __tg_round(simd_double8 x) {4760static inline SIMD_CFUNC simd_double8 __tg_round(simd_double8 x) {
4762 return _simd_round_d8(x);4761 return _simd_round_d8(x);
...@@ -4787,7 +4786,7 @@ static inline SIMD_CFUNC simd_float4 __tg_atan2(simd_float4 y, simd_float4 x) {...@@ -4787,7 +4786,7 @@ static inline SIMD_CFUNC simd_float4 __tg_atan2(simd_float4 y, simd_float4 x) {
4787}4786}
4788#endif4787#endif
47894788
4790#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__4789#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
4791extern simd_float8 _simd_atan2_f8(simd_float8 y, simd_float8 x);4790extern simd_float8 _simd_atan2_f8(simd_float8 y, simd_float8 x);
4792static inline SIMD_CFUNC simd_float8 __tg_atan2(simd_float8 y, simd_float8 x) {4791static inline SIMD_CFUNC simd_float8 __tg_atan2(simd_float8 y, simd_float8 x) {
4793 return _simd_atan2_f8(y, x);4792 return _simd_atan2_f8(y, x);
...@@ -4798,7 +4797,7 @@ static inline SIMD_CFUNC simd_float8 __tg_atan2(simd_float8 y, simd_float8 x) {...@@ -4798,7 +4797,7 @@ static inline SIMD_CFUNC simd_float8 __tg_atan2(simd_float8 y, simd_float8 x) {
4798}4797}
4799#endif4798#endif
48004799
4801#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__4800#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
4802extern simd_float16 _simd_atan2_f16(simd_float16 y, simd_float16 x);4801extern simd_float16 _simd_atan2_f16(simd_float16 y, simd_float16 x);
4803static inline SIMD_CFUNC simd_float16 __tg_atan2(simd_float16 y, simd_float16 x) {4802static inline SIMD_CFUNC simd_float16 __tg_atan2(simd_float16 y, simd_float16 x) {
4804 return _simd_atan2_f16(y, x);4803 return _simd_atan2_f16(y, x);
...@@ -4824,7 +4823,7 @@ static inline SIMD_CFUNC simd_double3 __tg_atan2(simd_double3 y, simd_double3 x)...@@ -4824,7 +4823,7 @@ static inline SIMD_CFUNC simd_double3 __tg_atan2(simd_double3 y, simd_double3 x)
4824 return simd_make_double3(__tg_atan2(simd_make_double4(y), simd_make_double4(x)));4823 return simd_make_double3(__tg_atan2(simd_make_double4(y), simd_make_double4(x)));
4825}4824}
48264825
4827#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__4826#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
4828extern simd_double4 _simd_atan2_d4(simd_double4 y, simd_double4 x);4827extern simd_double4 _simd_atan2_d4(simd_double4 y, simd_double4 x);
4829static inline SIMD_CFUNC simd_double4 __tg_atan2(simd_double4 y, simd_double4 x) {4828static inline SIMD_CFUNC simd_double4 __tg_atan2(simd_double4 y, simd_double4 x) {
4830 return _simd_atan2_d4(y, x);4829 return _simd_atan2_d4(y, x);
...@@ -4835,7 +4834,7 @@ static inline SIMD_CFUNC simd_double4 __tg_atan2(simd_double4 y, simd_double4 x)...@@ -4835,7 +4834,7 @@ static inline SIMD_CFUNC simd_double4 __tg_atan2(simd_double4 y, simd_double4 x)
4835}4834}
4836#endif4835#endif
48374836
4838#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__4837#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
4839extern simd_double8 _simd_atan2_d8(simd_double8 y, simd_double8 x);4838extern simd_double8 _simd_atan2_d8(simd_double8 y, simd_double8 x);
4840static inline SIMD_CFUNC simd_double8 __tg_atan2(simd_double8 y, simd_double8 x) {4839static inline SIMD_CFUNC simd_double8 __tg_atan2(simd_double8 y, simd_double8 x) {
4841 return _simd_atan2_d8(y, x);4840 return _simd_atan2_d8(y, x);
...@@ -4866,7 +4865,7 @@ static inline SIMD_CFUNC simd_float4 __tg_hypot(simd_float4 x, simd_float4 y) {...@@ -4866,7 +4865,7 @@ static inline SIMD_CFUNC simd_float4 __tg_hypot(simd_float4 x, simd_float4 y) {
4866}4865}
4867#endif4866#endif
48684867
4869#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__4868#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
4870extern simd_float8 _simd_hypot_f8(simd_float8 x, simd_float8 y);4869extern simd_float8 _simd_hypot_f8(simd_float8 x, simd_float8 y);
4871static inline SIMD_CFUNC simd_float8 __tg_hypot(simd_float8 x, simd_float8 y) {4870static inline SIMD_CFUNC simd_float8 __tg_hypot(simd_float8 x, simd_float8 y) {
4872 return _simd_hypot_f8(x, y);4871 return _simd_hypot_f8(x, y);
...@@ -4877,7 +4876,7 @@ static inline SIMD_CFUNC simd_float8 __tg_hypot(simd_float8 x, simd_float8 y) {...@@ -4877,7 +4876,7 @@ static inline SIMD_CFUNC simd_float8 __tg_hypot(simd_float8 x, simd_float8 y) {
4877}4876}
4878#endif4877#endif
48794878
4880#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__4879#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
4881extern simd_float16 _simd_hypot_f16(simd_float16 x, simd_float16 y);4880extern simd_float16 _simd_hypot_f16(simd_float16 x, simd_float16 y);
4882static inline SIMD_CFUNC simd_float16 __tg_hypot(simd_float16 x, simd_float16 y) {4881static inline SIMD_CFUNC simd_float16 __tg_hypot(simd_float16 x, simd_float16 y) {
4883 return _simd_hypot_f16(x, y);4882 return _simd_hypot_f16(x, y);
...@@ -4903,7 +4902,7 @@ static inline SIMD_CFUNC simd_double3 __tg_hypot(simd_double3 x, simd_double3 y)...@@ -4903,7 +4902,7 @@ static inline SIMD_CFUNC simd_double3 __tg_hypot(simd_double3 x, simd_double3 y)
4903 return simd_make_double3(__tg_hypot(simd_make_double4(x), simd_make_double4(y)));4902 return simd_make_double3(__tg_hypot(simd_make_double4(x), simd_make_double4(y)));
4904}4903}
49054904
4906#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__4905#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
4907extern simd_double4 _simd_hypot_d4(simd_double4 x, simd_double4 y);4906extern simd_double4 _simd_hypot_d4(simd_double4 x, simd_double4 y);
4908static inline SIMD_CFUNC simd_double4 __tg_hypot(simd_double4 x, simd_double4 y) {4907static inline SIMD_CFUNC simd_double4 __tg_hypot(simd_double4 x, simd_double4 y) {
4909 return _simd_hypot_d4(x, y);4908 return _simd_hypot_d4(x, y);
...@@ -4914,7 +4913,7 @@ static inline SIMD_CFUNC simd_double4 __tg_hypot(simd_double4 x, simd_double4 y)...@@ -4914,7 +4913,7 @@ static inline SIMD_CFUNC simd_double4 __tg_hypot(simd_double4 x, simd_double4 y)
4914}4913}
4915#endif4914#endif
49164915
4917#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__4916#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
4918extern simd_double8 _simd_hypot_d8(simd_double8 x, simd_double8 y);4917extern simd_double8 _simd_hypot_d8(simd_double8 x, simd_double8 y);
4919static inline SIMD_CFUNC simd_double8 __tg_hypot(simd_double8 x, simd_double8 y) {4918static inline SIMD_CFUNC simd_double8 __tg_hypot(simd_double8 x, simd_double8 y) {
4920 return _simd_hypot_d8(x, y);4919 return _simd_hypot_d8(x, y);
...@@ -4945,7 +4944,7 @@ static inline SIMD_CFUNC simd_float4 __tg_pow(simd_float4 x, simd_float4 y) {...@@ -4945,7 +4944,7 @@ static inline SIMD_CFUNC simd_float4 __tg_pow(simd_float4 x, simd_float4 y) {
4945}4944}
4946#endif4945#endif
49474946
4948#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__4947#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
4949extern simd_float8 _simd_pow_f8(simd_float8 x, simd_float8 y);4948extern simd_float8 _simd_pow_f8(simd_float8 x, simd_float8 y);
4950static inline SIMD_CFUNC simd_float8 __tg_pow(simd_float8 x, simd_float8 y) {4949static inline SIMD_CFUNC simd_float8 __tg_pow(simd_float8 x, simd_float8 y) {
4951 return _simd_pow_f8(x, y);4950 return _simd_pow_f8(x, y);
...@@ -4956,7 +4955,7 @@ static inline SIMD_CFUNC simd_float8 __tg_pow(simd_float8 x, simd_float8 y) {...@@ -4956,7 +4955,7 @@ static inline SIMD_CFUNC simd_float8 __tg_pow(simd_float8 x, simd_float8 y) {
4956}4955}
4957#endif4956#endif
49584957
4959#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__4958#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
4960extern simd_float16 _simd_pow_f16(simd_float16 x, simd_float16 y);4959extern simd_float16 _simd_pow_f16(simd_float16 x, simd_float16 y);
4961static inline SIMD_CFUNC simd_float16 __tg_pow(simd_float16 x, simd_float16 y) {4960static inline SIMD_CFUNC simd_float16 __tg_pow(simd_float16 x, simd_float16 y) {
4962 return _simd_pow_f16(x, y);4961 return _simd_pow_f16(x, y);
...@@ -4982,7 +4981,7 @@ static inline SIMD_CFUNC simd_double3 __tg_pow(simd_double3 x, simd_double3 y) {...@@ -4982,7 +4981,7 @@ static inline SIMD_CFUNC simd_double3 __tg_pow(simd_double3 x, simd_double3 y) {
4982 return simd_make_double3(__tg_pow(simd_make_double4(x), simd_make_double4(y)));4981 return simd_make_double3(__tg_pow(simd_make_double4(x), simd_make_double4(y)));
4983}4982}
49844983
4985#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__4984#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
4986extern simd_double4 _simd_pow_d4(simd_double4 x, simd_double4 y);4985extern simd_double4 _simd_pow_d4(simd_double4 x, simd_double4 y);
4987static inline SIMD_CFUNC simd_double4 __tg_pow(simd_double4 x, simd_double4 y) {4986static inline SIMD_CFUNC simd_double4 __tg_pow(simd_double4 x, simd_double4 y) {
4988 return _simd_pow_d4(x, y);4987 return _simd_pow_d4(x, y);
...@@ -4993,7 +4992,7 @@ static inline SIMD_CFUNC simd_double4 __tg_pow(simd_double4 x, simd_double4 y) {...@@ -4993,7 +4992,7 @@ static inline SIMD_CFUNC simd_double4 __tg_pow(simd_double4 x, simd_double4 y) {
4993}4992}
4994#endif4993#endif
49954994
4996#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__4995#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
4997extern simd_double8 _simd_pow_d8(simd_double8 x, simd_double8 y);4996extern simd_double8 _simd_pow_d8(simd_double8 x, simd_double8 y);
4998static inline SIMD_CFUNC simd_double8 __tg_pow(simd_double8 x, simd_double8 y) {4997static inline SIMD_CFUNC simd_double8 __tg_pow(simd_double8 x, simd_double8 y) {
4999 return _simd_pow_d8(x, y);4998 return _simd_pow_d8(x, y);
...@@ -5024,7 +5023,7 @@ static inline SIMD_CFUNC simd_float4 __tg_fmod(simd_float4 x, simd_float4 y) {...@@ -5024,7 +5023,7 @@ static inline SIMD_CFUNC simd_float4 __tg_fmod(simd_float4 x, simd_float4 y) {
5024}5023}
5025#endif5024#endif
50265025
5027#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__5026#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
5028extern simd_float8 _simd_fmod_f8(simd_float8 x, simd_float8 y);5027extern simd_float8 _simd_fmod_f8(simd_float8 x, simd_float8 y);
5029static inline SIMD_CFUNC simd_float8 __tg_fmod(simd_float8 x, simd_float8 y) {5028static inline SIMD_CFUNC simd_float8 __tg_fmod(simd_float8 x, simd_float8 y) {
5030 return _simd_fmod_f8(x, y);5029 return _simd_fmod_f8(x, y);
...@@ -5035,7 +5034,7 @@ static inline SIMD_CFUNC simd_float8 __tg_fmod(simd_float8 x, simd_float8 y) {...@@ -5035,7 +5034,7 @@ static inline SIMD_CFUNC simd_float8 __tg_fmod(simd_float8 x, simd_float8 y) {
5035}5034}
5036#endif5035#endif
50375036
5038#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__5037#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
5039extern simd_float16 _simd_fmod_f16(simd_float16 x, simd_float16 y);5038extern simd_float16 _simd_fmod_f16(simd_float16 x, simd_float16 y);
5040static inline SIMD_CFUNC simd_float16 __tg_fmod(simd_float16 x, simd_float16 y) {5039static inline SIMD_CFUNC simd_float16 __tg_fmod(simd_float16 x, simd_float16 y) {
5041 return _simd_fmod_f16(x, y);5040 return _simd_fmod_f16(x, y);
...@@ -5061,7 +5060,7 @@ static inline SIMD_CFUNC simd_double3 __tg_fmod(simd_double3 x, simd_double3 y)...@@ -5061,7 +5060,7 @@ static inline SIMD_CFUNC simd_double3 __tg_fmod(simd_double3 x, simd_double3 y)
5061 return simd_make_double3(__tg_fmod(simd_make_double4(x), simd_make_double4(y)));5060 return simd_make_double3(__tg_fmod(simd_make_double4(x), simd_make_double4(y)));
5062}5061}
50635062
5064#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__5063#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
5065extern simd_double4 _simd_fmod_d4(simd_double4 x, simd_double4 y);5064extern simd_double4 _simd_fmod_d4(simd_double4 x, simd_double4 y);
5066static inline SIMD_CFUNC simd_double4 __tg_fmod(simd_double4 x, simd_double4 y) {5065static inline SIMD_CFUNC simd_double4 __tg_fmod(simd_double4 x, simd_double4 y) {
5067 return _simd_fmod_d4(x, y);5066 return _simd_fmod_d4(x, y);
...@@ -5072,7 +5071,7 @@ static inline SIMD_CFUNC simd_double4 __tg_fmod(simd_double4 x, simd_double4 y)...@@ -5072,7 +5071,7 @@ static inline SIMD_CFUNC simd_double4 __tg_fmod(simd_double4 x, simd_double4 y)
5072}5071}
5073#endif5072#endif
50745073
5075#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__5074#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
5076extern simd_double8 _simd_fmod_d8(simd_double8 x, simd_double8 y);5075extern simd_double8 _simd_fmod_d8(simd_double8 x, simd_double8 y);
5077static inline SIMD_CFUNC simd_double8 __tg_fmod(simd_double8 x, simd_double8 y) {5076static inline SIMD_CFUNC simd_double8 __tg_fmod(simd_double8 x, simd_double8 y) {
5078 return _simd_fmod_d8(x, y);5077 return _simd_fmod_d8(x, y);
...@@ -5103,7 +5102,7 @@ static inline SIMD_CFUNC simd_float4 __tg_remainder(simd_float4 x, simd_float4 y...@@ -5103,7 +5102,7 @@ static inline SIMD_CFUNC simd_float4 __tg_remainder(simd_float4 x, simd_float4 y
5103}5102}
5104#endif5103#endif
51055104
5106#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__5105#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
5107extern simd_float8 _simd_remainder_f8(simd_float8 x, simd_float8 y);5106extern simd_float8 _simd_remainder_f8(simd_float8 x, simd_float8 y);
5108static inline SIMD_CFUNC simd_float8 __tg_remainder(simd_float8 x, simd_float8 y) {5107static inline SIMD_CFUNC simd_float8 __tg_remainder(simd_float8 x, simd_float8 y) {
5109 return _simd_remainder_f8(x, y);5108 return _simd_remainder_f8(x, y);
...@@ -5114,7 +5113,7 @@ static inline SIMD_CFUNC simd_float8 __tg_remainder(simd_float8 x, simd_float8 y...@@ -5114,7 +5113,7 @@ static inline SIMD_CFUNC simd_float8 __tg_remainder(simd_float8 x, simd_float8 y
5114}5113}
5115#endif5114#endif
51165115
5117#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__5116#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
5118extern simd_float16 _simd_remainder_f16(simd_float16 x, simd_float16 y);5117extern simd_float16 _simd_remainder_f16(simd_float16 x, simd_float16 y);
5119static inline SIMD_CFUNC simd_float16 __tg_remainder(simd_float16 x, simd_float16 y) {5118static inline SIMD_CFUNC simd_float16 __tg_remainder(simd_float16 x, simd_float16 y) {
5120 return _simd_remainder_f16(x, y);5119 return _simd_remainder_f16(x, y);
...@@ -5140,7 +5139,7 @@ static inline SIMD_CFUNC simd_double3 __tg_remainder(simd_double3 x, simd_double...@@ -5140,7 +5139,7 @@ static inline SIMD_CFUNC simd_double3 __tg_remainder(simd_double3 x, simd_double
5140 return simd_make_double3(__tg_remainder(simd_make_double4(x), simd_make_double4(y)));5139 return simd_make_double3(__tg_remainder(simd_make_double4(x), simd_make_double4(y)));
5141}5140}
51425141
5143#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__5142#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
5144extern simd_double4 _simd_remainder_d4(simd_double4 x, simd_double4 y);5143extern simd_double4 _simd_remainder_d4(simd_double4 x, simd_double4 y);
5145static inline SIMD_CFUNC simd_double4 __tg_remainder(simd_double4 x, simd_double4 y) {5144static inline SIMD_CFUNC simd_double4 __tg_remainder(simd_double4 x, simd_double4 y) {
5146 return _simd_remainder_d4(x, y);5145 return _simd_remainder_d4(x, y);
...@@ -5151,7 +5150,7 @@ static inline SIMD_CFUNC simd_double4 __tg_remainder(simd_double4 x, simd_double...@@ -5151,7 +5150,7 @@ static inline SIMD_CFUNC simd_double4 __tg_remainder(simd_double4 x, simd_double
5151}5150}
5152#endif5151#endif
51535152
5154#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__5153#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
5155extern simd_double8 _simd_remainder_d8(simd_double8 x, simd_double8 y);5154extern simd_double8 _simd_remainder_d8(simd_double8 x, simd_double8 y);
5156static inline SIMD_CFUNC simd_double8 __tg_remainder(simd_double8 x, simd_double8 y) {5155static inline SIMD_CFUNC simd_double8 __tg_remainder(simd_double8 x, simd_double8 y) {
5157 return _simd_remainder_d8(x, y);5156 return _simd_remainder_d8(x, y);
...@@ -5182,7 +5181,7 @@ static inline SIMD_CFUNC simd_float4 __tg_nextafter(simd_float4 x, simd_float4 y...@@ -5182,7 +5181,7 @@ static inline SIMD_CFUNC simd_float4 __tg_nextafter(simd_float4 x, simd_float4 y
5182}5181}
5183#endif5182#endif
51845183
5185#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__5184#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
5186extern simd_float8 _simd_nextafter_f8(simd_float8 x, simd_float8 y);5185extern simd_float8 _simd_nextafter_f8(simd_float8 x, simd_float8 y);
5187static inline SIMD_CFUNC simd_float8 __tg_nextafter(simd_float8 x, simd_float8 y) {5186static inline SIMD_CFUNC simd_float8 __tg_nextafter(simd_float8 x, simd_float8 y) {
5188 return _simd_nextafter_f8(x, y);5187 return _simd_nextafter_f8(x, y);
...@@ -5193,7 +5192,7 @@ static inline SIMD_CFUNC simd_float8 __tg_nextafter(simd_float8 x, simd_float8 y...@@ -5193,7 +5192,7 @@ static inline SIMD_CFUNC simd_float8 __tg_nextafter(simd_float8 x, simd_float8 y
5193}5192}
5194#endif5193#endif
51955194
5196#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__5195#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
5197extern simd_float16 _simd_nextafter_f16(simd_float16 x, simd_float16 y);5196extern simd_float16 _simd_nextafter_f16(simd_float16 x, simd_float16 y);
5198static inline SIMD_CFUNC simd_float16 __tg_nextafter(simd_float16 x, simd_float16 y) {5197static inline SIMD_CFUNC simd_float16 __tg_nextafter(simd_float16 x, simd_float16 y) {
5199 return _simd_nextafter_f16(x, y);5198 return _simd_nextafter_f16(x, y);
...@@ -5219,7 +5218,7 @@ static inline SIMD_CFUNC simd_double3 __tg_nextafter(simd_double3 x, simd_double...@@ -5219,7 +5218,7 @@ static inline SIMD_CFUNC simd_double3 __tg_nextafter(simd_double3 x, simd_double
5219 return simd_make_double3(__tg_nextafter(simd_make_double4(x), simd_make_double4(y)));5218 return simd_make_double3(__tg_nextafter(simd_make_double4(x), simd_make_double4(y)));
5220}5219}
52215220
5222#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__5221#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX2__
5223extern simd_double4 _simd_nextafter_d4(simd_double4 x, simd_double4 y);5222extern simd_double4 _simd_nextafter_d4(simd_double4 x, simd_double4 y);
5224static inline SIMD_CFUNC simd_double4 __tg_nextafter(simd_double4 x, simd_double4 y) {5223static inline SIMD_CFUNC simd_double4 __tg_nextafter(simd_double4 x, simd_double4 y) {
5225 return _simd_nextafter_d4(x, y);5224 return _simd_nextafter_d4(x, y);
...@@ -5230,7 +5229,7 @@ static inline SIMD_CFUNC simd_double4 __tg_nextafter(simd_double4 x, simd_double...@@ -5230,7 +5229,7 @@ static inline SIMD_CFUNC simd_double4 __tg_nextafter(simd_double4 x, simd_double
5230}5229}
5231#endif5230#endif
52325231
5233#if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__5232#if SIMD_LIBRARY_VERSION >= 3 && defined __AVX512F__
5234extern simd_double8 _simd_nextafter_d8(simd_double8 x, simd_double8 y);5233extern simd_double8 _simd_nextafter_d8(simd_double8 x, simd_double8 y);
5235static inline SIMD_CFUNC simd_double8 __tg_nextafter(simd_double8 x, simd_double8 y) {5234static inline SIMD_CFUNC simd_double8 __tg_nextafter(simd_double8 x, simd_double8 y) {
5236 return _simd_nextafter_d8(x, y);5235 return _simd_nextafter_d8(x, y);
...@@ -5287,7 +5286,7 @@ static inline SIMD_CFUNC simd_float8 __tg_fma(simd_float8 x, simd_float8 y, simd...@@ -5287,7 +5286,7 @@ static inline SIMD_CFUNC simd_float8 __tg_fma(simd_float8 x, simd_float8 y, simd
5287}5286}
52885287
5289static inline SIMD_CFUNC simd_float16 __tg_fma(simd_float16 x, simd_float16 y, simd_float16 z) {5288static inline SIMD_CFUNC simd_float16 __tg_fma(simd_float16 x, simd_float16 y, simd_float16 z) {
5290#if defined __x86_64__ && defined __AVX512F__5289#if defined __AVX512F__
5291 return _mm512_fmadd_ps(x, y, z);5290 return _mm512_fmadd_ps(x, y, z);
5292#else5291#else
5293 return simd_make_float16(__tg_fma(x.lo, y.lo, z.lo), __tg_fma(x.hi, y.hi, z.hi));5292 return simd_make_float16(__tg_fma(x.lo, y.lo, z.lo), __tg_fma(x.hi, y.hi, z.hi));
...@@ -5322,7 +5321,7 @@ static inline SIMD_CFUNC simd_double4 __tg_fma(simd_double4 x, simd_double4 y, s...@@ -5322,7 +5321,7 @@ static inline SIMD_CFUNC simd_double4 __tg_fma(simd_double4 x, simd_double4 y, s
5322}5321}
53235322
5324static inline SIMD_CFUNC simd_double8 __tg_fma(simd_double8 x, simd_double8 y, simd_double8 z) {5323static inline SIMD_CFUNC simd_double8 __tg_fma(simd_double8 x, simd_double8 y, simd_double8 z) {
5325#if defined __x86_64__ && defined __AVX512F__5324#if defined __AVX512F__
5326 return _mm512_fmadd_pd(x, y, z);5325 return _mm512_fmadd_pd(x, y, z);
5327#else5326#else
5328 return simd_make_double8(__tg_fma(x.lo, y.lo, z.lo), __tg_fma(x.hi, y.hi, z.hi));5327 return simd_make_double8(__tg_fma(x.lo, y.lo, z.lo), __tg_fma(x.hi, y.hi, z.hi));
lib/libc/include/x86_64-macos-gnu/simd/packed.h+122-122
...@@ -35,22 +35,22 @@...@@ -35,22 +35,22 @@
35/*! @abstract A vector of two 8-bit signed (twos-complement) integers with35/*! @abstract A vector of two 8-bit signed (twos-complement) integers with
36 * relaxed alignment.36 * relaxed alignment.
37 * @description In C++ and Metal, this type is also available as37 * @description In C++ and Metal, this type is also available as
38 * simd::packed::char2. The alignment of this type is that of the38 * simd::packed_char2. The alignment of this type is that of the underlying
39 * underlying scalar element type, so you can use it to load or store from39 * scalar element type, so you can use it to load or store from an array of
40 * an array of that type. */40 * that type. */
41typedef __attribute__((__ext_vector_type__(2),__aligned__(1))) char simd_packed_char2;41typedef __attribute__((__ext_vector_type__(2),__aligned__(1))) char simd_packed_char2;
4242
43/*! @abstract A vector of four 8-bit signed (twos-complement) integers with43/*! @abstract A vector of four 8-bit signed (twos-complement) integers with
44 * relaxed alignment.44 * relaxed alignment.
45 * @description In C++ and Metal, this type is also available as45 * @description In C++ and Metal, this type is also available as
46 * simd::packed::char4. The alignment of this type is that of the46 * simd::packed_char4. The alignment of this type is that of the underlying
47 * underlying scalar element type, so you can use it to load or store from47 * scalar element type, so you can use it to load or store from an array of
48 * an array of that type. */48 * that type. */
49typedef __attribute__((__ext_vector_type__(4),__aligned__(1))) char simd_packed_char4;49typedef __attribute__((__ext_vector_type__(4),__aligned__(1))) char simd_packed_char4;
5050
51/*! @abstract A vector of eight 8-bit signed (twos-complement) integers with51/*! @abstract A vector of eight 8-bit signed (twos-complement) integers with
52 * relaxed alignment.52 * relaxed alignment.
53 * @description In C++ this type is also available as simd::packed::char8.53 * @description In C++ this type is also available as simd::packed_char8.
54 * This type is not available in Metal. The alignment of this type is only54 * This type is not available in Metal. The alignment of this type is only
55 * that of the underlying scalar element type, so you can use it to load or55 * that of the underlying scalar element type, so you can use it to load or
56 * store from an array of that type. */56 * store from an array of that type. */
...@@ -58,7 +58,7 @@ typedef __attribute__((__ext_vector_type__(8),__aligned__(1))) char simd_packed_...@@ -58,7 +58,7 @@ typedef __attribute__((__ext_vector_type__(8),__aligned__(1))) char simd_packed_
5858
59/*! @abstract A vector of sixteen 8-bit signed (twos-complement) integers59/*! @abstract A vector of sixteen 8-bit signed (twos-complement) integers
60 * with relaxed alignment.60 * with relaxed alignment.
61 * @description In C++ this type is also available as simd::packed::char16.61 * @description In C++ this type is also available as simd::packed_char16.
62 * This type is not available in Metal. The alignment of this type is only62 * This type is not available in Metal. The alignment of this type is only
63 * that of the underlying scalar element type, so you can use it to load or63 * that of the underlying scalar element type, so you can use it to load or
64 * store from an array of that type. */64 * store from an array of that type. */
...@@ -66,7 +66,7 @@ typedef __attribute__((__ext_vector_type__(16),__aligned__(1))) char simd_packed...@@ -66,7 +66,7 @@ typedef __attribute__((__ext_vector_type__(16),__aligned__(1))) char simd_packed
6666
67/*! @abstract A vector of thirty-two 8-bit signed (twos-complement) integers67/*! @abstract A vector of thirty-two 8-bit signed (twos-complement) integers
68 * with relaxed alignment.68 * with relaxed alignment.
69 * @description In C++ this type is also available as simd::packed::char32.69 * @description In C++ this type is also available as simd::packed_char32.
70 * This type is not available in Metal. The alignment of this type is only70 * This type is not available in Metal. The alignment of this type is only
71 * that of the underlying scalar element type, so you can use it to load or71 * that of the underlying scalar element type, so you can use it to load or
72 * store from an array of that type. */72 * store from an array of that type. */
...@@ -74,7 +74,7 @@ typedef __attribute__((__ext_vector_type__(32),__aligned__(1))) char simd_packed...@@ -74,7 +74,7 @@ typedef __attribute__((__ext_vector_type__(32),__aligned__(1))) char simd_packed
7474
75/*! @abstract A vector of sixty-four 8-bit signed (twos-complement) integers75/*! @abstract A vector of sixty-four 8-bit signed (twos-complement) integers
76 * with relaxed alignment.76 * with relaxed alignment.
77 * @description In C++ this type is also available as simd::packed::char64.77 * @description In C++ this type is also available as simd::packed_char64.
78 * This type is not available in Metal. The alignment of this type is only78 * This type is not available in Metal. The alignment of this type is only
79 * that of the underlying scalar element type, so you can use it to load or79 * that of the underlying scalar element type, so you can use it to load or
80 * store from an array of that type. */80 * store from an array of that type. */
...@@ -83,7 +83,7 @@ typedef __attribute__((__ext_vector_type__(64),__aligned__(1))) char simd_packed...@@ -83,7 +83,7 @@ typedef __attribute__((__ext_vector_type__(64),__aligned__(1))) char simd_packed
83/*! @abstract A vector of two 8-bit unsigned integers with relaxed83/*! @abstract A vector of two 8-bit unsigned integers with relaxed
84 * alignment.84 * alignment.
85 * @description In C++ and Metal, this type is also available as85 * @description In C++ and Metal, this type is also available as
86 * simd::packed::uchar2. The alignment of this type is that of the86 * simd::packed_uchar2. The alignment of this type is that of the
87 * underlying scalar element type, so you can use it to load or store from87 * underlying scalar element type, so you can use it to load or store from
88 * an array of that type. */88 * an array of that type. */
89typedef __attribute__((__ext_vector_type__(2),__aligned__(1))) unsigned char simd_packed_uchar2;89typedef __attribute__((__ext_vector_type__(2),__aligned__(1))) unsigned char simd_packed_uchar2;
...@@ -91,14 +91,14 @@ typedef __attribute__((__ext_vector_type__(2),__aligned__(1))) unsigned char sim...@@ -91,14 +91,14 @@ typedef __attribute__((__ext_vector_type__(2),__aligned__(1))) unsigned char sim
91/*! @abstract A vector of four 8-bit unsigned integers with relaxed91/*! @abstract A vector of four 8-bit unsigned integers with relaxed
92 * alignment.92 * alignment.
93 * @description In C++ and Metal, this type is also available as93 * @description In C++ and Metal, this type is also available as
94 * simd::packed::uchar4. The alignment of this type is that of the94 * simd::packed_uchar4. The alignment of this type is that of the
95 * underlying scalar element type, so you can use it to load or store from95 * underlying scalar element type, so you can use it to load or store from
96 * an array of that type. */96 * an array of that type. */
97typedef __attribute__((__ext_vector_type__(4),__aligned__(1))) unsigned char simd_packed_uchar4;97typedef __attribute__((__ext_vector_type__(4),__aligned__(1))) unsigned char simd_packed_uchar4;
9898
99/*! @abstract A vector of eight 8-bit unsigned integers with relaxed99/*! @abstract A vector of eight 8-bit unsigned integers with relaxed
100 * alignment.100 * alignment.
101 * @description In C++ this type is also available as simd::packed::uchar8.101 * @description In C++ this type is also available as simd::packed_uchar8.
102 * This type is not available in Metal. The alignment of this type is only102 * This type is not available in Metal. The alignment of this type is only
103 * that of the underlying scalar element type, so you can use it to load or103 * that of the underlying scalar element type, so you can use it to load or
104 * store from an array of that type. */104 * store from an array of that type. */
...@@ -106,32 +106,32 @@ typedef __attribute__((__ext_vector_type__(8),__aligned__(1))) unsigned char sim...@@ -106,32 +106,32 @@ typedef __attribute__((__ext_vector_type__(8),__aligned__(1))) unsigned char sim
106106
107/*! @abstract A vector of sixteen 8-bit unsigned integers with relaxed107/*! @abstract A vector of sixteen 8-bit unsigned integers with relaxed
108 * alignment.108 * alignment.
109 * @description In C++ this type is also available as109 * @description In C++ this type is also available as simd::packed_uchar16.
110 * simd::packed::uchar16. This type is not available in Metal. The110 * This type is not available in Metal. The alignment of this type is only
111 * alignment of this type is only that of the underlying scalar element111 * that of the underlying scalar element type, so you can use it to load or
112 * type, so you can use it to load or store from an array of that type. */112 * store from an array of that type. */
113typedef __attribute__((__ext_vector_type__(16),__aligned__(1))) unsigned char simd_packed_uchar16;113typedef __attribute__((__ext_vector_type__(16),__aligned__(1))) unsigned char simd_packed_uchar16;
114114
115/*! @abstract A vector of thirty-two 8-bit unsigned integers with relaxed115/*! @abstract A vector of thirty-two 8-bit unsigned integers with relaxed
116 * alignment.116 * alignment.
117 * @description In C++ this type is also available as117 * @description In C++ this type is also available as simd::packed_uchar32.
118 * simd::packed::uchar32. This type is not available in Metal. The118 * This type is not available in Metal. The alignment of this type is only
119 * alignment of this type is only that of the underlying scalar element119 * that of the underlying scalar element type, so you can use it to load or
120 * type, so you can use it to load or store from an array of that type. */120 * store from an array of that type. */
121typedef __attribute__((__ext_vector_type__(32),__aligned__(1))) unsigned char simd_packed_uchar32;121typedef __attribute__((__ext_vector_type__(32),__aligned__(1))) unsigned char simd_packed_uchar32;
122122
123/*! @abstract A vector of sixty-four 8-bit unsigned integers with relaxed123/*! @abstract A vector of sixty-four 8-bit unsigned integers with relaxed
124 * alignment.124 * alignment.
125 * @description In C++ this type is also available as125 * @description In C++ this type is also available as simd::packed_uchar64.
126 * simd::packed::uchar64. This type is not available in Metal. The126 * This type is not available in Metal. The alignment of this type is only
127 * alignment of this type is only that of the underlying scalar element127 * that of the underlying scalar element type, so you can use it to load or
128 * type, so you can use it to load or store from an array of that type. */128 * store from an array of that type. */
129typedef __attribute__((__ext_vector_type__(64),__aligned__(1))) unsigned char simd_packed_uchar64;129typedef __attribute__((__ext_vector_type__(64),__aligned__(1))) unsigned char simd_packed_uchar64;
130130
131/*! @abstract A vector of two 16-bit signed (twos-complement) integers with131/*! @abstract A vector of two 16-bit signed (twos-complement) integers with
132 * relaxed alignment.132 * relaxed alignment.
133 * @description In C++ and Metal, this type is also available as133 * @description In C++ and Metal, this type is also available as
134 * simd::packed::short2. The alignment of this type is that of the134 * simd::packed_short2. The alignment of this type is that of the
135 * underlying scalar element type, so you can use it to load or store from135 * underlying scalar element type, so you can use it to load or store from
136 * an array of that type. */136 * an array of that type. */
137typedef __attribute__((__ext_vector_type__(2),__aligned__(2))) short simd_packed_short2;137typedef __attribute__((__ext_vector_type__(2),__aligned__(2))) short simd_packed_short2;
...@@ -139,14 +139,14 @@ typedef __attribute__((__ext_vector_type__(2),__aligned__(2))) short simd_packed...@@ -139,14 +139,14 @@ typedef __attribute__((__ext_vector_type__(2),__aligned__(2))) short simd_packed
139/*! @abstract A vector of four 16-bit signed (twos-complement) integers with139/*! @abstract A vector of four 16-bit signed (twos-complement) integers with
140 * relaxed alignment.140 * relaxed alignment.
141 * @description In C++ and Metal, this type is also available as141 * @description In C++ and Metal, this type is also available as
142 * simd::packed::short4. The alignment of this type is that of the142 * simd::packed_short4. The alignment of this type is that of the
143 * underlying scalar element type, so you can use it to load or store from143 * underlying scalar element type, so you can use it to load or store from
144 * an array of that type. */144 * an array of that type. */
145typedef __attribute__((__ext_vector_type__(4),__aligned__(2))) short simd_packed_short4;145typedef __attribute__((__ext_vector_type__(4),__aligned__(2))) short simd_packed_short4;
146146
147/*! @abstract A vector of eight 16-bit signed (twos-complement) integers147/*! @abstract A vector of eight 16-bit signed (twos-complement) integers
148 * with relaxed alignment.148 * with relaxed alignment.
149 * @description In C++ this type is also available as simd::packed::short8.149 * @description In C++ this type is also available as simd::packed_short8.
150 * This type is not available in Metal. The alignment of this type is only150 * This type is not available in Metal. The alignment of this type is only
151 * that of the underlying scalar element type, so you can use it to load or151 * that of the underlying scalar element type, so you can use it to load or
152 * store from an array of that type. */152 * store from an array of that type. */
...@@ -154,24 +154,24 @@ typedef __attribute__((__ext_vector_type__(8),__aligned__(2))) short simd_packed...@@ -154,24 +154,24 @@ typedef __attribute__((__ext_vector_type__(8),__aligned__(2))) short simd_packed
154154
155/*! @abstract A vector of sixteen 16-bit signed (twos-complement) integers155/*! @abstract A vector of sixteen 16-bit signed (twos-complement) integers
156 * with relaxed alignment.156 * with relaxed alignment.
157 * @description In C++ this type is also available as157 * @description In C++ this type is also available as simd::packed_short16.
158 * simd::packed::short16. This type is not available in Metal. The158 * This type is not available in Metal. The alignment of this type is only
159 * alignment of this type is only that of the underlying scalar element159 * that of the underlying scalar element type, so you can use it to load or
160 * type, so you can use it to load or store from an array of that type. */160 * store from an array of that type. */
161typedef __attribute__((__ext_vector_type__(16),__aligned__(2))) short simd_packed_short16;161typedef __attribute__((__ext_vector_type__(16),__aligned__(2))) short simd_packed_short16;
162162
163/*! @abstract A vector of thirty-two 16-bit signed (twos-complement)163/*! @abstract A vector of thirty-two 16-bit signed (twos-complement)
164 * integers with relaxed alignment.164 * integers with relaxed alignment.
165 * @description In C++ this type is also available as165 * @description In C++ this type is also available as simd::packed_short32.
166 * simd::packed::short32. This type is not available in Metal. The166 * This type is not available in Metal. The alignment of this type is only
167 * alignment of this type is only that of the underlying scalar element167 * that of the underlying scalar element type, so you can use it to load or
168 * type, so you can use it to load or store from an array of that type. */168 * store from an array of that type. */
169typedef __attribute__((__ext_vector_type__(32),__aligned__(2))) short simd_packed_short32;169typedef __attribute__((__ext_vector_type__(32),__aligned__(2))) short simd_packed_short32;
170170
171/*! @abstract A vector of two 16-bit unsigned integers with relaxed171/*! @abstract A vector of two 16-bit unsigned integers with relaxed
172 * alignment.172 * alignment.
173 * @description In C++ and Metal, this type is also available as173 * @description In C++ and Metal, this type is also available as
174 * simd::packed::ushort2. The alignment of this type is that of the174 * simd::packed_ushort2. The alignment of this type is that of the
175 * underlying scalar element type, so you can use it to load or store from175 * underlying scalar element type, so you can use it to load or store from
176 * an array of that type. */176 * an array of that type. */
177typedef __attribute__((__ext_vector_type__(2),__aligned__(2))) unsigned short simd_packed_ushort2;177typedef __attribute__((__ext_vector_type__(2),__aligned__(2))) unsigned short simd_packed_ushort2;
...@@ -179,23 +179,23 @@ typedef __attribute__((__ext_vector_type__(2),__aligned__(2))) unsigned short si...@@ -179,23 +179,23 @@ typedef __attribute__((__ext_vector_type__(2),__aligned__(2))) unsigned short si
179/*! @abstract A vector of four 16-bit unsigned integers with relaxed179/*! @abstract A vector of four 16-bit unsigned integers with relaxed
180 * alignment.180 * alignment.
181 * @description In C++ and Metal, this type is also available as181 * @description In C++ and Metal, this type is also available as
182 * simd::packed::ushort4. The alignment of this type is that of the182 * simd::packed_ushort4. The alignment of this type is that of the
183 * underlying scalar element type, so you can use it to load or store from183 * underlying scalar element type, so you can use it to load or store from
184 * an array of that type. */184 * an array of that type. */
185typedef __attribute__((__ext_vector_type__(4),__aligned__(2))) unsigned short simd_packed_ushort4;185typedef __attribute__((__ext_vector_type__(4),__aligned__(2))) unsigned short simd_packed_ushort4;
186186
187/*! @abstract A vector of eight 16-bit unsigned integers with relaxed187/*! @abstract A vector of eight 16-bit unsigned integers with relaxed
188 * alignment.188 * alignment.
189 * @description In C++ this type is also available as189 * @description In C++ this type is also available as simd::packed_ushort8.
190 * simd::packed::ushort8. This type is not available in Metal. The190 * This type is not available in Metal. The alignment of this type is only
191 * alignment of this type is only that of the underlying scalar element191 * that of the underlying scalar element type, so you can use it to load or
192 * type, so you can use it to load or store from an array of that type. */192 * store from an array of that type. */
193typedef __attribute__((__ext_vector_type__(8),__aligned__(2))) unsigned short simd_packed_ushort8;193typedef __attribute__((__ext_vector_type__(8),__aligned__(2))) unsigned short simd_packed_ushort8;
194194
195/*! @abstract A vector of sixteen 16-bit unsigned integers with relaxed195/*! @abstract A vector of sixteen 16-bit unsigned integers with relaxed
196 * alignment.196 * alignment.
197 * @description In C++ this type is also available as197 * @description In C++ this type is also available as
198 * simd::packed::ushort16. This type is not available in Metal. The198 * simd::packed_ushort16. This type is not available in Metal. The
199 * alignment of this type is only that of the underlying scalar element199 * alignment of this type is only that of the underlying scalar element
200 * type, so you can use it to load or store from an array of that type. */200 * type, so you can use it to load or store from an array of that type. */
201typedef __attribute__((__ext_vector_type__(16),__aligned__(2))) unsigned short simd_packed_ushort16;201typedef __attribute__((__ext_vector_type__(16),__aligned__(2))) unsigned short simd_packed_ushort16;
...@@ -203,7 +203,7 @@ typedef __attribute__((__ext_vector_type__(16),__aligned__(2))) unsigned short s...@@ -203,7 +203,7 @@ typedef __attribute__((__ext_vector_type__(16),__aligned__(2))) unsigned short s
203/*! @abstract A vector of thirty-two 16-bit unsigned integers with relaxed203/*! @abstract A vector of thirty-two 16-bit unsigned integers with relaxed
204 * alignment.204 * alignment.
205 * @description In C++ this type is also available as205 * @description In C++ this type is also available as
206 * simd::packed::ushort32. This type is not available in Metal. The206 * simd::packed_ushort32. This type is not available in Metal. The
207 * alignment of this type is only that of the underlying scalar element207 * alignment of this type is only that of the underlying scalar element
208 * type, so you can use it to load or store from an array of that type. */208 * type, so you can use it to load or store from an array of that type. */
209typedef __attribute__((__ext_vector_type__(32),__aligned__(2))) unsigned short simd_packed_ushort32;209typedef __attribute__((__ext_vector_type__(32),__aligned__(2))) unsigned short simd_packed_ushort32;
...@@ -211,7 +211,7 @@ typedef __attribute__((__ext_vector_type__(32),__aligned__(2))) unsigned short s...@@ -211,7 +211,7 @@ typedef __attribute__((__ext_vector_type__(32),__aligned__(2))) unsigned short s
211/*! @abstract A vector of two 32-bit signed (twos-complement) integers with211/*! @abstract A vector of two 32-bit signed (twos-complement) integers with
212 * relaxed alignment.212 * relaxed alignment.
213 * @description In C++ and Metal, this type is also available as213 * @description In C++ and Metal, this type is also available as
214 * simd::packed::int2. The alignment of this type is that of the underlying214 * simd::packed_int2. The alignment of this type is that of the underlying
215 * scalar element type, so you can use it to load or store from an array of215 * scalar element type, so you can use it to load or store from an array of
216 * that type. */216 * that type. */
217typedef __attribute__((__ext_vector_type__(2),__aligned__(4))) int simd_packed_int2;217typedef __attribute__((__ext_vector_type__(2),__aligned__(4))) int simd_packed_int2;
...@@ -219,14 +219,14 @@ typedef __attribute__((__ext_vector_type__(2),__aligned__(4))) int simd_packed_i...@@ -219,14 +219,14 @@ typedef __attribute__((__ext_vector_type__(2),__aligned__(4))) int simd_packed_i
219/*! @abstract A vector of four 32-bit signed (twos-complement) integers with219/*! @abstract A vector of four 32-bit signed (twos-complement) integers with
220 * relaxed alignment.220 * relaxed alignment.
221 * @description In C++ and Metal, this type is also available as221 * @description In C++ and Metal, this type is also available as
222 * simd::packed::int4. The alignment of this type is that of the underlying222 * simd::packed_int4. The alignment of this type is that of the underlying
223 * scalar element type, so you can use it to load or store from an array of223 * scalar element type, so you can use it to load or store from an array of
224 * that type. */224 * that type. */
225typedef __attribute__((__ext_vector_type__(4),__aligned__(4))) int simd_packed_int4;225typedef __attribute__((__ext_vector_type__(4),__aligned__(4))) int simd_packed_int4;
226226
227/*! @abstract A vector of eight 32-bit signed (twos-complement) integers227/*! @abstract A vector of eight 32-bit signed (twos-complement) integers
228 * with relaxed alignment.228 * with relaxed alignment.
229 * @description In C++ this type is also available as simd::packed::int8.229 * @description In C++ this type is also available as simd::packed_int8.
230 * This type is not available in Metal. The alignment of this type is only230 * This type is not available in Metal. The alignment of this type is only
231 * that of the underlying scalar element type, so you can use it to load or231 * that of the underlying scalar element type, so you can use it to load or
232 * store from an array of that type. */232 * store from an array of that type. */
...@@ -234,7 +234,7 @@ typedef __attribute__((__ext_vector_type__(8),__aligned__(4))) int simd_packed_i...@@ -234,7 +234,7 @@ typedef __attribute__((__ext_vector_type__(8),__aligned__(4))) int simd_packed_i
234234
235/*! @abstract A vector of sixteen 32-bit signed (twos-complement) integers235/*! @abstract A vector of sixteen 32-bit signed (twos-complement) integers
236 * with relaxed alignment.236 * with relaxed alignment.
237 * @description In C++ this type is also available as simd::packed::int16.237 * @description In C++ this type is also available as simd::packed_int16.
238 * This type is not available in Metal. The alignment of this type is only238 * This type is not available in Metal. The alignment of this type is only
239 * that of the underlying scalar element type, so you can use it to load or239 * that of the underlying scalar element type, so you can use it to load or
240 * store from an array of that type. */240 * store from an array of that type. */
...@@ -243,22 +243,22 @@ typedef __attribute__((__ext_vector_type__(16),__aligned__(4))) int simd_packed_...@@ -243,22 +243,22 @@ typedef __attribute__((__ext_vector_type__(16),__aligned__(4))) int simd_packed_
243/*! @abstract A vector of two 32-bit unsigned integers with relaxed243/*! @abstract A vector of two 32-bit unsigned integers with relaxed
244 * alignment.244 * alignment.
245 * @description In C++ and Metal, this type is also available as245 * @description In C++ and Metal, this type is also available as
246 * simd::packed::uint2. The alignment of this type is that of the246 * simd::packed_uint2. The alignment of this type is that of the underlying
247 * underlying scalar element type, so you can use it to load or store from247 * scalar element type, so you can use it to load or store from an array of
248 * an array of that type. */248 * that type. */
249typedef __attribute__((__ext_vector_type__(2),__aligned__(4))) unsigned int simd_packed_uint2;249typedef __attribute__((__ext_vector_type__(2),__aligned__(4))) unsigned int simd_packed_uint2;
250250
251/*! @abstract A vector of four 32-bit unsigned integers with relaxed251/*! @abstract A vector of four 32-bit unsigned integers with relaxed
252 * alignment.252 * alignment.
253 * @description In C++ and Metal, this type is also available as253 * @description In C++ and Metal, this type is also available as
254 * simd::packed::uint4. The alignment of this type is that of the254 * simd::packed_uint4. The alignment of this type is that of the underlying
255 * underlying scalar element type, so you can use it to load or store from255 * scalar element type, so you can use it to load or store from an array of
256 * an array of that type. */256 * that type. */
257typedef __attribute__((__ext_vector_type__(4),__aligned__(4))) unsigned int simd_packed_uint4;257typedef __attribute__((__ext_vector_type__(4),__aligned__(4))) unsigned int simd_packed_uint4;
258258
259/*! @abstract A vector of eight 32-bit unsigned integers with relaxed259/*! @abstract A vector of eight 32-bit unsigned integers with relaxed
260 * alignment.260 * alignment.
261 * @description In C++ this type is also available as simd::packed::uint8.261 * @description In C++ this type is also available as simd::packed_uint8.
262 * This type is not available in Metal. The alignment of this type is only262 * This type is not available in Metal. The alignment of this type is only
263 * that of the underlying scalar element type, so you can use it to load or263 * that of the underlying scalar element type, so you can use it to load or
264 * store from an array of that type. */264 * store from an array of that type. */
...@@ -266,7 +266,7 @@ typedef __attribute__((__ext_vector_type__(8),__aligned__(4))) unsigned int simd...@@ -266,7 +266,7 @@ typedef __attribute__((__ext_vector_type__(8),__aligned__(4))) unsigned int simd
266266
267/*! @abstract A vector of sixteen 32-bit unsigned integers with relaxed267/*! @abstract A vector of sixteen 32-bit unsigned integers with relaxed
268 * alignment.268 * alignment.
269 * @description In C++ this type is also available as simd::packed::uint16.269 * @description In C++ this type is also available as simd::packed_uint16.
270 * This type is not available in Metal. The alignment of this type is only270 * This type is not available in Metal. The alignment of this type is only
271 * that of the underlying scalar element type, so you can use it to load or271 * that of the underlying scalar element type, so you can use it to load or
272 * store from an array of that type. */272 * store from an array of that type. */
...@@ -275,7 +275,7 @@ typedef __attribute__((__ext_vector_type__(16),__aligned__(4))) unsigned int sim...@@ -275,7 +275,7 @@ typedef __attribute__((__ext_vector_type__(16),__aligned__(4))) unsigned int sim
275/*! @abstract A vector of two 32-bit floating-point numbers with relaxed275/*! @abstract A vector of two 32-bit floating-point numbers with relaxed
276 * alignment.276 * alignment.
277 * @description In C++ and Metal, this type is also available as277 * @description In C++ and Metal, this type is also available as
278 * simd::packed::float2. The alignment of this type is that of the278 * simd::packed_float2. The alignment of this type is that of the
279 * underlying scalar element type, so you can use it to load or store from279 * underlying scalar element type, so you can use it to load or store from
280 * an array of that type. */280 * an array of that type. */
281typedef __attribute__((__ext_vector_type__(2),__aligned__(4))) float simd_packed_float2;281typedef __attribute__((__ext_vector_type__(2),__aligned__(4))) float simd_packed_float2;
...@@ -283,14 +283,14 @@ typedef __attribute__((__ext_vector_type__(2),__aligned__(4))) float simd_packed...@@ -283,14 +283,14 @@ typedef __attribute__((__ext_vector_type__(2),__aligned__(4))) float simd_packed
283/*! @abstract A vector of four 32-bit floating-point numbers with relaxed283/*! @abstract A vector of four 32-bit floating-point numbers with relaxed
284 * alignment.284 * alignment.
285 * @description In C++ and Metal, this type is also available as285 * @description In C++ and Metal, this type is also available as
286 * simd::packed::float4. The alignment of this type is that of the286 * simd::packed_float4. The alignment of this type is that of the
287 * underlying scalar element type, so you can use it to load or store from287 * underlying scalar element type, so you can use it to load or store from
288 * an array of that type. */288 * an array of that type. */
289typedef __attribute__((__ext_vector_type__(4),__aligned__(4))) float simd_packed_float4;289typedef __attribute__((__ext_vector_type__(4),__aligned__(4))) float simd_packed_float4;
290290
291/*! @abstract A vector of eight 32-bit floating-point numbers with relaxed291/*! @abstract A vector of eight 32-bit floating-point numbers with relaxed
292 * alignment.292 * alignment.
293 * @description In C++ this type is also available as simd::packed::float8.293 * @description In C++ this type is also available as simd::packed_float8.
294 * This type is not available in Metal. The alignment of this type is only294 * This type is not available in Metal. The alignment of this type is only
295 * that of the underlying scalar element type, so you can use it to load or295 * that of the underlying scalar element type, so you can use it to load or
296 * store from an array of that type. */296 * store from an array of that type. */
...@@ -298,18 +298,18 @@ typedef __attribute__((__ext_vector_type__(8),__aligned__(4))) float simd_packed...@@ -298,18 +298,18 @@ typedef __attribute__((__ext_vector_type__(8),__aligned__(4))) float simd_packed
298298
299/*! @abstract A vector of sixteen 32-bit floating-point numbers with relaxed299/*! @abstract A vector of sixteen 32-bit floating-point numbers with relaxed
300 * alignment.300 * alignment.
301 * @description In C++ this type is also available as301 * @description In C++ this type is also available as simd::packed_float16.
302 * simd::packed::float16. This type is not available in Metal. The302 * This type is not available in Metal. The alignment of this type is only
303 * alignment of this type is only that of the underlying scalar element303 * that of the underlying scalar element type, so you can use it to load or
304 * type, so you can use it to load or store from an array of that type. */304 * store from an array of that type. */
305typedef __attribute__((__ext_vector_type__(16),__aligned__(4))) float simd_packed_float16;305typedef __attribute__((__ext_vector_type__(16),__aligned__(4))) float simd_packed_float16;
306306
307/*! @abstract A vector of two 64-bit signed (twos-complement) integers with307/*! @abstract A vector of two 64-bit signed (twos-complement) integers with
308 * relaxed alignment.308 * relaxed alignment.
309 * @description In C++ and Metal, this type is also available as309 * @description In C++ and Metal, this type is also available as
310 * simd::packed::long2. The alignment of this type is that of the310 * simd::packed_long2. The alignment of this type is that of the underlying
311 * underlying scalar element type, so you can use it to load or store from311 * scalar element type, so you can use it to load or store from an array of
312 * an array of that type. */312 * that type. */
313#if defined __LP64__313#if defined __LP64__
314typedef __attribute__((__ext_vector_type__(2),__aligned__(8))) simd_long1 simd_packed_long2;314typedef __attribute__((__ext_vector_type__(2),__aligned__(8))) simd_long1 simd_packed_long2;
315#else315#else
...@@ -319,9 +319,9 @@ typedef __attribute__((__ext_vector_type__(2),__aligned__(4))) simd_long1 simd_p...@@ -319,9 +319,9 @@ typedef __attribute__((__ext_vector_type__(2),__aligned__(4))) simd_long1 simd_p
319/*! @abstract A vector of four 64-bit signed (twos-complement) integers with319/*! @abstract A vector of four 64-bit signed (twos-complement) integers with
320 * relaxed alignment.320 * relaxed alignment.
321 * @description In C++ and Metal, this type is also available as321 * @description In C++ and Metal, this type is also available as
322 * simd::packed::long4. The alignment of this type is that of the322 * simd::packed_long4. The alignment of this type is that of the underlying
323 * underlying scalar element type, so you can use it to load or store from323 * scalar element type, so you can use it to load or store from an array of
324 * an array of that type. */324 * that type. */
325#if defined __LP64__325#if defined __LP64__
326typedef __attribute__((__ext_vector_type__(4),__aligned__(8))) simd_long1 simd_packed_long4;326typedef __attribute__((__ext_vector_type__(4),__aligned__(8))) simd_long1 simd_packed_long4;
327#else327#else
...@@ -330,7 +330,7 @@ typedef __attribute__((__ext_vector_type__(4),__aligned__(4))) simd_long1 simd_p...@@ -330,7 +330,7 @@ typedef __attribute__((__ext_vector_type__(4),__aligned__(4))) simd_long1 simd_p
330330
331/*! @abstract A vector of eight 64-bit signed (twos-complement) integers331/*! @abstract A vector of eight 64-bit signed (twos-complement) integers
332 * with relaxed alignment.332 * with relaxed alignment.
333 * @description In C++ this type is also available as simd::packed::long8.333 * @description In C++ this type is also available as simd::packed_long8.
334 * This type is not available in Metal. The alignment of this type is only334 * This type is not available in Metal. The alignment of this type is only
335 * that of the underlying scalar element type, so you can use it to load or335 * that of the underlying scalar element type, so you can use it to load or
336 * store from an array of that type. */336 * store from an array of that type. */
...@@ -343,7 +343,7 @@ typedef __attribute__((__ext_vector_type__(8),__aligned__(4))) simd_long1 simd_p...@@ -343,7 +343,7 @@ typedef __attribute__((__ext_vector_type__(8),__aligned__(4))) simd_long1 simd_p
343/*! @abstract A vector of two 64-bit unsigned integers with relaxed343/*! @abstract A vector of two 64-bit unsigned integers with relaxed
344 * alignment.344 * alignment.
345 * @description In C++ and Metal, this type is also available as345 * @description In C++ and Metal, this type is also available as
346 * simd::packed::ulong2. The alignment of this type is that of the346 * simd::packed_ulong2. The alignment of this type is that of the
347 * underlying scalar element type, so you can use it to load or store from347 * underlying scalar element type, so you can use it to load or store from
348 * an array of that type. */348 * an array of that type. */
349#if defined __LP64__349#if defined __LP64__
...@@ -355,7 +355,7 @@ typedef __attribute__((__ext_vector_type__(2),__aligned__(4))) simd_ulong1 simd_...@@ -355,7 +355,7 @@ typedef __attribute__((__ext_vector_type__(2),__aligned__(4))) simd_ulong1 simd_
355/*! @abstract A vector of four 64-bit unsigned integers with relaxed355/*! @abstract A vector of four 64-bit unsigned integers with relaxed
356 * alignment.356 * alignment.
357 * @description In C++ and Metal, this type is also available as357 * @description In C++ and Metal, this type is also available as
358 * simd::packed::ulong4. The alignment of this type is that of the358 * simd::packed_ulong4. The alignment of this type is that of the
359 * underlying scalar element type, so you can use it to load or store from359 * underlying scalar element type, so you can use it to load or store from
360 * an array of that type. */360 * an array of that type. */
361#if defined __LP64__361#if defined __LP64__
...@@ -366,7 +366,7 @@ typedef __attribute__((__ext_vector_type__(4),__aligned__(4))) simd_ulong1 simd_...@@ -366,7 +366,7 @@ typedef __attribute__((__ext_vector_type__(4),__aligned__(4))) simd_ulong1 simd_
366366
367/*! @abstract A vector of eight 64-bit unsigned integers with relaxed367/*! @abstract A vector of eight 64-bit unsigned integers with relaxed
368 * alignment.368 * alignment.
369 * @description In C++ this type is also available as simd::packed::ulong8.369 * @description In C++ this type is also available as simd::packed_ulong8.
370 * This type is not available in Metal. The alignment of this type is only370 * This type is not available in Metal. The alignment of this type is only
371 * that of the underlying scalar element type, so you can use it to load or371 * that of the underlying scalar element type, so you can use it to load or
372 * store from an array of that type. */372 * store from an array of that type. */
...@@ -379,7 +379,7 @@ typedef __attribute__((__ext_vector_type__(8),__aligned__(4))) simd_ulong1 simd_...@@ -379,7 +379,7 @@ typedef __attribute__((__ext_vector_type__(8),__aligned__(4))) simd_ulong1 simd_
379/*! @abstract A vector of two 64-bit floating-point numbers with relaxed379/*! @abstract A vector of two 64-bit floating-point numbers with relaxed
380 * alignment.380 * alignment.
381 * @description In C++ and Metal, this type is also available as381 * @description In C++ and Metal, this type is also available as
382 * simd::packed::double2. The alignment of this type is that of the382 * simd::packed_double2. The alignment of this type is that of the
383 * underlying scalar element type, so you can use it to load or store from383 * underlying scalar element type, so you can use it to load or store from
384 * an array of that type. */384 * an array of that type. */
385#if defined __LP64__385#if defined __LP64__
...@@ -391,7 +391,7 @@ typedef __attribute__((__ext_vector_type__(2),__aligned__(4))) double simd_packe...@@ -391,7 +391,7 @@ typedef __attribute__((__ext_vector_type__(2),__aligned__(4))) double simd_packe
391/*! @abstract A vector of four 64-bit floating-point numbers with relaxed391/*! @abstract A vector of four 64-bit floating-point numbers with relaxed
392 * alignment.392 * alignment.
393 * @description In C++ and Metal, this type is also available as393 * @description In C++ and Metal, this type is also available as
394 * simd::packed::double4. The alignment of this type is that of the394 * simd::packed_double4. The alignment of this type is that of the
395 * underlying scalar element type, so you can use it to load or store from395 * underlying scalar element type, so you can use it to load or store from
396 * an array of that type. */396 * an array of that type. */
397#if defined __LP64__397#if defined __LP64__
...@@ -402,10 +402,10 @@ typedef __attribute__((__ext_vector_type__(4),__aligned__(4))) double simd_packe...@@ -402,10 +402,10 @@ typedef __attribute__((__ext_vector_type__(4),__aligned__(4))) double simd_packe
402402
403/*! @abstract A vector of eight 64-bit floating-point numbers with relaxed403/*! @abstract A vector of eight 64-bit floating-point numbers with relaxed
404 * alignment.404 * alignment.
405 * @description In C++ this type is also available as405 * @description In C++ this type is also available as simd::packed_double8.
406 * simd::packed::double8. This type is not available in Metal. The406 * This type is not available in Metal. The alignment of this type is only
407 * alignment of this type is only that of the underlying scalar element407 * that of the underlying scalar element type, so you can use it to load or
408 * type, so you can use it to load or store from an array of that type. */408 * store from an array of that type. */
409#if defined __LP64__409#if defined __LP64__
410typedef __attribute__((__ext_vector_type__(8),__aligned__(8))) double simd_packed_double8;410typedef __attribute__((__ext_vector_type__(8),__aligned__(8))) double simd_packed_double8;
411#else411#else
...@@ -772,259 +772,259 @@ typedef ::simd_packed_double8 double8;...@@ -772,259 +772,259 @@ typedef ::simd_packed_double8 double8;
772/*! @abstract A vector of two 8-bit signed (twos-complement) integers with772/*! @abstract A vector of two 8-bit signed (twos-complement) integers with
773 * relaxed alignment.773 * relaxed alignment.
774 * @description This type is deprecated; you should use simd_packed_char2774 * @description This type is deprecated; you should use simd_packed_char2
775 * or simd::packed::char2 instead. */775 * or simd::packed_char2 instead. */
776typedef simd_packed_char2 packed_char2;776typedef simd_packed_char2 packed_char2;
777777
778/*! @abstract A vector of four 8-bit signed (twos-complement) integers with778/*! @abstract A vector of four 8-bit signed (twos-complement) integers with
779 * relaxed alignment.779 * relaxed alignment.
780 * @description This type is deprecated; you should use simd_packed_char4780 * @description This type is deprecated; you should use simd_packed_char4
781 * or simd::packed::char4 instead. */781 * or simd::packed_char4 instead. */
782typedef simd_packed_char4 packed_char4;782typedef simd_packed_char4 packed_char4;
783783
784/*! @abstract A vector of eight 8-bit signed (twos-complement) integers with784/*! @abstract A vector of eight 8-bit signed (twos-complement) integers with
785 * relaxed alignment.785 * relaxed alignment.
786 * @description This type is deprecated; you should use simd_packed_char8786 * @description This type is deprecated; you should use simd_packed_char8
787 * or simd::packed::char8 instead. */787 * or simd::packed_char8 instead. */
788typedef simd_packed_char8 packed_char8;788typedef simd_packed_char8 packed_char8;
789789
790/*! @abstract A vector of sixteen 8-bit signed (twos-complement) integers790/*! @abstract A vector of sixteen 8-bit signed (twos-complement) integers
791 * with relaxed alignment.791 * with relaxed alignment.
792 * @description This type is deprecated; you should use simd_packed_char16792 * @description This type is deprecated; you should use simd_packed_char16
793 * or simd::packed::char16 instead. */793 * or simd::packed_char16 instead. */
794typedef simd_packed_char16 packed_char16;794typedef simd_packed_char16 packed_char16;
795795
796/*! @abstract A vector of thirty-two 8-bit signed (twos-complement) integers796/*! @abstract A vector of thirty-two 8-bit signed (twos-complement) integers
797 * with relaxed alignment.797 * with relaxed alignment.
798 * @description This type is deprecated; you should use simd_packed_char32798 * @description This type is deprecated; you should use simd_packed_char32
799 * or simd::packed::char32 instead. */799 * or simd::packed_char32 instead. */
800typedef simd_packed_char32 packed_char32;800typedef simd_packed_char32 packed_char32;
801801
802/*! @abstract A vector of sixty-four 8-bit signed (twos-complement) integers802/*! @abstract A vector of sixty-four 8-bit signed (twos-complement) integers
803 * with relaxed alignment.803 * with relaxed alignment.
804 * @description This type is deprecated; you should use simd_packed_char64804 * @description This type is deprecated; you should use simd_packed_char64
805 * or simd::packed::char64 instead. */805 * or simd::packed_char64 instead. */
806typedef simd_packed_char64 packed_char64;806typedef simd_packed_char64 packed_char64;
807807
808/*! @abstract A vector of two 8-bit unsigned integers with relaxed808/*! @abstract A vector of two 8-bit unsigned integers with relaxed
809 * alignment.809 * alignment.
810 * @description This type is deprecated; you should use simd_packed_uchar2810 * @description This type is deprecated; you should use simd_packed_uchar2
811 * or simd::packed::uchar2 instead. */811 * or simd::packed_uchar2 instead. */
812typedef simd_packed_uchar2 packed_uchar2;812typedef simd_packed_uchar2 packed_uchar2;
813813
814/*! @abstract A vector of four 8-bit unsigned integers with relaxed814/*! @abstract A vector of four 8-bit unsigned integers with relaxed
815 * alignment.815 * alignment.
816 * @description This type is deprecated; you should use simd_packed_uchar4816 * @description This type is deprecated; you should use simd_packed_uchar4
817 * or simd::packed::uchar4 instead. */817 * or simd::packed_uchar4 instead. */
818typedef simd_packed_uchar4 packed_uchar4;818typedef simd_packed_uchar4 packed_uchar4;
819819
820/*! @abstract A vector of eight 8-bit unsigned integers with relaxed820/*! @abstract A vector of eight 8-bit unsigned integers with relaxed
821 * alignment.821 * alignment.
822 * @description This type is deprecated; you should use simd_packed_uchar8822 * @description This type is deprecated; you should use simd_packed_uchar8
823 * or simd::packed::uchar8 instead. */823 * or simd::packed_uchar8 instead. */
824typedef simd_packed_uchar8 packed_uchar8;824typedef simd_packed_uchar8 packed_uchar8;
825825
826/*! @abstract A vector of sixteen 8-bit unsigned integers with relaxed826/*! @abstract A vector of sixteen 8-bit unsigned integers with relaxed
827 * alignment.827 * alignment.
828 * @description This type is deprecated; you should use simd_packed_uchar16828 * @description This type is deprecated; you should use simd_packed_uchar16
829 * or simd::packed::uchar16 instead. */829 * or simd::packed_uchar16 instead. */
830typedef simd_packed_uchar16 packed_uchar16;830typedef simd_packed_uchar16 packed_uchar16;
831831
832/*! @abstract A vector of thirty-two 8-bit unsigned integers with relaxed832/*! @abstract A vector of thirty-two 8-bit unsigned integers with relaxed
833 * alignment.833 * alignment.
834 * @description This type is deprecated; you should use simd_packed_uchar32834 * @description This type is deprecated; you should use simd_packed_uchar32
835 * or simd::packed::uchar32 instead. */835 * or simd::packed_uchar32 instead. */
836typedef simd_packed_uchar32 packed_uchar32;836typedef simd_packed_uchar32 packed_uchar32;
837837
838/*! @abstract A vector of sixty-four 8-bit unsigned integers with relaxed838/*! @abstract A vector of sixty-four 8-bit unsigned integers with relaxed
839 * alignment.839 * alignment.
840 * @description This type is deprecated; you should use simd_packed_uchar64840 * @description This type is deprecated; you should use simd_packed_uchar64
841 * or simd::packed::uchar64 instead. */841 * or simd::packed_uchar64 instead. */
842typedef simd_packed_uchar64 packed_uchar64;842typedef simd_packed_uchar64 packed_uchar64;
843843
844/*! @abstract A vector of two 16-bit signed (twos-complement) integers with844/*! @abstract A vector of two 16-bit signed (twos-complement) integers with
845 * relaxed alignment.845 * relaxed alignment.
846 * @description This type is deprecated; you should use simd_packed_short2846 * @description This type is deprecated; you should use simd_packed_short2
847 * or simd::packed::short2 instead. */847 * or simd::packed_short2 instead. */
848typedef simd_packed_short2 packed_short2;848typedef simd_packed_short2 packed_short2;
849849
850/*! @abstract A vector of four 16-bit signed (twos-complement) integers with850/*! @abstract A vector of four 16-bit signed (twos-complement) integers with
851 * relaxed alignment.851 * relaxed alignment.
852 * @description This type is deprecated; you should use simd_packed_short4852 * @description This type is deprecated; you should use simd_packed_short4
853 * or simd::packed::short4 instead. */853 * or simd::packed_short4 instead. */
854typedef simd_packed_short4 packed_short4;854typedef simd_packed_short4 packed_short4;
855855
856/*! @abstract A vector of eight 16-bit signed (twos-complement) integers856/*! @abstract A vector of eight 16-bit signed (twos-complement) integers
857 * with relaxed alignment.857 * with relaxed alignment.
858 * @description This type is deprecated; you should use simd_packed_short8858 * @description This type is deprecated; you should use simd_packed_short8
859 * or simd::packed::short8 instead. */859 * or simd::packed_short8 instead. */
860typedef simd_packed_short8 packed_short8;860typedef simd_packed_short8 packed_short8;
861861
862/*! @abstract A vector of sixteen 16-bit signed (twos-complement) integers862/*! @abstract A vector of sixteen 16-bit signed (twos-complement) integers
863 * with relaxed alignment.863 * with relaxed alignment.
864 * @description This type is deprecated; you should use simd_packed_short16864 * @description This type is deprecated; you should use simd_packed_short16
865 * or simd::packed::short16 instead. */865 * or simd::packed_short16 instead. */
866typedef simd_packed_short16 packed_short16;866typedef simd_packed_short16 packed_short16;
867867
868/*! @abstract A vector of thirty-two 16-bit signed (twos-complement)868/*! @abstract A vector of thirty-two 16-bit signed (twos-complement)
869 * integers with relaxed alignment.869 * integers with relaxed alignment.
870 * @description This type is deprecated; you should use simd_packed_short32870 * @description This type is deprecated; you should use simd_packed_short32
871 * or simd::packed::short32 instead. */871 * or simd::packed_short32 instead. */
872typedef simd_packed_short32 packed_short32;872typedef simd_packed_short32 packed_short32;
873873
874/*! @abstract A vector of two 16-bit unsigned integers with relaxed874/*! @abstract A vector of two 16-bit unsigned integers with relaxed
875 * alignment.875 * alignment.
876 * @description This type is deprecated; you should use simd_packed_ushort2876 * @description This type is deprecated; you should use simd_packed_ushort2
877 * or simd::packed::ushort2 instead. */877 * or simd::packed_ushort2 instead. */
878typedef simd_packed_ushort2 packed_ushort2;878typedef simd_packed_ushort2 packed_ushort2;
879879
880/*! @abstract A vector of four 16-bit unsigned integers with relaxed880/*! @abstract A vector of four 16-bit unsigned integers with relaxed
881 * alignment.881 * alignment.
882 * @description This type is deprecated; you should use simd_packed_ushort4882 * @description This type is deprecated; you should use simd_packed_ushort4
883 * or simd::packed::ushort4 instead. */883 * or simd::packed_ushort4 instead. */
884typedef simd_packed_ushort4 packed_ushort4;884typedef simd_packed_ushort4 packed_ushort4;
885885
886/*! @abstract A vector of eight 16-bit unsigned integers with relaxed886/*! @abstract A vector of eight 16-bit unsigned integers with relaxed
887 * alignment.887 * alignment.
888 * @description This type is deprecated; you should use simd_packed_ushort8888 * @description This type is deprecated; you should use simd_packed_ushort8
889 * or simd::packed::ushort8 instead. */889 * or simd::packed_ushort8 instead. */
890typedef simd_packed_ushort8 packed_ushort8;890typedef simd_packed_ushort8 packed_ushort8;
891891
892/*! @abstract A vector of sixteen 16-bit unsigned integers with relaxed892/*! @abstract A vector of sixteen 16-bit unsigned integers with relaxed
893 * alignment.893 * alignment.
894 * @description This type is deprecated; you should use894 * @description This type is deprecated; you should use
895 * simd_packed_ushort16 or simd::packed::ushort16 instead. */895 * simd_packed_ushort16 or simd::packed_ushort16 instead. */
896typedef simd_packed_ushort16 packed_ushort16;896typedef simd_packed_ushort16 packed_ushort16;
897897
898/*! @abstract A vector of thirty-two 16-bit unsigned integers with relaxed898/*! @abstract A vector of thirty-two 16-bit unsigned integers with relaxed
899 * alignment.899 * alignment.
900 * @description This type is deprecated; you should use900 * @description This type is deprecated; you should use
901 * simd_packed_ushort32 or simd::packed::ushort32 instead. */901 * simd_packed_ushort32 or simd::packed_ushort32 instead. */
902typedef simd_packed_ushort32 packed_ushort32;902typedef simd_packed_ushort32 packed_ushort32;
903903
904/*! @abstract A vector of two 32-bit signed (twos-complement) integers with904/*! @abstract A vector of two 32-bit signed (twos-complement) integers with
905 * relaxed alignment.905 * relaxed alignment.
906 * @description This type is deprecated; you should use simd_packed_int2 or906 * @description This type is deprecated; you should use simd_packed_int2 or
907 * simd::packed::int2 instead. */907 * simd::packed_int2 instead. */
908typedef simd_packed_int2 packed_int2;908typedef simd_packed_int2 packed_int2;
909909
910/*! @abstract A vector of four 32-bit signed (twos-complement) integers with910/*! @abstract A vector of four 32-bit signed (twos-complement) integers with
911 * relaxed alignment.911 * relaxed alignment.
912 * @description This type is deprecated; you should use simd_packed_int4 or912 * @description This type is deprecated; you should use simd_packed_int4 or
913 * simd::packed::int4 instead. */913 * simd::packed_int4 instead. */
914typedef simd_packed_int4 packed_int4;914typedef simd_packed_int4 packed_int4;
915915
916/*! @abstract A vector of eight 32-bit signed (twos-complement) integers916/*! @abstract A vector of eight 32-bit signed (twos-complement) integers
917 * with relaxed alignment.917 * with relaxed alignment.
918 * @description This type is deprecated; you should use simd_packed_int8 or918 * @description This type is deprecated; you should use simd_packed_int8 or
919 * simd::packed::int8 instead. */919 * simd::packed_int8 instead. */
920typedef simd_packed_int8 packed_int8;920typedef simd_packed_int8 packed_int8;
921921
922/*! @abstract A vector of sixteen 32-bit signed (twos-complement) integers922/*! @abstract A vector of sixteen 32-bit signed (twos-complement) integers
923 * with relaxed alignment.923 * with relaxed alignment.
924 * @description This type is deprecated; you should use simd_packed_int16924 * @description This type is deprecated; you should use simd_packed_int16
925 * or simd::packed::int16 instead. */925 * or simd::packed_int16 instead. */
926typedef simd_packed_int16 packed_int16;926typedef simd_packed_int16 packed_int16;
927927
928/*! @abstract A vector of two 32-bit unsigned integers with relaxed928/*! @abstract A vector of two 32-bit unsigned integers with relaxed
929 * alignment.929 * alignment.
930 * @description This type is deprecated; you should use simd_packed_uint2930 * @description This type is deprecated; you should use simd_packed_uint2
931 * or simd::packed::uint2 instead. */931 * or simd::packed_uint2 instead. */
932typedef simd_packed_uint2 packed_uint2;932typedef simd_packed_uint2 packed_uint2;
933933
934/*! @abstract A vector of four 32-bit unsigned integers with relaxed934/*! @abstract A vector of four 32-bit unsigned integers with relaxed
935 * alignment.935 * alignment.
936 * @description This type is deprecated; you should use simd_packed_uint4936 * @description This type is deprecated; you should use simd_packed_uint4
937 * or simd::packed::uint4 instead. */937 * or simd::packed_uint4 instead. */
938typedef simd_packed_uint4 packed_uint4;938typedef simd_packed_uint4 packed_uint4;
939939
940/*! @abstract A vector of eight 32-bit unsigned integers with relaxed940/*! @abstract A vector of eight 32-bit unsigned integers with relaxed
941 * alignment.941 * alignment.
942 * @description This type is deprecated; you should use simd_packed_uint8942 * @description This type is deprecated; you should use simd_packed_uint8
943 * or simd::packed::uint8 instead. */943 * or simd::packed_uint8 instead. */
944typedef simd_packed_uint8 packed_uint8;944typedef simd_packed_uint8 packed_uint8;
945945
946/*! @abstract A vector of sixteen 32-bit unsigned integers with relaxed946/*! @abstract A vector of sixteen 32-bit unsigned integers with relaxed
947 * alignment.947 * alignment.
948 * @description This type is deprecated; you should use simd_packed_uint16948 * @description This type is deprecated; you should use simd_packed_uint16
949 * or simd::packed::uint16 instead. */949 * or simd::packed_uint16 instead. */
950typedef simd_packed_uint16 packed_uint16;950typedef simd_packed_uint16 packed_uint16;
951951
952/*! @abstract A vector of two 32-bit floating-point numbers with relaxed952/*! @abstract A vector of two 32-bit floating-point numbers with relaxed
953 * alignment.953 * alignment.
954 * @description This type is deprecated; you should use simd_packed_float2954 * @description This type is deprecated; you should use simd_packed_float2
955 * or simd::packed::float2 instead. */955 * or simd::packed_float2 instead. */
956typedef simd_packed_float2 packed_float2;956typedef simd_packed_float2 packed_float2;
957957
958/*! @abstract A vector of four 32-bit floating-point numbers with relaxed958/*! @abstract A vector of four 32-bit floating-point numbers with relaxed
959 * alignment.959 * alignment.
960 * @description This type is deprecated; you should use simd_packed_float4960 * @description This type is deprecated; you should use simd_packed_float4
961 * or simd::packed::float4 instead. */961 * or simd::packed_float4 instead. */
962typedef simd_packed_float4 packed_float4;962typedef simd_packed_float4 packed_float4;
963963
964/*! @abstract A vector of eight 32-bit floating-point numbers with relaxed964/*! @abstract A vector of eight 32-bit floating-point numbers with relaxed
965 * alignment.965 * alignment.
966 * @description This type is deprecated; you should use simd_packed_float8966 * @description This type is deprecated; you should use simd_packed_float8
967 * or simd::packed::float8 instead. */967 * or simd::packed_float8 instead. */
968typedef simd_packed_float8 packed_float8;968typedef simd_packed_float8 packed_float8;
969969
970/*! @abstract A vector of sixteen 32-bit floating-point numbers with relaxed970/*! @abstract A vector of sixteen 32-bit floating-point numbers with relaxed
971 * alignment.971 * alignment.
972 * @description This type is deprecated; you should use simd_packed_float16972 * @description This type is deprecated; you should use simd_packed_float16
973 * or simd::packed::float16 instead. */973 * or simd::packed_float16 instead. */
974typedef simd_packed_float16 packed_float16;974typedef simd_packed_float16 packed_float16;
975975
976/*! @abstract A vector of two 64-bit signed (twos-complement) integers with976/*! @abstract A vector of two 64-bit signed (twos-complement) integers with
977 * relaxed alignment.977 * relaxed alignment.
978 * @description This type is deprecated; you should use simd_packed_long2978 * @description This type is deprecated; you should use simd_packed_long2
979 * or simd::packed::long2 instead. */979 * or simd::packed_long2 instead. */
980typedef simd_packed_long2 packed_long2;980typedef simd_packed_long2 packed_long2;
981981
982/*! @abstract A vector of four 64-bit signed (twos-complement) integers with982/*! @abstract A vector of four 64-bit signed (twos-complement) integers with
983 * relaxed alignment.983 * relaxed alignment.
984 * @description This type is deprecated; you should use simd_packed_long4984 * @description This type is deprecated; you should use simd_packed_long4
985 * or simd::packed::long4 instead. */985 * or simd::packed_long4 instead. */
986typedef simd_packed_long4 packed_long4;986typedef simd_packed_long4 packed_long4;
987987
988/*! @abstract A vector of eight 64-bit signed (twos-complement) integers988/*! @abstract A vector of eight 64-bit signed (twos-complement) integers
989 * with relaxed alignment.989 * with relaxed alignment.
990 * @description This type is deprecated; you should use simd_packed_long8990 * @description This type is deprecated; you should use simd_packed_long8
991 * or simd::packed::long8 instead. */991 * or simd::packed_long8 instead. */
992typedef simd_packed_long8 packed_long8;992typedef simd_packed_long8 packed_long8;
993993
994/*! @abstract A vector of two 64-bit unsigned integers with relaxed994/*! @abstract A vector of two 64-bit unsigned integers with relaxed
995 * alignment.995 * alignment.
996 * @description This type is deprecated; you should use simd_packed_ulong2996 * @description This type is deprecated; you should use simd_packed_ulong2
997 * or simd::packed::ulong2 instead. */997 * or simd::packed_ulong2 instead. */
998typedef simd_packed_ulong2 packed_ulong2;998typedef simd_packed_ulong2 packed_ulong2;
999999
1000/*! @abstract A vector of four 64-bit unsigned integers with relaxed1000/*! @abstract A vector of four 64-bit unsigned integers with relaxed
1001 * alignment.1001 * alignment.
1002 * @description This type is deprecated; you should use simd_packed_ulong41002 * @description This type is deprecated; you should use simd_packed_ulong4
1003 * or simd::packed::ulong4 instead. */1003 * or simd::packed_ulong4 instead. */
1004typedef simd_packed_ulong4 packed_ulong4;1004typedef simd_packed_ulong4 packed_ulong4;
10051005
1006/*! @abstract A vector of eight 64-bit unsigned integers with relaxed1006/*! @abstract A vector of eight 64-bit unsigned integers with relaxed
1007 * alignment.1007 * alignment.
1008 * @description This type is deprecated; you should use simd_packed_ulong81008 * @description This type is deprecated; you should use simd_packed_ulong8
1009 * or simd::packed::ulong8 instead. */1009 * or simd::packed_ulong8 instead. */
1010typedef simd_packed_ulong8 packed_ulong8;1010typedef simd_packed_ulong8 packed_ulong8;
10111011
1012/*! @abstract A vector of two 64-bit floating-point numbers with relaxed1012/*! @abstract A vector of two 64-bit floating-point numbers with relaxed
1013 * alignment.1013 * alignment.
1014 * @description This type is deprecated; you should use simd_packed_double21014 * @description This type is deprecated; you should use simd_packed_double2
1015 * or simd::packed::double2 instead. */1015 * or simd::packed_double2 instead. */
1016typedef simd_packed_double2 packed_double2;1016typedef simd_packed_double2 packed_double2;
10171017
1018/*! @abstract A vector of four 64-bit floating-point numbers with relaxed1018/*! @abstract A vector of four 64-bit floating-point numbers with relaxed
1019 * alignment.1019 * alignment.
1020 * @description This type is deprecated; you should use simd_packed_double41020 * @description This type is deprecated; you should use simd_packed_double4
1021 * or simd::packed::double4 instead. */1021 * or simd::packed_double4 instead. */
1022typedef simd_packed_double4 packed_double4;1022typedef simd_packed_double4 packed_double4;
10231023
1024/*! @abstract A vector of eight 64-bit floating-point numbers with relaxed1024/*! @abstract A vector of eight 64-bit floating-point numbers with relaxed
1025 * alignment.1025 * alignment.
1026 * @description This type is deprecated; you should use simd_packed_double81026 * @description This type is deprecated; you should use simd_packed_double8
1027 * or simd::packed::double8 instead. */1027 * or simd::packed_double8 instead. */
1028typedef simd_packed_double8 packed_double8;1028typedef simd_packed_double8 packed_double8;
10291029
1030# endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */1030# endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */
lib/libc/include/x86_64-macos-gnu/simd/quaternion.h+4-6
...@@ -435,7 +435,7 @@ static SIMD_NOINLINE simd_quatf simd_quaternion(simd_float3 from, simd_float3 to...@@ -435,7 +435,7 @@ static SIMD_NOINLINE simd_quatf simd_quaternion(simd_float3 from, simd_float3 to
435 // Because from and to are more than 90 degrees apart, we compute the435 // Because from and to are more than 90 degrees apart, we compute the
436 // rotation in two stages (from -> half), (half -> to) to preserve numerical436 // rotation in two stages (from -> half), (half -> to) to preserve numerical
437 // accuracy.437 // accuracy.
438 simd_float3 half = from + to;438 simd_float3 half = simd_normalize(from + to);
439 439
440 if (simd_length_squared(half) == 0) {440 if (simd_length_squared(half) == 0) {
441 // half is nearly zero, so from and to point in nearly opposite directions441 // half is nearly zero, so from and to point in nearly opposite directions
...@@ -449,9 +449,8 @@ static SIMD_NOINLINE simd_quatf simd_quaternion(simd_float3 from, simd_float3 to...@@ -449,9 +449,8 @@ static SIMD_NOINLINE simd_quatf simd_quaternion(simd_float3 from, simd_float3 to
449 else449 else
450 return _simd_quaternion(simd_normalize(simd_cross(from, (simd_float3){0,0,1})), 0.f);450 return _simd_quaternion(simd_normalize(simd_cross(from, (simd_float3){0,0,1})), 0.f);
451 }451 }
452452
453 // Compute the two-step rotation. */453 // Compute the two-step rotation. */
454 half = simd_normalize(half);
455 return simd_mul(_simd_quaternion_reduced(from, half),454 return simd_mul(_simd_quaternion_reduced(from, half),
456 _simd_quaternion_reduced(half, to));455 _simd_quaternion_reduced(half, to));
457}456}
...@@ -1021,7 +1020,7 @@ static SIMD_NOINLINE simd_quatd simd_quaternion(simd_double3 from, simd_double3...@@ -1021,7 +1020,7 @@ static SIMD_NOINLINE simd_quatd simd_quaternion(simd_double3 from, simd_double3
1021 // Because from and to are more than 90 degrees apart, we compute the1020 // Because from and to are more than 90 degrees apart, we compute the
1022 // rotation in two stages (from -> half), (half -> to) to preserve numerical1021 // rotation in two stages (from -> half), (half -> to) to preserve numerical
1023 // accuracy.1022 // accuracy.
1024 simd_double3 half = from + to;1023 simd_double3 half = simd_normalize(from + to);
1025 1024
1026 if (simd_length_squared(half) == 0) {1025 if (simd_length_squared(half) == 0) {
1027 // half is nearly zero, so from and to point in nearly opposite directions1026 // half is nearly zero, so from and to point in nearly opposite directions
...@@ -1035,9 +1034,8 @@ static SIMD_NOINLINE simd_quatd simd_quaternion(simd_double3 from, simd_double3...@@ -1035,9 +1034,8 @@ static SIMD_NOINLINE simd_quatd simd_quaternion(simd_double3 from, simd_double3
1035 else1034 else
1036 return _simd_quaternion(simd_normalize(simd_cross(from, (simd_double3){0,0,1})), 0.f);1035 return _simd_quaternion(simd_normalize(simd_cross(from, (simd_double3){0,0,1})), 0.f);
1037 }1036 }
10381037
1039 // Compute the two-step rotation. */1038 // Compute the two-step rotation. */
1040 half = simd_normalize(half);
1041 return simd_mul(_simd_quaternion_reduced(from, half),1039 return simd_mul(_simd_quaternion_reduced(from, half),
1042 _simd_quaternion_reduced(half, to));1040 _simd_quaternion_reduced(half, to));
1043}1041}
lib/libc/include/x86_64-macos-gnu/spawn.h-22
...@@ -135,18 +135,12 @@ __BEGIN_DECLS...@@ -135,18 +135,12 @@ __BEGIN_DECLS
135int posix_spawnattr_getbinpref_np(const posix_spawnattr_t * __restrict,135int posix_spawnattr_getbinpref_np(const posix_spawnattr_t * __restrict,
136 size_t, cpu_type_t *__restrict, size_t *__restrict) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos);136 size_t, cpu_type_t *__restrict, size_t *__restrict) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos);
137137
138int posix_spawnattr_getarchpref_np(const posix_spawnattr_t * __restrict,
139 size_t, cpu_type_t *__restrict, cpu_subtype_t *__restrict, size_t *__restrict) __API_AVAILABLE(macos(11.0), ios(14.0)) __API_UNAVAILABLE(watchos, tvos);
140
141int posix_spawnattr_setauditsessionport_np(posix_spawnattr_t * __restrict,138int posix_spawnattr_setauditsessionport_np(posix_spawnattr_t * __restrict,
142 mach_port_t) __API_AVAILABLE(macos(10.6), ios(3.2));139 mach_port_t) __API_AVAILABLE(macos(10.6), ios(3.2));
143140
144int posix_spawnattr_setbinpref_np(posix_spawnattr_t * __restrict,141int posix_spawnattr_setbinpref_np(posix_spawnattr_t * __restrict,
145 size_t, cpu_type_t *__restrict, size_t *__restrict) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos);142 size_t, cpu_type_t *__restrict, size_t *__restrict) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos);
146143
147int posix_spawnattr_setarchpref_np(posix_spawnattr_t * __restrict,
148 size_t, cpu_type_t *__restrict, cpu_subtype_t *__restrict, size_t *__restrict) __API_AVAILABLE(macos(11.0), ios(14.0)) __API_UNAVAILABLE(watchos, tvos);
149
150int posix_spawnattr_setexceptionports_np(posix_spawnattr_t * __restrict,144int posix_spawnattr_setexceptionports_np(posix_spawnattr_t * __restrict,
151 exception_mask_t, mach_port_t,145 exception_mask_t, mach_port_t,
152 exception_behavior_t, thread_state_flavor_t) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos);146 exception_behavior_t, thread_state_flavor_t) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos);
...@@ -156,22 +150,6 @@ int posix_spawnattr_setspecialport_np(posix_spawnattr_t * __restrict,...@@ -156,22 +150,6 @@ int posix_spawnattr_setspecialport_np(posix_spawnattr_t * __restrict,
156150
157int posix_spawnattr_setsuidcredport_np(posix_spawnattr_t * __restrict, mach_port_t) __API_UNAVAILABLE(ios, macos);151int posix_spawnattr_setsuidcredport_np(posix_spawnattr_t * __restrict, mach_port_t) __API_UNAVAILABLE(ios, macos);
158152
159int posix_spawnattr_setnosmt_np(const posix_spawnattr_t * __restrict attr) __API_AVAILABLE(macos(11.0));
160
161/*
162 * Set CPU Security Mitigation on the spawned process
163 * This attribute affects all threads and is inherited on fork and exec
164 */
165int posix_spawnattr_set_csm_np(const posix_spawnattr_t * __restrict attr, uint32_t flags) __API_AVAILABLE(macos(11.0));
166/*
167 * flags for CPU Security Mitigation attribute
168 * POSIX_SPAWN_NP_CSM_ALL should be used in most cases,
169 * the individual flags are provided only for performance evaluation etc
170 */
171#define POSIX_SPAWN_NP_CSM_ALL 0x0001
172#define POSIX_SPAWN_NP_CSM_NOSMT 0x0002
173#define POSIX_SPAWN_NP_CSM_TECS 0x0004
174
175int posix_spawn_file_actions_addinherit_np(posix_spawn_file_actions_t *,153int posix_spawn_file_actions_addinherit_np(posix_spawn_file_actions_t *,
176 int) __API_AVAILABLE(macos(10.7), ios(4.3)) __API_UNAVAILABLE(watchos, tvos);154 int) __API_AVAILABLE(macos(10.7), ios(4.3)) __API_UNAVAILABLE(watchos, tvos);
177155
lib/libc/include/x86_64-macos-gnu/stdio.h+1-1
...@@ -217,7 +217,7 @@ __END_DECLS...@@ -217,7 +217,7 @@ __END_DECLS
217/* Additional functionality provided by:217/* Additional functionality provided by:
218 * POSIX.2-1992 C Language Binding Option218 * POSIX.2-1992 C Language Binding Option
219 */219 */
220#if TARGET_OS_IPHONE220#if TARGET_OS_EMBEDDED
221#define __swift_unavailable_on(osx_msg, ios_msg) __swift_unavailable(ios_msg)221#define __swift_unavailable_on(osx_msg, ios_msg) __swift_unavailable(ios_msg)
222#else222#else
223#define __swift_unavailable_on(osx_msg, ios_msg) __swift_unavailable(osx_msg)223#define __swift_unavailable_on(osx_msg, ios_msg) __swift_unavailable(osx_msg)
lib/libc/include/x86_64-macos-gnu/stdlib.h+1-4
...@@ -178,7 +178,7 @@ unsigned long long...@@ -178,7 +178,7 @@ unsigned long long
178 strtoull(const char *__str, char **__endptr, int __base);178 strtoull(const char *__str, char **__endptr, int __base);
179#endif /* !__DARWIN_NO_LONG_LONG */179#endif /* !__DARWIN_NO_LONG_LONG */
180180
181#if TARGET_OS_IPHONE181#if TARGET_OS_EMBEDDED
182#define __swift_unavailable_on(osx_msg, ios_msg) __swift_unavailable(ios_msg)182#define __swift_unavailable_on(osx_msg, ios_msg) __swift_unavailable(ios_msg)
183#else183#else
184#define __swift_unavailable_on(osx_msg, ios_msg) __swift_unavailable(osx_msg)184#define __swift_unavailable_on(osx_msg, ios_msg) __swift_unavailable(osx_msg)
...@@ -347,9 +347,6 @@ int sradixsort(const unsigned char **__base, int __nel, const unsigned char *__...@@ -347,9 +347,6 @@ int sradixsort(const unsigned char **__base, int __nel, const unsigned char *__
347void sranddev(void);347void sranddev(void);
348void srandomdev(void);348void srandomdev(void);
349void *reallocf(void *__ptr, size_t __size) __alloc_size(2);349void *reallocf(void *__ptr, size_t __size) __alloc_size(2);
350long long
351 strtonum(const char *__numstr, long long __minval, long long __maxval, const char **__errstrp)
352 __API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0));
353#if !__DARWIN_NO_LONG_LONG350#if !__DARWIN_NO_LONG_LONG
354long long351long long
355 strtoq(const char *__str, char **__endptr, int __base);352 strtoq(const char *__str, char **__endptr, int __base);
lib/libc/include/x86_64-macos-gnu/string.h-4
...@@ -170,10 +170,6 @@ void swab(const void * __restrict, void * __restrict, ssize_t);...@@ -170,10 +170,6 @@ void swab(const void * __restrict, void * __restrict, ssize_t);
170__OSX_AVAILABLE(10.12.1) __IOS_AVAILABLE(10.1)170__OSX_AVAILABLE(10.12.1) __IOS_AVAILABLE(10.1)
171__TVOS_AVAILABLE(10.0.1) __WATCHOS_AVAILABLE(3.1)171__TVOS_AVAILABLE(10.0.1) __WATCHOS_AVAILABLE(3.1)
172int timingsafe_bcmp(const void *__b1, const void *__b2, size_t __len);172int timingsafe_bcmp(const void *__b1, const void *__b2, size_t __len);
173
174__OSX_AVAILABLE(11.0) __IOS_AVAILABLE(14.0)
175__TVOS_AVAILABLE(14.0) __WATCHOS_AVAILABLE(7.0)
176int strsignal_r(int __sig, char *__strsignalbuf, size_t __buflen);
177__END_DECLS173__END_DECLS
178174
179/* Some functions historically defined in string.h were placed in strings.h175/* Some functions historically defined in string.h were placed in strings.h
lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_attr_t.h+6-6
...@@ -2,7 +2,7 @@...@@ -2,7 +2,7 @@
2 * Copyright (c) 2003-2012 Apple Inc. All rights reserved.2 * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
3 *3 *
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 *5 *
6 * This file contains Original Code and/or Modifications of Original Code6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in8 * Version 2.0 (the 'License'). You may not use this file except in
...@@ -11,10 +11,10 @@...@@ -11,10 +11,10 @@
11 * unlawful or unlicensed copies of an Apple operating system, or to11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.13 * terms of an Apple operating system software license agreement.
14 *14 *
15 * Please obtain a copy of the License at15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
17 *17 *
18 * The Original Code and all software distributed under the License are18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
...@@ -22,11 +22,11 @@...@@ -22,11 +22,11 @@
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and23 * Please see the License for the specific language governing rights and
24 * limitations under the License.24 * limitations under the License.
25 *25 *
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
27 */27 */
28#ifndef _PTHREAD_ATTR_T28#ifndef _PTHREAD_ATTR_T
29#define _PTHREAD_ATTR_T29#define _PTHREAD_ATTR_T
30#include <sys/_pthread/_pthread_types.h> /* __darwin_pthread_attr_t */30#include <sys/_pthread/_pthread_types.h> /* __darwin_pthread_attr_t */
31typedef __darwin_pthread_attr_t pthread_attr_t;31typedef __darwin_pthread_attr_t pthread_attr_t;
32#endif /* _PTHREAD_ATTR_T */32#endif /* _PTHREAD_ATTR_T */
lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_cond_t.h+4-4
...@@ -2,7 +2,7 @@...@@ -2,7 +2,7 @@
2 * Copyright (c) 2003-2012 Apple Inc. All rights reserved.2 * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
3 *3 *
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 *5 *
6 * This file contains Original Code and/or Modifications of Original Code6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in8 * Version 2.0 (the 'License'). You may not use this file except in
...@@ -11,10 +11,10 @@...@@ -11,10 +11,10 @@
11 * unlawful or unlicensed copies of an Apple operating system, or to11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.13 * terms of an Apple operating system software license agreement.
14 *14 *
15 * Please obtain a copy of the License at15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
17 *17 *
18 * The Original Code and all software distributed under the License are18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
...@@ -22,7 +22,7 @@...@@ -22,7 +22,7 @@
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and23 * Please see the License for the specific language governing rights and
24 * limitations under the License.24 * limitations under the License.
25 *25 *
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
27 */27 */
28#ifndef _PTHREAD_COND_T28#ifndef _PTHREAD_COND_T
lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_condattr_t.h+4-4
...@@ -2,7 +2,7 @@...@@ -2,7 +2,7 @@
2 * Copyright (c) 2003-2012 Apple Inc. All rights reserved.2 * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
3 *3 *
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 *5 *
6 * This file contains Original Code and/or Modifications of Original Code6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in8 * Version 2.0 (the 'License'). You may not use this file except in
...@@ -11,10 +11,10 @@...@@ -11,10 +11,10 @@
11 * unlawful or unlicensed copies of an Apple operating system, or to11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.13 * terms of an Apple operating system software license agreement.
14 *14 *
15 * Please obtain a copy of the License at15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
17 *17 *
18 * The Original Code and all software distributed under the License are18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
...@@ -22,7 +22,7 @@...@@ -22,7 +22,7 @@
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and23 * Please see the License for the specific language governing rights and
24 * limitations under the License.24 * limitations under the License.
25 *25 *
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
27 */27 */
28#ifndef _PTHREAD_CONDATTR_T28#ifndef _PTHREAD_CONDATTR_T
lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_rwlock_t.h+4-4
...@@ -2,7 +2,7 @@...@@ -2,7 +2,7 @@
2 * Copyright (c) 2003-2012 Apple Inc. All rights reserved.2 * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
3 *3 *
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 *5 *
6 * This file contains Original Code and/or Modifications of Original Code6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in8 * Version 2.0 (the 'License'). You may not use this file except in
...@@ -11,10 +11,10 @@...@@ -11,10 +11,10 @@
11 * unlawful or unlicensed copies of an Apple operating system, or to11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.13 * terms of an Apple operating system software license agreement.
14 *14 *
15 * Please obtain a copy of the License at15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
17 *17 *
18 * The Original Code and all software distributed under the License are18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
...@@ -22,7 +22,7 @@...@@ -22,7 +22,7 @@
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and23 * Please see the License for the specific language governing rights and
24 * limitations under the License.24 * limitations under the License.
25 *25 *
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
27 */27 */
28#ifndef _PTHREAD_RWLOCK_T28#ifndef _PTHREAD_RWLOCK_T
lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_rwlockattr_t.h+4-4
...@@ -2,7 +2,7 @@...@@ -2,7 +2,7 @@
2 * Copyright (c) 2003-2012 Apple Inc. All rights reserved.2 * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
3 *3 *
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 *5 *
6 * This file contains Original Code and/or Modifications of Original Code6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in8 * Version 2.0 (the 'License'). You may not use this file except in
...@@ -11,10 +11,10 @@...@@ -11,10 +11,10 @@
11 * unlawful or unlicensed copies of an Apple operating system, or to11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.13 * terms of an Apple operating system software license agreement.
14 *14 *
15 * Please obtain a copy of the License at15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
17 *17 *
18 * The Original Code and all software distributed under the License are18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
...@@ -22,7 +22,7 @@...@@ -22,7 +22,7 @@
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and23 * Please see the License for the specific language governing rights and
24 * limitations under the License.24 * limitations under the License.
25 *25 *
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
27 */27 */
28#ifndef _PTHREAD_RWLOCKATTR_T28#ifndef _PTHREAD_RWLOCKATTR_T
lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_t.h+4-4
...@@ -2,7 +2,7 @@...@@ -2,7 +2,7 @@
2 * Copyright (c) 2003-2012 Apple Inc. All rights reserved.2 * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
3 *3 *
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 *5 *
6 * This file contains Original Code and/or Modifications of Original Code6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in8 * Version 2.0 (the 'License'). You may not use this file except in
...@@ -11,10 +11,10 @@...@@ -11,10 +11,10 @@
11 * unlawful or unlicensed copies of an Apple operating system, or to11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.13 * terms of an Apple operating system software license agreement.
14 *14 *
15 * Please obtain a copy of the License at15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
17 *17 *
18 * The Original Code and all software distributed under the License are18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
...@@ -22,7 +22,7 @@...@@ -22,7 +22,7 @@
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and23 * Please see the License for the specific language governing rights and
24 * limitations under the License.24 * limitations under the License.
25 *25 *
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
27 */27 */
28#ifndef _PTHREAD_T28#ifndef _PTHREAD_T
lib/libc/include/x86_64-macos-gnu/sys/_pthread/_pthread_types.h+4-4
...@@ -2,7 +2,7 @@...@@ -2,7 +2,7 @@
2 * Copyright (c) 2003-2013 Apple Inc. All rights reserved.2 * Copyright (c) 2003-2013 Apple Inc. All rights reserved.
3 *3 *
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 *5 *
6 * This file contains Original Code and/or Modifications of Original Code6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in8 * Version 2.0 (the 'License'). You may not use this file except in
...@@ -11,10 +11,10 @@...@@ -11,10 +11,10 @@
11 * unlawful or unlicensed copies of an Apple operating system, or to11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.13 * terms of an Apple operating system software license agreement.
14 *14 *
15 * Please obtain a copy of the License at15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
17 *17 *
18 * The Original Code and all software distributed under the License are18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
...@@ -22,7 +22,7 @@...@@ -22,7 +22,7 @@
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and23 * Please see the License for the specific language governing rights and
24 * limitations under the License.24 * limitations under the License.
25 *25 *
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
27 */27 */
2828
lib/libc/include/x86_64-macos-gnu/sys/_select.h-5
...@@ -36,13 +36,8 @@...@@ -36,13 +36,8 @@
36#ifndef _SYS__SELECT_H_36#ifndef _SYS__SELECT_H_
37#define _SYS__SELECT_H_37#define _SYS__SELECT_H_
3838
39#include <sys/cdefs.h> /* __DARWIN_EXTSN_C, __DARWIN_1050, __DARWIN_ALIAS_C */
40#include <sys/_types/_fd_def.h> /* fd_set */
41#include <sys/_types/_timeval.h> /* struct timeval */
42
43int select(int, fd_set * __restrict, fd_set * __restrict,39int select(int, fd_set * __restrict, fd_set * __restrict,
44 fd_set * __restrict, struct timeval * __restrict)40 fd_set * __restrict, struct timeval * __restrict)
45
46#if defined(_DARWIN_C_SOURCE) || defined(_DARWIN_UNLIMITED_SELECT)41#if defined(_DARWIN_C_SOURCE) || defined(_DARWIN_UNLIMITED_SELECT)
47__DARWIN_EXTSN_C(select)42__DARWIN_EXTSN_C(select)
48#else /* !_DARWIN_C_SOURCE && !_DARWIN_UNLIMITED_SELECT */43#else /* !_DARWIN_C_SOURCE && !_DARWIN_UNLIMITED_SELECT */
lib/libc/include/x86_64-macos-gnu/sys/_symbol_aliasing.h-36
...@@ -305,30 +305,6 @@...@@ -305,30 +305,6 @@
305#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_13_6(x)305#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_13_6(x)
306#endif306#endif
307307
308#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 130700
309#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_13_7(x) x
310#else
311#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_13_7(x)
312#endif
313
314#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 140000
315#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_14_0(x) x
316#else
317#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_14_0(x)
318#endif
319
320#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 140100
321#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_14_1(x) x
322#else
323#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_14_1(x)
324#endif
325
326#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 140200
327#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_14_2(x) x
328#else
329#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_14_2(x)
330#endif
331
332#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1000308#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1000
333#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_0(x) x309#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_0(x) x
334#else310#else
...@@ -521,15 +497,3 @@...@@ -521,15 +497,3 @@
521#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_15_1(x)497#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_15_1(x)
522#endif498#endif
523499
524#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101600
525#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_16(x) x
526#else
527#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_16(x)
528#endif
529
530#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 110000
531#define __DARWIN_ALIAS_STARTING_MAC___MAC_11_0(x) x
532#else
533#define __DARWIN_ALIAS_STARTING_MAC___MAC_11_0(x)
534#endif
535
lib/libc/include/x86_64-macos-gnu/sys/_types/_fd_def.h+1-8
...@@ -51,16 +51,12 @@ typedef struct fd_set {...@@ -51,16 +51,12 @@ typedef struct fd_set {
51 __int32_t fds_bits[__DARWIN_howmany(__DARWIN_FD_SETSIZE, __DARWIN_NFDBITS)];51 __int32_t fds_bits[__DARWIN_howmany(__DARWIN_FD_SETSIZE, __DARWIN_NFDBITS)];
52} fd_set;52} fd_set;
5353
54int __darwin_check_fd_set_overflow(int, const void *, int) __API_AVAILABLE(macosx(11.0), ios(14.0), tvos(14.0), watchos(7.0));54int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((__weak_import__));
55__END_DECLS55__END_DECLS
5656
57__header_always_inline int57__header_always_inline int
58__darwin_check_fd_set(int _a, const void *_b)58__darwin_check_fd_set(int _a, const void *_b)
59{59{
60#ifdef __clang__
61#pragma clang diagnostic push
62#pragma clang diagnostic ignored "-Wunguarded-availability-new"
63#endif
64 if ((uintptr_t)&__darwin_check_fd_set_overflow != (uintptr_t) 0) {60 if ((uintptr_t)&__darwin_check_fd_set_overflow != (uintptr_t) 0) {
65#if defined(_DARWIN_UNLIMITED_SELECT) || defined(_DARWIN_C_SOURCE)61#if defined(_DARWIN_UNLIMITED_SELECT) || defined(_DARWIN_C_SOURCE)
66 return __darwin_check_fd_set_overflow(_a, _b, 1);62 return __darwin_check_fd_set_overflow(_a, _b, 1);
...@@ -70,9 +66,6 @@ __darwin_check_fd_set(int _a, const void *_b)...@@ -70,9 +66,6 @@ __darwin_check_fd_set(int _a, const void *_b)
70 } else {66 } else {
71 return 1;67 return 1;
72 }68 }
73#ifdef __clang__
74#pragma clang diagnostic pop
75#endif
76}69}
7770
78/* This inline avoids argument side-effect issues with FD_ISSET() */71/* This inline avoids argument side-effect issues with FD_ISSET() */
lib/libc/include/x86_64-macos-gnu/sys/_types/_int8_t.h+1-1
...@@ -27,5 +27,5 @@...@@ -27,5 +27,5 @@
27 */27 */
28#ifndef _INT8_T28#ifndef _INT8_T
29#define _INT8_T29#define _INT8_T
30typedef signed char int8_t;30typedef __signed char int8_t;
31#endif /* _INT8_T */31#endif /* _INT8_T */
lib/libc/include/x86_64-macos-gnu/sys/_types/_ucontext.h-1
...@@ -38,7 +38,6 @@...@@ -38,7 +38,6 @@
38#include <machine/types.h> /* __darwin_size_t */38#include <machine/types.h> /* __darwin_size_t */
39#include <machine/_mcontext.h> /* _STRUCT_MCONTEXT */39#include <machine/_mcontext.h> /* _STRUCT_MCONTEXT */
40#include <sys/_types.h> /* __darwin_sigset_t */40#include <sys/_types.h> /* __darwin_sigset_t */
41#include <sys/_types/_sigaltstack.h> /* _STRUCT_SIGALTSTACK */
4241
43_STRUCT_UCONTEXT42_STRUCT_UCONTEXT
44{43{
lib/libc/include/x86_64-macos-gnu/sys/acl.h-1
...@@ -25,7 +25,6 @@...@@ -25,7 +25,6 @@
2525
26#include <Availability.h>26#include <Availability.h>
27#include <sys/kauth.h>27#include <sys/kauth.h>
28#include <sys/_types/_ssize_t.h>
2928
30#define __DARWIN_ACL_READ_DATA (1<<1)29#define __DARWIN_ACL_READ_DATA (1<<1)
31#define __DARWIN_ACL_LIST_DIRECTORY __DARWIN_ACL_READ_DATA30#define __DARWIN_ACL_LIST_DIRECTORY __DARWIN_ACL_READ_DATA
lib/libc/include/x86_64-macos-gnu/sys/attr.h+1-8
...@@ -51,7 +51,6 @@...@@ -51,7 +51,6 @@
5151
5252
53#define FSOPT_ATTR_CMN_EXTENDED 0x0000002053#define FSOPT_ATTR_CMN_EXTENDED 0x00000020
54#define FSOPT_RETURN_REALDEV 0x00000200
5554
56/* we currently aren't anywhere near this amount for a valid55/* we currently aren't anywhere near this amount for a valid
57 * fssearchblock.sizeofsearchparams1 or fssearchblock.sizeofsearchparams256 * fssearchblock.sizeofsearchparams1 or fssearchblock.sizeofsearchparams2
...@@ -240,10 +239,6 @@ typedef struct vol_capabilities_attr {...@@ -240,10 +239,6 @@ typedef struct vol_capabilities_attr {
240 * that implies multiple volumes must be mounted in order to boot and root the239 * that implies multiple volumes must be mounted in order to boot and root the
241 * operating system. Typically, this means a read-only system volume and a240 * operating system. Typically, this means a read-only system volume and a
242 * writable data volume.241 * writable data volume.
243 *
244 * VOL_CAP_FMT_SEALED: When set, this volume is cryptographically sealed.
245 * Any modifications to volume data or metadata will be detected and may
246 * render the volume unusable.
247 */242 */
248#define VOL_CAP_FMT_PERSISTENTOBJECTIDS 0x00000001243#define VOL_CAP_FMT_PERSISTENTOBJECTIDS 0x00000001
249#define VOL_CAP_FMT_SYMBOLICLINKS 0x00000002244#define VOL_CAP_FMT_SYMBOLICLINKS 0x00000002
...@@ -270,7 +265,6 @@ typedef struct vol_capabilities_attr {...@@ -270,7 +265,6 @@ typedef struct vol_capabilities_attr {
270#define VOL_CAP_FMT_NO_PERMISSIONS 0x00400000265#define VOL_CAP_FMT_NO_PERMISSIONS 0x00400000
271#define VOL_CAP_FMT_SHARED_SPACE 0x00800000266#define VOL_CAP_FMT_SHARED_SPACE 0x00800000
272#define VOL_CAP_FMT_VOL_GROUPS 0x01000000267#define VOL_CAP_FMT_VOL_GROUPS 0x01000000
273#define VOL_CAP_FMT_SEALED 0x02000000
274268
275/*269/*
276 * VOL_CAP_INT_SEARCHFS: When set, the volume implements the270 * VOL_CAP_INT_SEARCHFS: When set, the volume implements the
...@@ -521,9 +515,8 @@ typedef struct vol_attributes_attr {...@@ -521,9 +515,8 @@ typedef struct vol_attributes_attr {
521#define ATTR_CMNEXT_REALFSID 0x00000080515#define ATTR_CMNEXT_REALFSID 0x00000080
522#define ATTR_CMNEXT_CLONEID 0x00000100516#define ATTR_CMNEXT_CLONEID 0x00000100
523#define ATTR_CMNEXT_EXT_FLAGS 0x00000200517#define ATTR_CMNEXT_EXT_FLAGS 0x00000200
524#define ATTR_CMNEXT_RECURSIVE_GENCOUNT 0x00000400
525518
526#define ATTR_CMNEXT_VALIDMASK 0x000007fc519#define ATTR_CMNEXT_VALIDMASK 0x000003fc
527#define ATTR_CMNEXT_SETMASK 0x00000000520#define ATTR_CMNEXT_SETMASK 0x00000000
528521
529/* Deprecated fork attributes */522/* Deprecated fork attributes */
lib/libc/include/x86_64-macos-gnu/sys/cdefs.h+11-32
...@@ -174,15 +174,6 @@...@@ -174,15 +174,6 @@
174#define __cold174#define __cold
175#endif175#endif
176176
177/* __exported denotes symbols that should be exported even when symbols
178 * are hidden by default.
179 * __exported_push/_exported_pop are pragmas used to delimit a range of
180 * symbols that should be exported even when symbols are hidden by default.
181 */
182#define __exported __attribute__((__visibility__("default")))
183#define __exported_push _Pragma("GCC visibility push(default)")
184#define __exported_pop _Pragma("GCC visibility pop")
185
186/* __deprecated causes the compiler to produce a warning when encountering177/* __deprecated causes the compiler to produce a warning when encountering
187 * code using the deprecated functionality.178 * code using the deprecated functionality.
188 * __deprecated_msg() does the same, and compilers that support it will print179 * __deprecated_msg() does the same, and compilers that support it will print
...@@ -211,17 +202,9 @@...@@ -211,17 +202,9 @@
211#define __kpi_deprecated(_msg)202#define __kpi_deprecated(_msg)
212203
213/* __unavailable causes the compiler to error out when encountering204/* __unavailable causes the compiler to error out when encountering
214 * code using the tagged function205 * code using the tagged function of variable.
215 */206 */
216#if __has_attribute(unavailable)207#define __unavailable __attribute__((__unavailable__))
217#define __unavailable __attribute__((__unavailable__))
218#else
219#define __unavailable
220#endif
221
222#define __kpi_unavailable
223
224#define __kpi_deprecated_arm64_macos_unavailable
225208
226/* Delete pseudo-keywords wherever they are not available or needed. */209/* Delete pseudo-keywords wherever they are not available or needed. */
227#ifndef __dead210#ifndef __dead
...@@ -488,19 +471,9 @@...@@ -488,19 +471,9 @@
488471
489/* These settings are particular to each product. */472/* These settings are particular to each product. */
490/* Platform: MacOSX */473/* Platform: MacOSX */
491#if defined(__i386__)
492#define __DARWIN_ONLY_64_BIT_INO_T 0474#define __DARWIN_ONLY_64_BIT_INO_T 0
493#define __DARWIN_ONLY_UNIX_CONFORMANCE 0475/* #undef __DARWIN_ONLY_UNIX_CONFORMANCE (automatically set for 64-bit) */
494#define __DARWIN_ONLY_VERS_1050 0476#define __DARWIN_ONLY_VERS_1050 0
495#elif defined(__x86_64__)
496#define __DARWIN_ONLY_64_BIT_INO_T 0
497#define __DARWIN_ONLY_UNIX_CONFORMANCE 1
498#define __DARWIN_ONLY_VERS_1050 0
499#else
500#define __DARWIN_ONLY_64_BIT_INO_T 1
501#define __DARWIN_ONLY_UNIX_CONFORMANCE 1
502#define __DARWIN_ONLY_VERS_1050 1
503#endif
504477
505/*478/*
506 * The __DARWIN_ALIAS macros are used to do symbol renaming; they allow479 * The __DARWIN_ALIAS macros are used to do symbol renaming; they allow
...@@ -520,6 +493,14 @@...@@ -520,6 +493,14 @@
520 * pre-10.5, and it is the default compilation environment, revert the493 * pre-10.5, and it is the default compilation environment, revert the
521 * compilation environment to pre-__DARWIN_UNIX03.494 * compilation environment to pre-__DARWIN_UNIX03.
522 */495 */
496#if !defined(__DARWIN_ONLY_UNIX_CONFORMANCE)
497# if defined(__LP64__)
498# define __DARWIN_ONLY_UNIX_CONFORMANCE 1
499# else /* !__LP64__ */
500# define __DARWIN_ONLY_UNIX_CONFORMANCE 0
501# endif /* __LP64__ */
502#endif /* !__DARWIN_ONLY_UNIX_CONFORMANCE */
503
523#if !defined(__DARWIN_UNIX03)504#if !defined(__DARWIN_UNIX03)
524# if __DARWIN_ONLY_UNIX_CONFORMANCE505# if __DARWIN_ONLY_UNIX_CONFORMANCE
525# if defined(_NONSTD_SOURCE)506# if defined(_NONSTD_SOURCE)
...@@ -822,8 +803,6 @@...@@ -822,8 +803,6 @@
822 */803 */
823#if !defined(__sys_cdefs_arch_unknown__) && defined(__i386__)804#if !defined(__sys_cdefs_arch_unknown__) && defined(__i386__)
824#elif !defined(__sys_cdefs_arch_unknown__) && defined(__x86_64__)805#elif !defined(__sys_cdefs_arch_unknown__) && defined(__x86_64__)
825#elif !defined(__sys_cdefs_arch_unknown__) && defined(__arm__)
826#elif !defined(__sys_cdefs_arch_unknown__) && defined(__arm64__)
827#else806#else
828#error Unsupported architecture807#error Unsupported architecture
829#endif808#endif
lib/libc/include/x86_64-macos-gnu/sys/event.h+1-1
...@@ -262,7 +262,7 @@ enum {...@@ -262,7 +262,7 @@ enum {
262#define NOTE_EXEC 0x20000000 /* process exec'd */262#define NOTE_EXEC 0x20000000 /* process exec'd */
263#define NOTE_REAP ((unsigned int)eNoteReapDeprecated /* 0x10000000 */ ) /* process reaped */263#define NOTE_REAP ((unsigned int)eNoteReapDeprecated /* 0x10000000 */ ) /* process reaped */
264#define NOTE_SIGNAL 0x08000000 /* shared with EVFILT_SIGNAL */264#define NOTE_SIGNAL 0x08000000 /* shared with EVFILT_SIGNAL */
265#define NOTE_EXITSTATUS 0x04000000 /* exit status to be returned, valid for child process or when allowed to signal target pid */265#define NOTE_EXITSTATUS 0x04000000 /* exit status to be returned, valid for child process only */
266#define NOTE_EXIT_DETAIL 0x02000000 /* provide details on reasons for exit */266#define NOTE_EXIT_DETAIL 0x02000000 /* provide details on reasons for exit */
267267
268#define NOTE_PDATAMASK 0x000fffff /* mask for signal & exit status */268#define NOTE_PDATAMASK 0x000fffff /* mask for signal & exit status */
lib/libc/include/x86_64-macos-gnu/sys/fcntl.h+48-72
...@@ -107,51 +107,24 @@...@@ -107,51 +107,24 @@
107 * which was documented to use FREAD/FWRITE, continues to work.107 * which was documented to use FREAD/FWRITE, continues to work.
108 */108 */
109#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)109#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
110#define FREAD 0x00000001110#define FREAD 0x0001
111#define FWRITE 0x00000002111#define FWRITE 0x0002
112#endif112#endif
113#define O_NONBLOCK 0x00000004 /* no delay */113#define O_NONBLOCK 0x0004 /* no delay */
114#define O_APPEND 0x00000008 /* set append mode */114#define O_APPEND 0x0008 /* set append mode */
115115
116#include <sys/_types/_o_sync.h>116#include <sys/_types/_o_sync.h>
117117
118#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)118#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
119#define O_SHLOCK 0x00000010 /* open with shared file lock */119#define O_SHLOCK 0x0010 /* open with shared file lock */
120#define O_EXLOCK 0x00000020 /* open with exclusive file lock */120#define O_EXLOCK 0x0020 /* open with exclusive file lock */
121#define O_ASYNC 0x00000040 /* signal pgrp when data ready */121#define O_ASYNC 0x0040 /* signal pgrp when data ready */
122#define O_FSYNC O_SYNC /* source compatibility: do not use */122#define O_FSYNC O_SYNC /* source compatibility: do not use */
123#define O_NOFOLLOW 0x00000100 /* don't follow symlinks */123#define O_NOFOLLOW 0x0100 /* don't follow symlinks */
124#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */124#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */
125#define O_CREAT 0x00000200 /* create if nonexistant */125#define O_CREAT 0x0200 /* create if nonexistant */
126#define O_TRUNC 0x00000400 /* truncate to zero length */126#define O_TRUNC 0x0400 /* truncate to zero length */
127#define O_EXCL 0x00000800 /* error if already exists */127#define O_EXCL 0x0800 /* error if already exists */
128
129#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
130#define O_EVTONLY 0x00008000 /* descriptor requested for event notifications only */
131#endif
132
133
134#define O_NOCTTY 0x00020000 /* don't assign controlling terminal */
135
136
137#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
138#define O_DIRECTORY 0x00100000
139#define O_SYMLINK 0x00200000 /* allow open of a symlink */
140#endif
141
142// O_DSYNC 0x00400000 /* synch I/O data integrity */
143#include <sys/_types/_o_dsync.h>
144
145
146#if __DARWIN_C_LEVEL >= 200809L
147#define O_CLOEXEC 0x01000000 /* implicitly set FD_CLOEXEC */
148#endif
149
150
151#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
152#define O_NOFOLLOW_ANY 0x20000000 /* no symlinks allowed in path */
153#endif
154
155128
156#if __DARWIN_C_LEVEL >= 200809L129#if __DARWIN_C_LEVEL >= 200809L
157/*130/*
...@@ -172,6 +145,30 @@...@@ -172,6 +145,30 @@
172#endif145#endif
173#endif146#endif
174147
148#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
149#define O_EVTONLY 0x8000 /* descriptor requested for event notifications only */
150#endif
151
152
153#define O_NOCTTY 0x20000 /* don't assign controlling terminal */
154
155
156#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
157#define O_DIRECTORY 0x100000
158#define O_SYMLINK 0x200000 /* allow open of a symlink */
159#endif
160
161#include <sys/_types/_o_dsync.h>
162
163
164#if __DARWIN_C_LEVEL >= 200809L
165#define O_CLOEXEC 0x1000000 /* implicitly set FD_CLOEXEC */
166#endif
167
168
169
170
171
175/* Data Protection Flags */172/* Data Protection Flags */
176#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)173#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
177#define O_DP_GETRAWENCRYPTED 0x0001174#define O_DP_GETRAWENCRYPTED 0x0001
...@@ -227,7 +224,7 @@...@@ -227,7 +224,7 @@
227#define F_FLUSH_DATA 40224#define F_FLUSH_DATA 40
228#define F_CHKCLEAN 41 /* Used for regression test */225#define F_CHKCLEAN 41 /* Used for regression test */
229#define F_PREALLOCATE 42 /* Preallocate storage */226#define F_PREALLOCATE 42 /* Preallocate storage */
230#define F_SETSIZE 43 /* Truncate a file. Equivalent to calling truncate(2) */227#define F_SETSIZE 43 /* Truncate a file without zeroing space */
231#define F_RDADVISE 44 /* Issue an advisory read async with no copy to user */228#define F_RDADVISE 44 /* Issue an advisory read async with no copy to user */
232#define F_RDAHEAD 45 /* turn read ahead off/on for this fd */229#define F_RDAHEAD 45 /* turn read ahead off/on for this fd */
233/*230/*
...@@ -296,10 +293,6 @@...@@ -296,10 +293,6 @@
296293
297#define F_GETPATH_NOFIRMLINK 102 /* return the full path without firmlinks of the fd */294#define F_GETPATH_NOFIRMLINK 102 /* return the full path without firmlinks of the fd */
298295
299#define F_ADDFILESIGS_INFO 103 /* Add signature from same file, return information */
300#define F_ADDFILESUPPL 104 /* Add supplemental signature from same file with fd reference to original */
301#define F_GETSIGSINFO 105 /* Look up code signature information attached to a file or slice */
302
303// FS-specific fcntl()'s numbers begin at 0x00010000 and go up296// FS-specific fcntl()'s numbers begin at 0x00010000 and go up
304#define FCNTL_FS_SPECIFIC_BASE 0x00010000297#define FCNTL_FS_SPECIFIC_BASE 0x00010000
305298
...@@ -381,34 +374,30 @@ struct radvisory {...@@ -381,34 +374,30 @@ struct radvisory {
381};374};
382375
383376
377/** Information the user passes in to get the codeblobs out of the kernel */
378typedef struct fcodeblobs {
379 void *f_cd_hash;
380 size_t f_hash_size;
381 void *f_cd_buffer;
382 size_t f_cd_size;
383 unsigned int *f_out_size;
384 int f_arch;
385 int __padding;
386} fcodeblobs_t;
387
388
384/*389/*
385 * detached code signatures data type -390 * detached code signatures data type -
386 * information passed by user to system used by F_ADDSIGS and F_ADDFILESIGS.391 * information passed by user to system used by F_ADDSIGS and F_ADDFILESIGS.
387 * F_ADDFILESIGS is a shortcut for files that contain their own signature and392 * F_ADDFILESIGS is a shortcut for files that contain their own signature and
388 * doesn't require mapping of the file in order to load the signature.393 * doesn't require mapping of the file in order to load the signature.
389 */394 */
390#define USER_FSIGNATURES_CDHASH_LEN 20
391typedef struct fsignatures {395typedef struct fsignatures {
392 off_t fs_file_start;396 off_t fs_file_start;
393 void *fs_blob_start;397 void *fs_blob_start;
394 size_t fs_blob_size;398 size_t fs_blob_size;
395
396 /* The following fields are only applicable to F_ADDFILESIGS_INFO (64bit only). */
397 /* Prior to F_ADDFILESIGS_INFO, this struct ended after fs_blob_size. */
398 size_t fs_fsignatures_size;// input: size of this struct (for compatibility)
399 char fs_cdhash[USER_FSIGNATURES_CDHASH_LEN]; // output: cdhash
400 int fs_hash_type;// output: hash algorithm type for cdhash
401} fsignatures_t;399} fsignatures_t;
402400
403typedef struct fsupplement {
404 off_t fs_file_start; /* offset of Mach-O image in FAT file */
405 off_t fs_blob_start; /* offset of signature in Mach-O image */
406 size_t fs_blob_size; /* signature blob size */
407 int fs_orig_fd; /* address of original image */
408} fsupplement_t;
409
410
411
412/*401/*
413 * DYLD needs to check if the object is allowed to be combined402 * DYLD needs to check if the object is allowed to be combined
414 * into the main binary. This is done between the code signature403 * into the main binary. This is done between the code signature
...@@ -426,19 +415,6 @@ typedef struct fchecklv {...@@ -426,19 +415,6 @@ typedef struct fchecklv {
426} fchecklv_t;415} fchecklv_t;
427416
428417
429/* At this time F_GETSIGSINFO can only indicate platformness.
430 * As additional requestable information is defined, new keys will be added and the
431 * fgetsigsinfo_t structure will be lengthened to add space for the additional information
432 */
433#define GETSIGSINFO_PLATFORM_BINARY 1
434
435/* fgetsigsinfo_t used by F_GETSIGSINFO command */
436typedef struct fgetsigsinfo {
437 off_t fg_file_start; /* IN: Offset in the file to look for a signature, -1 for any signature */
438 int fg_info_request; /* IN: Key indicating the info requested */
439 int fg_sig_is_platform; /* OUT: 1 if the signature is a plat form binary, 0 if not */
440} fgetsigsinfo_t;
441
442418
443/* lock operations for flock(2) */419/* lock operations for flock(2) */
444#define LOCK_SH 0x01 /* shared file lock */420#define LOCK_SH 0x01 /* shared file lock */
lib/libc/include/x86_64-macos-gnu/sys/ioccom.h+1-1
...@@ -83,7 +83,7 @@...@@ -83,7 +83,7 @@
83#define IOC_OUT (__uint32_t)0x4000000083#define IOC_OUT (__uint32_t)0x40000000
84/* copy parameters in */84/* copy parameters in */
85#define IOC_IN (__uint32_t)0x8000000085#define IOC_IN (__uint32_t)0x80000000
86/* copy parameters in and out */86/* copy paramters in and out */
87#define IOC_INOUT (IOC_IN|IOC_OUT)87#define IOC_INOUT (IOC_IN|IOC_OUT)
88/* mask for IN/OUT/VOID */88/* mask for IN/OUT/VOID */
89#define IOC_DIRMASK (__uint32_t)0xe000000089#define IOC_DIRMASK (__uint32_t)0xe0000000
lib/libc/include/x86_64-macos-gnu/sys/kauth.h-3
...@@ -38,10 +38,7 @@...@@ -38,10 +38,7 @@
38#include <sys/appleapiopts.h>38#include <sys/appleapiopts.h>
39#include <sys/cdefs.h>39#include <sys/cdefs.h>
40#include <mach/boolean.h>40#include <mach/boolean.h>
41#include <machine/types.h> /* u_int8_t, etc. */
42#include <sys/_types.h> /* __offsetof() */41#include <sys/_types.h> /* __offsetof() */
43#include <sys/_types/_uid_t.h> /* uid_t */
44#include <sys/_types/_gid_t.h> /* gid_t */
45#include <sys/syslimits.h> /* NGROUPS_MAX */42#include <sys/syslimits.h> /* NGROUPS_MAX */
4643
47#ifdef __APPLE_API_EVOLVING44#ifdef __APPLE_API_EVOLVING
lib/libc/include/x86_64-macos-gnu/sys/mman.h+4-17
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright (c) 2000-2020 Apple Computer, Inc. All rights reserved.2 * Copyright (c) 2000-2019 Apple Computer, Inc. All rights reserved.
3 *3 *
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 *5 *
...@@ -89,10 +89,6 @@...@@ -89,10 +89,6 @@
89#include <sys/_types/_off_t.h>89#include <sys/_types/_off_t.h>
90#include <sys/_types/_size_t.h>90#include <sys/_types/_size_t.h>
9191
92#if __DARWIN_C_LEVEL >= 200809L
93#include <Availability.h>
94#endif /* __DARWIN_C_LEVEL */
95
96/*92/*
97 * Protections are chosen from these bits, or-ed together93 * Protections are chosen from these bits, or-ed together
98 */94 */
...@@ -149,17 +145,9 @@...@@ -149,17 +145,9 @@
149#define MAP_RESILIENT_CODESIGN 0x2000 /* no code-signing failures */145#define MAP_RESILIENT_CODESIGN 0x2000 /* no code-signing failures */
150#define MAP_RESILIENT_MEDIA 0x4000 /* no backing-store failures */146#define MAP_RESILIENT_MEDIA 0x4000 /* no backing-store failures */
151147
152#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500148#if !defined(CONFIG_EMBEDDED)
153#define MAP_32BIT 0x8000 /* Return virtual addresses <4G only */149#define MAP_32BIT 0x8000 /* Return virtual addresses <4G only: Requires entitlement */
154#endif /* defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500 */150#endif /* !defined(CONFIG_EMBEDDED) */
155
156
157/*
158 * Flags used to support translated processes.
159 */
160#define MAP_TRANSLATED_ALLOW_EXECUTE 0x20000 /* allow execute in translated processes */
161
162#define MAP_UNIX03 0x40000 /* UNIX03 compliance */
163151
164#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */152#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
165153
...@@ -225,7 +213,6 @@...@@ -225,7 +213,6 @@
225213
226214
227215
228
229__BEGIN_DECLS216__BEGIN_DECLS
230/* [ML] */217/* [ML] */
231int mlockall(int);218int mlockall(int);
lib/libc/include/x86_64-macos-gnu/sys/mount.h+1-12
...@@ -324,7 +324,7 @@ struct vfsidctl {...@@ -324,7 +324,7 @@ struct vfsidctl {
324 * New style VFS sysctls, do not reuse/conflict with the namespace for324 * New style VFS sysctls, do not reuse/conflict with the namespace for
325 * private sysctls.325 * private sysctls.
326 */326 */
327#define VFS_CTL_OSTATFS 0x00010001 /* old legacy statfs */327#define VFS_CTL_STATFS 0x00010001 /* statfs */
328#define VFS_CTL_UMOUNT 0x00010002 /* unmount */328#define VFS_CTL_UMOUNT 0x00010002 /* unmount */
329#define VFS_CTL_QUERY 0x00010003 /* anything wrong? (vfsquery) */329#define VFS_CTL_QUERY 0x00010003 /* anything wrong? (vfsquery) */
330#define VFS_CTL_NEWADDR 0x00010004 /* reconnect to new address */330#define VFS_CTL_NEWADDR 0x00010004 /* reconnect to new address */
...@@ -334,17 +334,6 @@ struct vfsidctl {...@@ -334,17 +334,6 @@ struct vfsidctl {
334#define VFS_CTL_DISC 0x00010008 /* server disconnected */334#define VFS_CTL_DISC 0x00010008 /* server disconnected */
335#define VFS_CTL_SERVERINFO 0x00010009 /* information about fs server */335#define VFS_CTL_SERVERINFO 0x00010009 /* information about fs server */
336#define VFS_CTL_NSTATUS 0x0001000A /* netfs mount status */336#define VFS_CTL_NSTATUS 0x0001000A /* netfs mount status */
337#define VFS_CTL_STATFS64 0x0001000B /* statfs64 */
338
339/*
340 * Automatically select the correct VFS_CTL_*STATFS* flavor based
341 * on what "struct statfs" layout the client will use.
342 */
343#if __DARWIN_64_BIT_INO_T
344#define VFS_CTL_STATFS VFS_CTL_STATFS64
345#else
346#define VFS_CTL_STATFS VFS_CTL_OSTATFS
347#endif
348337
349struct vfsquery {338struct vfsquery {
350 u_int32_t vq_flags;339 u_int32_t vq_flags;
lib/libc/include/x86_64-macos-gnu/sys/param.h+22-4
...@@ -197,10 +197,10 @@...@@ -197,10 +197,10 @@
197#define MAXSYMLINKS 32197#define MAXSYMLINKS 32
198198
199/* Bit map related macros. */199/* Bit map related macros. */
200#define setbit(a, i) (((unsigned char *)(a))[(i)/NBBY] |= 1u<<((i)%NBBY))200#define setbit(a, i) (((char *)(a))[(i)/NBBY] |= 1<<((i)%NBBY))
201#define clrbit(a, i) (((unsigned char *)(a))[(i)/NBBY] &= ~(1u<<((i)%NBBY)))201#define clrbit(a, i) (((char *)(a))[(i)/NBBY] &= ~(1<<((i)%NBBY)))
202#define isset(a, i) (((unsigned char *)(a))[(i)/NBBY] & (1u<<((i)%NBBY)))202#define isset(a, i) (((char *)(a))[(i)/NBBY] & (1<<((i)%NBBY)))
203#define isclr(a, i) ((((unsigned char *)(a))[(i)/NBBY] & (1u<<((i)%NBBY))) == 0)203#define isclr(a, i) ((((char *)(a))[(i)/NBBY] & (1<<((i)%NBBY))) == 0)
204204
205/* Macros for counting and rounding. */205/* Macros for counting and rounding. */
206#ifndef howmany206#ifndef howmany
...@@ -218,6 +218,24 @@...@@ -218,6 +218,24 @@
218#define MAX(a, b) (((a)>(b))?(a):(b))218#define MAX(a, b) (((a)>(b))?(a):(b))
219#endif /* MAX */219#endif /* MAX */
220220
221/*
222 * Constants for setting the parameters of the kernel memory allocator.
223 *
224 * 2 ** MINBUCKET is the smallest unit of memory that will be
225 * allocated. It must be at least large enough to hold a pointer.
226 *
227 * Units of memory less or equal to MAXALLOCSAVE will permanently
228 * allocate physical memory; requests for these size pieces of
229 * memory are quite fast. Allocations greater than MAXALLOCSAVE must
230 * always allocate and free physical memory; requests for these
231 * size allocations should be done infrequently as they will be slow.
232 *
233 * Constraints: CLBYTES <= MAXALLOCSAVE <= 2 ** (MINBUCKET + 14), and
234 * MAXALLOCSIZE must be a power of two.
235 */
236#define MINBUCKET 4 /* 4 => min allocation of 16 bytes */
237#define MAXALLOCSAVE (2 * CLBYTES)
238
221/*239/*
222 * Scale factor for scaled integers used to count %cpu time and load avgs.240 * Scale factor for scaled integers used to count %cpu time and load avgs.
223 *241 *
lib/libc/include/x86_64-macos-gnu/sys/proc.h-1
...@@ -84,7 +84,6 @@...@@ -84,7 +84,6 @@
84struct session;84struct session;
85struct pgrp;85struct pgrp;
86struct proc;86struct proc;
87struct proc_ident;
8887
89/* Exported fields for kern sysctls */88/* Exported fields for kern sysctls */
90struct extern_proc {89struct extern_proc {
lib/libc/include/x86_64-macos-gnu/sys/resource.h+2-56
...@@ -188,13 +188,7 @@ struct rusage {...@@ -188,13 +188,7 @@ struct rusage {
188#define RUSAGE_INFO_V2 2188#define RUSAGE_INFO_V2 2
189#define RUSAGE_INFO_V3 3189#define RUSAGE_INFO_V3 3
190#define RUSAGE_INFO_V4 4190#define RUSAGE_INFO_V4 4
191#define RUSAGE_INFO_V5 5191#define RUSAGE_INFO_CURRENT RUSAGE_INFO_V4
192#define RUSAGE_INFO_CURRENT RUSAGE_INFO_V5
193
194/*
195 * Flags for RUSAGE_INFO_V5
196 */
197#define RU_PROC_RUNS_RESLIDE 0x00000001 /* proc has reslid shared cache */
198192
199typedef void *rusage_info_t;193typedef void *rusage_info_t;
200194
...@@ -324,47 +318,7 @@ struct rusage_info_v4 {...@@ -324,47 +318,7 @@ struct rusage_info_v4 {
324 uint64_t ri_runnable_time;318 uint64_t ri_runnable_time;
325};319};
326320
327struct rusage_info_v5 {321typedef struct rusage_info_v4 rusage_info_current;
328 uint8_t ri_uuid[16];
329 uint64_t ri_user_time;
330 uint64_t ri_system_time;
331 uint64_t ri_pkg_idle_wkups;
332 uint64_t ri_interrupt_wkups;
333 uint64_t ri_pageins;
334 uint64_t ri_wired_size;
335 uint64_t ri_resident_size;
336 uint64_t ri_phys_footprint;
337 uint64_t ri_proc_start_abstime;
338 uint64_t ri_proc_exit_abstime;
339 uint64_t ri_child_user_time;
340 uint64_t ri_child_system_time;
341 uint64_t ri_child_pkg_idle_wkups;
342 uint64_t ri_child_interrupt_wkups;
343 uint64_t ri_child_pageins;
344 uint64_t ri_child_elapsed_abstime;
345 uint64_t ri_diskio_bytesread;
346 uint64_t ri_diskio_byteswritten;
347 uint64_t ri_cpu_time_qos_default;
348 uint64_t ri_cpu_time_qos_maintenance;
349 uint64_t ri_cpu_time_qos_background;
350 uint64_t ri_cpu_time_qos_utility;
351 uint64_t ri_cpu_time_qos_legacy;
352 uint64_t ri_cpu_time_qos_user_initiated;
353 uint64_t ri_cpu_time_qos_user_interactive;
354 uint64_t ri_billed_system_time;
355 uint64_t ri_serviced_system_time;
356 uint64_t ri_logical_writes;
357 uint64_t ri_lifetime_max_phys_footprint;
358 uint64_t ri_instructions;
359 uint64_t ri_cycles;
360 uint64_t ri_billed_energy;
361 uint64_t ri_serviced_energy;
362 uint64_t ri_interval_max_phys_footprint;
363 uint64_t ri_runnable_time;
364 uint64_t ri_flags;
365};
366
367typedef struct rusage_info_v5 rusage_info_current;
368322
369#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */323#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
370324
...@@ -455,8 +409,6 @@ struct proc_rlimit_control_wakeupmon {...@@ -455,8 +409,6 @@ struct proc_rlimit_control_wakeupmon {
455#define IOPOL_TYPE_VFS_ATIME_UPDATES 2409#define IOPOL_TYPE_VFS_ATIME_UPDATES 2
456#define IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES 3410#define IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES 3
457#define IOPOL_TYPE_VFS_STATFS_NO_DATA_VOLUME 4411#define IOPOL_TYPE_VFS_STATFS_NO_DATA_VOLUME 4
458#define IOPOL_TYPE_VFS_TRIGGER_RESOLVE 5
459#define IOPOL_TYPE_VFS_IGNORE_CONTENT_PROTECTION 6
460412
461/* scope */413/* scope */
462#define IOPOL_SCOPE_PROCESS 0414#define IOPOL_SCOPE_PROCESS 0
...@@ -486,12 +438,6 @@ struct proc_rlimit_control_wakeupmon {...@@ -486,12 +438,6 @@ struct proc_rlimit_control_wakeupmon {
486#define IOPOL_VFS_STATFS_NO_DATA_VOLUME_DEFAULT 0438#define IOPOL_VFS_STATFS_NO_DATA_VOLUME_DEFAULT 0
487#define IOPOL_VFS_STATFS_FORCE_NO_DATA_VOLUME 1439#define IOPOL_VFS_STATFS_FORCE_NO_DATA_VOLUME 1
488440
489#define IOPOL_VFS_TRIGGER_RESOLVE_DEFAULT 0
490#define IOPOL_VFS_TRIGGER_RESOLVE_OFF 1
491
492#define IOPOL_VFS_CONTENT_PROTECTION_DEFAULT 0
493#define IOPOL_VFS_CONTENT_PROTECTION_IGNORE 1
494
495#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */441#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
496442
497443
lib/libc/include/x86_64-macos-gnu/sys/shm.h-4
...@@ -109,11 +109,7 @@ typedef unsigned short shmatt_t;...@@ -109,11 +109,7 @@ typedef unsigned short shmatt_t;
109 * headers at this time, to avoid the resulting namespace109 * headers at this time, to avoid the resulting namespace
110 * pollution, which is why we discourages its use.110 * pollution, which is why we discourages its use.
111 */111 */
112#if __arm64__
113#define SHMLBA (16*1024) /* [XSI] Segment low boundary address multiple*/
114#else /* __arm64__ */
115#define SHMLBA 4096 /* [XSI] Segment low boundary address multiple*/112#define SHMLBA 4096 /* [XSI] Segment low boundary address multiple*/
116#endif /* __arm64__ */
117113
118/* "official" access mode definitions; somewhat braindead since you have114/* "official" access mode definitions; somewhat braindead since you have
119 * to specify (SHM_* >> 3) for group and (SHM_* >> 6) for world permissions */115 * to specify (SHM_* >> 3) for group and (SHM_* >> 6) for world permissions */
lib/libc/include/x86_64-macos-gnu/sys/socket.h+6-15
...@@ -160,8 +160,8 @@...@@ -160,8 +160,8 @@
160#define SO_ERROR 0x1007 /* get error status and clear */160#define SO_ERROR 0x1007 /* get error status and clear */
161#define SO_TYPE 0x1008 /* get socket type */161#define SO_TYPE 0x1008 /* get socket type */
162#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)162#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
163#define SO_LABEL 0x1010 /* deprecated */163#define SO_LABEL 0x1010 /* socket's MAC label */
164#define SO_PEERLABEL 0x1011 /* deprecated */164#define SO_PEERLABEL 0x1011 /* socket's peer MAC label */
165#ifdef __APPLE__165#ifdef __APPLE__
166#define SO_NREAD 0x1020 /* APPLE: get 1st-packet byte count */166#define SO_NREAD 0x1020 /* APPLE: get 1st-packet byte count */
167#define SO_NKE 0x1021 /* APPLE: Install socket-level NKE */167#define SO_NKE 0x1021 /* APPLE: Install socket-level NKE */
...@@ -182,7 +182,7 @@...@@ -182,7 +182,7 @@
182#define SO_NET_SERVICE_TYPE 0x1116 /* Network service type */182#define SO_NET_SERVICE_TYPE 0x1116 /* Network service type */
183183
184184
185#define SO_NETSVC_MARKING_LEVEL 0x1119 /* Get QoS marking in effect for socket */185#define SO_NETSVC_MARKING_LEVEL 0x1119 /* Get QoS marking in effect for socket */
186186
187/*187/*
188 * Network Service Type for option SO_NET_SERVICE_TYPE188 * Network Service Type for option SO_NET_SERVICE_TYPE
...@@ -398,8 +398,7 @@ struct so_np_extensions {...@@ -398,8 +398,7 @@ struct so_np_extensions {
398#define AF_RESERVED_36 36 /* Reserved for internal usage */398#define AF_RESERVED_36 36 /* Reserved for internal usage */
399#define AF_IEEE80211 37 /* IEEE 802.11 protocol */399#define AF_IEEE80211 37 /* IEEE 802.11 protocol */
400#define AF_UTUN 38400#define AF_UTUN 38
401#define AF_VSOCK 40 /* VM Sockets */401#define AF_MAX 40
402#define AF_MAX 41
403#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */402#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
404403
405/*404/*
...@@ -487,7 +486,6 @@ struct sockaddr_storage {...@@ -487,7 +486,6 @@ struct sockaddr_storage {
487#define PF_PPP AF_PPP486#define PF_PPP AF_PPP
488#define PF_RESERVED_36 AF_RESERVED_36487#define PF_RESERVED_36 AF_RESERVED_36
489#define PF_UTUN AF_UTUN488#define PF_UTUN AF_UTUN
490#define PF_VSOCK AF_VSOCK
491#define PF_MAX AF_MAX489#define PF_MAX AF_MAX
492490
493/*491/*
...@@ -580,13 +578,6 @@ struct msghdr {...@@ -580,13 +578,6 @@ struct msghdr {
580#define MSG_NEEDSA 0x10000 /* Fail receive if socket address cannot be allocated */578#define MSG_NEEDSA 0x10000 /* Fail receive if socket address cannot be allocated */
581#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */579#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
582580
583#if __DARWIN_C_LEVEL >= 200809L
584#define MSG_NOSIGNAL 0x80000 /* do not generate SIGPIPE on EOF */
585#endif /* __DARWIN_C_LEVEL */
586
587#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
588#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
589
590/*581/*
591 * Header for ancillary data objects in msg_control buffer.582 * Header for ancillary data objects in msg_control buffer.
592 * Used for additional information with/about a datagram583 * Used for additional information with/about a datagram
...@@ -680,7 +671,7 @@ struct cmsgcred {...@@ -680,7 +671,7 @@ struct cmsgcred {
680#define SHUT_WR 1 /* shut down the writing side */671#define SHUT_WR 1 /* shut down the writing side */
681#define SHUT_RDWR 2 /* shut down both sides */672#define SHUT_RDWR 2 /* shut down both sides */
682673
683#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)674#if !defined(_POSIX_C_SOURCE)
684/*675/*
685 * sendfile(2) header/trailer struct676 * sendfile(2) header/trailer struct
686 */677 */
...@@ -692,7 +683,7 @@ struct sf_hdtr {...@@ -692,7 +683,7 @@ struct sf_hdtr {
692};683};
693684
694685
695#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */686#endif /* !_POSIX_C_SOURCE */
696687
697688
698__BEGIN_DECLS689__BEGIN_DECLS
lib/libc/include/x86_64-macos-gnu/sys/spawn.h+1-3
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright (c) 2006-2020 Apple Computer, Inc. All rights reserved.2 * Copyright (c) 2006 Apple Computer, Inc. All rights reserved.
3 *3 *
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 *5 *
...@@ -61,8 +61,6 @@...@@ -61,8 +61,6 @@
61#define POSIX_SPAWN_SETSID 0x040061#define POSIX_SPAWN_SETSID 0x0400
62#define POSIX_SPAWN_CLOEXEC_DEFAULT 0x400062#define POSIX_SPAWN_CLOEXEC_DEFAULT 0x4000
6363
64#define _POSIX_SPAWN_RESLIDE 0x0800
65
66/*64/*
67 * Possible values to be set for the process control actions on resource starvation.65 * Possible values to be set for the process control actions on resource starvation.
68 * POSIX_SPAWN_PCONTROL_THROTTLE indicates that the process is to be throttled on starvation.66 * POSIX_SPAWN_PCONTROL_THROTTLE indicates that the process is to be throttled on starvation.
lib/libc/include/x86_64-macos-gnu/sys/stat.h+1-3
...@@ -361,7 +361,6 @@ struct stat64 __DARWIN_STRUCT_STAT64;...@@ -361,7 +361,6 @@ struct stat64 __DARWIN_STRUCT_STAT64;
361361
362#endif362#endif
363363
364#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
365/*364/*
366 * Extended flags ("EF") returned by ATTR_CMNEXT_EXT_FLAGS from getattrlist/getattrlistbulk365 * Extended flags ("EF") returned by ATTR_CMNEXT_EXT_FLAGS from getattrlist/getattrlistbulk
367 */366 */
...@@ -370,8 +369,7 @@ struct stat64 __DARWIN_STRUCT_STAT64;...@@ -370,8 +369,7 @@ struct stat64 __DARWIN_STRUCT_STAT64;
370#define EF_IS_SYNC_ROOT 0x00000004 /* file is a sync root for iCloud */369#define EF_IS_SYNC_ROOT 0x00000004 /* file is a sync root for iCloud */
371#define EF_IS_PURGEABLE 0x00000008 /* file is purgeable */370#define EF_IS_PURGEABLE 0x00000008 /* file is purgeable */
372#define EF_IS_SPARSE 0x00000010 /* file has at least one sparse region */371#define EF_IS_SPARSE 0x00000010 /* file has at least one sparse region */
373#define EF_IS_SYNTHETIC 0x00000020 /* a synthetic directory/symlink */372
374#endif
375373
376374
377375
lib/libc/include/x86_64-macos-gnu/sys/sysctl.h+7-11
...@@ -553,8 +553,8 @@ extern struct loadavg averunnable;...@@ -553,8 +553,8 @@ extern struct loadavg averunnable;
553/*553/*
554 * CTL_HW identifiers554 * CTL_HW identifiers
555 */555 */
556#define HW_MACHINE 1 /* string: machine class (deprecated: use HW_PRODUCT) */556#define HW_MACHINE 1 /* string: machine class */
557#define HW_MODEL 2 /* string: specific machine model (deprecated: use HW_TARGET) */557#define HW_MODEL 2 /* string: specific machine model */
558#define HW_NCPU 3 /* int: number of cpus */558#define HW_NCPU 3 /* int: number of cpus */
559#define HW_BYTEORDER 4 /* int: machine byte order */559#define HW_BYTEORDER 4 /* int: machine byte order */
560#define HW_PHYSMEM 5 /* int: total memory */560#define HW_PHYSMEM 5 /* int: total memory */
...@@ -578,14 +578,12 @@ extern struct loadavg averunnable;...@@ -578,14 +578,12 @@ extern struct loadavg averunnable;
578#define HW_TB_FREQ 23 /* int: Bus Frequency */578#define HW_TB_FREQ 23 /* int: Bus Frequency */
579#define HW_MEMSIZE 24 /* uint64_t: physical ram size */579#define HW_MEMSIZE 24 /* uint64_t: physical ram size */
580#define HW_AVAILCPU 25 /* int: number of available CPUs */580#define HW_AVAILCPU 25 /* int: number of available CPUs */
581#define HW_TARGET 26 /* string: model identifier */581#define HW_MAXID 26 /* number of valid hw ids */
582#define HW_PRODUCT 27 /* string: product identifier */
583#define HW_MAXID 28 /* number of valid hw ids */
584582
585#define CTL_HW_NAMES { \583#define CTL_HW_NAMES { \
586 { 0, 0 }, \584 { 0, 0 }, \
587 { "machine", CTLTYPE_STRING }, /* Deprecated: use hw.product */ \585 { "machine", CTLTYPE_STRING }, \
588 { "model", CTLTYPE_STRING }, /* Deprecated: use hw.target */ \586 { "model", CTLTYPE_STRING }, \
589 { "ncpu", CTLTYPE_INT }, \587 { "ncpu", CTLTYPE_INT }, \
590 { "byteorder", CTLTYPE_INT }, \588 { "byteorder", CTLTYPE_INT }, \
591 { "physmem", CTLTYPE_INT }, \589 { "physmem", CTLTYPE_INT }, \
...@@ -608,9 +606,7 @@ extern struct loadavg averunnable;...@@ -608,9 +606,7 @@ extern struct loadavg averunnable;
608 { "l3cachesize", CTLTYPE_INT }, \606 { "l3cachesize", CTLTYPE_INT }, \
609 { "tbfrequency", CTLTYPE_INT }, \607 { "tbfrequency", CTLTYPE_INT }, \
610 { "memsize", CTLTYPE_QUAD }, \608 { "memsize", CTLTYPE_QUAD }, \
611 { "availcpu", CTLTYPE_INT }, \609 { "availcpu", CTLTYPE_INT } \
612 { "target", CTLTYPE_STRING }, \
613 { "product", CTLTYPE_STRING }, \
614}610}
615611
616/*612/*
...@@ -759,7 +755,7 @@ extern struct loadavg averunnable;...@@ -759,7 +755,7 @@ extern struct loadavg averunnable;
759#define CTL_DEBUG_MAXID 20755#define CTL_DEBUG_MAXID 20
760756
761757
762#if (CTL_MAXID != 9) || (KERN_MAXID != 72) || (VM_MAXID != 6) || (HW_MAXID != 28) || (USER_MAXID != 21) || (CTL_DEBUG_MAXID != 20)758#if (CTL_MAXID != 9) || (KERN_MAXID != 72) || (VM_MAXID != 6) || (HW_MAXID != 26) || (USER_MAXID != 21) || (CTL_DEBUG_MAXID != 20)
763#error Use the SYSCTL_*() macros and OID_AUTO instead!759#error Use the SYSCTL_*() macros and OID_AUTO instead!
764#endif760#endif
765761
lib/libc/include/x86_64-macos-gnu/sys/syslimits.h+1-9
...@@ -68,19 +68,11 @@...@@ -68,19 +68,11 @@
68#include <sys/cdefs.h>68#include <sys/cdefs.h>
6969
70#if !defined(_ANSI_SOURCE)70#if !defined(_ANSI_SOURCE)
71
72/* max bytes for an exec function */
73#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__)
74#define ARG_MAX (1024 * 1024)
75#else
76#define ARG_MAX (256 * 1024)
77#endif
78
79/*71/*
80 * Note: CHILD_MAX *must* be less than hard_maxproc, which is set at72 * Note: CHILD_MAX *must* be less than hard_maxproc, which is set at
81 * compile time; you *cannot* set it higher than the hard limit!!73 * compile time; you *cannot* set it higher than the hard limit!!
82 */74 */
8375#define ARG_MAX (256 * 1024) /* max bytes for an exec function */
84#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)76#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
85#define CHILD_MAX 266 /* max simultaneous processes */77#define CHILD_MAX 266 /* max simultaneous processes */
86#define GID_MAX 2147483647U /* max value for a gid_t (2^31-2) */78#define GID_MAX 2147483647U /* max value for a gid_t (2^31-2) */
lib/libc/include/x86_64-macos-gnu/sys/uio.h+2-13
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright (c) 2000-2019 Apple Inc. All rights reserved.2 * Copyright (c) 2000-2008 Apple Inc. All rights reserved.
3 *3 *
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 *5 *
...@@ -64,10 +64,8 @@...@@ -64,10 +64,8 @@
64#ifndef _SYS_UIO_H_64#ifndef _SYS_UIO_H_
65#define _SYS_UIO_H_65#define _SYS_UIO_H_
6666
67#include <Availability.h>
68#include <sys/cdefs.h>67#include <sys/cdefs.h>
69#include <sys/_types.h>68#include <sys/_types.h>
70#include <sys/_types/_off_t.h>
7169
72/*70/*
73 * [XSI] The ssize_t and size_t types shall be defined as described71 * [XSI] The ssize_t and size_t types shall be defined as described
...@@ -78,7 +76,7 @@...@@ -78,7 +76,7 @@
7876
79/*77/*
80 * [XSI] Structure whose address is passed as the second parameter to the78 * [XSI] Structure whose address is passed as the second parameter to the
81 * readv(), preadv(), writev() and pwritev() functions.79 * readv() and writev() functions.
82 */80 */
83#include <sys/_types/_iovec_t.h>81#include <sys/_types/_iovec_t.h>
8482
...@@ -97,15 +95,6 @@ enum uio_rw { UIO_READ, UIO_WRITE };...@@ -97,15 +95,6 @@ enum uio_rw { UIO_READ, UIO_WRITE };
97__BEGIN_DECLS95__BEGIN_DECLS
98ssize_t readv(int, const struct iovec *, int) __DARWIN_ALIAS_C(readv);96ssize_t readv(int, const struct iovec *, int) __DARWIN_ALIAS_C(readv);
99ssize_t writev(int, const struct iovec *, int) __DARWIN_ALIAS_C(writev);97ssize_t writev(int, const struct iovec *, int) __DARWIN_ALIAS_C(writev);
100
101#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || defined(_DARWIN_C_SOURCE)
102
103ssize_t preadv(int, const struct iovec *, int, off_t) __DARWIN_NOCANCEL(preadv) __API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0));
104ssize_t pwritev(int, const struct iovec *, int, off_t) __DARWIN_NOCANCEL(pwritev) __API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0));
105
106#endif /* #if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || defined(_DARWIN_C_SOURCE) */
107
108__END_DECLS98__END_DECLS
10999
110
111#endif /* !_SYS_UIO_H_ */100#endif /* !_SYS_UIO_H_ */
lib/libc/include/x86_64-macos-gnu/sys/un.h-1
...@@ -90,7 +90,6 @@ struct sockaddr_un {...@@ -90,7 +90,6 @@ struct sockaddr_un {
90#define LOCAL_PEEREPID 0x003 /* retrieve eff. peer pid */90#define LOCAL_PEEREPID 0x003 /* retrieve eff. peer pid */
91#define LOCAL_PEERUUID 0x004 /* retrieve peer UUID */91#define LOCAL_PEERUUID 0x004 /* retrieve peer UUID */
92#define LOCAL_PEEREUUID 0x005 /* retrieve eff. peer UUID */92#define LOCAL_PEEREUUID 0x005 /* retrieve eff. peer UUID */
93#define LOCAL_PEERTOKEN 0x006 /* retrieve peer audit token */
9493
95#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */94#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
9695
lib/libc/include/x86_64-macos-gnu/xlocale/_inttypes.h-1
...@@ -26,7 +26,6 @@...@@ -26,7 +26,6 @@
2626
27#include <sys/cdefs.h>27#include <sys/cdefs.h>
28#include <stdint.h>28#include <stdint.h>
29#include <stddef.h> /* wchar_t */
30#include <_xlocale.h>29#include <_xlocale.h>
3130
32__BEGIN_DECLS31__BEGIN_DECLS
lib/libc/include/x86_64-macos-gnu/xlocale/_wchar.h-2
...@@ -27,8 +27,6 @@...@@ -27,8 +27,6 @@
27#include <_stdio.h>27#include <_stdio.h>
28#include <_xlocale.h>28#include <_xlocale.h>
29#include <sys/_types/_mbstate_t.h>29#include <sys/_types/_mbstate_t.h>
30#include <sys/_types/_wint_t.h>
31#include <stddef.h> /* wchar_t */
3230
33/* Initially added in Issue 4 */31/* Initially added in Issue 4 */
34__BEGIN_DECLS32__BEGIN_DECLS
lib/libc/include/x86_64-macos-gnu/xpc/availability.h-4
...@@ -6,10 +6,6 @@...@@ -6,10 +6,6 @@
6// Certain parts of the project use all the project's headers but have to build6// Certain parts of the project use all the project's headers but have to build
7// against newer OSX SDKs than ebuild uses -- liblaunch_host being the example.7// against newer OSX SDKs than ebuild uses -- liblaunch_host being the example.
8// So we need to define these.8// So we need to define these.
9#ifndef __MAC_10_16
10#define __MAC_10_16 101600
11#endif // __MAC_10_16
12
13#ifndef __MAC_10_159#ifndef __MAC_10_15
14#define __MAC_10_15 10150010#define __MAC_10_15 101500
15#define __AVAILABILITY_INTERNAL__MAC_10_15 \11#define __AVAILABILITY_INTERNAL__MAC_10_15 \
lib/libc/include/x86_64-macos-gnu/xpc/base.h-2
...@@ -29,8 +29,6 @@ __BEGIN_DECLS...@@ -29,8 +29,6 @@ __BEGIN_DECLS
29#include <Availability.h>29#include <Availability.h>
30#endif // __has_include(<xpc/availability.h>)30#endif // __has_include(<xpc/availability.h>)
3131
32#include <os/availability.h>
33
34#ifndef __XPC_INDIRECT__32#ifndef __XPC_INDIRECT__
35#error "Please #include <xpc/xpc.h> instead of this file directly."33#error "Please #include <xpc/xpc.h> instead of this file directly."
36#endif // __XPC_INDIRECT__ 34#endif // __XPC_INDIRECT__
lib/libc/include/x86_64-macos-gnu/xpc/connection.h+4-5
...@@ -542,11 +542,10 @@ xpc_connection_send_message_with_reply(xpc_connection_t connection,...@@ -542,11 +542,10 @@ xpc_connection_send_message_with_reply(xpc_connection_t connection,
542 * You are responsible for releasing the returned object.542 * You are responsible for releasing the returned object.
543 *543 *
544 * @discussion544 * @discussion
545 * This API supports priority inversion avoidance, and should be used instead of545 * This API is primarily for transitional purposes. Its implementation is
546 * combining xpc_connection_send_message_with_reply() with a semaphore.546 * conceptually equivalent to calling xpc_connection_send_message_with_reply()
547 *547 * and then immediately blocking the calling thread on a semaphore and
548 * Invoking this API from a queue that is a part of the target queue hierarchy548 * signaling the semaphore from the reply block.
549 * results in deadlocks under certain conditions.
550 *549 *
551 * Be judicious about your use of this API. It can block indefinitely, so if you550 * Be judicious about your use of this API. It can block indefinitely, so if you
552 * are using it to implement an API that can be called from the main thread, you551 * are using it to implement an API that can be called from the main thread, you
lib/libc/include/x86_64-macos-gnu/xpc/xpc.h+4-42
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1// Copyright (c) 2009-2020 Apple Inc. All rights reserved. 1// Copyright (c) 2009-2011 Apple Inc. All rights reserved.
22
3#ifndef __XPC_H__3#ifndef __XPC_H__
4#define __XPC_H__4#define __XPC_H__
...@@ -37,7 +37,7 @@ __BEGIN_DECLS...@@ -37,7 +37,7 @@ __BEGIN_DECLS
37#define __OSX_AVAILABLE_STARTING(x, y)37#define __OSX_AVAILABLE_STARTING(x, y)
38#endif // __OSX_AVAILABLE_STARTING38#endif // __OSX_AVAILABLE_STARTING
3939
40#define XPC_API_VERSION 2020061040#define XPC_API_VERSION 20121012
4141
42/*!42/*!
43 * @typedef xpc_type_t43 * @typedef xpc_type_t
...@@ -76,7 +76,8 @@ OS_OBJECT_DECL(xpc_object);...@@ -76,7 +76,8 @@ OS_OBJECT_DECL(xpc_object);
76XPC_INLINE XPC_NONNULL_ALL76XPC_INLINE XPC_NONNULL_ALL
77void77void
78_xpc_object_validate(xpc_object_t object) {78_xpc_object_validate(xpc_object_t object) {
79 (void)*(unsigned long volatile *)(OS_OBJECT_BRIDGE void *)object;79 void *isa = *(void * volatile *)(OS_OBJECT_BRIDGE void *)object;
80 (void)isa;
80}81}
81#else // OS_OBJECT_USE_OBJC82#else // OS_OBJECT_USE_OBJC
82typedef void * xpc_object_t;83typedef void * xpc_object_t;
...@@ -1168,23 +1169,6 @@ XPC_EXPORT XPC_MALLOC XPC_RETURNS_RETAINED XPC_WARN_RESULT...@@ -1168,23 +1169,6 @@ XPC_EXPORT XPC_MALLOC XPC_RETURNS_RETAINED XPC_WARN_RESULT
1168xpc_object_t1169xpc_object_t
1169xpc_array_create(const xpc_object_t _Nonnull * _Nullable objects, size_t count);1170xpc_array_create(const xpc_object_t _Nonnull * _Nullable objects, size_t count);
11701171
1171/*!
1172 * @function xpc_array_create_empty
1173 *
1174 * @abstract
1175 * Creates an XPC object representing an array of XPC objects.
1176 *
1177 * @result
1178 * A new array object.
1179 *
1180 * @see
1181 * xpc_array_create
1182 */
1183API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))
1184XPC_EXPORT XPC_MALLOC XPC_RETURNS_RETAINED XPC_WARN_RESULT
1185xpc_object_t
1186xpc_array_create_empty(void);
1187
1188/*!1172/*!
1189 * @function xpc_array_set_value1173 * @function xpc_array_set_value
1190 *1174 *
...@@ -1914,24 +1898,6 @@ xpc_object_t...@@ -1914,24 +1898,6 @@ xpc_object_t
1914xpc_dictionary_create(const char * _Nonnull const * _Nullable keys,1898xpc_dictionary_create(const char * _Nonnull const * _Nullable keys,
1915 const xpc_object_t _Nullable * _Nullable values, size_t count);1899 const xpc_object_t _Nullable * _Nullable values, size_t count);
19161900
1917/*!
1918 * @function xpc_dictionary_create_empty
1919 *
1920 * @abstract
1921 * Creates an XPC object representing a dictionary of XPC objects keyed to
1922 * C-strings.
1923 *
1924 * @result
1925 * The new dictionary object.
1926 *
1927 * @see
1928 * xpc_dictionary_create
1929 */
1930API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))
1931XPC_EXPORT XPC_MALLOC XPC_RETURNS_RETAINED XPC_WARN_RESULT
1932xpc_object_t
1933xpc_dictionary_create_empty(void);
1934
1935/*!1901/*!
1936 * @function xpc_dictionary_create_reply1902 * @function xpc_dictionary_create_reply
1937 * 1903 *
...@@ -2682,10 +2648,6 @@ xpc_transaction_end(void);...@@ -2682,10 +2648,6 @@ xpc_transaction_end(void);
2682 * @discussion2648 * @discussion
2683 * Multiple calls to this function for the same event stream will result in2649 * Multiple calls to this function for the same event stream will result in
2684 * undefined behavior.2650 * undefined behavior.
2685 *
2686 * There is no API to pause delivery of XPC events. If a process that
2687 * has set an XPC event handler exits, events may be dropped due to races
2688 * between the event handler running and the process exiting.
2689 */2651 */
2690#if __BLOCKS__2652#if __BLOCKS__
2691__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0)2653__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0)