Merge branch 'master' of github.com:solisoft/cosmopolitan into feature/OnErrorHook

This commit is contained in:
BONNAURE Olivier 2024-02-05 20:27:34 +01:00
commit 6a76293c4f
795 changed files with 95733 additions and 1673 deletions

View file

@ -116,7 +116,7 @@ ZIPCOPY = build/bootstrap/zipcopy.com
PECHECK = build/bootstrap/pecheck.com
FIXUPOBJ = build/bootstrap/fixupobj.com
MKDIR = build/bootstrap/mkdir.com -p
COMPILE = build/bootstrap/compile.com -V9 -P4096 $(QUOTA)
COMPILE = build/bootstrap/compile.com -V9 -M2048m -P8192 $(QUOTA)
IGNORE := $(shell $(MKDIR) $(TMPDIR))
@ -286,6 +286,7 @@ include third_party/readline/BUILD.mk # │
include third_party/libunwind/BUILD.mk # |
include third_party/libcxxabi/BUILD.mk # |
include third_party/libcxx/BUILD.mk # │
include third_party/openmp/BUILD.mk # │
include third_party/double-conversion/BUILD.mk # │
include third_party/pcre/BUILD.mk # │
include third_party/less/BUILD.mk # │
@ -441,6 +442,7 @@ COSMOPOLITAN_OBJECTS = \
THIRD_PARTY_GETOPT \
LIBC_LOG \
LIBC_TIME \
THIRD_PARTY_OPENMP \
THIRD_PARTY_MUSL \
THIRD_PARTY_ZLIB_GZ \
THIRD_PARTY_LIBCXXABI \
@ -522,6 +524,8 @@ COSMOCC_PKGS = \
THIRD_PARTY_AARCH64 \
THIRD_PARTY_LIBCXX \
THIRD_PARTY_LIBCXXABI \
THIRD_PARTY_LIBUNWIND \
THIRD_PARTY_OPENMP \
THIRD_PARTY_INTEL
o/$(MODE)/cosmopolitan.a: \

View file

@ -173,8 +173,6 @@ o/$(MODE)/ape/ape-no-modify-self.o: \
libc/runtime/mman.internal.h \
libc/runtime/pc.internal.h \
libc/sysv/consts/prot.h \
ape/blink-linux-aarch64.gz \
ape/blink-xnu-aarch64.gz \
o/$(MODE)/ape/ape.elf
@$(COMPILE) \
-AOBJECTIFY.S \
@ -202,9 +200,7 @@ o/$(MODE)/ape/ape-copy-self.o: \
libc/runtime/e820.internal.h \
libc/runtime/mman.internal.h \
libc/runtime/pc.internal.h \
libc/sysv/consts/prot.h \
ape/blink-linux-aarch64.gz \
ape/blink-xnu-aarch64.gz
libc/sysv/consts/prot.h
@$(COMPILE) \
-AOBJECTIFY.S \
$(OBJECTIFY.S) \
@ -263,10 +259,6 @@ endif
o/$(MODE)/ape/ape.o: ape/ape.S
@$(COMPILE) -AOBJECTIFY.S $(OBJECTIFY.S) $(OUTPUT_OPTION) -c $<
o/$(MODE)/ape/ape.o: \
ape/blink-linux-aarch64.gz \
ape/blink-xnu-aarch64.gz
o/$(MODE)/ape/ape.lds: \
ape/ape.lds \
ape/macros.internal.h \

View file

@ -700,36 +700,9 @@ apesh: .ascii "\n@\n#'\"\n" // sixth edition shebang
#endif /* APE_NO_MODIFY_SELF */
.ascii "exit $?\n"
.ascii "fi\n" // x86_64
// ...
// decentralized section (.apesh)
// ...
.ascii "PHDRS='' <<'@'\n"
.endobj apesh
// elf program headers get inserted here
// because they need to be in the first 4096 bytes
.section .emushprologue,"a",@progbits
emush: .ascii "\n@\n#'\"\n"
.ascii "s=$(uname -s 2>/dev/null) || s=Darwin\n"
// our script is running on a non-x86_64 architecture
// 1. `dd` out the appropriate blink vm blob
// 2. gunzip the blink virtual machine executable
// 3. relaunch this program inside the blink vm
.ascii "o=\"$(command -v \"$0\")\"\n"
.ascii "e=\"${TMPDIR:-${HOME:-.}}/.ape-blink-1.0.0\"\n"
.previous
// ...
// decentralized section (.emush)
// - __static_yoink("blink_linux_aarch64"); // for raspberry pi
// - __static_yoink("blink_xnu_aarch64"); // is apple silicon
// ...
.section .emushepilogue,"a",@progbits
.ascii "echo \"$0: this ape binary lacks $m support\" >&2\n"
.rept 16
.ascii "exit 127\n"
.endr
.ascii "echo error: this ape binary only supports x86_64 >&2\n"
.ascii "exit 1\n"
.previous
.endobj apesh
#ifdef APE_LOADER
.section .ape.loader,"a",@progbits

View file

@ -229,7 +229,6 @@ SECTIONS {
/* Real Mode */
KEEP(*(.head))
KEEP(*(.apesh))
KEEP(*(.text.head))
/* Executable & Linkable Format */
@ -238,10 +237,6 @@ SECTIONS {
KEEP(*(.elf.phdrs))
ape_phdrs_end = .;
KEEP(*(.emushprologue))
KEEP(*(.emush))
KEEP(*(.emushepilogue))
/* OpenBSD */
. = ALIGN(. != 0 ? __SIZEOF_POINTER__ : 0);
ape_note = .;
@ -301,7 +296,6 @@ SECTIONS {
KEEP(*(.textwindowsprologue))
*(.text.windows)
KEEP(*(.textwindowsepilogue))
KEEP(*(.blink))
*(SORT_BY_ALIGNMENT(.text.modernity))
*(SORT_BY_ALIGNMENT(.text.modernity.*))
*(SORT_BY_ALIGNMENT(.text.hot))
@ -613,29 +607,6 @@ SHSTUB2(ape_loader_dd_count,
? ROUNDUP(ape_loader_end - ape_loader, CONSTANT(COMMONPAGESIZE)) / 64
: 0);
#if defined(APE_IS_SHELL_SCRIPT) && !IsTiny()
#define IDENTITY(X) X
#define APE_DECLARE_FIXED_DECIMAL(F, X) \
X##_quad = DEFINED(X) ? ((F(X) < 1000000000 ? 32 : F(X) / 1000000000 % 10 + 48) << 000 | \
(F(X) < 100000000 ? 32 : F(X) / 100000000 % 10 + 48) << 010 | \
(F(X) < 10000000 ? 32 : F(X) / 10000000 % 10 + 48) << 020 | \
(F(X) < 1000000 ? 32 : F(X) / 1000000 % 10 + 48) << 030 | \
(F(X) < 100000 ? 32 : F(X) / 100000 % 10 + 48) << 040 | \
(F(X) < 10000 ? 32 : F(X) / 10000 % 10 + 48) << 050 | \
(F(X) < 1000 ? 32 : F(X) / 1000 % 10 + 48) << 060 | \
(F(X) < 100 ? 32 : F(X) / 100 % 10 + 48) << 070) : 0; \
X##_short = DEFINED(X) ? ((F(X) < 10 ? 32 : F(X) / 10 % 10 + 48) << 000 | \
(F(X) % 10 + 48) << 010) : 0
APE_DECLARE_FIXED_DECIMAL(RVA, blink_linux_aarch64);
APE_DECLARE_FIXED_DECIMAL(IDENTITY, blink_linux_aarch64_size);
APE_DECLARE_FIXED_DECIMAL(RVA, blink_xnu_aarch64);
APE_DECLARE_FIXED_DECIMAL(IDENTITY, blink_xnu_aarch64_size);
#endif /* APE_IS_SHELL_SCRIPT */
#if SupportsMetal()
v_ape_realsectors = MIN(0x70000 - IMAGE_BASE_REAL, ROUNDUP(RVA(_ezip), 512)) / 512;
v_ape_realbytes = v_ape_realsectors * 512;

View file

@ -59,9 +59,7 @@ for x in .ape \
.ape-1.7 \
.ape-1.8 \
.ape-1.9 \
.ape-1.10 \
.ape-blink-0.9.2 \
.ape-blink-1.0.0; do
.ape-1.10; do
rm -f \
~/$x \
/tmp/$x \

Binary file not shown.

Binary file not shown.

View file

@ -40,6 +40,9 @@ o/$(MODE)/%.h: %.c
o/$(MODE)/%.o: %.cc
@$(COMPILE) -AOBJECTIFY.cxx $(OBJECTIFY.cxx) $(OUTPUT_OPTION) $<
o/$(MODE)/%.o: %.cpp
@$(COMPILE) -AOBJECTIFY.cxx $(OBJECTIFY.cxx) $(OUTPUT_OPTION) $<
o/$(MODE)/%.lds: %.lds
@$(COMPILE) -APREPROCESS $(PREPROCESS.lds) $(OUTPUT_OPTION) $<

View file

@ -152,7 +152,6 @@ o/$(MODE)/examples/picol.com.dbg: \
$(APE_NO_MODIFY_SELF)
@$(APELINK)
o/$(MODE)/examples/nesemu1.o: private QUOTA += -M512m
o/$(MODE)/usr/share/dict/words.zip.o: private ZIPOBJ_FLAGS += -C2
$(EXAMPLES_OBJS): examples/BUILD.mk

View file

@ -142,6 +142,9 @@ libc/isystem/nsync_once.h \
libc/isystem/nsync_time.h \
libc/isystem/nsync_waiter.h \
libc/isystem/numeric \
libc/isystem/omp-tools.h \
libc/isystem/omp.h \
libc/isystem/ompx.h \
libc/isystem/optional \
libc/isystem/ostream \
libc/isystem/paths.h \
@ -251,6 +254,7 @@ libc/isystem/uio.h \
libc/isystem/unistd.h \
libc/isystem/unordered_map \
libc/isystem/unordered_set \
libc/isystem/unwind.h \
libc/isystem/utility \
libc/isystem/utime.h \
libc/isystem/utmp.h \
@ -273,6 +277,8 @@ LIBC_INCS = $(filter %.inc,$(LIBC_FILES))
LIBC_CHECKS = $(LIBC_HDRS_H:%=o/$(MODE)/%.ok)
LIBC_FILES := $(wildcard libc/*)
o/$(MODE)/libc/isystem/ompx.h.ok: private CPPFLAGS += -Wno-unknown-pragmas
.PHONY: o/$(MODE)/libc
o/$(MODE)/libc: o/$(MODE)/libc/calls \
o/$(MODE)/libc/crt \

View file

@ -24,11 +24,15 @@
/**
* Returns true if process is running under qemu-x86_64 or qemu-aarch64.
*/
int IsQemu(void) {
// qemu doesn't validate the advice argument
// we could also check if __getcwd(0, 0) raises efault
int e = errno;
int r = !sys_madvise(__executable_start, 16384, 127);
errno = e;
return r;
int IsQemuUser(void) {
static char rplus1;
if (!rplus1) {
// qemu doesn't validate the advice argument
// we could also check if __getcwd(0, 0) raises efault
int e = errno;
int r = !sys_madvise(__executable_start, 16384, 127);
errno = e;
rplus1 = r + 1;
}
return rplus1 - 1;
}

View file

@ -1,7 +1,7 @@
/*-*- mode:unix-assembly; indent-tabs-mode:t; tab-width:8; coding:utf-8 -*-│
vi: set noet ft=asm ts=8 sw=8 fenc=utf-8 :vi
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│
vi: set et ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi
Copyright 2023 Justine Alexandra Roberts Tunney
Copyright 2024 Justine Alexandra Roberts Tunney
Permission to use, copy, modify, and/or distribute this software for
any purpose with or without fee is hereby granted, provided that the
@ -16,43 +16,32 @@
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/macros.internal.h"
#include "libc/calls/calls.h"
#include "libc/calls/struct/cpuset.h"
#include "libc/dce.h"
#include "libc/nexgen32e/rdtscp.h"
#include "libc/nexgen32e/x86feature.h"
#include "libc/nt/struct/processornumber.h"
#include "libc/nt/synchronization.h"
// Blink Virtual Machine for Apple Silicon
//
// If you want to support Apple M1 by embedding an emulator in
// your APE binary that runs automatically, then put this:
//
// __static_yoink("blink_xnu_aarch64");
//
// In your main.c file, to pull it into linkage from the static
// archive. Alternatively, you may simply add blink_xnu_aarch64.o
// as an explicit linker argument.
int sys_getcpu(unsigned *opt_cpu, unsigned *opt_node, void *tcache);
.section .blink,"a",@progbits
.globl blink_xnu_aarch64_size
blink_xnu_aarch64:
.incbin "ape/blink-xnu-aarch64.gz"
.endobj blink_xnu_aarch64,globl
blink_xnu_aarch64_size = . - blink_xnu_aarch64
.section .emush,"a",@progbits
.ascii "if [ \"$s\" = Darwin ] && [ \"$m\" = arm64 ]; then\n"
.ascii "if ! [ -x \"$e\" ]; then\n"
.ascii "echo \"extracting blink-darwin-aarch64 to ${e}\" >&2\n"
.ascii "dd if=\"$o\" bs=1 skip=$(("
.weak blink_xnu_aarch64_quad
.quad blink_xnu_aarch64_quad
.weak blink_xnu_aarch64_short
.short blink_xnu_aarch64_short
.ascii ")) count=$(("
.weak blink_xnu_aarch64_size_quad
.quad blink_xnu_aarch64_size_quad
.weak blink_xnu_aarch64_size_short
.short blink_xnu_aarch64_size_short
.ascii ")) conv=notrunc 2>/dev/null | gunzip >\"$e.$$\"\n"
.ascii "mv -f \"$e.$$\" \"$e\"\n"
.ascii "chmod +x \"$e\"\n"
.ascii "fi\n"
.ascii "exec \"$e\" \"$o\" \"$@\"\n"
.ascii "fi\n"
/**
* Returns ID of CPU on which thread is currently scheduled.
*/
int sched_getcpu(void) {
if (X86_HAVE(RDTSCP)) {
unsigned tsc_aux;
rdtscp(&tsc_aux);
return TSC_AUX_CORE(tsc_aux);
} else if (IsWindows()) {
struct NtProcessorNumber pn;
GetCurrentProcessorNumberEx(&pn);
return 64 * pn.Group + pn.Number;
} else {
unsigned cpu = 0;
int rc = sys_getcpu(&cpu, 0, 0);
if (rc == -1) return -1;
return cpu;
}
}

View file

@ -53,5 +53,7 @@ int CPU_COUNT_S(size_t, const cpu_set_t *) libcesque;
#define CPU_CLR_S(i, size, set) _CPU_S(i, size, set, &= ~)
#define CPU_ISSET_S(i, size, set) _CPU_S(i, size, set, &)
typedef cpu_set_t cpuset_t; /* for freebsd compatibility */
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_CPUSET_H_ */

View file

@ -8,7 +8,7 @@ namespace __cxxabiv1 {
char *__cxa_demangle(const char *, char *, size_t *, int *);
int __cxa_atexit(void (*)(void *), void *, void *) paramsnonnull((1)) dontthrow;
int __cxa_thread_atexit(void *, void *, void *) dontthrow;
int __cxa_thread_atexit(void (*)(void *), void *, void *) dontthrow;
void __cxa_finalize(void *);
#ifdef __cplusplus

View file

@ -121,7 +121,7 @@ COSMOPOLITAN_C_START_
extern const int __hostos;
int IsQemu(void);
int IsQemuUser(void);
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

View file

@ -649,8 +649,9 @@ void abort(void) wontreturn;
#pragma GCC diagnostic ignored "-Wformat-extra-args" /* todo: patch gcc */
#pragma GCC diagnostic ignored "-Wunused-function" /* contradicts dce */
#pragma GCC diagnostic ignored "-Wunused-const-variable" /* sooo ridiculous */
#pragma GCC diagnostic ignored "-Wbuiltin-declaration-mismatch"
#ifndef __cplusplus
#pragma GCC diagnostic ignored "-Wold-style-definition" /* orwellian bulls */
#pragma GCC diagnostic ignored "-Wold-style-definition" /* orwellian bullsh */
#endif
#ifndef __STRICT_ANSI__

View file

@ -103,7 +103,7 @@ void __get_main_stack(void **out_addr, size_t *out_size, int *out_guardsize) {
if (IsWindows()) {
*out_addr = (void *)GetStaticStackAddr(0);
*out_size = GetStaticStackSize();
*out_guardsize = GetGuardSize();
*out_guardsize = getauxval(AT_PAGESZ);
return;
}
int pagesz = getauxval(AT_PAGESZ);

View file

@ -45,7 +45,7 @@ int gettid(void) {
}
}
if (IsXnuSilicon()) {
return enosys();
return enosys(); // can only happen if we can't access thread local storage
} else {
return sys_gettid();
}

View file

@ -112,6 +112,13 @@ struct UbsanOverflowData {
struct UbsanTypeDescriptor *type;
};
struct UbsanDynamicTypeCacheMissData {
struct UbsanSourceLocation location;
struct UbsanTypeDescriptor *type;
void *TypeInfo;
unsigned char TypeCheckKind;
};
struct UbsanFloatCastOverflowData {
#if __GNUC__ + 0 >= 6
struct UbsanSourceLocation location;
@ -145,6 +152,8 @@ upcast of\0\
cast to virtual base of\0\
\0";
uintptr_t __ubsan_vptr_type_cache[128];
static int __ubsan_bits(struct UbsanTypeDescriptor *t) {
return 1 << (t->info >> 1);
}
@ -439,15 +448,22 @@ void __ubsan_handle_divrem_overflow_abort(
__ubsan_handle_divrem_overflow(loc);
}
static bool HandleDynamicTypeCacheMiss(
struct UbsanDynamicTypeCacheMissData *data, uintptr_t ptr, uintptr_t hash) {
return false; // TODO: implement me
}
void __ubsan_handle_dynamic_type_cache_miss(
const struct UbsanSourceLocation *loc) {
__ubsan_abort(loc, "dynamic type cache miss")();
__ubsan_unreachable();
struct UbsanDynamicTypeCacheMissData *data, uintptr_t ptr, uintptr_t hash) {
HandleDynamicTypeCacheMiss(data, ptr, hash);
}
void __ubsan_handle_dynamic_type_cache_miss_abort(
const struct UbsanSourceLocation *loc) {
__ubsan_handle_dynamic_type_cache_miss(loc);
struct UbsanDynamicTypeCacheMissData *data, uintptr_t ptr, uintptr_t hash) {
if (HandleDynamicTypeCacheMiss(data, ptr, hash)) {
__ubsan_abort(&data->location, "dynamic type cache miss")();
__ubsan_unreachable();
}
}
void __ubsan_handle_function_type_mismatch(

3
libc/isystem/omp-tools.h Normal file
View file

@ -0,0 +1,3 @@
#ifndef _OMP_TOOLS_H
#include "third_party/openmp/omp-tools.h"
#endif /* _OMP_TOOLS_H */

3
libc/isystem/omp.h Normal file
View file

@ -0,0 +1,3 @@
#ifndef _OMP_H
#include "third_party/openmp/omp.h"
#endif /* _OMP_H */

3
libc/isystem/ompx.h Normal file
View file

@ -0,0 +1,3 @@
#ifndef _OMPX_H
#include "third_party/openmp/ompx.h"
#endif /* _OMPX_H */

4
libc/isystem/unwind.h Normal file
View file

@ -0,0 +1,4 @@
#ifndef _UNWIND_H
#define _UNWIND_H
#include "third_party/libunwind/include/unwind.h"
#endif /* _UNWIND_H */

View file

@ -1,60 +0,0 @@
/*-*- mode:unix-assembly; indent-tabs-mode:t; tab-width:8; coding:utf-8 -*-│
vi: set noet ft=asm ts=8 sw=8 fenc=utf-8 :vi
Copyright 2023 Justine Alexandra Roberts Tunney
Permission to use, copy, modify, and/or distribute this software for
any purpose with or without fee is hereby granted, provided that the
above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/macros.internal.h"
// Blink Virtual Machine for Linux Arm64
//
// If you want to support Raspberry Pi by embedding an emulator
// in your APE binary that runs automatically, then put this:
//
// __static_yoink("blink_linux_aarch64");
//
// In your main.c file, to pull it into linkage from the static
// archive. Alternatively, you may simply add blink_linux_aarch64.o
// as an explicit linker argument.
.section .blink,"a",@progbits
.globl blink_linux_aarch64_size
blink_linux_aarch64:
.incbin "ape/blink-linux-aarch64.gz"
.endobj blink_linux_aarch64,globl
blink_linux_aarch64_size = . - blink_linux_aarch64
.section .emush,"a",@progbits
.ascii "if [ \"$s\" = Linux ]; then\n"
.ascii "if [ \"$m\" = aarch64 ] || [ \"$m\" = arm64 ]; then\n"
.ascii "if ! [ -x \"$e\" ]; then\n"
.ascii "echo \"extracting blink-linux-aarch64 to ${e}\" >&2\n"
.ascii "dd if=\"$o\" bs=1 skip=$(("
.weak blink_linux_aarch64_quad
.quad blink_linux_aarch64_quad
.weak blink_linux_aarch64_short
.short blink_linux_aarch64_short
.ascii ")) count=$(("
.weak blink_linux_aarch64_size_quad
.quad blink_linux_aarch64_size_quad
.weak blink_linux_aarch64_size_short
.short blink_linux_aarch64_size_short
.ascii ")) conv=notrunc 2>/dev/null | gunzip >\"$e.$$\"\n"
.ascii "mv -f \"$e.$$\" \"$e\"\n"
.ascii "chmod +x \"$e\"\n"
.ascii "fi\n"
.ascii "exec \"$e\" \"$o\" \"$@\"\n"
.ascii "fi\n"
.ascii "fi\n"

View file

@ -31,28 +31,38 @@
// are quite toilsome.
//
// @see www.felixcloutier.com/x86/cpuid
kCpuids:.long 0,0,0,0 # EAX=0 (Basic Processor Info)
.long 0,0,0,0 # EAX=1 (Processor Info)
.long 0,0,0,0 # EAX=2
.long 0,0,0,0 # EAX=7 (Extended Features)
.long 0,0,0,0 # EAX=0x80000001 (NexGen32e)
.long 0,0,0,0 # EAX=0x80000007 (APM)
.long 0,0,0,0 # EAX=16h (CPU Frequency)
kCpuids:.long 0,0,0,0 // EAX=0 (Basic Processor Info)
.long 0,0,0,0 // EAX=1 (Processor Info)
.long 0,0,0,0 // EAX=2
.long 0,0,0,0 // EAX=7 (Extended Features)
.long 0,0,0,0 // EAX=0x80000001 (NexGen32e)
.long 0,0,0,0 // EAX=0x80000007 (APM)
.long 0,0,0,0 // EAX=16h (CPU Frequency)
.long 0,0,0,0 // EAX=7 ECX=1 (Extended Feats)
.endobj kCpuids,globl
.previous
.init.start 201,_init_kCpuids
push %rbx
push $0
push $0x16
push $0xffffffff80000007
push $0xffffffff80000001
push $1
push $7
push $0
push $0x16
push $0
push $0xffffffff80000007
push $0
push $0xffffffff80000001
push $0
push $7
push $0
push $2
push $0
push $1
mov %rdi,%r8
xor %eax,%eax
1: xor %ecx,%ecx
xor %ecx,%ecx
1: nop
#ifdef FEATURELESS
// It's been reported that GDB reverse debugging doesn't
// understand VEX encoding. The workaround is to put:
@ -62,6 +72,7 @@ kCpuids:.long 0,0,0,0 # EAX=0 (Basic Processor Info)
// Inside your ~/.cosmo.mk file.
xor %eax,%eax
xor %ebx,%ebx
xor %ecx,%ecx
xor %edx,%edx
#else
cpuid
@ -74,10 +85,11 @@ kCpuids:.long 0,0,0,0 # EAX=0 (Basic Processor Info)
xchg %eax,%edx
stosl
2: pop %rax
test %eax,%eax # EAX = stacklist->pop()
jz 3f # EAX 0 (EOL sentinel)
cmp KCPUIDS(0H,EAX)(%r8),%al # EAX CPUID.0 max leaf
jbe 1b # CPUID too new to probe
test %eax,%eax // EAX = stacklist->pop()
jz 3f // EAX 0 (EOL sentinel)
pop %rcx // HERE WE GO AGAIN CPUID
cmp KCPUIDS(0H,EAX)(%r8),%al // EAX CPUID.0 max leaf
jbe 1b // CPUID too new to probe
add $4*4,%rdi
jmp 2b
3: nop

View file

@ -8,7 +8,8 @@
#define KCPUIDS_80000001H 4
#define KCPUIDS_80000007H 5
#define KCPUIDS_16H 6
#define KCPUIDS_LEN 7
#define KCPUIDS_7H_1H 7
#define KCPUIDS_LEN 8
#define KCPUIDS_6H -1 /* TBD: Thermal and Power Management */
#define KCPUIDS_DH -1 /* TBD: Extended state features */
#define KCPUIDS_80000008H -1 /* TBD: AMD Miscellaneous */

View file

@ -18,8 +18,8 @@ COSMOPOLITAN_C_START_
*/
#define rdtscp(OPT_OUT_IA32_TSC_AUX) \
({ \
uint64_t Rax, Rdx; \
uint32_t Ecx, *EcxOut; \
uint64_t Rax, Rcx, Rdx; \
asm volatile("rdtscp" \
: "=a"(Rax), "=c"(Ecx), "=d"(Rdx) \
: /* no inputs */ \

View file

@ -37,6 +37,18 @@
#define _X86_CC_AVXVNNI 0
#endif
#ifdef __AVXVNNIINT8__
#define _X86_CC_AVXVNNIINT8 1
#else
#define _X86_CC_AVXVNNIINT8 0
#endif
#ifdef __AVXVNNIINT16__
#define _X86_CC_AVXVNNIINT16 1
#else
#define _X86_CC_AVXVNNIINT16 0
#endif
#ifdef __AVX512F__
#define _X86_CC_AVX512F 1
#else

View file

@ -28,7 +28,9 @@
#define X86_ARCH_CAPABILITIES 7H, EDX, 29, 0
#define X86_AVX 1H, ECX, 28, _X86_CC_AVX /* sandybridge c. 2012 */
#define X86_AVX2 7H, EBX, 5, _X86_CC_AVX2 /* haswell c. 2013 */
#define X86_AVXVNNI 7H, EAX, 4, _X86_CC_AVXVNNI
#define X86_AVXVNNI 7H_1H, EAX, 4, _X86_CC_AVXVNNI
#define X86_AVXVNNIINT8 7H_1H, EDX, 4, _X86_CC_AVXVNNIINT8
#define X86_AVXVNNIINT16 7H_1H, EDX, 10, _X86_CC_AVXVNNIINT16
#define X86_AVX512BW 7H, EBX, 30, 0
#define X86_AVX512CD 7H, EBX, 28, 0
#define X86_AVX512DQ 7H, EBX, 17, 0

View file

@ -2,9 +2,9 @@
.imp API-MS-Win-Core-Synch-l1-2-0,__imp_WaitOnAddress,WaitOnAddress
.text.windows
.ftrace1
.ftrace1
WaitOnAddress:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp API-MS-Win-Core-Synch-l1-2-0,__imp_WakeByAddressAll,WakeByAddressAll
.text.windows
.ftrace1
.ftrace1
WakeByAddressAll:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp API-MS-Win-Core-Synch-l1-2-0,__imp_WakeByAddressSingle,WakeByAddressSingle
.text.windows
.ftrace1
.ftrace1
WakeByAddressSingle:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp PowrProf,__imp_SetSuspendState,SetSuspendState
.text.windows
.ftrace1
.ftrace1
SetSuspendState:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_AccessCheck,AccessCheck
.text.windows
.ftrace1
.ftrace1
AccessCheck:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_AdjustTokenPrivileges,AdjustTokenPrivileges
.text.windows
.ftrace1
.ftrace1
AdjustTokenPrivileges:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_CreateProcessAsUserW,CreateProcessAsUserW
.text.windows
.ftrace1
.ftrace1
CreateProcessAsUser:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_DeregisterEventSource,DeregisterEventSource
.text.windows
.ftrace1
.ftrace1
DeregisterEventSource:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_DuplicateToken,DuplicateToken
.text.windows
.ftrace1
.ftrace1
DuplicateToken:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_DuplicateTokenEx,DuplicateTokenEx
.text.windows
.ftrace1
.ftrace1
DuplicateTokenEx:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_GetFileSecurityW,GetFileSecurityW
.text.windows
.ftrace1
.ftrace1
GetFileSecurity:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_GetUserNameW,GetUserNameW
.text.windows
.ftrace1
.ftrace1
GetUserName:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_ImpersonateSelf,ImpersonateSelf
.text.windows
.ftrace1
.ftrace1
ImpersonateSelf:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_InitiateShutdownW,InitiateShutdownW
.text.windows
.ftrace1
.ftrace1
InitiateShutdown:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_LookupPrivilegeValueW,LookupPrivilegeValueW
.text.windows
.ftrace1
.ftrace1
LookupPrivilegeValue:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_MapGenericMask,MapGenericMask
.text.windows
.ftrace1
.ftrace1
MapGenericMask:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_OpenProcessToken,OpenProcessToken
.text.windows
.ftrace1
.ftrace1
OpenProcessToken:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_OpenThreadToken,OpenThreadToken
.text.windows
.ftrace1
.ftrace1
OpenThreadToken:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_RegCloseKey,RegCloseKey
.text.windows
.ftrace1
.ftrace1
RegCloseKey:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_RegConnectRegistryW,RegConnectRegistryW
.text.windows
.ftrace1
.ftrace1
RegConnectRegistry:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_RegCreateKeyExW,RegCreateKeyExW
.text.windows
.ftrace1
.ftrace1
RegCreateKeyEx:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_RegCreateKeyW,RegCreateKeyW
.text.windows
.ftrace1
.ftrace1
RegCreateKey:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_RegDeleteKeyExW,RegDeleteKeyExW
.text.windows
.ftrace1
.ftrace1
RegDeleteKeyEx:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_RegDeleteKeyW,RegDeleteKeyW
.text.windows
.ftrace1
.ftrace1
RegDeleteKey:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_RegDeleteTreeW,RegDeleteTreeW
.text.windows
.ftrace1
.ftrace1
RegDeleteTree:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_RegDeleteValueW,RegDeleteValueW
.text.windows
.ftrace1
.ftrace1
RegDeleteValue:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_RegDisablePredefinedCache,RegDisablePredefinedCache
.text.windows
.ftrace1
.ftrace1
RegDisablePredefinedCache:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_RegDisableReflectionKey,RegDisableReflectionKey
.text.windows
.ftrace1
.ftrace1
RegDisableReflectionKey:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_RegEnableReflectionKey,RegEnableReflectionKey
.text.windows
.ftrace1
.ftrace1
RegEnableReflectionKey:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_RegEnumKeyExW,RegEnumKeyExW
.text.windows
.ftrace1
.ftrace1
RegEnumKeyEx:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_RegEnumKeyW,RegEnumKeyW
.text.windows
.ftrace1
.ftrace1
RegEnumKey:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_RegEnumValueW,RegEnumValueW
.text.windows
.ftrace1
.ftrace1
RegEnumValue:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_RegFlushKey,RegFlushKey
.text.windows
.ftrace1
.ftrace1
RegFlushKey:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_RegGetKeySecurity,RegGetKeySecurity
.text.windows
.ftrace1
.ftrace1
RegGetKeySecurity:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_RegGetValueW,RegGetValueW
.text.windows
.ftrace1
.ftrace1
RegGetValue:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_RegLoadKeyW,RegLoadKeyW
.text.windows
.ftrace1
.ftrace1
RegLoadKey:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_RegNotifyChangeKeyValue,RegNotifyChangeKeyValue
.text.windows
.ftrace1
.ftrace1
RegNotifyChangeKeyValue:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_RegOpenCurrentUser,RegOpenCurrentUser
.text.windows
.ftrace1
.ftrace1
RegOpenCurrentUser:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_RegOpenKeyExW,RegOpenKeyExW
.text.windows
.ftrace1
.ftrace1
RegOpenKeyEx:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_RegOpenUserClassesRoot,RegOpenUserClassesRoot
.text.windows
.ftrace1
.ftrace1
RegOpenUserClassesRoot:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_RegOverridePredefKey,RegOverridePredefKey
.text.windows
.ftrace1
.ftrace1
RegOverridePredefKey:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_RegQueryInfoKeyW,RegQueryInfoKeyW
.text.windows
.ftrace1
.ftrace1
RegQueryInfoKey:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_RegQueryMultipleValuesW,RegQueryMultipleValuesW
.text.windows
.ftrace1
.ftrace1
RegQueryMultipleValues:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_RegQueryReflectionKey,RegQueryReflectionKey
.text.windows
.ftrace1
.ftrace1
RegQueryReflectionKey:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_RegQueryValueExW,RegQueryValueExW
.text.windows
.ftrace1
.ftrace1
RegQueryValueEx:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_RegQueryValueW,RegQueryValueW
.text.windows
.ftrace1
.ftrace1
RegQueryValue:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_RegReplaceKeyW,RegReplaceKeyW
.text.windows
.ftrace1
.ftrace1
RegReplaceKey:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_RegRestoreKeyW,RegRestoreKeyW
.text.windows
.ftrace1
.ftrace1
RegRestoreKey:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_RegSaveKeyW,RegSaveKeyW
.text.windows
.ftrace1
.ftrace1
RegSaveKey:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_RegSetKeySecurity,RegSetKeySecurity
.text.windows
.ftrace1
.ftrace1
RegSetKeySecurity:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_RegSetValueExW,RegSetValueExW
.text.windows
.ftrace1
.ftrace1
RegSetValueEx:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_RegSetValueW,RegSetValueW
.text.windows
.ftrace1
.ftrace1
RegSetValue:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_RegUnLoadKeyW,RegUnLoadKeyW
.text.windows
.ftrace1
.ftrace1
RegUnLoadKey:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_RegisterEventSourceW,RegisterEventSourceW
.text.windows
.ftrace1
.ftrace1
RegisterEventSource:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_ReportEventA,ReportEventA
.text.windows
.ftrace1
.ftrace1
ReportEventA:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_ReportEventW,ReportEventW
.text.windows
.ftrace1
.ftrace1
ReportEvent:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_RevertToSelf,RevertToSelf
.text.windows
.ftrace1
.ftrace1
RevertToSelf:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp advapi32,__imp_SystemFunction036,SystemFunction036
.text.windows
.ftrace1
.ftrace1
RtlGenRandom:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp comdlg32,__imp_ChooseColorW,ChooseColorW
.text.windows
.ftrace1
.ftrace1
ChooseColor:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp comdlg32,__imp_ChooseFontW,ChooseFontW
.text.windows
.ftrace1
.ftrace1
ChooseFont:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp comdlg32,__imp_GetFileTitleW,GetFileTitleW
.text.windows
.ftrace1
.ftrace1
GetFileTitle:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp comdlg32,__imp_GetOpenFileNameW,GetOpenFileNameW
.text.windows
.ftrace1
.ftrace1
GetOpenFileName:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp comdlg32,__imp_GetSaveFileNameW,GetSaveFileNameW
.text.windows
.ftrace1
.ftrace1
GetSaveFileName:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp comdlg32,__imp_PrintDlgW,PrintDlgW
.text.windows
.ftrace1
.ftrace1
PrintDlg:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp comdlg32,__imp_ReplaceTextW,ReplaceTextW
.text.windows
.ftrace1
.ftrace1
ReplaceText:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp gdi32,__imp_BitBlt,BitBlt
.text.windows
.ftrace1
.ftrace1
BitBlt:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp gdi32,__imp_ChoosePixelFormat,ChoosePixelFormat
.text.windows
.ftrace1
.ftrace1
ChoosePixelFormat:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp gdi32,__imp_CreateBitmap,CreateBitmap
.text.windows
.ftrace1
.ftrace1
CreateBitmap:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp gdi32,__imp_CreateCompatibleBitmap,CreateCompatibleBitmap
.text.windows
.ftrace1
.ftrace1
CreateCompatibleBitmap:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp gdi32,__imp_CreateCompatibleDC,CreateCompatibleDC
.text.windows
.ftrace1
.ftrace1
CreateCompatibleDC:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

View file

@ -2,9 +2,9 @@
.imp gdi32,__imp_CreateDIBSection,CreateDIBSection
.text.windows
.ftrace1
.ftrace1
CreateDIBSection:
.ftrace2
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp

Some files were not shown because too many files have changed in this diff Show more