mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-07 06:53:33 +00:00
Clean old .source directive out of asm code
This commit is contained in:
parent
b149a9bcc4
commit
6c2fd9ecc6
269 changed files with 59 additions and 303 deletions
|
@ -37,4 +37,3 @@ sad16x8n:
|
|||
jnz 0b
|
||||
1: .leafepilogue
|
||||
.endfn sad16x8n,globl,hidden
|
||||
.source __FILE__
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
|
||||
clamp4int256$core:
|
||||
.leafprologue
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
|
||||
// Returns index of minimum uint16 in array.
|
||||
//
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
|
||||
// Returns index of minimum positive int16 in array.
|
||||
//
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/nexgen32e/x86feature.h"
|
||||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
|
||||
// Dispatches to fastest windex() implementation.
|
||||
.initbss 300,_init_windex
|
||||
|
|
|
@ -25,4 +25,3 @@
|
|||
pop %rsi
|
||||
pop %rdi
|
||||
.init.end 302,_init_g_fds
|
||||
.source __FILE__
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
|
||||
// Obtains WIN32 magic path, e.g. GetTempPathA.
|
||||
//
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
|
||||
// Calls GetTempPathA() w/ different API.
|
||||
//
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/dce.h"
|
||||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
|
||||
#define BYTES 64
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/dce.h"
|
||||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
|
||||
#define BYTES 64
|
||||
|
||||
|
|
|
@ -43,4 +43,3 @@ kTmpPath:
|
|||
add $kTmpPathMax,%rdi
|
||||
#endif
|
||||
.init.end 300,_init_kTmpPath
|
||||
.source __FILE__
|
||||
|
|
|
@ -35,4 +35,3 @@ nowl: .quad 0
|
|||
cmovnz %rcx,%rax
|
||||
stosq
|
||||
.init.end 202,_init_nowl
|
||||
.source __FILE__
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.text.windows
|
||||
.source __FILE__
|
||||
|
||||
__onntconsoleevent_nt:
|
||||
ezlea __onntconsoleevent,ax
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.text.windows
|
||||
.source __FILE__
|
||||
|
||||
__wincrash_nt:
|
||||
ezlea __wincrash,ax
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.text.windows
|
||||
.source __FILE__
|
||||
|
||||
__winalarm_nt:
|
||||
ezlea __winalarm,ax
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
|
||||
.init.start 300,_init_wincrash
|
||||
pushpop 1,%rcx
|
||||
|
|
|
@ -47,7 +47,8 @@ _start:
|
|||
lea 8(%rsp),%rsi # argv
|
||||
lea 16(%rsp,%rbx,8),%rdx # envp
|
||||
mov %rsp,__oldstack(%rip)
|
||||
.frame0
|
||||
and $-16,%rsp
|
||||
xor %ebp,%ebp
|
||||
// bofram 9f
|
||||
.weak ape_idata_iat
|
||||
.weak ape_idata_iatend
|
||||
|
|
|
@ -125,8 +125,8 @@ static int __fmt_atoi(const char **str) {
|
|||
* @note implementation detail of printf(), snprintf(), etc.
|
||||
* @see printf() for wordier documentation
|
||||
* @note netlib.org is so helpful
|
||||
* @asyncsignalsafe
|
||||
* @vforksafe
|
||||
* @asyncsignalsafe if floating point isn't used
|
||||
* @vforksafe if floating point isn't used
|
||||
*/
|
||||
hidden int __fmt(void *fn, void *arg, const char *format, va_list va) {
|
||||
union {
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
.endm
|
||||
|
||||
.section .rodata
|
||||
.underrun
|
||||
kDos2Errno:
|
||||
.e kNtErrorModNotFound,ENOSYS
|
||||
.e kNtErrorBadCommand,EACCES
|
||||
|
@ -100,3 +101,4 @@ kDos2Errno:
|
|||
.e WSAVERNOTSUPPORTED,ENOSYS
|
||||
.short 0
|
||||
.endobj kDos2Errno,globl,hidden
|
||||
.overrun
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
.section .rodata
|
||||
.align 4
|
||||
.underrun
|
||||
kErrorNames:
|
||||
.e EINVAL
|
||||
.e ENOSYS
|
||||
|
@ -116,3 +117,4 @@ kErrorNames:
|
|||
.e ERESTART
|
||||
.long 0
|
||||
.endobj kErrorNames,globl,hidden
|
||||
.overrun
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
.section .rodata
|
||||
.align 4
|
||||
.underrun
|
||||
kErrorNamesLong:
|
||||
.e EINVAL,"Invalid argument"
|
||||
.e ENOSYS,"Function not implemented"
|
||||
|
@ -116,3 +117,4 @@ kErrorNamesLong:
|
|||
.e ERESTART,"Interrupted system call should be restarted"
|
||||
.long 0
|
||||
.endobj kErrorNamesLong,globl,hidden
|
||||
.overrun
|
||||
|
|
|
@ -30,7 +30,7 @@ extern const struct Dos2Errno kDos2Errno[];
|
|||
/**
|
||||
* Translates Windows error using superset of consts.sh.
|
||||
*/
|
||||
textwindows errno_t __dos2errno(uint32_t error) {
|
||||
privileged errno_t __dos2errno(uint32_t error) {
|
||||
int i;
|
||||
for (i = 0; kDos2Errno[i].doscode; ++i) {
|
||||
if (error == kDos2Errno[i].doscode) {
|
|
@ -19,6 +19,7 @@
|
|||
#include "libc/alg/reverse.internal.h"
|
||||
#include "libc/assert.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/fmt/divmod10.internal.h"
|
||||
#include "libc/fmt/fmts.h"
|
||||
#include "libc/fmt/internal.h"
|
||||
#include "libc/limits.h"
|
||||
|
@ -92,7 +93,6 @@ static int __fmt_ntoa_format(int out(const char *, void *, size_t), void *arg,
|
|||
int __fmt_ntoa2(int out(const char *, void *, size_t), void *arg,
|
||||
uintmax_t value, bool neg, unsigned log2base, unsigned prec,
|
||||
unsigned width, unsigned flags, const char *alphabet) {
|
||||
uint64_t u64;
|
||||
uintmax_t remainder;
|
||||
unsigned len, count, digit;
|
||||
char buf[BUFFER_SIZE];
|
||||
|
@ -103,9 +103,7 @@ int __fmt_ntoa2(int out(const char *, void *, size_t), void *arg,
|
|||
do {
|
||||
if (!log2base) {
|
||||
if (value <= UINT64_MAX) {
|
||||
u64 = value;
|
||||
digit = u64 % 10;
|
||||
value = u64 / 10;
|
||||
value = DivMod10(value, &digit);
|
||||
} else {
|
||||
value = __udivmodti4(value, 10, &remainder);
|
||||
digit = remainder;
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/bits/safemacros.internal.h"
|
||||
#include "libc/fmt/fmt.h"
|
||||
|
||||
/**
|
||||
|
@ -23,7 +24,11 @@
|
|||
* @see strerror_r()
|
||||
*/
|
||||
noasan char *strerror(int err) {
|
||||
_Alignas(1) static char buf[512];
|
||||
strerror_r(err, buf, sizeof(buf));
|
||||
return buf;
|
||||
if (IsTiny()) {
|
||||
return firstnonnull(strerror_short(err), "EUNKNOWN");
|
||||
} else {
|
||||
_Alignas(1) static char buf[512];
|
||||
strerror_r(err, buf, sizeof(buf));
|
||||
return buf;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
.privileged
|
||||
.alignfunc
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
.privileged
|
||||
.alignfunc
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
.privileged
|
||||
.alignfunc
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
.privileged
|
||||
.alignfunc
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
.privileged
|
||||
.alignfunc
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
.privileged
|
||||
.alignfunc
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
.privileged
|
||||
.alignfunc
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
.privileged
|
||||
.alignfunc
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
.privileged
|
||||
.alignfunc
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.privileged
|
||||
.source __FILE__
|
||||
|
||||
// Arithmetic overflow handler.
|
||||
// @see -ftrapv
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
|
||||
.rodata.cst4
|
||||
__asan_option_detect_stack_use_after_return:
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
.privileged
|
||||
.alignfunc
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
.privileged
|
||||
.alignfunc
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
.privileged
|
||||
.alignfunc
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
|
||||
// Encodes Thompson-Pike varint.
|
||||
//
|
||||
|
@ -47,6 +46,7 @@ tpenc: .leafprologue
|
|||
|
||||
.rodata
|
||||
.align 4
|
||||
.underrun
|
||||
kTpenc: .rept 4 # MSB≤10 (0x7FF)
|
||||
.byte 1,0b11000000 # len,mark
|
||||
.endr
|
||||
|
@ -64,3 +64,4 @@ kTpenc: .rept 4 # MSB≤10 (0x7FF)
|
|||
.endr
|
||||
.zero 2
|
||||
.endobj kTpenc
|
||||
.overrun
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/log/log.h"
|
||||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
|
||||
.bss
|
||||
.align 4
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
|
||||
// These function names make it a bit more obvious which signal
|
||||
// caused the crash, particularly in the GDB GUI. They're coded
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.text.unlikely
|
||||
.source __FILE__
|
||||
|
||||
// Code-size saving thunk for CHECK_EQ() in NDEBUG mode.
|
||||
__check_fail_eq:
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.text.unlikely
|
||||
.source __FILE__
|
||||
|
||||
// Code-size saving thunk for CHECK_GE() in NDEBUG mode.
|
||||
__check_fail_ge:
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.text.unlikely
|
||||
.source __FILE__
|
||||
|
||||
// Code-size saving thunk for CHECK_GT() in NDEBUG mode.
|
||||
__check_fail_gt:
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.text.unlikely
|
||||
.source __FILE__
|
||||
|
||||
// Code-size saving thunk for CHECK_LE() in NDEBUG mode.
|
||||
__check_fail_le:
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.text.unlikely
|
||||
.source __FILE__
|
||||
|
||||
// Code-size saving thunk for CHECK_LT() in NDEBUG mode.
|
||||
__check_fail_lt:
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
|
||||
__check_fail_ndebug:
|
||||
push %rbp
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.text.unlikely
|
||||
.source __FILE__
|
||||
|
||||
// Code-size saving thunk for CHECK_NE() in NDEBUG mode.
|
||||
__check_fail_ne:
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/intrin/asancodes.h"
|
||||
#include "ape/relocations.h"
|
||||
/* clang-format off */
|
||||
|
||||
|
@ -97,13 +98,13 @@
|
|||
#endif
|
||||
.endm
|
||||
|
||||
// Creates first stack frame.
|
||||
.macro .frame0
|
||||
and $-16,%rsp
|
||||
xor %ebp,%ebp
|
||||
.endm
|
||||
|
||||
.macro .source symbol:req
|
||||
// Documents unreachable assembly code.
|
||||
.macro .unreachable
|
||||
#ifndef NDEBUG
|
||||
ud2 # crash if contract is broken
|
||||
#elif defined(__FNO_OMIT_FRAME_POINTER__)
|
||||
nop # avoid noreturn tail call backtrace ambiguity
|
||||
#endif
|
||||
.endm
|
||||
|
||||
// Inserts profiling hook in prologue if cc wants it.
|
||||
|
@ -211,12 +212,12 @@
|
|||
|
||||
.macro .underrun
|
||||
#ifdef __FSANITIZE_ADDRESS__
|
||||
.poison __BASE_FILE__ kAsanGlobalUnderrun
|
||||
.poison __BASE_FILE__, kAsanGlobalUnderrun
|
||||
#endif
|
||||
.endm
|
||||
|
||||
.macro .overrun
|
||||
#ifdef __FSANITIZE_ADDRESS__
|
||||
.poison __BASE_FILE__ kAsanGlobalUnderrun
|
||||
.poison __BASE_FILE__, kAsanGlobalUnderrun
|
||||
#endif
|
||||
.endm
|
||||
|
|
|
@ -138,19 +138,19 @@
|
|||
// @param name should be consistent across macros for a module
|
||||
// @see libc/runtime/_init.S
|
||||
.macro .initro number:req name:req
|
||||
.section .initro.\number\().\name,"a",@progbits
|
||||
.section ".initro.\number\().\name","a",@progbits
|
||||
.align 8
|
||||
.endm
|
||||
.macro .initbss number:req name:req
|
||||
.section .piro.bss.init.2.\number\().\name,"aw",@nobits
|
||||
.section ".piro.bss.init.2.\number\().\name","aw",@nobits
|
||||
.align 8
|
||||
.endm
|
||||
.macro .init.start number:req name:req
|
||||
.section .init.\number\().\name,"ax",@progbits
|
||||
\name:
|
||||
.section ".init.\number\().\name","ax",@progbits
|
||||
"\name":
|
||||
.endm
|
||||
.macro .init.end number:req name:req bnd=globl vis
|
||||
.endfn \name,\bnd,\vis
|
||||
.endfn "\name",\bnd,\vis
|
||||
.previous
|
||||
.endm
|
||||
|
||||
|
@ -165,26 +165,26 @@
|
|||
// Ends function definition.
|
||||
// @cost saves 1-3 lines of code
|
||||
.macro .endfn name:req bnd vis
|
||||
.size \name,.-\name
|
||||
.type \name,@function
|
||||
.size "\name",.-"\name"
|
||||
.type "\name",@function
|
||||
.ifnb \bnd
|
||||
.\bnd \name
|
||||
.\bnd "\name"
|
||||
.endif
|
||||
.ifnb \vis
|
||||
.\vis \name
|
||||
.\vis "\name"
|
||||
.endif
|
||||
.endm
|
||||
|
||||
// Ends variable definition.
|
||||
// @cost saves 1-3 lines of code
|
||||
.macro .endobj name:req bnd vis
|
||||
.size \name,.-\name
|
||||
.type \name,@object
|
||||
.size "\name",.-"\name"
|
||||
.type "\name",@object
|
||||
.ifnb \bnd
|
||||
.\bnd \name
|
||||
.\bnd "\name"
|
||||
.endif
|
||||
.ifnb \vis
|
||||
.\vis \name
|
||||
.\vis "\name"
|
||||
.endif
|
||||
.endm
|
||||
|
||||
|
@ -216,10 +216,10 @@
|
|||
|
||||
// Declares optional function.
|
||||
.macro .optfn fn:req
|
||||
.globl \fn
|
||||
.weak \fn
|
||||
.equ \fn,missingno
|
||||
.type \fn,@function
|
||||
.globl "\fn"
|
||||
.weak "\fn"
|
||||
.equ "\fn",missingno
|
||||
.type "\fn",@function
|
||||
.endm
|
||||
|
||||
// Embeds fixed-width zero-filled string table.
|
||||
|
@ -257,17 +257,18 @@
|
|||
|
||||
// Puts initialized data in uninitialized data section.
|
||||
.macro .bsdata name:req expr:req bnd vis
|
||||
.section .initbss.300._init_\name,"aw",@nobits
|
||||
\name: .quad 0
|
||||
.endobj \name,\bnd,\vis
|
||||
.section ".initbss.300._init_\name","aw",@nobits
|
||||
"\name":
|
||||
.quad 0
|
||||
.endobj "\name",\bnd,\vis
|
||||
.previous
|
||||
.section .initro.300._init_\name,"a",@progbits
|
||||
.section ".initro.300._init_\name","a",@progbits
|
||||
.quad \expr
|
||||
.previous
|
||||
.section .init.300._init_\name,"ax",@progbits
|
||||
_init_\name:
|
||||
.section ".init.300._init_\name","ax",@progbits
|
||||
"_init_\name":
|
||||
movsq
|
||||
.endfn _init_\name
|
||||
.endfn "_init_\name"
|
||||
.previous
|
||||
.endm
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
#include "libc/notice.inc"
|
||||
.source __FILE__
|
||||
|
||||
// Allocates n * itemsize bytes, initialized to zero.
|
||||
//
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
|
||||
// Frees memory the C++ way.
|
||||
//
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
|
||||
// Allocates memory the C++ way.
|
||||
//
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
|
||||
// Allocates aligned memory the C++ way.
|
||||
//
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
|
||||
// Free memory returned by malloc() & co.
|
||||
//
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
|
||||
.initbss 202,_init_calloc
|
||||
hook_calloc:
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
|
||||
.initbss 202,_init_free
|
||||
hook_free:
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
|
||||
.initbss 202,_init_malloc
|
||||
hook_malloc:
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
|
||||
.initbss 202,_init_malloc_trim
|
||||
hook_malloc_trim:
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
|
||||
.initbss 202,_init_malloc_usable_size
|
||||
hook_malloc_usable_size:
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
|
||||
.initbss 202,_init_memalign
|
||||
hook_memalign:
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
|
||||
.initbss 202,_init_realloc
|
||||
hook_realloc:
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
|
||||
.initbss 202,_init_realloc_in_place
|
||||
hook_realloc_in_place:
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
#include "libc/notice.inc"
|
||||
.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,6 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
#include "libc/notice.inc"
|
||||
.source __FILE__
|
||||
|
||||
// Allocates / resizes / frees memory, e.g.
|
||||
//
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
#include "libc/notice.inc"
|
||||
.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
|
||||
|
|
|
@ -42,4 +42,3 @@ bsrmax: .leafprologue
|
|||
2: add $64,%eax
|
||||
jmp 1b
|
||||
.endfn bsrmax,globl
|
||||
.source __FILE__
|
||||
|
|
|
@ -127,4 +127,3 @@ cescapectab:
|
|||
add $(8-.Lcescapectab.ro.size%8),%rsi
|
||||
.endif
|
||||
.init.end 300,_init_cescapec
|
||||
.source __FILE__
|
||||
|
|
|
@ -39,4 +39,3 @@ cmpsb: .leafprologue
|
|||
.Lneg1: .long -1
|
||||
.endobj .Lneg1
|
||||
.previous
|
||||
.source __FILE__
|
||||
|
|
|
@ -42,4 +42,3 @@ cmpsl: .leafprologue
|
|||
.Lneg1: .long -1
|
||||
.endobj .Lneg1
|
||||
.previous
|
||||
.source __FILE__
|
||||
|
|
|
@ -39,4 +39,3 @@ cmpsq: .leafprologue
|
|||
.Lneg1: .long -1
|
||||
.endobj .Lneg1
|
||||
.previous
|
||||
.source __FILE__
|
||||
|
|
|
@ -39,4 +39,3 @@ cmpsw: .leafprologue
|
|||
.Lneg1: .long -1
|
||||
.endobj .Lneg1
|
||||
.previous
|
||||
.source __FILE__
|
||||
|
|
|
@ -39,4 +39,3 @@ cmpub: .leafprologue
|
|||
.Lneg1: .long -1
|
||||
.endobj .Lneg1
|
||||
.previous
|
||||
.source __FILE__
|
||||
|
|
|
@ -39,4 +39,3 @@ cmpul: .leafprologue
|
|||
.Lneg1: .long -1
|
||||
.endobj .Lneg1
|
||||
.previous
|
||||
.source __FILE__
|
||||
|
|
|
@ -39,4 +39,3 @@ cmpuq: .leafprologue
|
|||
.Lneg1: .long -1
|
||||
.endobj .Lneg1
|
||||
.previous
|
||||
.source __FILE__
|
||||
|
|
|
@ -39,4 +39,3 @@ cmpuw: .leafprologue
|
|||
.Lneg1: .long -1
|
||||
.endobj .Lneg1
|
||||
.previous
|
||||
.source __FILE__
|
||||
|
|
|
@ -138,7 +138,6 @@ crc32_pclmul:
|
|||
shr $32,%rax
|
||||
.leafepilogue
|
||||
.endfn crc32_pclmul,globl,hidden
|
||||
.source __FILE__
|
||||
|
||||
// Definitions of the bit-reflected domain constants k1,k2,k3, etc.
|
||||
// and the CRC32+Barrett polynomials given at the end of the paper.
|
||||
|
|
|
@ -67,4 +67,3 @@ crc32init:
|
|||
leave
|
||||
ret
|
||||
.endfn crc32init,globl
|
||||
.source __FILE__
|
||||
|
|
|
@ -28,4 +28,3 @@ div1000000000int64:
|
|||
jmp tinydivsi
|
||||
.globl tinydivsi
|
||||
.endfn div1000000000int64,globl
|
||||
.source __FILE__
|
||||
|
|
|
@ -27,4 +27,3 @@ div1000000int64:
|
|||
movabs $0x431bde82d7b634db,%rdx
|
||||
jmp tinydivsi
|
||||
.endfn div1000000int64,globl
|
||||
.source __FILE__
|
||||
|
|
|
@ -27,4 +27,3 @@ div10000int64:
|
|||
movabs $0x346dc5d63886594b,%rdx
|
||||
jmp tinydivsi
|
||||
.endfn div10000int64,globl
|
||||
.source __FILE__
|
||||
|
|
|
@ -27,4 +27,3 @@ div1000int64:
|
|||
movabs $0x20c49ba5e353f7cf,%rdx
|
||||
jmp tinydivsi
|
||||
.endfn div1000int64,globl
|
||||
.source __FILE__
|
||||
|
|
|
@ -32,4 +32,3 @@ div100int64:
|
|||
sub %rdi,%rax
|
||||
ret
|
||||
.endfn div100int64,globl
|
||||
.source __FILE__
|
||||
|
|
|
@ -27,4 +27,3 @@ div10int64:
|
|||
movabs $0x6666666666666667,%rdx
|
||||
jmp tinydivsi
|
||||
.endfn div10int64,globl
|
||||
.source __FILE__
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include "libc/macros.internal.h"
|
||||
.source __FILE__
|
||||
|
||||
// D.J. Bernstein's outrageously fast integer sorting algorithm.
|
||||
//
|
||||
|
|
|
@ -30,4 +30,3 @@ environ:
|
|||
.init.start 300,_init_environ
|
||||
mov %r14,environ(%rip)
|
||||
.init.end 300,_init_environ
|
||||
.source __FILE__
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.real
|
||||
.source __FILE__
|
||||
.code16 # ∩ .code32 ∩ .code64
|
||||
|
||||
// Function entry hook stub.
|
||||
|
|
|
@ -42,4 +42,3 @@ ffs: .leafprologue
|
|||
inc %eax
|
||||
.leafepilogue
|
||||
.endfn ffs,globl
|
||||
.source __FILE__
|
||||
|
|
|
@ -43,4 +43,3 @@ ffsl: .leafprologue
|
|||
.leafepilogue
|
||||
.endfn ffsl,globl
|
||||
.alias ffsl,ffsll
|
||||
.source __FILE__
|
||||
|
|
|
@ -58,7 +58,6 @@ __gc: decq __garbage(%rip)
|
|||
ret
|
||||
9: hlt
|
||||
.endfn __gc,globl,hidden
|
||||
.source __FILE__
|
||||
|
||||
.bss
|
||||
.align 8
|
||||
|
|
|
@ -25,4 +25,3 @@ identity:
|
|||
mov %rdi,%rax
|
||||
ret
|
||||
.endfn identity,globl
|
||||
.source __FILE__
|
||||
|
|
|
@ -36,4 +36,3 @@ imapxlatab:
|
|||
.loop 1b
|
||||
.leafepilogue
|
||||
.endfn imapxlatab,globl,hidden
|
||||
.source __FILE__
|
||||
|
|
|
@ -43,4 +43,3 @@ kBase36:.zero 256
|
|||
.loop 0b
|
||||
add $255-'Z',%rdi
|
||||
.init.end 300,_init_kBase36
|
||||
.source __FILE__
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#include "libc/macros.internal.h"
|
||||
.rodata
|
||||
.align 16
|
||||
.source __FILE__
|
||||
|
||||
// ibm cp437 unicode table w/ string literal safety
|
||||
//
|
||||
|
|
|
@ -84,4 +84,3 @@ kCpuids:.long 0,0,0,0 # EAX=0 (Basic Processor Info)
|
|||
#endif
|
||||
5: pop %rbx
|
||||
.init.end 201,_init_kCpuids
|
||||
.source __FILE__
|
||||
|
|
|
@ -38,4 +38,3 @@ kCrc32cTab:
|
|||
call crc32init
|
||||
pop %rsi
|
||||
.init.end 300,_init_kCrc32cTab
|
||||
.source __FILE__
|
||||
|
|
|
@ -60,4 +60,3 @@ kHalfCache3:
|
|||
4: shr %eax
|
||||
stosq
|
||||
.init.end 202,_init_kHalfCache3
|
||||
.source __FILE__
|
||||
|
|
|
@ -86,4 +86,3 @@ kReverseBits:
|
|||
.byte 0b00111111,0b10111111,0b01111111,0b11111111
|
||||
.endobj kReverseBits,globl
|
||||
.previous
|
||||
.source __FILE__
|
||||
|
|
|
@ -75,4 +75,3 @@ htons: movzwl %di,%eax
|
|||
.endfn htole16,globl
|
||||
.endfn ntohs,globl
|
||||
.endfn bswap_16,globl
|
||||
.source __FILE__
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
.real
|
||||
.source __FILE__
|
||||
.code16 # ∩ .code32 ∩ .code64
|
||||
|
||||
// Function Profiling Hook.
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue