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 PECHECK = build/bootstrap/pecheck.com
FIXUPOBJ = build/bootstrap/fixupobj.com FIXUPOBJ = build/bootstrap/fixupobj.com
MKDIR = build/bootstrap/mkdir.com -p 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)) IGNORE := $(shell $(MKDIR) $(TMPDIR))
@ -286,6 +286,7 @@ include third_party/readline/BUILD.mk # │
include third_party/libunwind/BUILD.mk # | include third_party/libunwind/BUILD.mk # |
include third_party/libcxxabi/BUILD.mk # | include third_party/libcxxabi/BUILD.mk # |
include third_party/libcxx/BUILD.mk # │ include third_party/libcxx/BUILD.mk # │
include third_party/openmp/BUILD.mk # │
include third_party/double-conversion/BUILD.mk # │ include third_party/double-conversion/BUILD.mk # │
include third_party/pcre/BUILD.mk # │ include third_party/pcre/BUILD.mk # │
include third_party/less/BUILD.mk # │ include third_party/less/BUILD.mk # │
@ -441,6 +442,7 @@ COSMOPOLITAN_OBJECTS = \
THIRD_PARTY_GETOPT \ THIRD_PARTY_GETOPT \
LIBC_LOG \ LIBC_LOG \
LIBC_TIME \ LIBC_TIME \
THIRD_PARTY_OPENMP \
THIRD_PARTY_MUSL \ THIRD_PARTY_MUSL \
THIRD_PARTY_ZLIB_GZ \ THIRD_PARTY_ZLIB_GZ \
THIRD_PARTY_LIBCXXABI \ THIRD_PARTY_LIBCXXABI \
@ -522,6 +524,8 @@ COSMOCC_PKGS = \
THIRD_PARTY_AARCH64 \ THIRD_PARTY_AARCH64 \
THIRD_PARTY_LIBCXX \ THIRD_PARTY_LIBCXX \
THIRD_PARTY_LIBCXXABI \ THIRD_PARTY_LIBCXXABI \
THIRD_PARTY_LIBUNWIND \
THIRD_PARTY_OPENMP \
THIRD_PARTY_INTEL THIRD_PARTY_INTEL
o/$(MODE)/cosmopolitan.a: \ 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/mman.internal.h \
libc/runtime/pc.internal.h \ libc/runtime/pc.internal.h \
libc/sysv/consts/prot.h \ libc/sysv/consts/prot.h \
ape/blink-linux-aarch64.gz \
ape/blink-xnu-aarch64.gz \
o/$(MODE)/ape/ape.elf o/$(MODE)/ape/ape.elf
@$(COMPILE) \ @$(COMPILE) \
-AOBJECTIFY.S \ -AOBJECTIFY.S \
@ -202,9 +200,7 @@ o/$(MODE)/ape/ape-copy-self.o: \
libc/runtime/e820.internal.h \ libc/runtime/e820.internal.h \
libc/runtime/mman.internal.h \ libc/runtime/mman.internal.h \
libc/runtime/pc.internal.h \ libc/runtime/pc.internal.h \
libc/sysv/consts/prot.h \ libc/sysv/consts/prot.h
ape/blink-linux-aarch64.gz \
ape/blink-xnu-aarch64.gz
@$(COMPILE) \ @$(COMPILE) \
-AOBJECTIFY.S \ -AOBJECTIFY.S \
$(OBJECTIFY.S) \ $(OBJECTIFY.S) \
@ -263,10 +259,6 @@ endif
o/$(MODE)/ape/ape.o: ape/ape.S o/$(MODE)/ape/ape.o: ape/ape.S
@$(COMPILE) -AOBJECTIFY.S $(OBJECTIFY.S) $(OUTPUT_OPTION) -c $< @$(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: \ o/$(MODE)/ape/ape.lds: \
ape/ape.lds \ ape/ape.lds \
ape/macros.internal.h \ ape/macros.internal.h \

View file

@ -700,36 +700,9 @@ apesh: .ascii "\n@\n#'\"\n" // sixth edition shebang
#endif /* APE_NO_MODIFY_SELF */ #endif /* APE_NO_MODIFY_SELF */
.ascii "exit $?\n" .ascii "exit $?\n"
.ascii "fi\n" // x86_64 .ascii "fi\n" // x86_64
// ... .ascii "echo error: this ape binary only supports x86_64 >&2\n"
// 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 "exit 1\n" .ascii "exit 1\n"
.previous .endobj apesh
#ifdef APE_LOADER #ifdef APE_LOADER
.section .ape.loader,"a",@progbits .section .ape.loader,"a",@progbits

View file

@ -229,7 +229,6 @@ SECTIONS {
/* Real Mode */ /* Real Mode */
KEEP(*(.head)) KEEP(*(.head))
KEEP(*(.apesh))
KEEP(*(.text.head)) KEEP(*(.text.head))
/* Executable & Linkable Format */ /* Executable & Linkable Format */
@ -238,10 +237,6 @@ SECTIONS {
KEEP(*(.elf.phdrs)) KEEP(*(.elf.phdrs))
ape_phdrs_end = .; ape_phdrs_end = .;
KEEP(*(.emushprologue))
KEEP(*(.emush))
KEEP(*(.emushepilogue))
/* OpenBSD */ /* OpenBSD */
. = ALIGN(. != 0 ? __SIZEOF_POINTER__ : 0); . = ALIGN(. != 0 ? __SIZEOF_POINTER__ : 0);
ape_note = .; ape_note = .;
@ -301,7 +296,6 @@ SECTIONS {
KEEP(*(.textwindowsprologue)) KEEP(*(.textwindowsprologue))
*(.text.windows) *(.text.windows)
KEEP(*(.textwindowsepilogue)) KEEP(*(.textwindowsepilogue))
KEEP(*(.blink))
*(SORT_BY_ALIGNMENT(.text.modernity)) *(SORT_BY_ALIGNMENT(.text.modernity))
*(SORT_BY_ALIGNMENT(.text.modernity.*)) *(SORT_BY_ALIGNMENT(.text.modernity.*))
*(SORT_BY_ALIGNMENT(.text.hot)) *(SORT_BY_ALIGNMENT(.text.hot))
@ -613,29 +607,6 @@ SHSTUB2(ape_loader_dd_count,
? ROUNDUP(ape_loader_end - ape_loader, CONSTANT(COMMONPAGESIZE)) / 64 ? ROUNDUP(ape_loader_end - ape_loader, CONSTANT(COMMONPAGESIZE)) / 64
: 0); : 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() #if SupportsMetal()
v_ape_realsectors = MIN(0x70000 - IMAGE_BASE_REAL, ROUNDUP(RVA(_ezip), 512)) / 512; v_ape_realsectors = MIN(0x70000 - IMAGE_BASE_REAL, ROUNDUP(RVA(_ezip), 512)) / 512;
v_ape_realbytes = v_ape_realsectors * 512; v_ape_realbytes = v_ape_realsectors * 512;

View file

@ -59,9 +59,7 @@ for x in .ape \
.ape-1.7 \ .ape-1.7 \
.ape-1.8 \ .ape-1.8 \
.ape-1.9 \ .ape-1.9 \
.ape-1.10 \ .ape-1.10; do
.ape-blink-0.9.2 \
.ape-blink-1.0.0; do
rm -f \ rm -f \
~/$x \ ~/$x \
/tmp/$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 o/$(MODE)/%.o: %.cc
@$(COMPILE) -AOBJECTIFY.cxx $(OBJECTIFY.cxx) $(OUTPUT_OPTION) $< @$(COMPILE) -AOBJECTIFY.cxx $(OBJECTIFY.cxx) $(OUTPUT_OPTION) $<
o/$(MODE)/%.o: %.cpp
@$(COMPILE) -AOBJECTIFY.cxx $(OBJECTIFY.cxx) $(OUTPUT_OPTION) $<
o/$(MODE)/%.lds: %.lds o/$(MODE)/%.lds: %.lds
@$(COMPILE) -APREPROCESS $(PREPROCESS.lds) $(OUTPUT_OPTION) $< @$(COMPILE) -APREPROCESS $(PREPROCESS.lds) $(OUTPUT_OPTION) $<

View file

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

View file

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

View file

@ -24,11 +24,15 @@
/** /**
* Returns true if process is running under qemu-x86_64 or qemu-aarch64. * Returns true if process is running under qemu-x86_64 or qemu-aarch64.
*/ */
int IsQemu(void) { int IsQemuUser(void) {
// qemu doesn't validate the advice argument static char rplus1;
// we could also check if __getcwd(0, 0) raises efault if (!rplus1) {
int e = errno; // qemu doesn't validate the advice argument
int r = !sys_madvise(__executable_start, 16384, 127); // we could also check if __getcwd(0, 0) raises efault
errno = e; int e = errno;
return r; 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 -*-│ /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│
vi: set noet ft=asm ts=8 sw=8 fenc=utf-8 :vi 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 Permission to use, copy, modify, and/or distribute this software for
any purpose with or without fee is hereby granted, provided that the 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 TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE. 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 int sys_getcpu(unsigned *opt_cpu, unsigned *opt_node, void *tcache);
//
// 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.
.section .blink,"a",@progbits /**
.globl blink_xnu_aarch64_size * Returns ID of CPU on which thread is currently scheduled.
blink_xnu_aarch64: */
.incbin "ape/blink-xnu-aarch64.gz" int sched_getcpu(void) {
.endobj blink_xnu_aarch64,globl if (X86_HAVE(RDTSCP)) {
blink_xnu_aarch64_size = . - blink_xnu_aarch64 unsigned tsc_aux;
rdtscp(&tsc_aux);
.section .emush,"a",@progbits return TSC_AUX_CORE(tsc_aux);
.ascii "if [ \"$s\" = Darwin ] && [ \"$m\" = arm64 ]; then\n" } else if (IsWindows()) {
.ascii "if ! [ -x \"$e\" ]; then\n" struct NtProcessorNumber pn;
.ascii "echo \"extracting blink-darwin-aarch64 to ${e}\" >&2\n" GetCurrentProcessorNumberEx(&pn);
.ascii "dd if=\"$o\" bs=1 skip=$((" return 64 * pn.Group + pn.Number;
.weak blink_xnu_aarch64_quad } else {
.quad blink_xnu_aarch64_quad unsigned cpu = 0;
.weak blink_xnu_aarch64_short int rc = sys_getcpu(&cpu, 0, 0);
.short blink_xnu_aarch64_short if (rc == -1) return -1;
.ascii ")) count=$((" return cpu;
.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"

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_CLR_S(i, size, set) _CPU_S(i, size, set, &= ~)
#define CPU_ISSET_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_ COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_CPUSET_H_ */ #endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_CPUSET_H_ */

View file

@ -8,7 +8,7 @@ namespace __cxxabiv1 {
char *__cxa_demangle(const char *, char *, size_t *, int *); char *__cxa_demangle(const char *, char *, size_t *, int *);
int __cxa_atexit(void (*)(void *), void *, void *) paramsnonnull((1)) dontthrow; 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 *); void __cxa_finalize(void *);
#ifdef __cplusplus #ifdef __cplusplus

View file

@ -121,7 +121,7 @@ COSMOPOLITAN_C_START_
extern const int __hostos; extern const int __hostos;
int IsQemu(void); int IsQemuUser(void);
COSMOPOLITAN_C_END_ COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */ #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 "-Wformat-extra-args" /* todo: patch gcc */
#pragma GCC diagnostic ignored "-Wunused-function" /* contradicts dce */ #pragma GCC diagnostic ignored "-Wunused-function" /* contradicts dce */
#pragma GCC diagnostic ignored "-Wunused-const-variable" /* sooo ridiculous */ #pragma GCC diagnostic ignored "-Wunused-const-variable" /* sooo ridiculous */
#pragma GCC diagnostic ignored "-Wbuiltin-declaration-mismatch"
#ifndef __cplusplus #ifndef __cplusplus
#pragma GCC diagnostic ignored "-Wold-style-definition" /* orwellian bulls */ #pragma GCC diagnostic ignored "-Wold-style-definition" /* orwellian bullsh */
#endif #endif
#ifndef __STRICT_ANSI__ #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()) { if (IsWindows()) {
*out_addr = (void *)GetStaticStackAddr(0); *out_addr = (void *)GetStaticStackAddr(0);
*out_size = GetStaticStackSize(); *out_size = GetStaticStackSize();
*out_guardsize = GetGuardSize(); *out_guardsize = getauxval(AT_PAGESZ);
return; return;
} }
int pagesz = getauxval(AT_PAGESZ); int pagesz = getauxval(AT_PAGESZ);

View file

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

View file

@ -112,6 +112,13 @@ struct UbsanOverflowData {
struct UbsanTypeDescriptor *type; struct UbsanTypeDescriptor *type;
}; };
struct UbsanDynamicTypeCacheMissData {
struct UbsanSourceLocation location;
struct UbsanTypeDescriptor *type;
void *TypeInfo;
unsigned char TypeCheckKind;
};
struct UbsanFloatCastOverflowData { struct UbsanFloatCastOverflowData {
#if __GNUC__ + 0 >= 6 #if __GNUC__ + 0 >= 6
struct UbsanSourceLocation location; struct UbsanSourceLocation location;
@ -145,6 +152,8 @@ upcast of\0\
cast to virtual base of\0\ cast to virtual base of\0\
\0"; \0";
uintptr_t __ubsan_vptr_type_cache[128];
static int __ubsan_bits(struct UbsanTypeDescriptor *t) { static int __ubsan_bits(struct UbsanTypeDescriptor *t) {
return 1 << (t->info >> 1); return 1 << (t->info >> 1);
} }
@ -439,15 +448,22 @@ void __ubsan_handle_divrem_overflow_abort(
__ubsan_handle_divrem_overflow(loc); __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( void __ubsan_handle_dynamic_type_cache_miss(
const struct UbsanSourceLocation *loc) { struct UbsanDynamicTypeCacheMissData *data, uintptr_t ptr, uintptr_t hash) {
__ubsan_abort(loc, "dynamic type cache miss")(); HandleDynamicTypeCacheMiss(data, ptr, hash);
__ubsan_unreachable();
} }
void __ubsan_handle_dynamic_type_cache_miss_abort( void __ubsan_handle_dynamic_type_cache_miss_abort(
const struct UbsanSourceLocation *loc) { struct UbsanDynamicTypeCacheMissData *data, uintptr_t ptr, uintptr_t hash) {
__ubsan_handle_dynamic_type_cache_miss(loc); if (HandleDynamicTypeCacheMiss(data, ptr, hash)) {
__ubsan_abort(&data->location, "dynamic type cache miss")();
__ubsan_unreachable();
}
} }
void __ubsan_handle_function_type_mismatch( 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. // are quite toilsome.
// //
// @see www.felixcloutier.com/x86/cpuid // @see www.felixcloutier.com/x86/cpuid
kCpuids:.long 0,0,0,0 # EAX=0 (Basic Processor Info) 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=1 (Processor Info)
.long 0,0,0,0 # EAX=2 .long 0,0,0,0 // EAX=2
.long 0,0,0,0 # EAX=7 (Extended Features) .long 0,0,0,0 // EAX=7 (Extended Features)
.long 0,0,0,0 # EAX=0x80000001 (NexGen32e) .long 0,0,0,0 // EAX=0x80000001 (NexGen32e)
.long 0,0,0,0 # EAX=0x80000007 (APM) .long 0,0,0,0 // EAX=0x80000007 (APM)
.long 0,0,0,0 # EAX=16h (CPU Frequency) .long 0,0,0,0 // EAX=16h (CPU Frequency)
.long 0,0,0,0 // EAX=7 ECX=1 (Extended Feats)
.endobj kCpuids,globl .endobj kCpuids,globl
.previous .previous
.init.start 201,_init_kCpuids .init.start 201,_init_kCpuids
push %rbx push %rbx
push $0 push $0
push $0x16 push $1
push $0xffffffff80000007
push $0xffffffff80000001
push $7 push $7
push $0
push $0x16
push $0
push $0xffffffff80000007
push $0
push $0xffffffff80000001
push $0
push $7
push $0
push $2 push $2
push $0
push $1 push $1
mov %rdi,%r8 mov %rdi,%r8
xor %eax,%eax xor %eax,%eax
1: xor %ecx,%ecx xor %ecx,%ecx
1: nop
#ifdef FEATURELESS #ifdef FEATURELESS
// It's been reported that GDB reverse debugging doesn't // It's been reported that GDB reverse debugging doesn't
// understand VEX encoding. The workaround is to put: // 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. // Inside your ~/.cosmo.mk file.
xor %eax,%eax xor %eax,%eax
xor %ebx,%ebx xor %ebx,%ebx
xor %ecx,%ecx
xor %edx,%edx xor %edx,%edx
#else #else
cpuid cpuid
@ -74,10 +85,11 @@ kCpuids:.long 0,0,0,0 # EAX=0 (Basic Processor Info)
xchg %eax,%edx xchg %eax,%edx
stosl stosl
2: pop %rax 2: pop %rax
test %eax,%eax # EAX = stacklist->pop() test %eax,%eax // EAX = stacklist->pop()
jz 3f # EAX 0 (EOL sentinel) jz 3f // EAX 0 (EOL sentinel)
cmp KCPUIDS(0H,EAX)(%r8),%al # EAX CPUID.0 max leaf pop %rcx // HERE WE GO AGAIN CPUID
jbe 1b # CPUID too new to probe cmp KCPUIDS(0H,EAX)(%r8),%al // EAX CPUID.0 max leaf
jbe 1b // CPUID too new to probe
add $4*4,%rdi add $4*4,%rdi
jmp 2b jmp 2b
3: nop 3: nop

View file

@ -8,7 +8,8 @@
#define KCPUIDS_80000001H 4 #define KCPUIDS_80000001H 4
#define KCPUIDS_80000007H 5 #define KCPUIDS_80000007H 5
#define KCPUIDS_16H 6 #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_6H -1 /* TBD: Thermal and Power Management */
#define KCPUIDS_DH -1 /* TBD: Extended state features */ #define KCPUIDS_DH -1 /* TBD: Extended state features */
#define KCPUIDS_80000008H -1 /* TBD: AMD Miscellaneous */ #define KCPUIDS_80000008H -1 /* TBD: AMD Miscellaneous */

View file

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

View file

@ -37,6 +37,18 @@
#define _X86_CC_AVXVNNI 0 #define _X86_CC_AVXVNNI 0
#endif #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__ #ifdef __AVX512F__
#define _X86_CC_AVX512F 1 #define _X86_CC_AVX512F 1
#else #else

View file

@ -28,7 +28,9 @@
#define X86_ARCH_CAPABILITIES 7H, EDX, 29, 0 #define X86_ARCH_CAPABILITIES 7H, EDX, 29, 0
#define X86_AVX 1H, ECX, 28, _X86_CC_AVX /* sandybridge c. 2012 */ #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_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_AVX512BW 7H, EBX, 30, 0
#define X86_AVX512CD 7H, EBX, 28, 0 #define X86_AVX512CD 7H, EBX, 28, 0
#define X86_AVX512DQ 7H, EBX, 17, 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 .imp API-MS-Win-Core-Synch-l1-2-0,__imp_WaitOnAddress,WaitOnAddress
.text.windows .text.windows
.ftrace1 .ftrace1
WaitOnAddress: WaitOnAddress:
.ftrace2 .ftrace2
#ifdef __x86_64__ #ifdef __x86_64__
push %rbp push %rbp
mov %rsp,%rbp mov %rsp,%rbp

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

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