mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 05:42:29 +00:00
Add scouts honor escape hatch for source embedding
This commit is contained in:
parent
c91b3c5006
commit
b4269930f7
547 changed files with 1516 additions and 944 deletions
|
@ -18,7 +18,7 @@
|
|||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
.p2align 4
|
||||
minmax_vector:
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
.init.start 400,_init_g_ntstartupinfo
|
||||
ezlea g_ntstartupinfo,cx
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
.init.start 400,_init_g_ntsysteminfo
|
||||
ezlea g_ntsysteminfo,cx
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
/ Obtains WIN32 magic path, e.g. GetTempPathA.
|
||||
/
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "libc/nexgen32e/hascharacter.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/str/tpdecode.h"
|
||||
#include "libc/sysv/consts/fileno.h"
|
||||
#include "libc/sysv/errfuns.h"
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include "libc/macros.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/str/tpdecode.h"
|
||||
#include "libc/sysv/errfuns.h"
|
||||
|
||||
/**
|
||||
|
|
|
@ -40,4 +40,4 @@ kTmpPath:
|
|||
call __getntsyspath
|
||||
.init.end 300,_init_kTmpPath
|
||||
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include "libc/calls/internal.h"
|
||||
#include "libc/conv/conv.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/str/tpdecode.h"
|
||||
#include "libc/sysv/errfuns.h"
|
||||
|
||||
/**
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
.init.start 300,_init_onntconsoleevent
|
||||
ezlea onntconsoleevent$nt,cx
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
.init.start 300,_init_onwincrash
|
||||
pushpop 1,%rcx
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/dce.h"
|
||||
#include "libc/macros.h"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
/ Creates file descriptors for IPC.
|
||||
/
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
/ Sets effective group ID.
|
||||
/
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
/ Sets effective user ID.
|
||||
/
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/calls/internal.h"
|
||||
#include "libc/macros.h"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
/ System Five signal handler.
|
||||
/
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
/ Directly calls ftruncate() impl on host o/s if available.
|
||||
ftruncate$sysv:
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
/ Calls GetTempPathA() w/ different API.
|
||||
/
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/dce.h"
|
||||
#include "libc/macros.h"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
/ Directly calls lseek() impl on host o/s if available.
|
||||
lseek$sysv:
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
/ Directly calls mmap() on system five host o/s.
|
||||
mmap$sysv:
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.text.windows
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
onntconsoleevent$nt:
|
||||
ezlea onntconsoleevent,ax
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.text.windows
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
onwincrash$nt:
|
||||
ezlea onwincrash,ax
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
/ Directly calls pread() impl on host o/s if available.
|
||||
pread$sysv:
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
/ Directly calls preadv() impl on host o/s if available.
|
||||
preadv$sysv:
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
/ Directly calls pwrite() impl on host o/s if available.
|
||||
pwrite$sysv:
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
/ Directly calls pwritev() impl on host o/s if available.
|
||||
pwritev$sysv:
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
/ Directly calls truncate() impl on host o/s if available.
|
||||
truncate$sysv:
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "libc/notice.inc"
|
||||
#include "libc/runtime/internal.h"
|
||||
.section .start,"ax",@progbits
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
/ System Five userspace program entrypoint.
|
||||
/
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/notice.inc"
|
||||
#include "libc/macros.h"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
/ Embeds ASCII names for errno constants into binary.
|
||||
/
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
#include "libc/nexgen32e/tinystrlen.h"
|
||||
#include "libc/str/internal.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/str/tpdecode.h"
|
||||
#include "libc/str/tpencode.h"
|
||||
#include "libc/unicode/unicode.h"
|
||||
|
||||
forceinline unsigned long tpiencode(wint_t wc) {
|
||||
|
|
|
@ -983,7 +983,7 @@ typedef uint64_t uintmax_t;
|
|||
|
||||
/**
|
||||
* Pulls another module, by symbol, into linkage.
|
||||
* The nop itself is discarded by the linker.
|
||||
* @note nop is discarded by ape/ape.lds
|
||||
*/
|
||||
#define YOINK(SYMBOL) \
|
||||
do { \
|
||||
|
@ -996,11 +996,30 @@ typedef uint64_t uintmax_t;
|
|||
: "X"(SYMBOL)); \
|
||||
} while (0)
|
||||
|
||||
/**
|
||||
* Pulls another module into linkage from top-level scope.
|
||||
* @note nop is discarded by ape/ape.lds
|
||||
*/
|
||||
#define STATIC_YOINK(SYMBOLSTR) \
|
||||
asm(".pushsection .yoink\n\tnop\t\"" SYMBOLSTR "\"\n\t.popsection")
|
||||
|
||||
/**
|
||||
* Pulls source file into ZIP portion of binary.
|
||||
* @see build/rules.mk which defines the wildcard build rule %.zip.o
|
||||
*/
|
||||
#ifndef IM_FEELING_NAUGHTY
|
||||
#define STATIC_YOINK_SOURCE(PATH) STATIC_YOINK(PATH)
|
||||
#else
|
||||
#define STATIC_YOINK_SOURCE(PATH)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Pulls source code of object being compiled.
|
||||
* @note automates better compliance with spirit of gpl terms
|
||||
* @note headers need to call STATIC_YOINK_SOURCE() manually
|
||||
*/
|
||||
#ifdef __SAUCE__
|
||||
STATIC_YOINK(__SAUCE__);
|
||||
STATIC_YOINK_SOURCE(__SAUCE__); /* see build/definitions.mk */
|
||||
#endif
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/log/log.h"
|
||||
#include "libc/macros.h"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
.bss
|
||||
.align 4
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
/ These function names make it a bit more obvious which signal
|
||||
/ caused the crash, particularly in the GDB GUI. They're coded
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.text.unlikely
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
/ Code-size saving thunk for CHECK_EQ() in NDEBUG mode.
|
||||
__check_fail_eq:
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.text.unlikely
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
/ Code-size saving thunk for CHECK_GE() in NDEBUG mode.
|
||||
__check_fail_ge:
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.text.unlikely
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
/ Code-size saving thunk for CHECK_GT() in NDEBUG mode.
|
||||
__check_fail_gt:
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.text.unlikely
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
/ Code-size saving thunk for CHECK_LE() in NDEBUG mode.
|
||||
__check_fail_le:
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.text.unlikely
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
/ Code-size saving thunk for CHECK_LT() in NDEBUG mode.
|
||||
__check_fail_lt:
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
__check_fail_ndebug:
|
||||
push %rbp
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.text.unlikely
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
/ Code-size saving thunk for CHECK_NE() in NDEBUG mode.
|
||||
__check_fail_ne:
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.text.unlikely
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
__ubsan_default_options:
|
||||
ret
|
||||
|
|
|
@ -87,6 +87,17 @@
|
|||
ret
|
||||
.endm
|
||||
|
||||
/ Pulls source code file into ZIP portion of binary.
|
||||
/
|
||||
/ @param symbol is quoted path relative to root e.g. __FILE__
|
||||
/ @see see libc/zipos/zipcentraldir.S
|
||||
/ @see see libc/integral/c.inc
|
||||
.macro .source symbol:req
|
||||
#ifndef IM_FEELING_NAUGHTY
|
||||
.yoink "\symbol"
|
||||
#endif
|
||||
.endm
|
||||
|
||||
/ Inserts profiling hook in prologue if cc wants it.
|
||||
/
|
||||
/ Cosmopolitan does this in a slightly different way from normal
|
||||
|
|
|
@ -35,4 +35,4 @@ fesetround:
|
|||
pop %rcx
|
||||
ret
|
||||
.endfn fesetround,globl,hidden
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
│ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA │
|
||||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.inc"
|
||||
#include "libc/macros.h"
|
||||
|
||||
feraiseexcept:
|
||||
and $0x3f,%edi
|
||||
|
@ -27,4 +27,4 @@ feraiseexcept:
|
|||
xor %eax,%eax
|
||||
ret
|
||||
.endfn feraiseexcept,globl
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -36,4 +36,4 @@ fesetenv:
|
|||
add $40,%rsp
|
||||
ret
|
||||
.endfn fesetenv,globl
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -29,4 +29,4 @@ fetestexcept:
|
|||
and %edi,%eax
|
||||
ret
|
||||
.endfn fetestexcept,globl
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
.initbss 800,_init_calloc
|
||||
hook$calloc:
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
#include "libc/notice.inc"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
/ Allocates n * itemsize bytes, initialized to zero.
|
||||
/
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
/ Frees memory the C++ way.
|
||||
/
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
.initbss 800,_init_free
|
||||
hook$free:
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
/ Free memory returned by malloc() & co.
|
||||
/
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
/ Allocates memory the C++ way.
|
||||
/
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
.initbss 800,_init_malloc
|
||||
hook$malloc:
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
/ Allocates uninitialized memory.
|
||||
/
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
#include "libc/notice.inc"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
/ Returns the number of bytes you can actually use in
|
||||
/ an allocated chunk, which may be more than you requested
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
/ Allocates aligned memory the C++ way.
|
||||
/
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
.initbss 800,_init_memalign
|
||||
hook$memalign:
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
#include "libc/notice.inc"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
/ Allocates aligned memory.
|
||||
/
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
/ Allocates aligned memory the POSIX way.
|
||||
/
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
#include "libc/notice.inc"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
/ Equivalent to valloc(minimum-page-that-holds(n)), that is,
|
||||
/ round up n to nearest PAGESIZE.
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
.initbss 800,_init_realloc
|
||||
hook$realloc:
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
#include "libc/notice.inc"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
/ Allocates / resizes / frees memory, e.g.
|
||||
/
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
#include "libc/notice.inc"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
/ Resizes the space allocated for p to size n, only if this can be
|
||||
/ done without moving p (i.e., only if there is adjacent space
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
#include "libc/notice.inc"
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
||||
/ Equivalent to memalign(PAGESIZE, n).
|
||||
/
|
||||
|
|
|
@ -36,4 +36,4 @@ __atomic_is_lock_free:
|
|||
cmovnz %ecx,%eax
|
||||
.leafepilogue
|
||||
.endfn __atomic_is_lock_free,globl,hidden
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -30,4 +30,4 @@
|
|||
/ @return 0 if equal or nonzero
|
||||
bcmp: jmp *hook$memcmp(%rip)
|
||||
.endfn bcmp,globl
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -28,5 +28,5 @@
|
|||
/ @param rdx is number of bytes
|
||||
bcopy: jmp memmove
|
||||
.endfn bcopy,globl
|
||||
.yoink __FILE__
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -40,4 +40,4 @@ bsf: .leafprologue
|
|||
bsf %edi,%eax
|
||||
.leafepilogue
|
||||
.endfn bsf,globl
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -41,4 +41,4 @@ bsfl: .leafprologue
|
|||
.leafepilogue
|
||||
.endfn bsfl,globl
|
||||
.alias bsfl,bsfll
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -40,4 +40,4 @@ bsr: .leafprologue
|
|||
bsr %edi,%eax
|
||||
.leafepilogue
|
||||
.endfn bsr,globl
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -41,4 +41,4 @@ bsrl: .leafprologue
|
|||
.leafepilogue
|
||||
.endfn bsrl,globl
|
||||
.alias bsrl,bsrll
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -44,4 +44,4 @@ bsrmax: .leafprologue
|
|||
2: add $64,%eax
|
||||
jmp 1b
|
||||
.endfn bsrmax,globl
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -32,4 +32,4 @@ bzero: mov %rsi,%rdx
|
|||
xor %esi,%esi
|
||||
jmp _memset
|
||||
.endfn bzero,globl
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -130,4 +130,4 @@ cescapectab:
|
|||
add $(8-.Lcescapectab.ro.size%8),%rsi
|
||||
.endif
|
||||
.init.end 300,_init_cescapec
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -32,4 +32,4 @@ clamp1: .leafprologue
|
|||
.Lmax: .rept 4
|
||||
.float 0.99609375
|
||||
.endr
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -40,4 +40,4 @@ cmpsb: .leafprologue
|
|||
.Lneg1: .long -1
|
||||
.endobj .Lneg1
|
||||
.previous
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -40,4 +40,4 @@ cmpsl: .leafprologue
|
|||
.Lneg1: .long -1
|
||||
.endobj .Lneg1
|
||||
.previous
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -40,4 +40,4 @@ cmpsq: .leafprologue
|
|||
.Lneg1: .long -1
|
||||
.endobj .Lneg1
|
||||
.previous
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -40,4 +40,4 @@ cmpsw: .leafprologue
|
|||
.Lneg1: .long -1
|
||||
.endobj .Lneg1
|
||||
.previous
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -40,4 +40,4 @@ cmpub: .leafprologue
|
|||
.Lneg1: .long -1
|
||||
.endobj .Lneg1
|
||||
.previous
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -40,4 +40,4 @@ cmpul: .leafprologue
|
|||
.Lneg1: .long -1
|
||||
.endobj .Lneg1
|
||||
.previous
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -40,4 +40,4 @@ cmpuq: .leafprologue
|
|||
.Lneg1: .long -1
|
||||
.endobj .Lneg1
|
||||
.previous
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -40,4 +40,4 @@ cmpuw: .leafprologue
|
|||
.Lneg1: .long -1
|
||||
.endobj .Lneg1
|
||||
.previous
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -260,4 +260,4 @@ crc32$pclmul:
|
|||
4194304 7.025 7.059 7.030 462
|
||||
8388607 7.082 6.980 6.997 464
|
||||
8388608 7.051 6.985 6.999 464 */
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -27,4 +27,4 @@
|
|||
crc32: movslq %edx,%rdx
|
||||
jmp crc32_z
|
||||
.endfn crc32,globl
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -43,4 +43,4 @@ crc32c: .quad 0
|
|||
#endif
|
||||
stosq
|
||||
.init.end 300,_init_crc32c
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -69,4 +69,4 @@ crc32init:
|
|||
leave
|
||||
ret
|
||||
.endfn crc32init,globl
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -98,4 +98,4 @@ ctypep: pop %rsi
|
|||
and %esi,%eax
|
||||
ret
|
||||
.endfn ctypep
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -116,4 +116,4 @@ div10: .leafprologue
|
|||
pop %rbx
|
||||
.leafepilogue
|
||||
.endfn div10,globl,hidden
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -29,4 +29,4 @@ div1000000000int64:
|
|||
jmp tinydivsi
|
||||
.globl tinydivsi
|
||||
.endfn div1000000000int64,globl
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -28,4 +28,4 @@ div1000000int64:
|
|||
movabs $0x431bde82d7b634db,%rdx
|
||||
jmp tinydivsi
|
||||
.endfn div1000000int64,globl
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -28,4 +28,4 @@ div1000int64:
|
|||
movabs $0x20c49ba5e353f7cf,%rdx
|
||||
jmp tinydivsi
|
||||
.endfn div1000int64,globl
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -28,4 +28,4 @@ div10int64:
|
|||
movabs $0x6666666666666667,%rdx
|
||||
jmp tinydivsi
|
||||
.endfn div10int64,globl
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -30,4 +30,4 @@ environ:.quad 0
|
|||
.init.start 300,_init_environ
|
||||
mov %r14,environ(%rip)
|
||||
.init.end 300,_init_environ
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -47,4 +47,4 @@ explicit_bzero:
|
|||
xorps %xmm5,%xmm5
|
||||
.leafepilogue
|
||||
.endfn explicit_bzero,globl
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -44,4 +44,4 @@ ffs: .leafprologue
|
|||
inc %eax
|
||||
.leafepilogue
|
||||
.endfn ffs,globl
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -45,4 +45,4 @@ ffsl: .leafprologue
|
|||
.leafepilogue
|
||||
.endfn ffsl,globl
|
||||
.alias ffsl,ffsll
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -29,4 +29,4 @@ g_argv: .quad 0
|
|||
mov %r13,%rax
|
||||
stosq
|
||||
.init.end 300,_init_g_argv
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -28,4 +28,4 @@ g_auxv: .quad 0
|
|||
mov %r15,%rax
|
||||
stosq
|
||||
.init.end 300,_init_g_auxv
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -20,4 +20,4 @@
|
|||
#include "libc/macros.h"
|
||||
|
||||
.comm g_runstate,4
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -88,4 +88,4 @@ __garbage:
|
|||
stosq
|
||||
pop %rdi
|
||||
.init.end 100,_init_garbage
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
|
@ -59,4 +59,4 @@ gclongjmp:
|
|||
pop %rdi
|
||||
jmp 0b
|
||||
.endfn gclongjmp,globl
|
||||
.yoink __FILE__
|
||||
.source __FILE__
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue