@zigc/lib 0.16.0-test.1 → 0.17.0-dev.131
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.
- package/LICENSE +19 -0
- package/c/fcntl.zig +6 -1
- package/c/inttypes.zig +0 -10
- package/c/math.zig +138 -114
- package/c/pthread.zig +57 -0
- package/c/search.zig +1 -27
- package/c/stdlib/drand48.zig +0 -57
- package/c/stdlib.zig +0 -100
- package/c/string.zig +20 -7
- package/c/strings.zig +0 -38
- package/c/stropts.zig +17 -0
- package/c/unistd.zig +27 -26
- package/c/wchar.zig +10 -0
- package/c.zig +3 -2
- package/compiler/aro/aro/Attribute/names.zig +604 -589
- package/compiler/aro/aro/Attribute.zig +202 -116
- package/compiler/aro/aro/Builtins/common.zig +874 -863
- package/compiler/aro/aro/Builtins/eval.zig +15 -7
- package/compiler/aro/aro/Builtins.zig +0 -1
- package/compiler/aro/aro/CodeGen.zig +8 -7
- package/compiler/aro/aro/Compilation.zig +137 -111
- package/compiler/aro/aro/Diagnostics.zig +21 -17
- package/compiler/aro/aro/Driver/GCCDetector.zig +635 -0
- package/compiler/aro/aro/Driver.zig +138 -63
- package/compiler/aro/aro/LangOpts.zig +12 -2
- package/compiler/aro/aro/Parser/Diagnostic.zig +79 -19
- package/compiler/aro/aro/Parser.zig +352 -153
- package/compiler/aro/aro/Pragma.zig +3 -2
- package/compiler/aro/aro/Preprocessor/Diagnostic.zig +21 -0
- package/compiler/aro/aro/Preprocessor.zig +136 -62
- package/compiler/aro/aro/Target.zig +17 -12
- package/compiler/aro/aro/Tokenizer.zig +31 -14
- package/compiler/aro/aro/Toolchain.zig +4 -7
- package/compiler/aro/aro/Tree.zig +178 -148
- package/compiler/aro/aro/TypeStore.zig +82 -24
- package/compiler/aro/aro/Value.zig +13 -17
- package/compiler/aro/aro/features.zig +1 -0
- package/compiler/aro/aro/pragmas/message.zig +3 -2
- package/compiler/aro/aro/pragmas/once.zig +0 -1
- package/compiler/aro/aro/record_layout.zig +3 -3
- package/compiler/aro/aro/text_literal.zig +3 -2
- package/compiler/aro/assembly_backend/x86_64.zig +7 -8
- package/compiler/aro/backend/Assembly.zig +1 -2
- package/compiler/aro/backend/Interner.zig +2 -2
- package/compiler/aro/backend/Ir.zig +100 -92
- package/compiler/aro/include/ptrcheck.h +49 -0
- package/compiler/aro/main.zig +26 -10
- package/compiler/build_runner.zig +1 -2
- package/compiler/objdump.zig +93 -0
- package/compiler/reduce/Walk.zig +7 -7
- package/compiler/reduce.zig +5 -1
- package/compiler/resinator/compile.zig +2 -2
- package/compiler/resinator/main.zig +7 -1
- package/compiler/resinator/preprocess.zig +1 -3
- package/compiler/std-docs.zig +8 -1
- package/compiler/test_runner.zig +194 -62
- package/compiler/translate-c/MacroTranslator.zig +80 -11
- package/compiler/translate-c/PatternList.zig +1 -9
- package/compiler/translate-c/Scope.zig +43 -6
- package/compiler/translate-c/Translator.zig +369 -127
- package/compiler/translate-c/ast.zig +19 -11
- package/compiler/translate-c/main.zig +76 -17
- package/compiler_rt/cos.zig +140 -53
- package/compiler_rt/divmodei4.zig +40 -17
- package/compiler_rt/exp.zig +1 -6
- package/compiler_rt/exp2.zig +1 -6
- package/compiler_rt/exp_f128.zig +377 -0
- package/compiler_rt/fabs.zig +0 -2
- package/compiler_rt/fma.zig +0 -2
- package/compiler_rt/fmax.zig +0 -2
- package/compiler_rt/fmin.zig +0 -2
- package/compiler_rt/fmod.zig +0 -2
- package/compiler_rt/limb64.zig +1127 -0
- package/compiler_rt/log.zig +0 -2
- package/compiler_rt/log10.zig +0 -2
- package/compiler_rt/log2.zig +0 -2
- package/compiler_rt/long_double.zig +37 -0
- package/compiler_rt/mulXi3.zig +1 -1
- package/compiler_rt/mulo.zig +6 -1
- package/compiler_rt/rem_pio2l.zig +173 -0
- package/compiler_rt/round.zig +0 -2
- package/compiler_rt/sin.zig +139 -56
- package/compiler_rt/sincos.zig +277 -72
- package/compiler_rt/sqrt.zig +0 -2
- package/compiler_rt/ssp.zig +1 -1
- package/compiler_rt/tan.zig +117 -48
- package/compiler_rt/trig.zig +256 -6
- package/compiler_rt/trunc.zig +0 -2
- package/compiler_rt/udivmodei4.zig +28 -0
- package/compiler_rt.zig +2 -0
- package/fuzzer.zig +857 -307
- package/libc/musl/arch/mipsn32/syscall_arch.h +35 -32
- package/libc/musl/src/math/pow.c +343 -0
- package/package.json +1 -1
- package/std/Build/Cache.zig +6 -6
- package/std/Build/Fuzz.zig +6 -19
- package/std/Build/Module.zig +1 -1
- package/std/Build/Step/CheckObject.zig +3 -3
- package/std/Build/Step/Compile.zig +18 -1
- package/std/Build/Step/ConfigHeader.zig +49 -33
- package/std/Build/Step/InstallArtifact.zig +18 -0
- package/std/Build/Step/Run.zig +538 -89
- package/std/Build/Step/TranslateC.zig +0 -6
- package/std/Build/Step.zig +10 -19
- package/std/Build/WebServer.zig +31 -19
- package/std/Build/abi.zig +47 -11
- package/std/Build.zig +17 -17
- package/std/Io/Dir.zig +7 -2
- package/std/Io/Dispatch.zig +5 -13
- package/std/Io/File/Reader.zig +3 -1
- package/std/Io/File/Writer.zig +8 -6
- package/std/Io/File.zig +1 -0
- package/std/Io/Kqueue.zig +2 -2
- package/std/Io/Reader.zig +8 -9
- package/std/Io/Semaphore.zig +112 -17
- package/std/Io/Terminal.zig +1 -1
- package/std/Io/Threaded.zig +352 -180
- package/std/Io/Uring.zig +15 -16
- package/std/Io/Writer.zig +46 -42
- package/std/Io/net.zig +11 -11
- package/std/Io.zig +1052 -20
- package/std/SemanticVersion.zig +1 -1
- package/std/Target/Query.zig +2 -2
- package/std/Target.zig +53 -7
- package/std/Thread.zig +8 -3
- package/std/array_hash_map.zig +105 -573
- package/std/array_list.zig +22 -31
- package/std/bit_set.zig +22 -6
- package/std/builtin/assembly.zig +68 -0
- package/std/builtin.zig +4 -0
- package/std/c/haiku.zig +3 -0
- package/std/c/serenity.zig +1 -6
- package/std/c.zig +106 -24
- package/std/compress/flate/Compress.zig +3 -3
- package/std/compress/flate/Decompress.zig +2 -3
- package/std/compress/zstd/Decompress.zig +2 -4
- package/std/crypto/Certificate/Bundle.zig +15 -1
- package/std/crypto/Certificate.zig +13 -1
- package/std/crypto/ascon.zig +75 -33
- package/std/crypto/codecs/asn1/Oid.zig +12 -1
- package/std/crypto/codecs/asn1.zig +33 -18
- package/std/crypto/codecs/base64_hex_ct.zig +16 -8
- package/std/crypto/ml_kem.zig +2 -9
- package/std/crypto/tls/Client.zig +79 -4
- package/std/crypto/tls.zig +1 -1
- package/std/crypto.zig +1 -0
- package/std/debug/Dwarf.zig +29 -9
- package/std/debug/Info.zig +4 -0
- package/std/debug/MachOFile.zig +46 -8
- package/std/debug/Pdb.zig +540 -37
- package/std/debug/SelfInfo/Elf.zig +19 -18
- package/std/debug/SelfInfo/MachO.zig +18 -7
- package/std/debug/SelfInfo/Windows.zig +138 -36
- package/std/debug.zig +181 -66
- package/std/enums.zig +25 -19
- package/std/fmt.zig +8 -3
- package/std/fs/path.zig +6 -4
- package/std/heap/ArenaAllocator.zig +145 -154
- package/std/heap/BufferFirstAllocator.zig +165 -0
- package/std/heap/debug_allocator.zig +7 -7
- package/std/heap.zig +2 -126
- package/std/http/Client.zig +31 -30
- package/std/http.zig +14 -13
- package/std/json/Scanner.zig +2 -2
- package/std/json/Stringify.zig +3 -3
- package/std/json/dynamic.zig +4 -4
- package/std/math/big/int.zig +16 -17
- package/std/mem/Allocator.zig +4 -5
- package/std/mem.zig +48 -0
- package/std/os/emscripten.zig +2 -18
- package/std/os/linux/IoUring.zig +2 -0
- package/std/os/linux/aarch64.zig +41 -12
- package/std/os/linux/arc.zig +173 -0
- package/std/os/linux/arm.zig +41 -12
- package/std/os/linux/hexagon.zig +33 -11
- package/std/os/linux/loongarch32.zig +41 -13
- package/std/os/linux/loongarch64.zig +41 -12
- package/std/os/linux/m68k.zig +41 -13
- package/std/os/linux/mips.zig +67 -36
- package/std/os/linux/mips64.zig +60 -29
- package/std/os/linux/mipsn32.zig +60 -29
- package/std/os/linux/or1k.zig +41 -12
- package/std/os/linux/powerpc.zig +41 -12
- package/std/os/linux/powerpc64.zig +41 -12
- package/std/os/linux/riscv32.zig +41 -12
- package/std/os/linux/riscv64.zig +41 -12
- package/std/os/linux/s390x.zig +44 -7
- package/std/os/linux/sparc64.zig +83 -52
- package/std/os/linux/thumb.zig +52 -36
- package/std/os/linux/x32.zig +41 -12
- package/std/os/linux/x86.zig +42 -13
- package/std/os/linux/x86_64.zig +41 -12
- package/std/os/linux.zig +419 -438
- package/std/os/uefi/tables/boot_services.zig +9 -8
- package/std/os/windows.zig +2 -2
- package/std/os.zig +41 -0
- package/std/pdb.zig +143 -4
- package/std/posix.zig +6 -12
- package/std/priority_dequeue.zig +13 -12
- package/std/priority_queue.zig +5 -4
- package/std/process/Child.zig +1 -1
- package/std/process/Environ.zig +1 -1
- package/std/process.zig +1 -1
- package/std/sort.zig +3 -3
- package/std/start.zig +17 -4
- package/std/std.zig +19 -6
- package/std/testing/FailingAllocator.zig +4 -4
- package/std/testing/Smith.zig +37 -2
- package/std/zig/Ast/Render.zig +187 -459
- package/std/zig/Ast.zig +0 -4
- package/std/zig/AstGen.zig +86 -103
- package/std/zig/AstRlAnnotate.zig +0 -11
- package/std/zig/AstSmith.zig +2602 -0
- package/std/zig/BuiltinFn.zig +0 -32
- package/std/zig/Client.zig +8 -3
- package/std/zig/LibCInstallation.zig +4 -3
- package/std/zig/Parse.zig +90 -81
- package/std/zig/Server.zig +26 -0
- package/std/zig/WindowsSdk.zig +13 -13
- package/std/zig/Zir.zig +66 -62
- package/std/zig/ZonGen.zig +6 -5
- package/std/zig/c_translation/helpers.zig +14 -9
- package/std/zig/llvm/Builder.zig +119 -60
- package/std/zig/system.zig +20 -4
- package/std/zig/tokenizer.zig +2 -1
- package/std/zig.zig +7 -10
- package/std/zip.zig +5 -5
- package/zig.h +340 -1
- package/compiler/aro/aro/Driver/Filesystem.zig +0 -241
- package/libc/mingw/complex/cabs.c +0 -48
- package/libc/mingw/complex/cabsf.c +0 -48
- package/libc/mingw/complex/cacos.c +0 -50
- package/libc/mingw/complex/cacosf.c +0 -50
- package/libc/mingw/complex/carg.c +0 -48
- package/libc/mingw/complex/cargf.c +0 -48
- package/libc/mingw/complex/casin.c +0 -50
- package/libc/mingw/complex/casinf.c +0 -50
- package/libc/mingw/complex/catan.c +0 -50
- package/libc/mingw/complex/catanf.c +0 -50
- package/libc/mingw/complex/ccos.c +0 -50
- package/libc/mingw/complex/ccosf.c +0 -50
- package/libc/mingw/complex/cexp.c +0 -48
- package/libc/mingw/complex/cexpf.c +0 -48
- package/libc/mingw/complex/cimag.c +0 -48
- package/libc/mingw/complex/cimagf.c +0 -48
- package/libc/mingw/complex/clog.c +0 -48
- package/libc/mingw/complex/clog10.c +0 -49
- package/libc/mingw/complex/clog10f.c +0 -49
- package/libc/mingw/complex/clogf.c +0 -48
- package/libc/mingw/complex/conj.c +0 -48
- package/libc/mingw/complex/conjf.c +0 -48
- package/libc/mingw/complex/cpow.c +0 -48
- package/libc/mingw/complex/cpowf.c +0 -48
- package/libc/mingw/complex/cproj.c +0 -48
- package/libc/mingw/complex/cprojf.c +0 -48
- package/libc/mingw/complex/creal.c +0 -48
- package/libc/mingw/complex/crealf.c +0 -48
- package/libc/mingw/complex/csin.c +0 -50
- package/libc/mingw/complex/csinf.c +0 -50
- package/libc/mingw/complex/csqrt.c +0 -48
- package/libc/mingw/complex/csqrtf.c +0 -48
- package/libc/mingw/complex/ctan.c +0 -50
- package/libc/mingw/complex/ctanf.c +0 -50
- package/libc/mingw/math/arm/s_rint.c +0 -86
- package/libc/mingw/math/arm/s_rintf.c +0 -51
- package/libc/mingw/math/arm/sincos.S +0 -30
- package/libc/mingw/math/arm-common/sincosl.c +0 -13
- package/libc/mingw/math/arm64/rint.c +0 -12
- package/libc/mingw/math/arm64/rintf.c +0 -12
- package/libc/mingw/math/arm64/sincos.S +0 -32
- package/libc/mingw/math/bsd_private_base.h +0 -148
- package/libc/mingw/math/fdiml.c +0 -24
- package/libc/mingw/math/frexpf.c +0 -13
- package/libc/mingw/math/frexpl.c +0 -71
- package/libc/mingw/math/x86/acosf.c +0 -29
- package/libc/mingw/math/x86/atanf.c +0 -23
- package/libc/mingw/math/x86/atanl.c +0 -18
- package/libc/mingw/math/x86/cos.def.h +0 -65
- package/libc/mingw/math/x86/cosl.c +0 -46
- package/libc/mingw/math/x86/cosl_internal.S +0 -55
- package/libc/mingw/math/x86/ldexp.c +0 -23
- package/libc/mingw/math/x86/scalbn.S +0 -41
- package/libc/mingw/math/x86/scalbnf.S +0 -40
- package/libc/mingw/math/x86/sin.def.h +0 -65
- package/libc/mingw/math/x86/sinl.c +0 -46
- package/libc/mingw/math/x86/sinl_internal.S +0 -58
- package/libc/mingw/math/x86/tanl.S +0 -62
- package/libc/mingw/misc/btowc.c +0 -28
- package/libc/mingw/misc/wcstof.c +0 -66
- package/libc/mingw/misc/wcstoimax.c +0 -132
- package/libc/mingw/misc/wcstoumax.c +0 -126
- package/libc/mingw/misc/wctob.c +0 -29
- package/libc/mingw/misc/winbs_uint64.c +0 -6
- package/libc/mingw/misc/winbs_ulong.c +0 -6
- package/libc/mingw/misc/winbs_ushort.c +0 -6
- package/libc/mingw/stdio/_Exit.c +0 -10
- package/libc/mingw/stdio/_findfirst64i32.c +0 -21
- package/libc/mingw/stdio/_findnext64i32.c +0 -21
- package/libc/mingw/stdio/_fstat64i32.c +0 -37
- package/libc/mingw/stdio/_stat64i32.c +0 -37
- package/libc/mingw/stdio/_wfindfirst64i32.c +0 -21
- package/libc/mingw/stdio/_wfindnext64i32.c +0 -21
- package/libc/mingw/stdio/_wstat64i32.c +0 -37
- package/libc/mingw/winpthreads/spinlock.c +0 -82
- package/libc/musl/src/legacy/isastream.c +0 -7
- package/libc/musl/src/legacy/valloc.c +0 -8
- package/libc/musl/src/linux/tee.c +0 -8
- package/libc/musl/src/math/__cosl.c +0 -96
- package/libc/musl/src/math/__sinl.c +0 -78
- package/libc/musl/src/math/__tanl.c +0 -143
- package/libc/musl/src/math/aarch64/lrint.c +0 -10
- package/libc/musl/src/math/aarch64/lrintf.c +0 -10
- package/libc/musl/src/math/aarch64/rintf.c +0 -7
- package/libc/musl/src/math/cosl.c +0 -39
- package/libc/musl/src/math/fdim.c +0 -10
- package/libc/musl/src/math/fdimf.c +0 -10
- package/libc/musl/src/math/fdiml.c +0 -18
- package/libc/musl/src/math/finite.c +0 -7
- package/libc/musl/src/math/finitef.c +0 -7
- package/libc/musl/src/math/frexp.c +0 -23
- package/libc/musl/src/math/frexpf.c +0 -23
- package/libc/musl/src/math/frexpl.c +0 -29
- package/libc/musl/src/math/i386/lrint.c +0 -8
- package/libc/musl/src/math/i386/lrintf.c +0 -8
- package/libc/musl/src/math/i386/rintf.c +0 -7
- package/libc/musl/src/math/lrint.c +0 -72
- package/libc/musl/src/math/lrintf.c +0 -8
- package/libc/musl/src/math/powerpc64/lrint.c +0 -16
- package/libc/musl/src/math/powerpc64/lrintf.c +0 -16
- package/libc/musl/src/math/rintf.c +0 -30
- package/libc/musl/src/math/s390x/rintf.c +0 -15
- package/libc/musl/src/math/sincosl.c +0 -60
- package/libc/musl/src/math/sinl.c +0 -41
- package/libc/musl/src/math/tanl.c +0 -29
- package/libc/musl/src/math/x32/lrint.s +0 -5
- package/libc/musl/src/math/x32/lrintf.s +0 -5
- package/libc/musl/src/math/x86_64/lrint.c +0 -8
- package/libc/musl/src/math/x86_64/lrintf.c +0 -8
- package/libc/musl/src/string/strdup.c +0 -10
- package/libc/musl/src/string/strndup.c +0 -12
- package/libc/musl/src/string/wcsdup.c +0 -10
- package/libc/musl/src/thread/pthread_spin_destroy.c +0 -6
- package/libc/musl/src/thread/pthread_spin_init.c +0 -6
- package/libc/musl/src/thread/pthread_spin_lock.c +0 -8
- package/libc/musl/src/thread/pthread_spin_trylock.c +0 -7
- package/libc/musl/src/thread/pthread_spin_unlock.c +0 -7
- package/libc/musl/src/unistd/dup2.c +0 -20
- package/libc/musl/src/unistd/dup3.c +0 -26
- package/libc/wasi/libc-bottom-half/sources/reallocarray.c +0 -14
- package/libc/wasi/thread-stub/pthread_spin_lock.c +0 -8
- package/libc/wasi/thread-stub/pthread_spin_trylock.c +0 -8
- package/libc/wasi/thread-stub/pthread_spin_unlock.c +0 -7
package/std/SemanticVersion.zig
CHANGED
|
@@ -146,7 +146,7 @@ fn parseNum(text: []const u8) error{ InvalidVersion, Overflow }!usize {
|
|
|
146
146
|
|
|
147
147
|
return std.fmt.parseUnsigned(usize, text, 10) catch |err| switch (err) {
|
|
148
148
|
error.InvalidCharacter => return error.InvalidVersion,
|
|
149
|
-
error.Overflow => return
|
|
149
|
+
error.Overflow => |e| return e,
|
|
150
150
|
};
|
|
151
151
|
}
|
|
152
152
|
|
package/std/Target/Query.zig
CHANGED
|
@@ -253,7 +253,7 @@ pub fn parse(args: ParseOptions) !Query {
|
|
|
253
253
|
} else if (abi.isAndroid()) {
|
|
254
254
|
result.android_api_level = std.fmt.parseUnsigned(u32, abi_ver_text, 10) catch |err| switch (err) {
|
|
255
255
|
error.InvalidCharacter => return error.InvalidVersion,
|
|
256
|
-
error.Overflow => return
|
|
256
|
+
error.Overflow => |e| return e,
|
|
257
257
|
};
|
|
258
258
|
} else {
|
|
259
259
|
return error.InvalidAbiVersion;
|
|
@@ -346,7 +346,7 @@ pub fn parseVersion(ver: []const u8) error{ InvalidVersion, Overflow }!SemanticV
|
|
|
346
346
|
fn parseVersionComponentInner(component: []const u8) error{ InvalidVersion, Overflow }!usize {
|
|
347
347
|
return std.fmt.parseUnsigned(usize, component, 10) catch |err| switch (err) {
|
|
348
348
|
error.InvalidCharacter => return error.InvalidVersion,
|
|
349
|
-
error.Overflow => return
|
|
349
|
+
error.Overflow => |e| return e,
|
|
350
350
|
};
|
|
351
351
|
}
|
|
352
352
|
}).parseVersionComponentInner;
|
package/std/Target.zig
CHANGED
|
@@ -68,6 +68,8 @@ pub const Os = struct {
|
|
|
68
68
|
opengl,
|
|
69
69
|
vulkan,
|
|
70
70
|
|
|
71
|
+
tios,
|
|
72
|
+
|
|
71
73
|
// LLVM tags deliberately omitted:
|
|
72
74
|
// - bridgeos
|
|
73
75
|
// - cheriotrtos
|
|
@@ -207,6 +209,8 @@ pub const Os = struct {
|
|
|
207
209
|
.opencl,
|
|
208
210
|
.opengl,
|
|
209
211
|
.vulkan,
|
|
212
|
+
|
|
213
|
+
.tios,
|
|
210
214
|
=> .semver,
|
|
211
215
|
|
|
212
216
|
.hurd => .hurd,
|
|
@@ -670,6 +674,12 @@ pub const Os = struct {
|
|
|
670
674
|
.max = .{ .major = 4, .minor = 6, .patch = 0 },
|
|
671
675
|
},
|
|
672
676
|
},
|
|
677
|
+
.tios => .{
|
|
678
|
+
.semver = .{
|
|
679
|
+
.min = .{ .major = 5, .minor = 0, .patch = 0 },
|
|
680
|
+
.max = .{ .major = 5, .minor = 8, .patch = 4 },
|
|
681
|
+
},
|
|
682
|
+
},
|
|
673
683
|
.vulkan => .{
|
|
674
684
|
.semver = .{
|
|
675
685
|
.min = .{ .major = 1, .minor = 2, .patch = 0 },
|
|
@@ -758,6 +768,7 @@ pub const wasm = @import("Target/wasm.zig");
|
|
|
758
768
|
pub const x86 = @import("Target/x86.zig");
|
|
759
769
|
pub const xcore = @import("Target/xcore.zig");
|
|
760
770
|
pub const xtensa = @import("Target/xtensa.zig");
|
|
771
|
+
pub const z80 = @import("Target/generic.zig");
|
|
761
772
|
|
|
762
773
|
pub const Abi = enum {
|
|
763
774
|
none,
|
|
@@ -912,6 +923,7 @@ pub const Abi = enum {
|
|
|
912
923
|
.windows => .gnu,
|
|
913
924
|
.uefi => .msvc,
|
|
914
925
|
.@"3ds" => .eabihf,
|
|
926
|
+
.psp => .eabihf,
|
|
915
927
|
.vita => .eabihf,
|
|
916
928
|
.wasi, .emscripten => .musl,
|
|
917
929
|
|
|
@@ -930,7 +942,6 @@ pub const Abi = enum {
|
|
|
930
942
|
.tvos,
|
|
931
943
|
.visionos,
|
|
932
944
|
.watchos,
|
|
933
|
-
.psp,
|
|
934
945
|
.ps3,
|
|
935
946
|
.ps4,
|
|
936
947
|
.ps5,
|
|
@@ -942,6 +953,7 @@ pub const Abi = enum {
|
|
|
942
953
|
.opencl,
|
|
943
954
|
.opengl,
|
|
944
955
|
.vulkan,
|
|
956
|
+
.tios,
|
|
945
957
|
=> .none,
|
|
946
958
|
};
|
|
947
959
|
}
|
|
@@ -1068,6 +1080,7 @@ pub fn toElfMachine(target: *const Target) std.elf.EM {
|
|
|
1068
1080
|
.avr => .AVR,
|
|
1069
1081
|
.bpfeb, .bpfel => .BPF,
|
|
1070
1082
|
.csky => .CSKY,
|
|
1083
|
+
.ez80 => .Z80,
|
|
1071
1084
|
.hexagon => .QDSP6,
|
|
1072
1085
|
.hppa, .hppa64 => .PARISC,
|
|
1073
1086
|
.kalimba => .CSR_KALIMBA,
|
|
@@ -1130,6 +1143,7 @@ pub fn toCoffMachine(target: *const Target) std.coff.IMAGE.FILE.MACHINE {
|
|
|
1130
1143
|
.bpfeb,
|
|
1131
1144
|
.bpfel,
|
|
1132
1145
|
.csky,
|
|
1146
|
+
.ez80,
|
|
1133
1147
|
.hexagon,
|
|
1134
1148
|
.hppa,
|
|
1135
1149
|
.hppa64,
|
|
@@ -1336,6 +1350,7 @@ pub const Cpu = struct {
|
|
|
1336
1350
|
bpfeb,
|
|
1337
1351
|
bpfel,
|
|
1338
1352
|
csky,
|
|
1353
|
+
ez80,
|
|
1339
1354
|
hexagon,
|
|
1340
1355
|
hppa,
|
|
1341
1356
|
hppa64,
|
|
@@ -1437,6 +1452,7 @@ pub const Cpu = struct {
|
|
|
1437
1452
|
x86,
|
|
1438
1453
|
xcore,
|
|
1439
1454
|
xtensa,
|
|
1455
|
+
z80,
|
|
1440
1456
|
};
|
|
1441
1457
|
|
|
1442
1458
|
pub inline fn family(arch: Arch) Family {
|
|
@@ -1449,6 +1465,7 @@ pub const Cpu = struct {
|
|
|
1449
1465
|
.avr => .avr,
|
|
1450
1466
|
.bpfeb, .bpfel => .bpf,
|
|
1451
1467
|
.csky => .csky,
|
|
1468
|
+
.ez80 => .z80,
|
|
1452
1469
|
.hexagon => .hexagon,
|
|
1453
1470
|
.hppa, .hppa64 => .hppa,
|
|
1454
1471
|
.kalimba => .kalimba,
|
|
@@ -1678,6 +1695,7 @@ pub const Cpu = struct {
|
|
|
1678
1695
|
.x86_64,
|
|
1679
1696
|
.xcore,
|
|
1680
1697
|
.xtensa,
|
|
1698
|
+
.ez80,
|
|
1681
1699
|
=> .little,
|
|
1682
1700
|
|
|
1683
1701
|
.aarch64_be,
|
|
@@ -1948,6 +1966,10 @@ pub const Cpu = struct {
|
|
|
1948
1966
|
.spirv_fragment,
|
|
1949
1967
|
.spirv_vertex,
|
|
1950
1968
|
=> &.{ .spirv32, .spirv64 },
|
|
1969
|
+
|
|
1970
|
+
.ez80_cet,
|
|
1971
|
+
.ez80_tiflags,
|
|
1972
|
+
=> &.{.ez80},
|
|
1951
1973
|
};
|
|
1952
1974
|
}
|
|
1953
1975
|
};
|
|
@@ -2035,7 +2057,8 @@ pub const Cpu = struct {
|
|
|
2035
2057
|
.lanai => &lanai.cpu.v11, // clang does not have a generic lanai model.
|
|
2036
2058
|
.loongarch64 => &loongarch.cpu.la64v1_0,
|
|
2037
2059
|
.m68k => &m68k.cpu.M68000,
|
|
2038
|
-
.mips
|
|
2060
|
+
.mips => &mips.cpu.mips32r2,
|
|
2061
|
+
.mipsel => switch (os.tag) {
|
|
2039
2062
|
.psp => &mips.cpu.allegrex,
|
|
2040
2063
|
else => &mips.cpu.mips32r2,
|
|
2041
2064
|
},
|
|
@@ -2235,6 +2258,7 @@ pub fn requiresLibC(target: *const Target) bool {
|
|
|
2235
2258
|
.plan9,
|
|
2236
2259
|
.other,
|
|
2237
2260
|
.@"3ds",
|
|
2261
|
+
.tios,
|
|
2238
2262
|
=> false,
|
|
2239
2263
|
};
|
|
2240
2264
|
}
|
|
@@ -2397,6 +2421,8 @@ pub const DynamicLinker = struct {
|
|
|
2397
2421
|
.ps5,
|
|
2398
2422
|
.psp,
|
|
2399
2423
|
.vita,
|
|
2424
|
+
|
|
2425
|
+
.tios,
|
|
2400
2426
|
=> .none,
|
|
2401
2427
|
};
|
|
2402
2428
|
}
|
|
@@ -2814,6 +2840,8 @@ pub const DynamicLinker = struct {
|
|
|
2814
2840
|
.opencl,
|
|
2815
2841
|
.opengl,
|
|
2816
2842
|
.vulkan,
|
|
2843
|
+
|
|
2844
|
+
.tios,
|
|
2817
2845
|
=> none,
|
|
2818
2846
|
|
|
2819
2847
|
// TODO go over each item in this list and either move it to the above list, or
|
|
@@ -2848,6 +2876,9 @@ pub fn ptrBitWidth_arch_abi(cpu_arch: Cpu.Arch, abi: Abi) u16 {
|
|
|
2848
2876
|
.x86_16,
|
|
2849
2877
|
=> 16,
|
|
2850
2878
|
|
|
2879
|
+
.ez80,
|
|
2880
|
+
=> 24,
|
|
2881
|
+
|
|
2851
2882
|
.arc,
|
|
2852
2883
|
.arceb,
|
|
2853
2884
|
.arm,
|
|
@@ -2916,6 +2947,8 @@ pub fn ptrBitWidth(target: *const Target) u16 {
|
|
|
2916
2947
|
pub fn stackAlignment(target: *const Target) u16 {
|
|
2917
2948
|
// Overrides for when the stack alignment is not equal to the pointer width.
|
|
2918
2949
|
switch (target.cpu.arch) {
|
|
2950
|
+
.ez80,
|
|
2951
|
+
=> return 1,
|
|
2919
2952
|
.m68k,
|
|
2920
2953
|
=> return 2,
|
|
2921
2954
|
.amdgcn,
|
|
@@ -2996,6 +3029,7 @@ pub fn cCharSignedness(target: *const Target) std.builtin.Signedness {
|
|
|
2996
3029
|
.arc,
|
|
2997
3030
|
.arceb,
|
|
2998
3031
|
.csky,
|
|
3032
|
+
.ez80,
|
|
2999
3033
|
.hexagon,
|
|
3000
3034
|
.msp430,
|
|
3001
3035
|
.powerpc,
|
|
@@ -3048,8 +3082,6 @@ pub fn cTypeByteSize(t: *const Target, c_type: CType) u16 {
|
|
|
3048
3082
|
=> @divExact(cTypeBitSize(t, c_type), 8),
|
|
3049
3083
|
|
|
3050
3084
|
.longdouble => switch (cTypeBitSize(t, c_type)) {
|
|
3051
|
-
16 => 2,
|
|
3052
|
-
32 => 4,
|
|
3053
3085
|
64 => 8,
|
|
3054
3086
|
80 => @intCast(std.mem.alignForward(usize, 10, cTypeAlignment(t, .longdouble))),
|
|
3055
3087
|
128 => 16,
|
|
@@ -3363,6 +3395,13 @@ pub fn cTypeBitSize(target: *const Target, c_type: CType) u16 {
|
|
|
3363
3395
|
.long, .ulong => return 64,
|
|
3364
3396
|
.longlong, .ulonglong, .double, .longdouble => return 64,
|
|
3365
3397
|
},
|
|
3398
|
+
.tios => switch (c_type) {
|
|
3399
|
+
.char => return 8,
|
|
3400
|
+
.short, .ushort => return 16,
|
|
3401
|
+
.int, .uint => return 24,
|
|
3402
|
+
.long, .ulong, .float, .double => return 32,
|
|
3403
|
+
.longlong, .ulonglong, .longdouble => return 64,
|
|
3404
|
+
},
|
|
3366
3405
|
|
|
3367
3406
|
.ps3,
|
|
3368
3407
|
.contiki,
|
|
@@ -3375,7 +3414,7 @@ pub fn cTypeBitSize(target: *const Target, c_type: CType) u16 {
|
|
|
3375
3414
|
pub fn cTypeAlignment(target: *const Target, c_type: CType) u16 {
|
|
3376
3415
|
// Overrides for unusual alignments
|
|
3377
3416
|
switch (target.cpu.arch) {
|
|
3378
|
-
.avr => return 1,
|
|
3417
|
+
.avr, .ez80 => return 1,
|
|
3379
3418
|
.x86 => switch (target.os.tag) {
|
|
3380
3419
|
.windows, .uefi => switch (c_type) {
|
|
3381
3420
|
.longlong, .ulonglong, .double => return 8,
|
|
@@ -3405,6 +3444,8 @@ pub fn cTypeAlignment(target: *const Target, c_type: CType) u16 {
|
|
|
3405
3444
|
return @min(
|
|
3406
3445
|
std.math.ceilPowerOfTwoAssert(u16, (cTypeBitSize(target, c_type) + 7) / 8),
|
|
3407
3446
|
@as(u16, switch (target.cpu.arch) {
|
|
3447
|
+
.ez80 => 1,
|
|
3448
|
+
|
|
3408
3449
|
.msp430,
|
|
3409
3450
|
.x86_16,
|
|
3410
3451
|
=> 2,
|
|
@@ -3483,7 +3524,7 @@ pub fn cTypePreferredAlignment(target: *const Target, c_type: CType) u16 {
|
|
|
3483
3524
|
.longdouble => return 4,
|
|
3484
3525
|
else => {},
|
|
3485
3526
|
},
|
|
3486
|
-
.avr => return 1,
|
|
3527
|
+
.avr, .ez80 => return 1,
|
|
3487
3528
|
.x86 => switch (target.os.tag) {
|
|
3488
3529
|
.windows, .uefi => switch (c_type) {
|
|
3489
3530
|
.longdouble => switch (target.abi) {
|
|
@@ -3515,6 +3556,8 @@ pub fn cTypePreferredAlignment(target: *const Target, c_type: CType) u16 {
|
|
|
3515
3556
|
return @min(
|
|
3516
3557
|
std.math.ceilPowerOfTwoAssert(u16, (cTypeBitSize(target, c_type) + 7) / 8),
|
|
3517
3558
|
@as(u16, switch (target.cpu.arch) {
|
|
3559
|
+
.ez80 => 1,
|
|
3560
|
+
|
|
3518
3561
|
.x86_16, .msp430 => 2,
|
|
3519
3562
|
|
|
3520
3563
|
.arc,
|
|
@@ -3586,7 +3629,9 @@ pub fn cTypePreferredAlignment(target: *const Target, c_type: CType) u16 {
|
|
|
3586
3629
|
|
|
3587
3630
|
pub fn cMaxIntAlignment(target: *const Target) u16 {
|
|
3588
3631
|
return switch (target.cpu.arch) {
|
|
3589
|
-
.avr
|
|
3632
|
+
.avr,
|
|
3633
|
+
.ez80,
|
|
3634
|
+
=> 1,
|
|
3590
3635
|
|
|
3591
3636
|
.msp430, .x86_16 => 2,
|
|
3592
3637
|
|
|
@@ -3725,6 +3770,7 @@ pub fn cCallingConvention(target: *const Target) ?std.builtin.CallingConvention
|
|
|
3725
3770
|
.amdgcn => .{ .amdgcn_device = .{} },
|
|
3726
3771
|
.nvptx, .nvptx64 => .nvptx_device,
|
|
3727
3772
|
.spirv32, .spirv64 => .spirv_device,
|
|
3773
|
+
.ez80 => .ez80_cet,
|
|
3728
3774
|
};
|
|
3729
3775
|
}
|
|
3730
3776
|
|
package/std/Thread.zig
CHANGED
|
@@ -442,7 +442,7 @@ fn callFn(comptime f: anytype, args: anytype) switch (Impl) {
|
|
|
442
442
|
@call(.auto, f, args) catch |err| {
|
|
443
443
|
std.debug.print("error: {s}\n", .{@errorName(err)});
|
|
444
444
|
if (@errorReturnTrace()) |trace| {
|
|
445
|
-
std.debug.
|
|
445
|
+
std.debug.dumpErrorReturnTrace(trace);
|
|
446
446
|
}
|
|
447
447
|
};
|
|
448
448
|
|
|
@@ -932,7 +932,7 @@ const WasiThreadImpl = struct {
|
|
|
932
932
|
@call(.auto, f, w.args) catch |err| {
|
|
933
933
|
std.debug.print("error: {s}\n", .{@errorName(err)});
|
|
934
934
|
if (@errorReturnTrace()) |trace| {
|
|
935
|
-
std.debug.
|
|
935
|
+
std.debug.dumpErrorReturnTrace(trace);
|
|
936
936
|
}
|
|
937
937
|
};
|
|
938
938
|
},
|
|
@@ -1147,6 +1147,11 @@ const LinuxThreadImpl = struct {
|
|
|
1147
1147
|
/// Ported over from musl libc's pthread detached implementation:
|
|
1148
1148
|
/// https://github.com/ifduyue/musl/search?q=__unmapself
|
|
1149
1149
|
fn freeAndExit(self: *ThreadCompletion) noreturn {
|
|
1150
|
+
// If we do not reset the child_tidptr to null here, the kernel would later write the
|
|
1151
|
+
// value zero to that address, which is inside the block we're unmapping below, after
|
|
1152
|
+
// our thread exits. This can sometimes corrupt memory in other mmap blocks from
|
|
1153
|
+
// unrelated concurrent threads.
|
|
1154
|
+
_ = linux.set_tid_address(null);
|
|
1150
1155
|
// If a signal were delivered between SYS_munmap and SYS_exit, any installed signal
|
|
1151
1156
|
// handler would immediately segfault due to the stack being unmapped. To avoid this,
|
|
1152
1157
|
// we need to mask all signals before entering the inline asm.
|
|
@@ -1484,7 +1489,7 @@ const LinuxThreadImpl = struct {
|
|
|
1484
1489
|
}
|
|
1485
1490
|
|
|
1486
1491
|
// Prepare the TLS segment and prepare a user_desc struct when needed on x86
|
|
1487
|
-
var tls_ptr = linux.tls.prepareArea(mapped[tls_offset..]);
|
|
1492
|
+
var tls_ptr = linux.tls.prepareArea(mapped[tls_offset..][0..linux.tls.area_desc.size]);
|
|
1488
1493
|
var user_desc: if (target.cpu.arch == .x86) linux.user_desc else void = undefined;
|
|
1489
1494
|
if (target.cpu.arch == .x86) {
|
|
1490
1495
|
defer tls_ptr = @intFromPtr(&user_desc);
|