@zigc/lib 0.16.0-test.1 → 0.17.0-dev.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (242) hide show
  1. package/LICENSE +19 -0
  2. package/c/math.zig +135 -35
  3. package/c/stropts.zig +17 -0
  4. package/c.zig +1 -0
  5. package/compiler/aro/aro/Attribute/names.zig +604 -589
  6. package/compiler/aro/aro/Attribute.zig +202 -116
  7. package/compiler/aro/aro/Builtins/common.zig +874 -863
  8. package/compiler/aro/aro/Builtins/eval.zig +15 -7
  9. package/compiler/aro/aro/Builtins.zig +0 -1
  10. package/compiler/aro/aro/CodeGen.zig +3 -1
  11. package/compiler/aro/aro/Compilation.zig +120 -97
  12. package/compiler/aro/aro/Diagnostics.zig +21 -17
  13. package/compiler/aro/aro/Driver/GCCDetector.zig +635 -0
  14. package/compiler/aro/aro/Driver.zig +124 -50
  15. package/compiler/aro/aro/LangOpts.zig +12 -2
  16. package/compiler/aro/aro/Parser/Diagnostic.zig +79 -19
  17. package/compiler/aro/aro/Parser.zig +336 -142
  18. package/compiler/aro/aro/Preprocessor/Diagnostic.zig +21 -0
  19. package/compiler/aro/aro/Preprocessor.zig +127 -56
  20. package/compiler/aro/aro/Target.zig +17 -12
  21. package/compiler/aro/aro/Tokenizer.zig +31 -14
  22. package/compiler/aro/aro/Toolchain.zig +4 -7
  23. package/compiler/aro/aro/Tree.zig +178 -148
  24. package/compiler/aro/aro/TypeStore.zig +82 -24
  25. package/compiler/aro/aro/Value.zig +13 -17
  26. package/compiler/aro/aro/features.zig +1 -0
  27. package/compiler/aro/aro/pragmas/once.zig +0 -1
  28. package/compiler/aro/aro/record_layout.zig +3 -3
  29. package/compiler/aro/assembly_backend/x86_64.zig +3 -4
  30. package/compiler/aro/backend/Assembly.zig +1 -2
  31. package/compiler/aro/backend/Interner.zig +2 -2
  32. package/compiler/aro/backend/Ir.zig +100 -92
  33. package/compiler/aro/include/ptrcheck.h +49 -0
  34. package/compiler/aro/main.zig +26 -10
  35. package/compiler/build_runner.zig +1 -0
  36. package/compiler/objdump.zig +93 -0
  37. package/compiler/reduce.zig +5 -1
  38. package/compiler/resinator/compile.zig +2 -2
  39. package/compiler/resinator/main.zig +7 -1
  40. package/compiler/resinator/preprocess.zig +1 -3
  41. package/compiler/std-docs.zig +8 -1
  42. package/compiler/test_runner.zig +193 -61
  43. package/compiler/translate-c/MacroTranslator.zig +80 -11
  44. package/compiler/translate-c/PatternList.zig +1 -9
  45. package/compiler/translate-c/Scope.zig +43 -6
  46. package/compiler/translate-c/Translator.zig +364 -126
  47. package/compiler/translate-c/ast.zig +19 -11
  48. package/compiler/translate-c/main.zig +75 -16
  49. package/compiler_rt/cos.zig +141 -52
  50. package/compiler_rt/limb64.zig +266 -0
  51. package/compiler_rt/long_double.zig +37 -0
  52. package/compiler_rt/mulo.zig +6 -1
  53. package/compiler_rt/rem_pio2l.zig +173 -0
  54. package/compiler_rt/sin.zig +140 -55
  55. package/compiler_rt/sincos.zig +279 -72
  56. package/compiler_rt/tan.zig +118 -47
  57. package/compiler_rt/trig.zig +256 -6
  58. package/compiler_rt.zig +2 -0
  59. package/fuzzer.zig +855 -307
  60. package/libc/musl/src/math/pow.c +343 -0
  61. package/package.json +1 -1
  62. package/std/Build/Fuzz.zig +6 -19
  63. package/std/Build/Module.zig +1 -1
  64. package/std/Build/Step/CheckObject.zig +3 -3
  65. package/std/Build/Step/Compile.zig +18 -0
  66. package/std/Build/Step/ConfigHeader.zig +49 -33
  67. package/std/Build/Step/InstallArtifact.zig +18 -0
  68. package/std/Build/Step/Run.zig +536 -87
  69. package/std/Build/Step/TranslateC.zig +0 -6
  70. package/std/Build/Step.zig +8 -15
  71. package/std/Build/WebServer.zig +29 -17
  72. package/std/Build/abi.zig +47 -11
  73. package/std/Build.zig +17 -14
  74. package/std/Io/Dispatch.zig +2 -0
  75. package/std/Io/File/Reader.zig +3 -1
  76. package/std/Io/File.zig +1 -0
  77. package/std/Io/Kqueue.zig +2 -2
  78. package/std/Io/Threaded.zig +181 -143
  79. package/std/Io/Uring.zig +2 -1
  80. package/std/Io.zig +970 -2
  81. package/std/Target.zig +3 -2
  82. package/std/Thread.zig +8 -3
  83. package/std/array_hash_map.zig +96 -555
  84. package/std/array_list.zig +22 -31
  85. package/std/bit_set.zig +22 -6
  86. package/std/builtin/assembly.zig +68 -0
  87. package/std/c.zig +17 -17
  88. package/std/compress/flate/Compress.zig +3 -3
  89. package/std/crypto/Certificate/Bundle.zig +15 -1
  90. package/std/crypto/codecs/asn1.zig +33 -18
  91. package/std/crypto/codecs/base64_hex_ct.zig +14 -4
  92. package/std/debug/Dwarf.zig +29 -9
  93. package/std/debug/Info.zig +4 -0
  94. package/std/debug/MachOFile.zig +46 -8
  95. package/std/debug/Pdb.zig +539 -36
  96. package/std/debug/SelfInfo/Elf.zig +19 -18
  97. package/std/debug/SelfInfo/MachO.zig +18 -7
  98. package/std/debug/SelfInfo/Windows.zig +138 -36
  99. package/std/debug.zig +179 -65
  100. package/std/enums.zig +25 -19
  101. package/std/heap/ArenaAllocator.zig +145 -154
  102. package/std/heap/debug_allocator.zig +7 -7
  103. package/std/http/Client.zig +10 -6
  104. package/std/http.zig +11 -9
  105. package/std/json/Stringify.zig +3 -3
  106. package/std/json/dynamic.zig +4 -4
  107. package/std/math/big/int.zig +16 -17
  108. package/std/mem/Allocator.zig +4 -5
  109. package/std/mem.zig +48 -0
  110. package/std/os/emscripten.zig +2 -18
  111. package/std/os/linux/arc.zig +144 -0
  112. package/std/os/linux.zig +21 -4
  113. package/std/os/windows.zig +2 -2
  114. package/std/pdb.zig +143 -4
  115. package/std/posix.zig +6 -12
  116. package/std/priority_dequeue.zig +13 -12
  117. package/std/priority_queue.zig +5 -4
  118. package/std/process/Child.zig +1 -1
  119. package/std/process/Environ.zig +1 -1
  120. package/std/start.zig +17 -4
  121. package/std/std.zig +19 -6
  122. package/std/testing/FailingAllocator.zig +4 -4
  123. package/std/testing/Smith.zig +37 -2
  124. package/std/zig/Ast/Render.zig +186 -458
  125. package/std/zig/Ast.zig +0 -4
  126. package/std/zig/AstGen.zig +44 -7
  127. package/std/zig/AstSmith.zig +2602 -0
  128. package/std/zig/Client.zig +8 -3
  129. package/std/zig/Parse.zig +83 -74
  130. package/std/zig/Server.zig +26 -0
  131. package/std/zig/Zir.zig +17 -0
  132. package/std/zig/c_translation/helpers.zig +14 -9
  133. package/std/zig/llvm/Builder.zig +107 -48
  134. package/std/zig/system.zig +20 -4
  135. package/std/zig/tokenizer.zig +2 -1
  136. package/std/zig.zig +6 -0
  137. package/compiler/aro/aro/Driver/Filesystem.zig +0 -241
  138. package/libc/mingw/complex/cabs.c +0 -48
  139. package/libc/mingw/complex/cabsf.c +0 -48
  140. package/libc/mingw/complex/cacos.c +0 -50
  141. package/libc/mingw/complex/cacosf.c +0 -50
  142. package/libc/mingw/complex/carg.c +0 -48
  143. package/libc/mingw/complex/cargf.c +0 -48
  144. package/libc/mingw/complex/casin.c +0 -50
  145. package/libc/mingw/complex/casinf.c +0 -50
  146. package/libc/mingw/complex/catan.c +0 -50
  147. package/libc/mingw/complex/catanf.c +0 -50
  148. package/libc/mingw/complex/ccos.c +0 -50
  149. package/libc/mingw/complex/ccosf.c +0 -50
  150. package/libc/mingw/complex/cexp.c +0 -48
  151. package/libc/mingw/complex/cexpf.c +0 -48
  152. package/libc/mingw/complex/cimag.c +0 -48
  153. package/libc/mingw/complex/cimagf.c +0 -48
  154. package/libc/mingw/complex/clog.c +0 -48
  155. package/libc/mingw/complex/clog10.c +0 -49
  156. package/libc/mingw/complex/clog10f.c +0 -49
  157. package/libc/mingw/complex/clogf.c +0 -48
  158. package/libc/mingw/complex/conj.c +0 -48
  159. package/libc/mingw/complex/conjf.c +0 -48
  160. package/libc/mingw/complex/cpow.c +0 -48
  161. package/libc/mingw/complex/cpowf.c +0 -48
  162. package/libc/mingw/complex/cproj.c +0 -48
  163. package/libc/mingw/complex/cprojf.c +0 -48
  164. package/libc/mingw/complex/creal.c +0 -48
  165. package/libc/mingw/complex/crealf.c +0 -48
  166. package/libc/mingw/complex/csin.c +0 -50
  167. package/libc/mingw/complex/csinf.c +0 -50
  168. package/libc/mingw/complex/csqrt.c +0 -48
  169. package/libc/mingw/complex/csqrtf.c +0 -48
  170. package/libc/mingw/complex/ctan.c +0 -50
  171. package/libc/mingw/complex/ctanf.c +0 -50
  172. package/libc/mingw/math/arm/s_rint.c +0 -86
  173. package/libc/mingw/math/arm/s_rintf.c +0 -51
  174. package/libc/mingw/math/arm/sincos.S +0 -30
  175. package/libc/mingw/math/arm-common/sincosl.c +0 -13
  176. package/libc/mingw/math/arm64/rint.c +0 -12
  177. package/libc/mingw/math/arm64/rintf.c +0 -12
  178. package/libc/mingw/math/arm64/sincos.S +0 -32
  179. package/libc/mingw/math/bsd_private_base.h +0 -148
  180. package/libc/mingw/math/frexpf.c +0 -13
  181. package/libc/mingw/math/frexpl.c +0 -71
  182. package/libc/mingw/math/x86/acosf.c +0 -29
  183. package/libc/mingw/math/x86/atanf.c +0 -23
  184. package/libc/mingw/math/x86/atanl.c +0 -18
  185. package/libc/mingw/math/x86/cos.def.h +0 -65
  186. package/libc/mingw/math/x86/cosl.c +0 -46
  187. package/libc/mingw/math/x86/cosl_internal.S +0 -55
  188. package/libc/mingw/math/x86/ldexp.c +0 -23
  189. package/libc/mingw/math/x86/scalbn.S +0 -41
  190. package/libc/mingw/math/x86/scalbnf.S +0 -40
  191. package/libc/mingw/math/x86/sin.def.h +0 -65
  192. package/libc/mingw/math/x86/sinl.c +0 -46
  193. package/libc/mingw/math/x86/sinl_internal.S +0 -58
  194. package/libc/mingw/math/x86/tanl.S +0 -62
  195. package/libc/mingw/misc/btowc.c +0 -28
  196. package/libc/mingw/misc/wcstof.c +0 -66
  197. package/libc/mingw/misc/wcstoimax.c +0 -132
  198. package/libc/mingw/misc/wcstoumax.c +0 -126
  199. package/libc/mingw/misc/wctob.c +0 -29
  200. package/libc/mingw/misc/winbs_uint64.c +0 -6
  201. package/libc/mingw/misc/winbs_ulong.c +0 -6
  202. package/libc/mingw/misc/winbs_ushort.c +0 -6
  203. package/libc/mingw/stdio/_Exit.c +0 -10
  204. package/libc/mingw/stdio/_findfirst64i32.c +0 -21
  205. package/libc/mingw/stdio/_findnext64i32.c +0 -21
  206. package/libc/mingw/stdio/_fstat64i32.c +0 -37
  207. package/libc/mingw/stdio/_stat64i32.c +0 -37
  208. package/libc/mingw/stdio/_wfindfirst64i32.c +0 -21
  209. package/libc/mingw/stdio/_wfindnext64i32.c +0 -21
  210. package/libc/mingw/stdio/_wstat64i32.c +0 -37
  211. package/libc/musl/src/legacy/isastream.c +0 -7
  212. package/libc/musl/src/legacy/valloc.c +0 -8
  213. package/libc/musl/src/math/__cosl.c +0 -96
  214. package/libc/musl/src/math/__sinl.c +0 -78
  215. package/libc/musl/src/math/__tanl.c +0 -143
  216. package/libc/musl/src/math/aarch64/lrint.c +0 -10
  217. package/libc/musl/src/math/aarch64/lrintf.c +0 -10
  218. package/libc/musl/src/math/aarch64/rintf.c +0 -7
  219. package/libc/musl/src/math/cosl.c +0 -39
  220. package/libc/musl/src/math/fdim.c +0 -10
  221. package/libc/musl/src/math/finite.c +0 -7
  222. package/libc/musl/src/math/finitef.c +0 -7
  223. package/libc/musl/src/math/frexp.c +0 -23
  224. package/libc/musl/src/math/frexpf.c +0 -23
  225. package/libc/musl/src/math/frexpl.c +0 -29
  226. package/libc/musl/src/math/i386/lrint.c +0 -8
  227. package/libc/musl/src/math/i386/lrintf.c +0 -8
  228. package/libc/musl/src/math/i386/rintf.c +0 -7
  229. package/libc/musl/src/math/lrint.c +0 -72
  230. package/libc/musl/src/math/lrintf.c +0 -8
  231. package/libc/musl/src/math/powerpc64/lrint.c +0 -16
  232. package/libc/musl/src/math/powerpc64/lrintf.c +0 -16
  233. package/libc/musl/src/math/rintf.c +0 -30
  234. package/libc/musl/src/math/s390x/rintf.c +0 -15
  235. package/libc/musl/src/math/sincosl.c +0 -60
  236. package/libc/musl/src/math/sinl.c +0 -41
  237. package/libc/musl/src/math/tanl.c +0 -29
  238. package/libc/musl/src/math/x32/lrint.s +0 -5
  239. package/libc/musl/src/math/x32/lrintf.s +0 -5
  240. package/libc/musl/src/math/x86_64/lrint.c +0 -8
  241. package/libc/musl/src/math/x86_64/lrintf.c +0 -8
  242. package/libc/wasi/libc-bottom-half/sources/reallocarray.c +0 -14
@@ -1,148 +0,0 @@
1
- /*
2
- * ====================================================
3
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
4
- *
5
- * Developed at SunPro, a Sun Microsystems, Inc. business.
6
- * Permission to use, copy, modify, and distribute this
7
- * software is freely granted, provided that this notice
8
- * is preserved.
9
- * ====================================================
10
- */
11
-
12
- #include <inttypes.h>
13
- #include <float.h>
14
-
15
- typedef unsigned int u_int32_t;
16
-
17
- typedef union
18
- {
19
- double value;
20
- struct
21
- {
22
- u_int32_t lsw;
23
- u_int32_t msw;
24
- } parts;
25
- } ieee_double_shape_type;
26
-
27
- typedef union {
28
- float value;
29
- u_int32_t word;
30
- } ieee_float_shape_type;
31
-
32
- /* Get two 32 bit ints from a double. */
33
-
34
- #define EXTRACT_WORDS(ix0,ix1,d) \
35
- do { \
36
- ieee_double_shape_type ew_u; \
37
- ew_u.value = (d); \
38
- (ix0) = ew_u.parts.msw; \
39
- (ix1) = ew_u.parts.lsw; \
40
- } while (0)
41
-
42
- /* Get the most significant 32 bit int from a double. */
43
-
44
- #define GET_HIGH_WORD(i,d) \
45
- do { \
46
- ieee_double_shape_type gh_u; \
47
- gh_u.value = (d); \
48
- (i) = gh_u.parts.msw; \
49
- } while (0)
50
-
51
- /* Get the less significant 32 bit int from a double. */
52
-
53
- #define GET_LOW_WORD(i,d) \
54
- do { \
55
- ieee_double_shape_type gl_u; \
56
- gl_u.value = (d); \
57
- (i) = gl_u.parts.lsw; \
58
- } while (0)
59
-
60
- /* Set a double from two 32 bit ints. */
61
-
62
- #define INSERT_WORDS(d,ix0,ix1) \
63
- do { \
64
- ieee_double_shape_type iw_u; \
65
- iw_u.parts.msw = (ix0); \
66
- iw_u.parts.lsw = (ix1); \
67
- (d) = iw_u.value; \
68
- } while (0)
69
-
70
- /* Set the more significant 32 bits of a double from an int. */
71
-
72
- #define SET_HIGH_WORD(d,v) \
73
- do { \
74
- ieee_double_shape_type sh_u; \
75
- sh_u.value = (d); \
76
- sh_u.parts.msw = (v); \
77
- (d) = sh_u.value; \
78
- } while (0)
79
-
80
- /* Set the less significant 32 bits of a double from an int. */
81
-
82
- #define SET_LOW_WORD(d,v) \
83
- do { \
84
- ieee_double_shape_type sl_u; \
85
- sl_u.value = (d); \
86
- sl_u.parts.lsw = (v); \
87
- (d) = sl_u.value; \
88
- } while (0)
89
-
90
- #define GET_FLOAT_WORD(i,d) do \
91
- { \
92
- ieee_float_shape_type gf_u; \
93
- gf_u.value = (d); \
94
- (i) = gf_u.word; \
95
- } while(0)
96
-
97
- #define SET_FLOAT_WORD(d,i) do \
98
- { \
99
- ieee_float_shape_type gf_u; \
100
- gf_u.word = (i); \
101
- (d) = gf_u.value; \
102
- } while(0)
103
-
104
-
105
- #ifdef FLT_EVAL_METHOD
106
- /*
107
- * Attempt to get strict C99 semantics for assignment with non-C99 compilers.
108
- */
109
- #if FLT_EVAL_METHOD == 0 || __GNUC__ == 0
110
- #define STRICT_ASSIGN(type, lval, rval) ((lval) = (rval))
111
- #else
112
- #define STRICT_ASSIGN(type, lval, rval) do { \
113
- volatile type __lval; \
114
- \
115
- if (sizeof(type) >= sizeof(long double)) \
116
- (lval) = (rval); \
117
- else { \
118
- __lval = (rval); \
119
- (lval) = __lval; \
120
- } \
121
- } while (0)
122
- #endif
123
- #endif /* FLT_EVAL_METHOD */
124
-
125
- /*
126
- * Mix 0, 1 or 2 NaNs. First add 0 to each arg. This normally just turns
127
- * signaling NaNs into quiet NaNs by setting a quiet bit. We do this
128
- * because we want to never return a signaling NaN, and also because we
129
- * don't want the quiet bit to affect the result. Then mix the converted
130
- * args using the specified operation.
131
- *
132
- * When one arg is NaN, the result is typically that arg quieted. When both
133
- * args are NaNs, the result is typically the quietening of the arg whose
134
- * mantissa is largest after quietening. When neither arg is NaN, the
135
- * result may be NaN because it is indeterminate, or finite for subsequent
136
- * construction of a NaN as the indeterminate 0.0L/0.0L.
137
- *
138
- * Technical complications: the result in bits after rounding to the final
139
- * precision might depend on the runtime precision and/or on compiler
140
- * optimizations, especially when different register sets are used for
141
- * different precisions. Try to make the result not depend on at least the
142
- * runtime precision by always doing the main mixing step in long double
143
- * precision. Try to reduce dependencies on optimizations by adding the
144
- * the 0's in different precisions (unless everything is in long double
145
- * precision).
146
- */
147
- #define nan_mix(x, y) (nan_mix_op((x), (y), +))
148
- #define nan_mix_op(x, y, op) (((x) + 0.0L) op ((y) + 0))
@@ -1,13 +0,0 @@
1
- /**
2
- * This file has no copyright assigned and is placed in the Public Domain.
3
- * This file is part of the mingw-w64 runtime package.
4
- * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5
- */
6
- extern double __cdecl frexp(double _X,int *_Y);
7
-
8
- float frexpf (float, int *);
9
- float frexpf (float x, int *expn)
10
- {
11
- return (float)frexp(x, expn);
12
- }
13
-
@@ -1,71 +0,0 @@
1
- /**
2
- * This file has no copyright assigned and is placed in the Public Domain.
3
- * This file is part of the mingw-w64 runtime package.
4
- * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5
- */
6
- long double frexpl(long double value, int* exp);
7
-
8
- #if __SIZEOF_LONG_DOUBLE__ == __SIZEOF_DOUBLE__
9
-
10
- double frexp(double value, int* exp);
11
-
12
- /* On ARM `long double` is 64 bits. */
13
- long double frexpl(long double value, int* exp)
14
- {
15
- return frexp(value, exp);
16
- }
17
-
18
- #elif defined(_AMD64_) || defined(__x86_64__) || defined(_X86_) || defined(__i386__)
19
-
20
- #include <stdint.h>
21
-
22
- /* https://en.wikipedia.org/wiki/Extended_precision#x86_extended_precision_format */
23
- typedef union x87reg_ {
24
- struct __attribute__((__packed__)) {
25
- uint64_t f64;
26
- uint16_t exp : 15;
27
- uint16_t sgn : 1;
28
- };
29
- long double f;
30
- } x87reg;
31
-
32
- long double frexpl(long double value, int* exp)
33
- {
34
- int n;
35
- x87reg reg;
36
- reg.f = value;
37
- if(reg.exp == 0x7FFF) {
38
- /* The value is an infinity or NaN.
39
- * Store zero in `*exp`. Return the value as is. */
40
- *exp = 0;
41
- return reg.f;
42
- }
43
- if(reg.exp != 0) {
44
- /* The value is normalized.
45
- * Extract and zero out the exponent. */
46
- *exp = reg.exp - 0x3FFE;
47
- reg.exp = 0x3FFE;
48
- return reg.f;
49
- }
50
- if(reg.f64 == 0) {
51
- /* The value is zero.
52
- * Store zero in `*exp`. Return the value as is.
53
- * Note the signness. */
54
- *exp = 0;
55
- return reg.f;
56
- }
57
- /* The value is denormalized.
58
- * Extract the exponent, normalize the value, then zero out
59
- * the exponent. Note that x87 uses an explicit leading bit. */
60
- n = __builtin_clzll(reg.f64);
61
- reg.f64 <<= n;
62
- *exp = 1 - 0x3FFE - n;
63
- reg.exp = 0x3FFE;
64
- return reg.f;
65
- }
66
-
67
- #else
68
-
69
- #error Please add `frexpl()` implementation for this platform.
70
-
71
- #endif
@@ -1,29 +0,0 @@
1
- /**
2
- * This file has no copyright assigned and is placed in the Public Domain.
3
- * This file is part of the mingw-w64 runtime package.
4
- * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5
- */
6
- /*
7
- * Written by J.T. Conklin <jtc@netbsd.org>.
8
- * Public domain.
9
- */
10
-
11
- #include <math.h>
12
-
13
- float
14
- acosf (float x)
15
- {
16
- float res = 0.0F;
17
-
18
- /* acosl = atanl (sqrtl(1 - x^2) / x) */
19
- asm volatile (
20
- "fld %%st\n\t"
21
- "fmul %%st(0)\n\t" /* x^2 */
22
- "fld1\n\t"
23
- "fsubp\n\t" /* 1 - x^2 */
24
- "fsqrt\n\t" /* sqrtl (1 - x^2) */
25
- "fxch %%st(1)\n\t"
26
- "fpatan"
27
- : "=t" (res) : "0" (x) : "st(1)");
28
- return res;
29
- }
@@ -1,23 +0,0 @@
1
- /**
2
- * This file has no copyright assigned and is placed in the Public Domain.
3
- * This file is part of the mingw-w64 runtime package.
4
- * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5
- */
6
- /*
7
- * Written by J.T. Conklin <jtc@netbsd.org>.
8
- * Public domain.
9
- *
10
- */
11
-
12
- #include <math.h>
13
-
14
- float
15
- atanf (float x)
16
- {
17
- float res = 0.0F;
18
-
19
- asm volatile (
20
- "fld1\n\t"
21
- "fpatan" : "=t" (res) : "0" (x));
22
- return res;
23
- }
@@ -1,18 +0,0 @@
1
- /**
2
- * This file has no copyright assigned and is placed in the Public Domain.
3
- * This file is part of the mingw-w64 runtime package.
4
- * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5
- */
6
- long double atanl (long double x);
7
-
8
- long double
9
- atanl (long double x)
10
- {
11
- long double res = 0.0L;
12
-
13
- asm volatile (
14
- "fld1\n\t"
15
- "fpatan"
16
- : "=t" (res) : "0" (x));
17
- return res;
18
- }
@@ -1,65 +0,0 @@
1
- /*
2
- This Software is provided under the Zope Public License (ZPL) Version 2.1.
3
-
4
- Copyright (c) 2009, 2010 by the mingw-w64 project
5
-
6
- See the AUTHORS file for the list of contributors to the mingw-w64 project.
7
-
8
- This license has been certified as open source. It has also been designated
9
- as GPL compatible by the Free Software Foundation (FSF).
10
-
11
- Redistribution and use in source and binary forms, with or without
12
- modification, are permitted provided that the following conditions are met:
13
-
14
- 1. Redistributions in source code must retain the accompanying copyright
15
- notice, this list of conditions, and the following disclaimer.
16
- 2. Redistributions in binary form must reproduce the accompanying
17
- copyright notice, this list of conditions, and the following disclaimer
18
- in the documentation and/or other materials provided with the
19
- distribution.
20
- 3. Names of the copyright holders must not be used to endorse or promote
21
- products derived from this software without prior written permission
22
- from the copyright holders.
23
- 4. The right to distribute this software or to use it for any purpose does
24
- not give you the right to use Servicemarks (sm) or Trademarks (tm) of
25
- the copyright holders. Use of them is covered by separate agreement
26
- with the copyright holders.
27
- 5. If any files are modified, you must cause the modified files to carry
28
- prominent notices stating that you changed the files and the date of
29
- any change.
30
-
31
- Disclaimer
32
-
33
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
34
- OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
35
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
36
- EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
37
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
38
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
39
- OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
40
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
41
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
42
- EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
43
- */
44
-
45
- #include "../complex/complex_internal.h"
46
- #include <errno.h>
47
-
48
- extern long double __cosl_internal (long double);
49
-
50
- __FLT_TYPE
51
- __FLT_ABI(cos) (__FLT_TYPE x)
52
- {
53
- int x_class = fpclassify (x);
54
- if (x_class == FP_NAN)
55
- {
56
- __FLT_RPT_DOMAIN ("cos", x, 0.0, x);
57
- return x;
58
- }
59
- else if (x_class == FP_INFINITE)
60
- {
61
- __FLT_RPT_DOMAIN ("cos", x, 0.0, __FLT_NAN);
62
- return __FLT_NAN;
63
- }
64
- return (__FLT_TYPE) __cosl_internal ((long double) x);
65
- }
@@ -1,46 +0,0 @@
1
- /*
2
- This Software is provided under the Zope Public License (ZPL) Version 2.1.
3
-
4
- Copyright (c) 2009, 2010 by the mingw-w64 project
5
-
6
- See the AUTHORS file for the list of contributors to the mingw-w64 project.
7
-
8
- This license has been certified as open source. It has also been designated
9
- as GPL compatible by the Free Software Foundation (FSF).
10
-
11
- Redistribution and use in source and binary forms, with or without
12
- modification, are permitted provided that the following conditions are met:
13
-
14
- 1. Redistributions in source code must retain the accompanying copyright
15
- notice, this list of conditions, and the following disclaimer.
16
- 2. Redistributions in binary form must reproduce the accompanying
17
- copyright notice, this list of conditions, and the following disclaimer
18
- in the documentation and/or other materials provided with the
19
- distribution.
20
- 3. Names of the copyright holders must not be used to endorse or promote
21
- products derived from this software without prior written permission
22
- from the copyright holders.
23
- 4. The right to distribute this software or to use it for any purpose does
24
- not give you the right to use Servicemarks (sm) or Trademarks (tm) of
25
- the copyright holders. Use of them is covered by separate agreement
26
- with the copyright holders.
27
- 5. If any files are modified, you must cause the modified files to carry
28
- prominent notices stating that you changed the files and the date of
29
- any change.
30
-
31
- Disclaimer
32
-
33
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
34
- OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
35
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
36
- EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
37
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
38
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
39
- OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
40
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
41
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
42
- EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
43
- */
44
-
45
- #define _NEW_COMPLEX_LDOUBLE 1
46
- #include "cos.def.h"
@@ -1,55 +0,0 @@
1
- /**
2
- * This file has no copyright assigned and is placed in the Public Domain.
3
- * This file is part of the mingw-w64 runtime package.
4
- * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5
- */
6
- #include <_mingw_mac.h>
7
-
8
- .file "cosl_internal.S"
9
- .text
10
- #ifdef __x86_64__
11
- .align 8
12
- #else
13
- .align 4
14
- #endif
15
- .globl __MINGW_USYMBOL(__cosl_internal)
16
- .def __MINGW_USYMBOL(__cosl_internal); .scl 2; .type 32; .endef
17
- __MINGW_USYMBOL(__cosl_internal):
18
- #ifdef __x86_64__
19
- fldt (%rdx)
20
- fcos
21
- fnstsw %ax
22
- testl $0x400,%eax
23
- jz 1f
24
- fldpi
25
- fadd %st(0)
26
- fxch %st(1)
27
- 2: fprem1
28
- fnstsw %ax
29
- testl $0x400,%eax
30
- jnz 2b
31
- fstp %st(1)
32
- fcos
33
- 1: movq %rcx,%rax
34
- movq $0,8(%rcx)
35
- fstpt (%rcx)
36
- ret
37
- #else
38
- fldt 4(%esp)
39
- fcos
40
- fnstsw %ax
41
- testl $0x400,%eax
42
- jnz 1f
43
- ret
44
- 1: fldpi
45
- fadd %st(0)
46
- fxch %st(1)
47
- 2: fprem1
48
- fnstsw %ax
49
- testl $0x400,%eax
50
- jnz 2b
51
- fstp %st(1)
52
- fcos
53
- ret
54
- #endif
55
-
@@ -1,23 +0,0 @@
1
- /**
2
- * This file has no copyright assigned and is placed in the Public Domain.
3
- * This file is part of the mingw-w64 runtime package.
4
- * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5
- */
6
- #include <math.h>
7
- #include <errno.h>
8
-
9
- double ldexp(double x, int expn)
10
- {
11
- double res = 0.0;
12
- if (!isfinite (x) || x == 0.0)
13
- return x;
14
-
15
- __asm__ __volatile__ ("fscale"
16
- : "=t" (res)
17
- : "0" (x), "u" ((double) expn));
18
-
19
- if (!isfinite (res) || res == 0.0L)
20
- errno = ERANGE;
21
-
22
- return res;
23
- }
@@ -1,41 +0,0 @@
1
- /**
2
- * This file has no copyright assigned and is placed in the Public Domain.
3
- * This file is part of the mingw-w64 runtime package.
4
- * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5
- */
6
- #include <_mingw_mac.h>
7
-
8
- .file "scalbn.S"
9
- .text
10
- #ifdef __x86_64__
11
- .align 8
12
- #else
13
- .align 4
14
- #endif
15
- .globl __MINGW_USYMBOL(scalbn)
16
- .def __MINGW_USYMBOL(scalbn); .scl 2; .type 32; .endef
17
- __MINGW_USYMBOL(scalbn):
18
- #ifdef __x86_64__
19
- subq $24, %rsp
20
- movq %rdx,(%rsp)
21
- fildl (%rsp)
22
- movsd %xmm0,(%rsp)
23
- fldl (%rsp)
24
- fscale
25
- fstp %st(1)
26
- fstpl (%rsp)
27
- movsd (%rsp),%xmm0
28
- addq $24, %rsp
29
- ret
30
-
31
- #else
32
- fildl 12(%esp)
33
- fldl 4(%esp)
34
- fscale
35
- fstp %st(1)
36
- ret
37
- #endif
38
-
39
- .globl __MINGW_USYMBOL(scalbln)
40
- .set __MINGW_USYMBOL(scalbln),__MINGW_USYMBOL(scalbn)
41
-
@@ -1,40 +0,0 @@
1
- /**
2
- * This file has no copyright assigned and is placed in the Public Domain.
3
- * This file is part of the mingw-w64 runtime package.
4
- * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5
- */
6
- #include <_mingw_mac.h>
7
-
8
- .file "scalbnf.S"
9
- .text
10
- #ifdef __x86_64__
11
- .align 8
12
- #else
13
- .align 4
14
- #endif
15
- .globl __MINGW_USYMBOL(scalbnf)
16
- .def __MINGW_USYMBOL(scalbnf); .scl 2; .type 32; .endef
17
- __MINGW_USYMBOL(scalbnf):
18
- #ifdef __x86_64__
19
- subq $24, %rsp
20
- movq %rdx,(%rsp)
21
- fildl (%rsp)
22
- movss %xmm0,(%rsp)
23
- flds (%rsp)
24
- fscale
25
- fstp %st(1)
26
- fstps (%rsp)
27
- movss (%rsp),%xmm0
28
- addq $24, %rsp
29
- ret
30
- #else
31
- fildl 8(%esp)
32
- flds 4(%esp)
33
- fscale
34
- fstp %st(1)
35
- ret
36
- #endif
37
-
38
- .globl __MINGW_USYMBOL(scalblnf)
39
- .set __MINGW_USYMBOL(scalblnf),__MINGW_USYMBOL(scalbnf)
40
-
@@ -1,65 +0,0 @@
1
- /*
2
- This Software is provided under the Zope Public License (ZPL) Version 2.1.
3
-
4
- Copyright (c) 2009, 2010 by the mingw-w64 project
5
-
6
- See the AUTHORS file for the list of contributors to the mingw-w64 project.
7
-
8
- This license has been certified as open source. It has also been designated
9
- as GPL compatible by the Free Software Foundation (FSF).
10
-
11
- Redistribution and use in source and binary forms, with or without
12
- modification, are permitted provided that the following conditions are met:
13
-
14
- 1. Redistributions in source code must retain the accompanying copyright
15
- notice, this list of conditions, and the following disclaimer.
16
- 2. Redistributions in binary form must reproduce the accompanying
17
- copyright notice, this list of conditions, and the following disclaimer
18
- in the documentation and/or other materials provided with the
19
- distribution.
20
- 3. Names of the copyright holders must not be used to endorse or promote
21
- products derived from this software without prior written permission
22
- from the copyright holders.
23
- 4. The right to distribute this software or to use it for any purpose does
24
- not give you the right to use Servicemarks (sm) or Trademarks (tm) of
25
- the copyright holders. Use of them is covered by separate agreement
26
- with the copyright holders.
27
- 5. If any files are modified, you must cause the modified files to carry
28
- prominent notices stating that you changed the files and the date of
29
- any change.
30
-
31
- Disclaimer
32
-
33
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
34
- OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
35
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
36
- EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
37
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
38
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
39
- OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
40
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
41
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
42
- EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
43
- */
44
-
45
- #include "../complex/complex_internal.h"
46
- #include <errno.h>
47
-
48
- extern long double __sinl_internal (long double);
49
-
50
- __FLT_TYPE
51
- __FLT_ABI(sin) (__FLT_TYPE x)
52
- {
53
- int x_class = fpclassify (x);
54
- if (x_class == FP_NAN)
55
- {
56
- __FLT_RPT_DOMAIN ("sin", x, 0.0, x);
57
- return x;
58
- }
59
- else if (x_class == FP_INFINITE)
60
- {
61
- __FLT_RPT_DOMAIN ("sin", x, 0.0, __FLT_NAN);
62
- return __FLT_NAN;
63
- }
64
- return (__FLT_TYPE) __sinl_internal ((long double) x);
65
- }
@@ -1,46 +0,0 @@
1
- /*
2
- This Software is provided under the Zope Public License (ZPL) Version 2.1.
3
-
4
- Copyright (c) 2009, 2010 by the mingw-w64 project
5
-
6
- See the AUTHORS file for the list of contributors to the mingw-w64 project.
7
-
8
- This license has been certified as open source. It has also been designated
9
- as GPL compatible by the Free Software Foundation (FSF).
10
-
11
- Redistribution and use in source and binary forms, with or without
12
- modification, are permitted provided that the following conditions are met:
13
-
14
- 1. Redistributions in source code must retain the accompanying copyright
15
- notice, this list of conditions, and the following disclaimer.
16
- 2. Redistributions in binary form must reproduce the accompanying
17
- copyright notice, this list of conditions, and the following disclaimer
18
- in the documentation and/or other materials provided with the
19
- distribution.
20
- 3. Names of the copyright holders must not be used to endorse or promote
21
- products derived from this software without prior written permission
22
- from the copyright holders.
23
- 4. The right to distribute this software or to use it for any purpose does
24
- not give you the right to use Servicemarks (sm) or Trademarks (tm) of
25
- the copyright holders. Use of them is covered by separate agreement
26
- with the copyright holders.
27
- 5. If any files are modified, you must cause the modified files to carry
28
- prominent notices stating that you changed the files and the date of
29
- any change.
30
-
31
- Disclaimer
32
-
33
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
34
- OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
35
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
36
- EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
37
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
38
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
39
- OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
40
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
41
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
42
- EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
43
- */
44
-
45
- #define _NEW_COMPLEX_LDOUBLE 1
46
- #include "sin.def.h"