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