Give Emacs another performance boost

This commit is contained in:
Justine Tunney 2023-08-18 09:34:14 -07:00
parent 5b42c810a5
commit 9c7b81ee0f
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
30 changed files with 253 additions and 102 deletions

View file

@ -1,19 +1,27 @@
#ifndef COSMOPOLITAN_THIRD_PARTY_ZLIB_CPU_FEATURES_H_
#define COSMOPOLITAN_THIRD_PARTY_ZLIB_CPU_FEATURES_H_
#include "libc/nexgen32e/x86feature.h"
#include "third_party/zlib/zconf.h"
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
#ifdef __x86_64__
#ifdef Z_COSMO_PREFIX_SET
#undef x86_cpu_enable_sse2
#undef x86_cpu_enable_ssse3
#undef x86_cpu_enable_simd
#undef x86_cpu_enable_avx512
#undef cpu_check_features
#endif
#define x86_cpu_enable_sse2 X86_HAVE(SSE2)
#define x86_cpu_enable_ssse3 X86_HAVE(SSSE3)
#define x86_cpu_enable_simd (X86_HAVE(SSE4_2) && X86_HAVE(PCLMUL))
#define x86_cpu_enable_avx512 X86_HAVE(AVX512F)
#define cpu_check_features() (void)0
#define cpu_check_features() ((void)0)
#elif defined(__aarch64__)
#define cpu_check_features zlib_cpu_check_features
extern int arm_cpu_enable_crc32;
extern int arm_cpu_enable_pmull;
void cpu_check_features(void);