diff --git a/build/online.mk b/build/online.mk index da1775bbe..433317dc9 100644 --- a/build/online.mk +++ b/build/online.mk @@ -22,14 +22,14 @@ # - tool/build/runit.c # - tool/build/runitd.c -.PRECIOUS: o/$(MODE)/%.com.ok -o/$(MODE)/%.com.ok: private .PLEDGE = stdio rpath wpath cpath proc fattr inet dns -o/$(MODE)/%.com.ok: private .UNVEIL += r:/etc/resolv.conf -o/$(MODE)/%.com.ok: \ - o/$(MODE)/tool/build/runit.com \ - o/$(MODE)/tool/build/runitd.com \ - o/$(MODE)/%.com +.PRECIOUS: o/$(MODE)/%.ok +o/$(MODE)/%.ok: private .PLEDGE = stdio rpath wpath cpath proc fattr inet dns +o/$(MODE)/%.ok: private .UNVEIL += r:/etc/resolv.conf +o/$(MODE)/%.ok: \ + o/$(MODE)/tool/build/runit \ + o/$(MODE)/tool/build/runitd \ + o/$(MODE)/% @$(COMPILE) -wATEST -tT$@ $^ $(HOSTS) .PHONY: -o/tiny/tool/build/runit.com: +o/tiny/tool/build/runit: diff --git a/libc/nexgen32e/x86feature.h b/libc/nexgen32e/x86feature.h index ebe6e05f8..bf623e65a 100644 --- a/libc/nexgen32e/x86feature.h +++ b/libc/nexgen32e/x86feature.h @@ -154,6 +154,7 @@ #define X86_XTPR 1H, ECX, 14, 0 #define X86_ZERO_FCS_FDS 7H, EBX, 13, 0 #define X86_JIT 80000001H, ECX, 31, 0 /* IsGenuineBlink() */ +#define X86_HYBRID_CPU 7H, EDX, 15, 0 /* Has performance and efficiency cores */ /* clang-format on */ /* AMD specific features */ diff --git a/libc/str/getzipcfilecompressedsize.c b/libc/str/getzipcfilecompressedsize.c index 4f69dfbef..f2c26ba36 100644 --- a/libc/str/getzipcfilecompressedsize.c +++ b/libc/str/getzipcfilecompressedsize.c @@ -29,8 +29,12 @@ int64_t GetZipCfileCompressedSize(const uint8_t *z) { const uint8_t *pe = p + ZIP_CFILE_EXTRASIZE(z); for (; p + ZIP_EXTRA_SIZE(p) <= pe; p += ZIP_EXTRA_SIZE(p)) { if (ZIP_EXTRA_HEADERID(p) == kZipExtraZip64) { - if (8 <= ZIP_EXTRA_CONTENTSIZE(p)) { - return ZIP_READ64(ZIP_EXTRA_CONTENT(p)); + int offset = 0; + if (ZIP_CFILE_UNCOMPRESSEDSIZE(z) == 0xFFFFFFFFu) { + offset += 8; + } + if (offset + 8 <= ZIP_EXTRA_CONTENTSIZE(p)) { + return ZIP_READ64(ZIP_EXTRA_CONTENT(p) + offset); } } } diff --git a/libc/str/getzipcfileuncompressedsize.c b/libc/str/getzipcfileuncompressedsize.c index 998c44aa9..3a38bd29e 100644 --- a/libc/str/getzipcfileuncompressedsize.c +++ b/libc/str/getzipcfileuncompressedsize.c @@ -29,12 +29,8 @@ int64_t GetZipCfileUncompressedSize(const uint8_t *z) { const uint8_t *pe = p + ZIP_CFILE_EXTRASIZE(z); for (; p + ZIP_EXTRA_SIZE(p) <= pe; p += ZIP_EXTRA_SIZE(p)) { if (ZIP_EXTRA_HEADERID(p) == kZipExtraZip64) { - int offset = 0; - if (ZIP_CFILE_COMPRESSEDSIZE(z) == 0xFFFFFFFFu) { - offset += 8; - } - if (offset + 8 <= ZIP_EXTRA_CONTENTSIZE(p)) { - return ZIP_READ64(ZIP_EXTRA_CONTENT(p) + offset); + if (8 <= ZIP_EXTRA_CONTENTSIZE(p)) { + return ZIP_READ64(ZIP_EXTRA_CONTENT(p)); } } } diff --git a/libc/str/getziplfilecompressedsize.c b/libc/str/getziplfilecompressedsize.c index e57d6e292..26403d300 100644 --- a/libc/str/getziplfilecompressedsize.c +++ b/libc/str/getziplfilecompressedsize.c @@ -29,8 +29,12 @@ int64_t GetZipLfileCompressedSize(const uint8_t *z) { const uint8_t *pe = p + ZIP_LFILE_EXTRASIZE(z); for (; p + ZIP_EXTRA_SIZE(p) <= pe; p += ZIP_EXTRA_SIZE(p)) { if (ZIP_EXTRA_HEADERID(p) == kZipExtraZip64) { - if (8 <= ZIP_EXTRA_CONTENTSIZE(p)) { - return ZIP_READ64(ZIP_EXTRA_CONTENT(p)); + int offset = 0; + if (ZIP_LFILE_UNCOMPRESSEDSIZE(z) == 0xFFFFFFFFu) { + offset += 8; + } + if (offset + 8 <= ZIP_EXTRA_CONTENTSIZE(p)) { + return ZIP_READ64(ZIP_EXTRA_CONTENT(p) + offset); } } } diff --git a/libc/str/getziplfileuncompressedsize.c b/libc/str/getziplfileuncompressedsize.c index 0ec5e3fac..86a6b3621 100644 --- a/libc/str/getziplfileuncompressedsize.c +++ b/libc/str/getziplfileuncompressedsize.c @@ -29,12 +29,8 @@ int64_t GetZipLfileUncompressedSize(const uint8_t *z) { const uint8_t *pe = p + ZIP_LFILE_EXTRASIZE(z); for (; p + ZIP_EXTRA_SIZE(p) <= pe; p += ZIP_EXTRA_SIZE(p)) { if (ZIP_EXTRA_HEADERID(p) == kZipExtraZip64) { - int offset = 0; - if (ZIP_LFILE_COMPRESSEDSIZE(z) == 0xFFFFFFFFu) { - offset += 8; - } - if (offset + 8 <= ZIP_EXTRA_CONTENTSIZE(p)) { - return ZIP_READ64(ZIP_EXTRA_CONTENT(p) + offset); + if (8 <= ZIP_EXTRA_CONTENTSIZE(p)) { + return ZIP_READ64(ZIP_EXTRA_CONTENT(p)); } } } diff --git a/tool/emacs/cosmo-cpp-constants.el b/tool/emacs/cosmo-cpp-constants.el index 4d73b8aad..5c27fe5b7 100644 --- a/tool/emacs/cosmo-cpp-constants.el +++ b/tool/emacs/cosmo-cpp-constants.el @@ -60,6 +60,7 @@ "__AVX5124VNNIW__" "__AVX512VBMI__" "__AVX512VNNI__" + "__AVX512VL__" "__AVXVNNI__" "__AVXVNNIINT8__" "__AVXVNNIINT16__" @@ -100,7 +101,31 @@ "__arm__" "__aarch64__" "__AARCH64EB__" + "__ARM_ARCH" "__ARM_NEON" + "__ARM_FEATURE_FMA" + "__ARM_FEATURE_FP16_VECTOR_ARITHMETIC" + "__ARM_FEATURE_DOTPROD" + "__ARM_FEATURE_FRINT" + "__ARM_FEATURE_RNG" + "__ARM_FEATURE_CLZ" + "__ARM_FEATURE_CRC32" + "__ARM_FEATURE_CRYPTO" + "__ARM_FEATURE_ATOMICS" + "__ARM_FEATURE_MATMUL_INT8" + "__ARM_FEATURE_NUMERIC_MAXMIN" + "__ARM_FEATURE_QBIT" + "__ARM_FEATURE_QRDMX" + "__ARM_FEATURE_SHA2" + "__ARM_FEATURE_SHA3" + "__ARM_FEATURE_SHA512" + "__ARM_FEATURE_SM3" + "__ARM_FEATURE_SM4" + "__ARM_FEATURE_FP16_FML" + "__ARM_FP16_ARGS" + "__ARM_FP16_FORMAT_ALTERNATIVE" + "__ARM_FP16_IEEE" + "__ARM_FP_FAST" "__powerpc__" "__powerpc64__" "__POWER9_VECTOR__"