mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-07 06:53:33 +00:00
Reduce build graph by another 14 percent
That's a 37% reduction total from what it was on 2022-05-23.
This commit is contained in:
parent
c2211c9e63
commit
8e176fb026
4029 changed files with 4620 additions and 4675 deletions
|
@ -85,9 +85,7 @@ o/$(MODE)/ape/ape-no-modify-self.o: \
|
||||||
libc/elf/def.h \
|
libc/elf/def.h \
|
||||||
libc/intrin/asancodes.h \
|
libc/intrin/asancodes.h \
|
||||||
libc/macho.internal.h \
|
libc/macho.internal.h \
|
||||||
libc/macros-cpp.internal.inc \
|
|
||||||
libc/macros.internal.h \
|
libc/macros.internal.h \
|
||||||
libc/macros.internal.inc \
|
|
||||||
libc/nexgen32e/uart.internal.h \
|
libc/nexgen32e/uart.internal.h \
|
||||||
libc/nexgen32e/vidya.internal.h \
|
libc/nexgen32e/vidya.internal.h \
|
||||||
libc/nt/pedef.internal.h \
|
libc/nt/pedef.internal.h \
|
||||||
|
@ -113,9 +111,7 @@ o/$(MODE)/ape/ape-copy-self.o: \
|
||||||
libc/elf/def.h \
|
libc/elf/def.h \
|
||||||
libc/intrin/asancodes.h \
|
libc/intrin/asancodes.h \
|
||||||
libc/macho.internal.h \
|
libc/macho.internal.h \
|
||||||
libc/macros-cpp.internal.inc \
|
|
||||||
libc/macros.internal.h \
|
libc/macros.internal.h \
|
||||||
libc/macros.internal.inc \
|
|
||||||
libc/nexgen32e/uart.internal.h \
|
libc/nexgen32e/uart.internal.h \
|
||||||
libc/nexgen32e/vidya.internal.h \
|
libc/nexgen32e/vidya.internal.h \
|
||||||
libc/nt/pedef.internal.h \
|
libc/nt/pedef.internal.h \
|
||||||
|
|
|
@ -16,10 +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/mem/reverse.internal.h"
|
|
||||||
#include "libc/assert.h"
|
#include "libc/assert.h"
|
||||||
#include "libc/intrin/likely.h"
|
|
||||||
#include "libc/intrin/weaken.h"
|
|
||||||
#include "libc/calls/calls.h"
|
#include "libc/calls/calls.h"
|
||||||
#include "libc/calls/state.internal.h"
|
#include "libc/calls/state.internal.h"
|
||||||
#include "libc/calls/strace.internal.h"
|
#include "libc/calls/strace.internal.h"
|
||||||
|
@ -27,12 +24,13 @@
|
||||||
#include "libc/dce.h"
|
#include "libc/dce.h"
|
||||||
#include "libc/intrin/asan.internal.h"
|
#include "libc/intrin/asan.internal.h"
|
||||||
#include "libc/intrin/asancodes.h"
|
#include "libc/intrin/asancodes.h"
|
||||||
#include "libc/intrin/cmpxchg.h"
|
|
||||||
#include "libc/intrin/kprintf.h"
|
#include "libc/intrin/kprintf.h"
|
||||||
|
#include "libc/intrin/likely.h"
|
||||||
#include "libc/intrin/lockcmpxchg.h"
|
#include "libc/intrin/lockcmpxchg.h"
|
||||||
#include "libc/intrin/nomultics.internal.h"
|
#include "libc/intrin/nomultics.internal.h"
|
||||||
#include "libc/intrin/pthread.h"
|
#include "libc/intrin/pthread.h"
|
||||||
#include "libc/intrin/spinlock.h"
|
#include "libc/intrin/spinlock.h"
|
||||||
|
#include "libc/intrin/weaken.h"
|
||||||
#include "libc/log/backtrace.internal.h"
|
#include "libc/log/backtrace.internal.h"
|
||||||
#include "libc/log/internal.h"
|
#include "libc/log/internal.h"
|
||||||
#include "libc/log/libfatal.internal.h"
|
#include "libc/log/libfatal.internal.h"
|
||||||
|
@ -40,6 +38,7 @@
|
||||||
#include "libc/macros.internal.h"
|
#include "libc/macros.internal.h"
|
||||||
#include "libc/mem/hook/hook.internal.h"
|
#include "libc/mem/hook/hook.internal.h"
|
||||||
#include "libc/mem/mem.h"
|
#include "libc/mem/mem.h"
|
||||||
|
#include "libc/mem/reverse.internal.h"
|
||||||
#include "libc/nexgen32e/gc.internal.h"
|
#include "libc/nexgen32e/gc.internal.h"
|
||||||
#include "libc/nexgen32e/stackframe.h"
|
#include "libc/nexgen32e/stackframe.h"
|
||||||
#include "libc/nt/enum/version.h"
|
#include "libc/nt/enum/version.h"
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
#include "libc/dce.h"
|
#include "libc/dce.h"
|
||||||
#include "libc/macros.internal.h"
|
#include "libc/macros.internal.h"
|
||||||
#include "libc/nexgen32e/bsr.h"
|
#include "libc/nexgen32e/bsr.h"
|
||||||
#include "libc/nt/process.h"
|
|
||||||
#include "libc/nt/runtime.h"
|
#include "libc/nt/runtime.h"
|
||||||
#include "libc/sysv/consts/nr.h"
|
#include "libc/sysv/consts/nr.h"
|
||||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||||
|
@ -105,14 +104,6 @@ forceinline int __sysv_getpid(void) {
|
||||||
return ax;
|
return ax;
|
||||||
}
|
}
|
||||||
|
|
||||||
forceinline int __getpid(void) {
|
|
||||||
if (!IsWindows()) {
|
|
||||||
return __sysv_getpid();
|
|
||||||
} else {
|
|
||||||
return GetCurrentProcessId();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
forceinline ssize_t __write(const void *p, size_t n) {
|
forceinline ssize_t __write(const void *p, size_t n) {
|
||||||
uint32_t wrote;
|
uint32_t wrote;
|
||||||
if (!IsWindows()) {
|
if (!IsWindows()) {
|
||||||
|
|
|
@ -1,200 +0,0 @@
|
||||||
/*-*- mode:unix-assembly; indent-tabs-mode:t; tab-width:8; coding:utf-8 -*-│
|
|
||||||
│vi: set et ft=asm ts=8 sw=8 fenc=utf-8 :vi│
|
|
||||||
╞══════════════════════════════════════════════════════════════════════════════╡
|
|
||||||
│ Copyright 2020 Justine Alexandra Roberts Tunney │
|
|
||||||
│ │
|
|
||||||
│ Permission to use, copy, modify, and/or distribute this software for │
|
|
||||||
│ any purpose with or without fee is hereby granted, provided that the │
|
|
||||||
│ above copyright notice and this permission notice appear in all copies. │
|
|
||||||
│ │
|
|
||||||
│ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL │
|
|
||||||
│ WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED │
|
|
||||||
│ WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE │
|
|
||||||
│ AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL │
|
|
||||||
│ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR │
|
|
||||||
│ PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER │
|
|
||||||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
|
||||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
|
||||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
|
||||||
#include "libc/intrin/asancodes.h"
|
|
||||||
#include "ape/relocations.h"
|
|
||||||
/* clang-format off */
|
|
||||||
|
|
||||||
#if __MNO_VZEROUPPER__ + 0
|
|
||||||
#define vzeroupper
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Begins definition of frameless function that calls no functions.
|
|
||||||
.macro .leafprologue
|
|
||||||
#if !(defined(TINY) && !defined(__PG__))
|
|
||||||
push %rbp
|
|
||||||
mov %rsp,%rbp
|
|
||||||
#endif
|
|
||||||
.endm
|
|
||||||
|
|
||||||
// Ends definition of frameless function that calls no functions.
|
|
||||||
.macro .leafepilogue
|
|
||||||
#if !(defined(TINY) && !defined(__PG__))
|
|
||||||
pop %rbp
|
|
||||||
#endif
|
|
||||||
ret
|
|
||||||
.endm
|
|
||||||
|
|
||||||
// Good alignment for functions where alignment actually helps.
|
|
||||||
// @note 16-byte
|
|
||||||
.macro .alignfunc
|
|
||||||
#ifndef __OPTIMIZE_SIZE__
|
|
||||||
.p2align 4
|
|
||||||
#endif
|
|
||||||
.endm
|
|
||||||
|
|
||||||
// Good alignment for loops where alignment actually helps.
|
|
||||||
// @note 16-byte if <10 padding otherwise 8-byte
|
|
||||||
.macro .alignloop
|
|
||||||
#ifndef __OPTIMIZE_SIZE__
|
|
||||||
.p2align 4,,10
|
|
||||||
.p2align 4
|
|
||||||
#endif
|
|
||||||
.endm
|
|
||||||
|
|
||||||
// Loads Effective Address
|
|
||||||
// Supporting security blankets
|
|
||||||
.macro plea symbol:req reg64:req reg32:req
|
|
||||||
#if __PIC__ + __PIE__ + __code_model_medium__ + __code_model_large__ + 0 > 1
|
|
||||||
lea \symbol(%rip),\reg64
|
|
||||||
#else
|
|
||||||
mov $\symbol,\reg32
|
|
||||||
#endif
|
|
||||||
.endm
|
|
||||||
|
|
||||||
// Loads Effective Address to Stack
|
|
||||||
// Supporting security blankets
|
|
||||||
.macro pshaddr symbol:req
|
|
||||||
#if __PIC__ + __PIE__ + __code_model_medium__ + __code_model_large__ + 0 > 1
|
|
||||||
push $IMAGE_BASE_VIRTUAL+RVA(\symbol)(%rip),\reg64
|
|
||||||
#else
|
|
||||||
push $\symbol
|
|
||||||
#endif
|
|
||||||
.endm
|
|
||||||
|
|
||||||
// TODO(jart): delete
|
|
||||||
// Loads Effective Address
|
|
||||||
// Supporting security blankets
|
|
||||||
.macro ezlea symbol:req reg:req
|
|
||||||
#if __pic__ + __pie__ + __code_model_medium__ + __code_model_large__ + 0 > 1
|
|
||||||
// lea \symbol(%rip),%r\reg
|
|
||||||
mov $\symbol,%e\reg
|
|
||||||
#else
|
|
||||||
mov $\symbol,%e\reg
|
|
||||||
#endif
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro farcall symbol:req
|
|
||||||
.type \symbol,@function
|
|
||||||
#if __PIC__ + __PIE__ + __code_model_medium__ + __code_model_large__ + 0 > 1
|
|
||||||
call *\symbol\()@gotpcrel(%rip)
|
|
||||||
#else
|
|
||||||
call \symbol\()@plt
|
|
||||||
#endif
|
|
||||||
.endm
|
|
||||||
|
|
||||||
// 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.
|
|
||||||
//
|
|
||||||
// Cosmopolitan does this in a slightly different way from normal
|
|
||||||
// GNU toolchains. We always use the -mnop-mcount behavior, since
|
|
||||||
// the runtime is able to morph the binary at runtime. It is good
|
|
||||||
// since we can put hooks for profiling and function tracing into
|
|
||||||
// most builds, without any impact on performance.
|
|
||||||
//
|
|
||||||
// @cost ≥0.3 cycles, 5 bytes
|
|
||||||
// @see build/compile
|
|
||||||
.macro .profilable
|
|
||||||
#ifdef __PG__
|
|
||||||
1382:
|
|
||||||
#if defined(__MFENTRY__)
|
|
||||||
call __fentry__
|
|
||||||
#elif defined(__PIC__) || defined(__PIE__)
|
|
||||||
// nopw 0x00(%rax,%rax,1)
|
|
||||||
.byte 0x66,0x0f,0x1f,0x44,0x00,0x00
|
|
||||||
#else
|
|
||||||
// nopl 0x00(%rax,%rax,1)
|
|
||||||
.byte 0x0f,0x1f,0x44,0x00,0x00
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
.endm
|
|
||||||
|
|
||||||
// Pushes RVA on stack of linktime mergeable string literal.
|
|
||||||
// @see popstr
|
|
||||||
.macro pushstr text
|
|
||||||
.section .rodata.str1.1,"aSM",@progbits,1
|
|
||||||
.Lstr\@: .asciz "\text"
|
|
||||||
.endobj .Lstr\@
|
|
||||||
.previous
|
|
||||||
push $.Lstr\@ - IMAGE_BASE_VIRTUAL
|
|
||||||
.endm
|
|
||||||
|
|
||||||
// Pops off stack string address.
|
|
||||||
// @see pushstr
|
|
||||||
.macro popstr dest:req
|
|
||||||
addl $IMAGE_BASE_VIRTUAL,(%rsp)
|
|
||||||
pop \dest
|
|
||||||
.endm
|
|
||||||
|
|
||||||
// Loads address of linktime mergeable string literal into register.
|
|
||||||
.macro loadstr text:req reg:req regsz bias=0
|
|
||||||
.section .rodata.str1.1,"aSM",@progbits,1
|
|
||||||
.type .Lstr\@,@object
|
|
||||||
.Lstr\@: .asciz "\text"
|
|
||||||
.Lstr\@.size = .-.Lstr\@ - 1
|
|
||||||
.size .Lstr\@,.-.Lstr\@
|
|
||||||
.previous
|
|
||||||
ezlea .Lstr\@,\reg
|
|
||||||
.ifnb \regsz
|
|
||||||
#ifdef __OPTIMIZE_SIZE__
|
|
||||||
.if .Lstr\@.size + \bias < 128
|
|
||||||
pushpop .Lstr\@.size,%r\regsz
|
|
||||||
.else
|
|
||||||
mov $.Lstr\@.size,%e\regsz
|
|
||||||
.endif
|
|
||||||
#else
|
|
||||||
mov $.Lstr\@.size,%e\regsz
|
|
||||||
#endif
|
|
||||||
.endif
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro .poison name:req kind:req
|
|
||||||
#ifdef __SANITIZE_ADDRESS__
|
|
||||||
2323: .quad 0
|
|
||||||
.init.start 304,"_init_\name\()_poison_\@"
|
|
||||||
push %rdi
|
|
||||||
push %rsi
|
|
||||||
ezlea 2323b,di
|
|
||||||
mov $8,%esi
|
|
||||||
mov $\kind,%edx
|
|
||||||
call __asan_poison
|
|
||||||
pop %rsi
|
|
||||||
pop %rdi
|
|
||||||
.init.end 304,"_init_\name\()_poison_\@"
|
|
||||||
#endif
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro .underrun
|
|
||||||
#ifdef __SANITIZE_ADDRESS__
|
|
||||||
.poison __BASE_FILE__, kAsanGlobalUnderrun
|
|
||||||
#endif
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro .overrun
|
|
||||||
#ifdef __SANITIZE_ADDRESS__
|
|
||||||
.poison __BASE_FILE__, kAsanGlobalUnderrun
|
|
||||||
#endif
|
|
||||||
.endm
|
|
|
@ -34,7 +34,507 @@
|
||||||
#define __STRINGIFY(A) #A
|
#define __STRINGIFY(A) #A
|
||||||
#define __PASTE(A, B) A##B
|
#define __PASTE(A, B) A##B
|
||||||
#ifdef __ASSEMBLER__
|
#ifdef __ASSEMBLER__
|
||||||
#include "libc/macros-cpp.internal.inc"
|
// clang-format off
|
||||||
#include "libc/macros.internal.inc"
|
|
||||||
|
#if __MNO_VZEROUPPER__ + 0
|
||||||
|
#define vzeroupper
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Shorthand notation for widely-acknowledged sections.
|
||||||
|
.macro .rodata
|
||||||
|
.section .rodata,"a",@progbits
|
||||||
|
.endm
|
||||||
|
.macro .init
|
||||||
|
.section .init,"ax",@progbits
|
||||||
|
.endm
|
||||||
|
.macro .real
|
||||||
|
.section .text.real,"ax",@progbits
|
||||||
|
.endm
|
||||||
|
.macro .head
|
||||||
|
.section .text.head,"ax",@progbits
|
||||||
|
.endm
|
||||||
|
.macro .text.startup
|
||||||
|
.section .text.startup,"ax",@progbits
|
||||||
|
.endm
|
||||||
|
.macro .text.exit
|
||||||
|
.section .text.exit,"ax",@progbits
|
||||||
|
.endm
|
||||||
|
.macro .firstclass
|
||||||
|
.section .text.hot,"ax",@progbits
|
||||||
|
.endm
|
||||||
|
.macro .text.unlikely
|
||||||
|
.section .text.unlikely,"ax",@progbits
|
||||||
|
.endm
|
||||||
|
.macro .text.likely
|
||||||
|
.section .text.hot,"ax",@progbits
|
||||||
|
.endm
|
||||||
|
.macro .text.modernity
|
||||||
|
.section .text.modernity,"ax",@progbits
|
||||||
|
.align 16
|
||||||
|
.endm
|
||||||
|
.macro .text.antiquity
|
||||||
|
.section .text.antiquity,"ax",@progbits
|
||||||
|
.endm
|
||||||
|
.macro .text.hot
|
||||||
|
.section .text.hot,"ax",@progbits
|
||||||
|
.endm
|
||||||
|
.macro .preinit_array
|
||||||
|
.section .preinit_array,"a",@init_array
|
||||||
|
.endm
|
||||||
|
.macro .init_array
|
||||||
|
.section .init_array,"a",@init_array
|
||||||
|
.endm
|
||||||
|
.macro .text.windows
|
||||||
|
.section .text.windows,"ax",@progbits
|
||||||
|
.endm
|
||||||
|
|
||||||
|
// Mergeable numeric constant sections.
|
||||||
|
//
|
||||||
|
// @note linker de-dupes item/values across whole compile
|
||||||
|
// @note therefore item/values are reordered w.r.t. link order
|
||||||
|
// @note therefore no section relative addressing
|
||||||
|
.macro .rodata.cst4
|
||||||
|
.section .rodata.cst4,"aM",@progbits,4
|
||||||
|
.align 4
|
||||||
|
.endm
|
||||||
|
.macro .rodata.cst8
|
||||||
|
.section .rodata.cst8,"aM",@progbits,8
|
||||||
|
.align 8
|
||||||
|
.endm
|
||||||
|
.macro .rodata.cst16
|
||||||
|
.section .rodata.cst16,"aM",@progbits,16
|
||||||
|
.align 16
|
||||||
|
.endm
|
||||||
|
.macro .rodata.cst32
|
||||||
|
.section .rodata.cst32,"aM",@progbits,32
|
||||||
|
.align 32
|
||||||
|
.endm
|
||||||
|
.macro .rodata.cst64
|
||||||
|
.section .rodata.cst64,"aM",@progbits,64
|
||||||
|
.align 64
|
||||||
|
.endm
|
||||||
|
.macro .tdata
|
||||||
|
.section .tdata,"awT",@progbits
|
||||||
|
.align 4
|
||||||
|
.endm
|
||||||
|
.macro .tbss
|
||||||
|
.section .tdata,"awT",@nobits
|
||||||
|
.align 4
|
||||||
|
.endm
|
||||||
|
|
||||||
|
// Mergeable NUL-terminated UTF-8 string constant section.
|
||||||
|
//
|
||||||
|
// @note linker de-dupes C strings here across whole compile
|
||||||
|
// @note therefore item/values are reordered w.r.t. link order
|
||||||
|
// @note therefore no section relative addressing
|
||||||
|
.macro .rodata.str1.1
|
||||||
|
.section .rodata.str1.1,"aMS",@progbits,1
|
||||||
|
.align 1
|
||||||
|
.endm
|
||||||
|
|
||||||
|
// Locates unreferenced code invulnerable to --gc-sections.
|
||||||
|
.macro .keep.text
|
||||||
|
.section .keep.text,"ax",@progbits
|
||||||
|
.endm
|
||||||
|
|
||||||
|
// Flags code as only allowed for testing purposes.
|
||||||
|
.macro .testonly
|
||||||
|
.section .test,"ax",@progbits
|
||||||
|
.endm
|
||||||
|
|
||||||
|
// Makes code runnable while code morphing.
|
||||||
|
.macro .privileged
|
||||||
|
.section .privileged,"ax",@progbits
|
||||||
|
.endm
|
||||||
|
|
||||||
|
// Loads address of errno into %rcx
|
||||||
|
.macro .errno
|
||||||
|
call __errno_location
|
||||||
|
.endm
|
||||||
|
|
||||||
|
// Post-Initialization Read-Only (PIRO) BSS section.
|
||||||
|
// @param ss is an optional string, for control image locality
|
||||||
|
.macro .piro ss
|
||||||
|
.ifnb \ss
|
||||||
|
.section .piro.sort.bss.\ss,"aw",@nobits
|
||||||
|
.else
|
||||||
|
.section .piro.bss,"aw",@nobits
|
||||||
|
.endif
|
||||||
|
.endm
|
||||||
|
|
||||||
|
// Helpers for Cosmopolitan _init() amalgamation magic.
|
||||||
|
// @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
|
||||||
|
.align 8
|
||||||
|
.endm
|
||||||
|
.macro .initbss number:req name:req
|
||||||
|
.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":
|
||||||
|
.endm
|
||||||
|
.macro .init.end number:req name:req bnd=globl vis
|
||||||
|
.endfn "\name",\bnd,\vis
|
||||||
|
.previous
|
||||||
|
.endm
|
||||||
|
|
||||||
|
// Declares alternative implementation of function.
|
||||||
|
// @param implement e.g. tinymath_pow
|
||||||
|
// @param canonical e.g. pow
|
||||||
|
.macro .alias implement:req canonical:req
|
||||||
|
.equ \canonical,\implement
|
||||||
|
.weak \canonical
|
||||||
|
.endm
|
||||||
|
|
||||||
|
// Ends function definition.
|
||||||
|
// @cost saves 1-3 lines of code
|
||||||
|
.macro .endfn name:req bnd vis
|
||||||
|
.size "\name",.-"\name"
|
||||||
|
.type "\name",@function
|
||||||
|
.ifnb \bnd
|
||||||
|
.\bnd "\name"
|
||||||
|
.endif
|
||||||
|
.ifnb \vis
|
||||||
|
.\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
|
||||||
|
.ifnb \bnd
|
||||||
|
.\bnd "\name"
|
||||||
|
.endif
|
||||||
|
.ifnb \vis
|
||||||
|
.\vis "\name"
|
||||||
|
.endif
|
||||||
|
.endm
|
||||||
|
|
||||||
|
// LOOP Instruction Replacement.
|
||||||
|
.macro .loop label:req
|
||||||
|
.byte 0x83
|
||||||
|
.byte 0xe9
|
||||||
|
.byte 0x01
|
||||||
|
jnz \label
|
||||||
|
.endm
|
||||||
|
|
||||||
|
// Pushes CONSTEXPR ∈ [-128,127].
|
||||||
|
// @note assembler is wrong for non-literal constexprs
|
||||||
|
.macro pushb x:req
|
||||||
|
.byte 0x6a
|
||||||
|
.byte \x
|
||||||
|
.endm
|
||||||
|
|
||||||
|
// Sign-extends CONSTEXPR ∈ [-128,127] to REGISTER.
|
||||||
|
// @cost ≥1 cycles, -2 bytes
|
||||||
|
.macro pushpop constexpr:req register:req
|
||||||
|
pushb \constexpr
|
||||||
|
pop \register
|
||||||
|
.endm
|
||||||
|
|
||||||
|
// Moves REGISTER to REGISTER.
|
||||||
|
// @cost ≥1 cycles, -1 REX byte
|
||||||
|
.macro movpp src:req dest:req
|
||||||
|
push \src
|
||||||
|
pop \dest
|
||||||
|
.endm
|
||||||
|
|
||||||
|
// Declares optional function.
|
||||||
|
.macro .optfn fn:req
|
||||||
|
.globl "\fn"
|
||||||
|
.weak "\fn"
|
||||||
|
.equ "\fn",missingno
|
||||||
|
.type "\fn",@function
|
||||||
|
.endm
|
||||||
|
|
||||||
|
// Embeds fixed-width zero-filled string table.
|
||||||
|
// @note zero-padded ≠ nul-terminated
|
||||||
|
.macro .fxstr width head rest:vararg
|
||||||
|
.ifnb \head
|
||||||
|
0: .ascii "\head"
|
||||||
|
.org 0b+\width
|
||||||
|
.fxstr \width,\rest
|
||||||
|
.endif
|
||||||
|
.endm
|
||||||
|
|
||||||
|
// Embeds Fixed-Width Zero-Padded String.
|
||||||
|
// @note .fxstr is better
|
||||||
|
.macro .ascin str:req fieldsize:req
|
||||||
|
1347: .ascii "\str"
|
||||||
|
.org 1347b+\fieldsize,0x00
|
||||||
|
.endm
|
||||||
|
|
||||||
|
// Marks symbols as object en-masse.
|
||||||
|
// @note zero-padded ≠ nul-terminated
|
||||||
|
.macro .object symbol rest:vararg
|
||||||
|
.ifnb \symbol
|
||||||
|
.type \symbol,@object
|
||||||
|
.object \rest
|
||||||
|
.endif
|
||||||
|
.endm
|
||||||
|
|
||||||
|
// Pads function prologue unconditionally for runtime hooking.
|
||||||
|
// @cost ≥0.3 cycles, 5 bytes
|
||||||
|
// @see .profilable
|
||||||
|
.macro .hookable
|
||||||
|
.byte 0x0f
|
||||||
|
.byte 0x1f
|
||||||
|
.byte 0x44
|
||||||
|
.byte 0x00
|
||||||
|
.byte 0x00
|
||||||
|
.endm
|
||||||
|
|
||||||
|
// 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
|
||||||
|
.previous
|
||||||
|
.section ".initro.300._init_\name","a",@progbits
|
||||||
|
.quad \expr
|
||||||
|
.previous
|
||||||
|
.section ".init.300._init_\name","ax",@progbits
|
||||||
|
"_init_\name":
|
||||||
|
movsq
|
||||||
|
.endfn "_init_\name"
|
||||||
|
.previous
|
||||||
|
.endm
|
||||||
|
|
||||||
|
// ICE Breakpoint.
|
||||||
|
// Modern gas forgot this but objdump knows
|
||||||
|
// @mode long,legacy,real
|
||||||
|
.macro icebp
|
||||||
|
.byte 0xF1
|
||||||
|
.endm
|
||||||
|
.macro int1
|
||||||
|
icebp
|
||||||
|
.endm
|
||||||
|
|
||||||
|
// Sets breakpoint for software debugger.
|
||||||
|
// @mode long,legacy,real
|
||||||
|
.macro .softicebp
|
||||||
|
.byte 0x53 # push bx
|
||||||
|
.byte 0x87 # xchg bx,bx (bochs breakpoint)
|
||||||
|
.byte 0xdb
|
||||||
|
.byte 0x5b # pop bx
|
||||||
|
.byte 0x66 # xchg ax,ax (microsoft breakpoint)
|
||||||
|
.byte 0x90
|
||||||
|
int3 # gdb breakpoint
|
||||||
|
.endm
|
||||||
|
|
||||||
|
// Assembles Intel Official 4-Byte NOP.
|
||||||
|
.macro fatnop4
|
||||||
|
.byte 0x0f,0x1f,0x40,0x00
|
||||||
|
.endm
|
||||||
|
|
||||||
|
// Pulls unrelated module into linkage.
|
||||||
|
//
|
||||||
|
// In order for this technique to work with --gc-sections, another
|
||||||
|
// module somewhere might want to weakly reference whats yoinked.
|
||||||
|
.macro .yoink symbol:req
|
||||||
|
.section .yoink
|
||||||
|
nopl "\symbol"(%rip)
|
||||||
|
.previous
|
||||||
|
.endm
|
||||||
|
|
||||||
|
// Calls Windows function.
|
||||||
|
//
|
||||||
|
// @param cx,dx,r8,r9,stack
|
||||||
|
// @return ax
|
||||||
|
// @clob ax,cx,dx,r8-r11
|
||||||
|
.macro ntcall symbol:req
|
||||||
|
sub $32,%rsp
|
||||||
|
call *\symbol(%rip)
|
||||||
|
add $32,%rsp
|
||||||
|
.endm
|
||||||
|
|
||||||
|
// Custom emulator instruction for bottom stack frame.
|
||||||
|
.macro bofram endfunc:req
|
||||||
|
.byte 0x0f,0x1f,0105,\endfunc-. # nopl disp8(%rbp)
|
||||||
|
.endm
|
||||||
|
|
||||||
|
// Begins definition of frameless function that calls no functions.
|
||||||
|
.macro .leafprologue
|
||||||
|
#if !(defined(TINY) && !defined(__PG__))
|
||||||
|
push %rbp
|
||||||
|
mov %rsp,%rbp
|
||||||
|
#endif
|
||||||
|
.endm
|
||||||
|
|
||||||
|
// Ends definition of frameless function that calls no functions.
|
||||||
|
.macro .leafepilogue
|
||||||
|
#if !(defined(TINY) && !defined(__PG__))
|
||||||
|
pop %rbp
|
||||||
|
#endif
|
||||||
|
ret
|
||||||
|
.endm
|
||||||
|
|
||||||
|
// Good alignment for functions where alignment actually helps.
|
||||||
|
// @note 16-byte
|
||||||
|
.macro .alignfunc
|
||||||
|
#ifndef __OPTIMIZE_SIZE__
|
||||||
|
.p2align 4
|
||||||
|
#endif
|
||||||
|
.endm
|
||||||
|
|
||||||
|
// Good alignment for loops where alignment actually helps.
|
||||||
|
// @note 16-byte if <10 padding otherwise 8-byte
|
||||||
|
.macro .alignloop
|
||||||
|
#ifndef __OPTIMIZE_SIZE__
|
||||||
|
.p2align 4,,10
|
||||||
|
.p2align 4
|
||||||
|
#endif
|
||||||
|
.endm
|
||||||
|
|
||||||
|
// Loads Effective Address
|
||||||
|
// Supporting security blankets
|
||||||
|
.macro plea symbol:req reg64:req reg32:req
|
||||||
|
#if __PIC__ + __PIE__ + __code_model_medium__ + __code_model_large__ + 0 > 1
|
||||||
|
lea \symbol(%rip),\reg64
|
||||||
|
#else
|
||||||
|
mov $\symbol,\reg32
|
||||||
|
#endif
|
||||||
|
.endm
|
||||||
|
|
||||||
|
// Loads Effective Address to Stack
|
||||||
|
// Supporting security blankets
|
||||||
|
.macro pshaddr symbol:req
|
||||||
|
#if __PIC__ + __PIE__ + __code_model_medium__ + __code_model_large__ + 0 > 1
|
||||||
|
push $IMAGE_BASE_VIRTUAL+RVA(\symbol)(%rip),\reg64
|
||||||
|
#else
|
||||||
|
push $\symbol
|
||||||
|
#endif
|
||||||
|
.endm
|
||||||
|
|
||||||
|
// TODO(jart): delete
|
||||||
|
// Loads Effective Address
|
||||||
|
// Supporting security blankets
|
||||||
|
.macro ezlea symbol:req reg:req
|
||||||
|
#if __pic__ + __pie__ + __code_model_medium__ + __code_model_large__ + 0 > 1
|
||||||
|
// lea \symbol(%rip),%r\reg
|
||||||
|
mov $\symbol,%e\reg
|
||||||
|
#else
|
||||||
|
mov $\symbol,%e\reg
|
||||||
|
#endif
|
||||||
|
.endm
|
||||||
|
|
||||||
|
.macro farcall symbol:req
|
||||||
|
.type \symbol,@function
|
||||||
|
#if __PIC__ + __PIE__ + __code_model_medium__ + __code_model_large__ + 0 > 1
|
||||||
|
call *\symbol\()@gotpcrel(%rip)
|
||||||
|
#else
|
||||||
|
call \symbol\()@plt
|
||||||
|
#endif
|
||||||
|
.endm
|
||||||
|
|
||||||
|
// 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.
|
||||||
|
//
|
||||||
|
// Cosmopolitan does this in a slightly different way from normal
|
||||||
|
// GNU toolchains. We always use the -mnop-mcount behavior, since
|
||||||
|
// the runtime is able to morph the binary at runtime. It is good
|
||||||
|
// since we can put hooks for profiling and function tracing into
|
||||||
|
// most builds, without any impact on performance.
|
||||||
|
//
|
||||||
|
// @cost ≥0.3 cycles, 5 bytes
|
||||||
|
// @see build/compile
|
||||||
|
.macro .profilable
|
||||||
|
#ifdef __PG__
|
||||||
|
1382:
|
||||||
|
#if defined(__MFENTRY__)
|
||||||
|
call __fentry__
|
||||||
|
#elif defined(__PIC__) || defined(__PIE__)
|
||||||
|
// nopw 0x00(%rax,%rax,1)
|
||||||
|
.byte 0x66,0x0f,0x1f,0x44,0x00,0x00
|
||||||
|
#else
|
||||||
|
// nopl 0x00(%rax,%rax,1)
|
||||||
|
.byte 0x0f,0x1f,0x44,0x00,0x00
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
.endm
|
||||||
|
|
||||||
|
// Pushes RVA on stack of linktime mergeable string literal.
|
||||||
|
// @see popstr
|
||||||
|
.macro pushstr text
|
||||||
|
.section .rodata.str1.1,"aSM",@progbits,1
|
||||||
|
.Lstr\@: .asciz "\text"
|
||||||
|
.endobj .Lstr\@
|
||||||
|
.previous
|
||||||
|
push $.Lstr\@ - IMAGE_BASE_VIRTUAL
|
||||||
|
.endm
|
||||||
|
|
||||||
|
// Pops off stack string address.
|
||||||
|
// @see pushstr
|
||||||
|
.macro popstr dest:req
|
||||||
|
addl $IMAGE_BASE_VIRTUAL,(%rsp)
|
||||||
|
pop \dest
|
||||||
|
.endm
|
||||||
|
|
||||||
|
// Loads address of linktime mergeable string literal into register.
|
||||||
|
.macro loadstr text:req reg:req regsz bias=0
|
||||||
|
.section .rodata.str1.1,"aSM",@progbits,1
|
||||||
|
.type .Lstr\@,@object
|
||||||
|
.Lstr\@: .asciz "\text"
|
||||||
|
.Lstr\@.size = .-.Lstr\@ - 1
|
||||||
|
.size .Lstr\@,.-.Lstr\@
|
||||||
|
.previous
|
||||||
|
ezlea .Lstr\@,\reg
|
||||||
|
.ifnb \regsz
|
||||||
|
#ifdef __OPTIMIZE_SIZE__
|
||||||
|
.if .Lstr\@.size + \bias < 128
|
||||||
|
pushpop .Lstr\@.size,%r\regsz
|
||||||
|
.else
|
||||||
|
mov $.Lstr\@.size,%e\regsz
|
||||||
|
.endif
|
||||||
|
#else
|
||||||
|
mov $.Lstr\@.size,%e\regsz
|
||||||
|
#endif
|
||||||
|
.endif
|
||||||
|
.endm
|
||||||
|
|
||||||
|
.macro .poison name:req kind:req
|
||||||
|
#ifdef __SANITIZE_ADDRESS__
|
||||||
|
2323: .quad 0
|
||||||
|
.init.start 304,"_init_\name\()_poison_\@"
|
||||||
|
push %rdi
|
||||||
|
push %rsi
|
||||||
|
ezlea 2323b,di
|
||||||
|
mov $8,%esi
|
||||||
|
mov $\kind,%edx
|
||||||
|
call __asan_poison
|
||||||
|
pop %rsi
|
||||||
|
pop %rdi
|
||||||
|
.init.end 304,"_init_\name\()_poison_\@"
|
||||||
|
#endif
|
||||||
|
.endm
|
||||||
|
|
||||||
|
.macro .underrun
|
||||||
|
#ifdef __SANITIZE_ADDRESS__
|
||||||
|
.poison __BASE_FILE__, kAsanGlobalUnderrun
|
||||||
|
#endif
|
||||||
|
.endm
|
||||||
|
|
||||||
|
.macro .overrun
|
||||||
|
#ifdef __SANITIZE_ADDRESS__
|
||||||
|
.poison __BASE_FILE__, kAsanGlobalUnderrun
|
||||||
|
#endif
|
||||||
|
.endm
|
||||||
|
|
||||||
|
// clang-format on
|
||||||
#endif /* __ASSEMBLER__ */
|
#endif /* __ASSEMBLER__ */
|
||||||
#endif /* COSMOPOLITAN_LIBC_MACROS_H_ */
|
#endif /* COSMOPOLITAN_LIBC_MACROS_H_ */
|
||||||
|
|
|
@ -1,334 +0,0 @@
|
||||||
/*-*- mode:unix-assembly; indent-tabs-mode:t; tab-width:8; coding:utf-8 -*-│
|
|
||||||
│vi: set et ft=asm ts=8 sw=8 fenc=utf-8 :vi│
|
|
||||||
╞══════════════════════════════════════════════════════════════════════════════╡
|
|
||||||
│ Copyright 2020 Justine Alexandra Roberts Tunney │
|
|
||||||
│ │
|
|
||||||
│ Permission to use, copy, modify, and/or distribute this software for │
|
|
||||||
│ any purpose with or without fee is hereby granted, provided that the │
|
|
||||||
│ above copyright notice and this permission notice appear in all copies. │
|
|
||||||
│ │
|
|
||||||
│ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL │
|
|
||||||
│ WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED │
|
|
||||||
│ WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE │
|
|
||||||
│ AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL │
|
|
||||||
│ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR │
|
|
||||||
│ PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER │
|
|
||||||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
|
||||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
|
||||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
|
||||||
|
|
||||||
// Shorthand notation for widely-acknowledged sections.
|
|
||||||
.macro .rodata
|
|
||||||
.section .rodata,"a",@progbits
|
|
||||||
.endm
|
|
||||||
.macro .init
|
|
||||||
.section .init,"ax",@progbits
|
|
||||||
.endm
|
|
||||||
.macro .real
|
|
||||||
.section .text.real,"ax",@progbits
|
|
||||||
.endm
|
|
||||||
.macro .head
|
|
||||||
.section .text.head,"ax",@progbits
|
|
||||||
.endm
|
|
||||||
.macro .text.startup
|
|
||||||
.section .text.startup,"ax",@progbits
|
|
||||||
.endm
|
|
||||||
.macro .text.exit
|
|
||||||
.section .text.exit,"ax",@progbits
|
|
||||||
.endm
|
|
||||||
.macro .firstclass
|
|
||||||
.section .text.hot,"ax",@progbits
|
|
||||||
.endm
|
|
||||||
.macro .text.unlikely
|
|
||||||
.section .text.unlikely,"ax",@progbits
|
|
||||||
.endm
|
|
||||||
.macro .text.likely
|
|
||||||
.section .text.hot,"ax",@progbits
|
|
||||||
.endm
|
|
||||||
.macro .text.modernity
|
|
||||||
.section .text.modernity,"ax",@progbits
|
|
||||||
.align 16
|
|
||||||
.endm
|
|
||||||
.macro .text.antiquity
|
|
||||||
.section .text.antiquity,"ax",@progbits
|
|
||||||
.endm
|
|
||||||
.macro .text.hot
|
|
||||||
.section .text.hot,"ax",@progbits
|
|
||||||
.endm
|
|
||||||
.macro .preinit_array
|
|
||||||
.section .preinit_array,"a",@init_array
|
|
||||||
.endm
|
|
||||||
.macro .init_array
|
|
||||||
.section .init_array,"a",@init_array
|
|
||||||
.endm
|
|
||||||
.macro .text.windows
|
|
||||||
.section .text.windows,"ax",@progbits
|
|
||||||
.endm
|
|
||||||
|
|
||||||
// Mergeable numeric constant sections.
|
|
||||||
//
|
|
||||||
// @note linker de-dupes item/values across whole compile
|
|
||||||
// @note therefore item/values are reordered w.r.t. link order
|
|
||||||
// @note therefore no section relative addressing
|
|
||||||
.macro .rodata.cst4
|
|
||||||
.section .rodata.cst4,"aM",@progbits,4
|
|
||||||
.align 4
|
|
||||||
.endm
|
|
||||||
.macro .rodata.cst8
|
|
||||||
.section .rodata.cst8,"aM",@progbits,8
|
|
||||||
.align 8
|
|
||||||
.endm
|
|
||||||
.macro .rodata.cst16
|
|
||||||
.section .rodata.cst16,"aM",@progbits,16
|
|
||||||
.align 16
|
|
||||||
.endm
|
|
||||||
.macro .rodata.cst32
|
|
||||||
.section .rodata.cst32,"aM",@progbits,32
|
|
||||||
.align 32
|
|
||||||
.endm
|
|
||||||
.macro .rodata.cst64
|
|
||||||
.section .rodata.cst64,"aM",@progbits,64
|
|
||||||
.align 64
|
|
||||||
.endm
|
|
||||||
.macro .tdata
|
|
||||||
.section .tdata,"awT",@progbits
|
|
||||||
.align 4
|
|
||||||
.endm
|
|
||||||
.macro .tbss
|
|
||||||
.section .tdata,"awT",@nobits
|
|
||||||
.align 4
|
|
||||||
.endm
|
|
||||||
|
|
||||||
// Mergeable NUL-terminated UTF-8 string constant section.
|
|
||||||
//
|
|
||||||
// @note linker de-dupes C strings here across whole compile
|
|
||||||
// @note therefore item/values are reordered w.r.t. link order
|
|
||||||
// @note therefore no section relative addressing
|
|
||||||
.macro .rodata.str1.1
|
|
||||||
.section .rodata.str1.1,"aMS",@progbits,1
|
|
||||||
.align 1
|
|
||||||
.endm
|
|
||||||
|
|
||||||
// Locates unreferenced code invulnerable to --gc-sections.
|
|
||||||
.macro .keep.text
|
|
||||||
.section .keep.text,"ax",@progbits
|
|
||||||
.endm
|
|
||||||
|
|
||||||
// Flags code as only allowed for testing purposes.
|
|
||||||
.macro .testonly
|
|
||||||
.section .test,"ax",@progbits
|
|
||||||
.endm
|
|
||||||
|
|
||||||
// Makes code runnable while code morphing.
|
|
||||||
.macro .privileged
|
|
||||||
.section .privileged,"ax",@progbits
|
|
||||||
.endm
|
|
||||||
|
|
||||||
// Loads address of errno into %rcx
|
|
||||||
.macro .errno
|
|
||||||
call __errno_location
|
|
||||||
.endm
|
|
||||||
|
|
||||||
// Post-Initialization Read-Only (PIRO) BSS section.
|
|
||||||
// @param ss is an optional string, for control image locality
|
|
||||||
.macro .piro ss
|
|
||||||
.ifnb \ss
|
|
||||||
.section .piro.sort.bss.\ss,"aw",@nobits
|
|
||||||
.else
|
|
||||||
.section .piro.bss,"aw",@nobits
|
|
||||||
.endif
|
|
||||||
.endm
|
|
||||||
|
|
||||||
// Helpers for Cosmopolitan _init() amalgamation magic.
|
|
||||||
// @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
|
|
||||||
.align 8
|
|
||||||
.endm
|
|
||||||
.macro .initbss number:req name:req
|
|
||||||
.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":
|
|
||||||
.endm
|
|
||||||
.macro .init.end number:req name:req bnd=globl vis
|
|
||||||
.endfn "\name",\bnd,\vis
|
|
||||||
.previous
|
|
||||||
.endm
|
|
||||||
|
|
||||||
// Declares alternative implementation of function.
|
|
||||||
// @param implement e.g. tinymath_pow
|
|
||||||
// @param canonical e.g. pow
|
|
||||||
.macro .alias implement:req canonical:req
|
|
||||||
.equ \canonical,\implement
|
|
||||||
.weak \canonical
|
|
||||||
.endm
|
|
||||||
|
|
||||||
// Ends function definition.
|
|
||||||
// @cost saves 1-3 lines of code
|
|
||||||
.macro .endfn name:req bnd vis
|
|
||||||
.size "\name",.-"\name"
|
|
||||||
.type "\name",@function
|
|
||||||
.ifnb \bnd
|
|
||||||
.\bnd "\name"
|
|
||||||
.endif
|
|
||||||
.ifnb \vis
|
|
||||||
.\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
|
|
||||||
.ifnb \bnd
|
|
||||||
.\bnd "\name"
|
|
||||||
.endif
|
|
||||||
.ifnb \vis
|
|
||||||
.\vis "\name"
|
|
||||||
.endif
|
|
||||||
.endm
|
|
||||||
|
|
||||||
// LOOP Instruction Replacement.
|
|
||||||
.macro .loop label:req
|
|
||||||
.byte 0x83,0xe9,0x01 # sub §1,%ecx
|
|
||||||
jnz \label
|
|
||||||
.endm
|
|
||||||
|
|
||||||
// Pushes CONSTEXPR ∈ [-128,127].
|
|
||||||
// @note assembler is wrong for non-literal constexprs
|
|
||||||
.macro pushb x:req
|
|
||||||
.byte 0x6a,\x
|
|
||||||
.endm
|
|
||||||
|
|
||||||
// Sign-extends CONSTEXPR ∈ [-128,127] to REGISTER.
|
|
||||||
// @cost ≥1 cycles, -2 bytes
|
|
||||||
.macro pushpop constexpr:req register:req
|
|
||||||
pushb \constexpr
|
|
||||||
pop \register
|
|
||||||
.endm
|
|
||||||
|
|
||||||
// Moves REGISTER to REGISTER.
|
|
||||||
// @cost ≥1 cycles, -1 REX byte
|
|
||||||
.macro movpp src:req dest:req
|
|
||||||
push \src
|
|
||||||
pop \dest
|
|
||||||
.endm
|
|
||||||
|
|
||||||
// Declares optional function.
|
|
||||||
.macro .optfn fn:req
|
|
||||||
.globl "\fn"
|
|
||||||
.weak "\fn"
|
|
||||||
.equ "\fn",missingno
|
|
||||||
.type "\fn",@function
|
|
||||||
.endm
|
|
||||||
|
|
||||||
// Embeds fixed-width zero-filled string table.
|
|
||||||
// @note zero-padded ≠ nul-terminated
|
|
||||||
.macro .fxstr width head rest:vararg
|
|
||||||
.ifnb \head
|
|
||||||
0: .ascii "\head"
|
|
||||||
.org 0b+\width
|
|
||||||
.fxstr \width,\rest
|
|
||||||
.endif
|
|
||||||
.endm
|
|
||||||
|
|
||||||
// Embeds Fixed-Width Zero-Padded String.
|
|
||||||
// @note .fxstr is better
|
|
||||||
.macro .ascin str:req fieldsize:req
|
|
||||||
1347: .ascii "\str"
|
|
||||||
.org 1347b+\fieldsize,0x00
|
|
||||||
.endm
|
|
||||||
|
|
||||||
// Marks symbols as object en-masse.
|
|
||||||
// @note zero-padded ≠ nul-terminated
|
|
||||||
.macro .object symbol rest:vararg
|
|
||||||
.ifnb \symbol
|
|
||||||
.type \symbol,@object
|
|
||||||
.object \rest
|
|
||||||
.endif
|
|
||||||
.endm
|
|
||||||
|
|
||||||
// Pads function prologue unconditionally for runtime hooking.
|
|
||||||
// @cost ≥0.3 cycles, 5 bytes
|
|
||||||
// @see .profilable
|
|
||||||
.macro .hookable
|
|
||||||
.byte 0x0f,0x1f,0x44,0x00,0x00
|
|
||||||
.endm
|
|
||||||
|
|
||||||
// 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
|
|
||||||
.previous
|
|
||||||
.section ".initro.300._init_\name","a",@progbits
|
|
||||||
.quad \expr
|
|
||||||
.previous
|
|
||||||
.section ".init.300._init_\name","ax",@progbits
|
|
||||||
"_init_\name":
|
|
||||||
movsq
|
|
||||||
.endfn "_init_\name"
|
|
||||||
.previous
|
|
||||||
.endm
|
|
||||||
|
|
||||||
// ICE Breakpoint.
|
|
||||||
// Modern gas forgot this but objdump knows
|
|
||||||
// @mode long,legacy,real
|
|
||||||
.macro icebp
|
|
||||||
.byte 0xF1
|
|
||||||
.endm
|
|
||||||
.macro int1
|
|
||||||
icebp
|
|
||||||
.endm
|
|
||||||
|
|
||||||
// Sets breakpoint for software debugger.
|
|
||||||
// @mode long,legacy,real
|
|
||||||
.macro .softicebp
|
|
||||||
.byte 0x53 # push bx
|
|
||||||
.byte 0x87,0xdb # xchg bx,bx (bochs breakpoint)
|
|
||||||
.byte 0x5b # pop bx
|
|
||||||
.byte 0x66,0x90 # xchg ax,ax (microsoft breakpoint)
|
|
||||||
int3 # gdb breakpoint
|
|
||||||
.endm
|
|
||||||
|
|
||||||
// Assembles Intel Official 4-Byte NOP.
|
|
||||||
.macro fatnop4
|
|
||||||
.byte 0x0f,0x1f,0x40,0x00
|
|
||||||
.endm
|
|
||||||
|
|
||||||
// Pulls unrelated module into linkage.
|
|
||||||
//
|
|
||||||
// In order for this technique to work with --gc-sections, another
|
|
||||||
// module somewhere might want to weakly reference whats yoinked.
|
|
||||||
.macro yoink symbol:req
|
|
||||||
.section .yoink
|
|
||||||
nopl "\symbol"(%rip)
|
|
||||||
.previous
|
|
||||||
.endm
|
|
||||||
.macro .yoink symbol:req
|
|
||||||
.section .yoink
|
|
||||||
nopl "\symbol"(%rip)
|
|
||||||
.previous
|
|
||||||
.endm
|
|
||||||
|
|
||||||
// Calls Windows function.
|
|
||||||
//
|
|
||||||
// @param cx,dx,r8,r9,stack
|
|
||||||
// @return ax
|
|
||||||
// @clob ax,cx,dx,r8-r11
|
|
||||||
.macro ntcall symbol:req
|
|
||||||
sub $32,%rsp
|
|
||||||
call *\symbol(%rip)
|
|
||||||
add $32,%rsp
|
|
||||||
.endm
|
|
||||||
|
|
||||||
// Custom emulator instruction for bottom stack frame.
|
|
||||||
.macro bofram endfunc:req
|
|
||||||
.byte 0x0f,0x1f,0105,\endfunc-. # nopl disp8(%rbp)
|
|
||||||
.endm
|
|
|
@ -28,5 +28,5 @@ hook_calloc:
|
||||||
.hidden dlcalloc
|
.hidden dlcalloc
|
||||||
ezlea dlcalloc,ax
|
ezlea dlcalloc,ax
|
||||||
stosq
|
stosq
|
||||||
yoink free
|
.yoink free
|
||||||
.init.end 202,_init_calloc
|
.init.end 202,_init_calloc
|
||||||
|
|
|
@ -27,7 +27,7 @@ hook_free:
|
||||||
.init.start 202,_init_free
|
.init.start 202,_init_free
|
||||||
ezlea dlfree,ax
|
ezlea dlfree,ax
|
||||||
stosq
|
stosq
|
||||||
yoink realloc
|
.yoink realloc
|
||||||
.init.end 202,_init_free
|
.init.end 202,_init_free
|
||||||
|
|
||||||
.hidden dlfree
|
.hidden dlfree
|
||||||
|
|
|
@ -28,5 +28,5 @@ hook_malloc:
|
||||||
.hidden dlmalloc
|
.hidden dlmalloc
|
||||||
ezlea dlmalloc,ax
|
ezlea dlmalloc,ax
|
||||||
stosq
|
stosq
|
||||||
yoink free
|
.yoink free
|
||||||
.init.end 202,_init_malloc
|
.init.end 202,_init_malloc
|
||||||
|
|
|
@ -28,5 +28,5 @@ hook_malloc_trim:
|
||||||
.hidden dlmalloc_trim
|
.hidden dlmalloc_trim
|
||||||
ezlea dlmalloc_trim,ax
|
ezlea dlmalloc_trim,ax
|
||||||
stosq
|
stosq
|
||||||
yoink free
|
.yoink free
|
||||||
.init.end 202,_init_malloc_trim
|
.init.end 202,_init_malloc_trim
|
||||||
|
|
|
@ -28,5 +28,5 @@ hook_memalign:
|
||||||
.hidden dlmemalign
|
.hidden dlmemalign
|
||||||
ezlea dlmemalign,ax
|
ezlea dlmemalign,ax
|
||||||
stosq
|
stosq
|
||||||
yoink free
|
.yoink free
|
||||||
.init.end 202,_init_memalign
|
.init.end 202,_init_memalign
|
||||||
|
|
|
@ -28,5 +28,5 @@ hook_realloc:
|
||||||
.hidden dlrealloc
|
.hidden dlrealloc
|
||||||
ezlea dlrealloc,ax
|
ezlea dlrealloc,ax
|
||||||
stosq
|
stosq
|
||||||
yoink free
|
.yoink free
|
||||||
.init.end 202,_init_realloc
|
.init.end 202,_init_realloc
|
||||||
|
|
|
@ -28,5 +28,5 @@ hook_realloc_in_place:
|
||||||
.hidden dlrealloc_in_place
|
.hidden dlrealloc_in_place
|
||||||
ezlea dlrealloc_in_place,ax
|
ezlea dlrealloc_in_place,ax
|
||||||
stosq
|
stosq
|
||||||
yoink free
|
.yoink free
|
||||||
.init.end 202,_init_realloc_in_place
|
.init.end 202,_init_realloc_in_place
|
||||||
|
|
|
@ -142,8 +142,6 @@ o/libc/nt/ntdllimport.inc: \
|
||||||
ape/relocations.h \
|
ape/relocations.h \
|
||||||
libc/nt/ntdllimport.h \
|
libc/nt/ntdllimport.h \
|
||||||
libc/macros.internal.h \
|
libc/macros.internal.h \
|
||||||
libc/macros.internal.inc \
|
|
||||||
libc/macros-cpp.internal.inc \
|
|
||||||
libc/intrin/asancodes.h
|
libc/intrin/asancodes.h
|
||||||
|
|
||||||
#───────────────────────────────────────────────────────────────────────────────
|
#───────────────────────────────────────────────────────────────────────────────
|
||||||
|
@ -337,8 +335,6 @@ o/libc/nt/codegen.inc: \
|
||||||
ape/macros.internal.h \
|
ape/macros.internal.h \
|
||||||
ape/relocations.h \
|
ape/relocations.h \
|
||||||
libc/macros.internal.h \
|
libc/macros.internal.h \
|
||||||
libc/macros.internal.inc \
|
|
||||||
libc/macros-cpp.internal.inc \
|
|
||||||
libc/intrin/asancodes.h
|
libc/intrin/asancodes.h
|
||||||
|
|
||||||
.PHONY: o/$(MODE)/libc/nt
|
.PHONY: o/$(MODE)/libc/nt
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
/* clang-format off */
|
/* clang-format off */
|
||||||
|
|
||||||
.macro .ntimp fn:req
|
.macro .ntimp fn:req
|
||||||
yoink _init_ntdll
|
.yoink _init_ntdll
|
||||||
.initbss 202,_init_ntdll.\fn
|
.initbss 202,_init_ntdll.\fn
|
||||||
__imp_\fn:
|
__imp_\fn:
|
||||||
.quad 0
|
.quad 0
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
// @param r15 is envp (still callee saved)
|
// @param r15 is envp (still callee saved)
|
||||||
// @note rdi is __init_bss_start (callee monotonic lockstep)
|
// @note rdi is __init_bss_start (callee monotonic lockstep)
|
||||||
// @note rsi is __init_rodata_start (callee monotonic lockstep)
|
// @note rsi is __init_rodata_start (callee monotonic lockstep)
|
||||||
// @see .init.start & .init.end (libc/macros.internal.inc)
|
// @see .init.start & .init.end (libc/macros.internal.h)
|
||||||
// @see ape/ape.lds
|
// @see ape/ape.lds
|
||||||
.section .initprologue,"ax",@progbits
|
.section .initprologue,"ax",@progbits
|
||||||
.type _init,@function
|
.type _init,@function
|
||||||
|
@ -76,7 +76,7 @@ _woot: leave
|
||||||
|
|
||||||
// Decentralized section for packed data structures & initializers.
|
// Decentralized section for packed data structures & initializers.
|
||||||
//
|
//
|
||||||
// @see .initro (libc/macros.internal.inc)
|
// @see .initro (libc/macros.internal.h)
|
||||||
// @see ape/ape.lds
|
// @see ape/ape.lds
|
||||||
.section .initroprologue,"a",@progbits
|
.section .initroprologue,"a",@progbits
|
||||||
.type __init_rodata_start,@object
|
.type __init_rodata_start,@object
|
||||||
|
@ -100,7 +100,7 @@ __init_rodata_end:
|
||||||
//
|
//
|
||||||
// Data in this section becomes read-only after initialization.
|
// Data in this section becomes read-only after initialization.
|
||||||
//
|
//
|
||||||
// @see .piro.bss.init (libc/macros.internal.inc)
|
// @see .piro.bss.init (libc/macros.internal.h)
|
||||||
// @see libc/runtime/piro.c
|
// @see libc/runtime/piro.c
|
||||||
// @see ape/ape.lds
|
// @see ape/ape.lds
|
||||||
.section .piro.bss.init.1,"aw",@nobits
|
.section .piro.bss.init.1,"aw",@nobits
|
||||||
|
|
92
libc/str/keastasianwidth.S
Normal file
92
libc/str/keastasianwidth.S
Normal file
|
@ -0,0 +1,92 @@
|
||||||
|
// o/$(MODE)/tool/build/lz4toasm.com -o o/$(MODE)/libc/str/EastAsianWidth.s -s kEastAsianWidth o/$(MODE)/libc/str/EastAsianWidth.bin.lz4
|
||||||
|
#include "libc/macros.internal.h"
|
||||||
|
|
||||||
|
.rodata
|
||||||
|
.align 4
|
||||||
|
kEastAsianWidthBits:
|
||||||
|
.long 32768 * 8
|
||||||
|
.endobj kEastAsianWidthBits,globl,hidden
|
||||||
|
.previous
|
||||||
|
|
||||||
|
.initbss 500,_init_kEastAsianWidth
|
||||||
|
kEastAsianWidth:
|
||||||
|
.zero 32768
|
||||||
|
.endobj kEastAsianWidth,globl,hidden
|
||||||
|
.previous
|
||||||
|
|
||||||
|
.init.start 500,_init_kEastAsianWidth
|
||||||
|
push %rsi
|
||||||
|
mov $500,%edx
|
||||||
|
call lz4cpy
|
||||||
|
mov %rax,%rdi
|
||||||
|
pop %rsi
|
||||||
|
add $504,%rsi
|
||||||
|
.init.end 500,_init_kEastAsianWidth
|
||||||
|
|
||||||
|
.initro 500,_init_kEastAsianWidth
|
||||||
|
kEastAsianWidthLz4:
|
||||||
|
.byte 0x1f,0x00,0x01,0x00,0xff,0xff,0x0e,0x17 #▼ ☺ λλ♫↨
|
||||||
|
.byte 0xff,0x01,0x00,0x0f,0x30,0x01,0xff,0x12 #λ☺ ☼0☺λ↕
|
||||||
|
.byte 0xaf,0x88,0x99,0xf0,0xad,0xae,0xfb,0x2b #»êÖ≡¡«√+
|
||||||
|
.byte 0x00,0x81,0xfb,0x13,0x01,0xf6,0x3f,0x0c # ü√‼☺÷?♀
|
||||||
|
.byte 0x00,0x06,0x1a,0x00,0x04,0x2f,0x1e,0x09 # ♠→ ♦/▲○
|
||||||
|
.byte 0x5c,0x00,0x2d,0x43,0x60,0x00,0x00,0x30 #\ -C` 0
|
||||||
|
.byte 0xa9,0x02,0x10,0x0f,0x06,0x00,0xf3,0x0d #⌐☻►☼♠ ≤♪
|
||||||
|
.byte 0x80,0x00,0x00,0x08,0x00,0x02,0x0c,0x00 #Ç ◘ ☻♀
|
||||||
|
.byte 0x60,0x30,0x40,0x10,0x00,0x00,0x04,0x2c #`0@► ♦,
|
||||||
|
.byte 0x24,0x20,0x0c,0x00,0x00,0x00,0x01,0x00 #$ ♀ ☺
|
||||||
|
.byte 0x00,0x00,0x50,0xb8,0x33,0x00,0x10,0xe0 # P╕3 ►α
|
||||||
|
.byte 0x11,0x00,0x1f,0x80,0x00,0x01,0x58,0x12 #◄ ▼Ç ☺X↕
|
||||||
|
.byte 0x18,0x07,0x00,0x1f,0x21,0xb0,0x03,0x55 #↑• ▼!░♥U
|
||||||
|
.byte 0x16,0xfb,0xb2,0x03,0x3f,0x0f,0x00,0xff #▬√▓♥?☼ λ
|
||||||
|
.byte 0x01,0x00,0x06,0x11,0x3f,0x35,0x01,0x03 #☺ ♠◄?5☺♥
|
||||||
|
.byte 0x0d,0x00,0x4e,0x7f,0xfe,0xff,0xff,0x0b #♪ N⌂■λλ♂
|
||||||
|
.byte 0x00,0x41,0xff,0xff,0xff,0xe0,0x06,0x00 # Aλλλα♠
|
||||||
|
.byte 0x07,0x13,0x00,0x11,0x7f,0x06,0x00,0x17 #•‼ ◄⌂♠ ↨
|
||||||
|
.byte 0x07,0x5e,0x00,0x02,0x12,0x00,0x2f,0x00 #•^ ☻↕ /
|
||||||
|
.byte 0xff,0x01,0x00,0xff,0xff,0xff,0x5d,0x0e #λ☺ λλλ]♫
|
||||||
|
.byte 0xa0,0x07,0x0f,0x01,0x00,0xff,0xff,0xff #á•☼☺ λλλ
|
||||||
|
.byte 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xbe #λλλλλλλ╛
|
||||||
|
.byte 0x13,0x1f,0x67,0x0e,0x0f,0x0c,0x13,0x83 #‼▼g♫☼♀‼â
|
||||||
|
.byte 0x1f,0x1f,0x60,0x13,0x3d,0x0f,0x63,0x06 #▼▼`‼=☼c♠
|
||||||
|
.byte 0xff,0xff,0xff,0xff,0xff,0x66,0x2f,0x0f #λλλλλf/☼
|
||||||
|
.byte 0x00,0x01,0x00,0xff,0xff,0xf9,0x04,0xb0 # ☺ λλ∙♦░
|
||||||
|
.byte 0x1a,0x2f,0xd1,0xe0,0x00,0x1d,0xff,0x10 #→/╤α ↔λ►
|
||||||
|
.byte 0x0f,0xa8,0x15,0x21,0x0f,0xa2,0x00,0x50 #☼¿§!☼ó P
|
||||||
|
.byte 0x12,0x03,0xa6,0x00,0x3f,0xf7,0xff,0x7f #↕♥ª ?≈λ⌂
|
||||||
|
.byte 0xd9,0x04,0x00,0x08,0xcd,0x19,0x1b,0x01 #┘♦ ◘═↓←☺
|
||||||
|
.byte 0x1c,0x00,0x2f,0x7f,0x00,0x01,0x00,0xff #∟ /⌂ ☺ λ
|
||||||
|
.byte 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff #λλλλλλλλ
|
||||||
|
.byte 0xff,0xff,0xff,0xff,0xf8,0x1f,0x0f,0x80 #λλλλ°▼☼Ç
|
||||||
|
.byte 0x18,0xff,0xff,0xf1,0x0f,0x00,0x03,0x4c #↑λλ±☼ ♥L
|
||||||
|
.byte 0x1f,0x07,0x04,0x08,0xff,0xff,0xff,0xff #▼•♦◘λλλλ
|
||||||
|
.byte 0x92,0x0f,0xc5,0x04,0x10,0x03,0x27,0x16 #Æ☼┼♦►♥'▬
|
||||||
|
.byte 0x4f,0x07,0x00,0xf0,0x00,0x6b,0x1b,0x1f #O• ≡ k←▼
|
||||||
|
.byte 0x0f,0x04,0x10,0xff,0xff,0xff,0xff,0xff #☼♦►λλλλλ
|
||||||
|
.byte 0xff,0xff,0x94,0x1f,0x10,0x19,0x00,0x05 #λλö▼►↓ ♣
|
||||||
|
.byte 0x0f,0x22,0x39,0x05,0x29,0x40,0xfe,0xd5 #☼.9♣)@■╒
|
||||||
|
.byte 0x0c,0x12,0x07,0x14,0x08,0x6f,0x0f,0xff #♀↕•¶◘o☼λ
|
||||||
|
.byte 0x01,0x03,0x00,0x3f,0x60,0x08,0x04,0x34 #☺♥ ?`◘♦4
|
||||||
|
.byte 0x01,0xe0,0xbf,0x10,0x08,0x15,0xdf,0x36 #☺α┐►◘§▀6
|
||||||
|
.byte 0x38,0x10,0x87,0x08,0x00,0x15,0x11,0x64 #8►ç◘ §◄d
|
||||||
|
.byte 0x08,0x1f,0xfd,0x40,0x08,0x03,0x15,0x9f #◘▼²@◘♥§ƒ
|
||||||
|
.byte 0xad,0x38,0x11,0x78,0x4d,0x1f,0x10,0x04 #¡8◄xM▼►♦
|
||||||
|
.byte 0xf3,0x39,0x07,0xb4,0x00,0x1c,0xf8,0x6a #≤9•┤ ∟°j
|
||||||
|
.byte 0x1f,0x05,0xde,0x38,0x6f,0x10,0x27,0x00 #▼♣▐8o►'
|
||||||
|
.byte 0x00,0x18,0xf0,0x81,0x0d,0x0a,0x0f,0x9e # ↑≡ü♪◙☼€
|
||||||
|
.byte 0x08,0x12,0x18,0xe0,0x8f,0x00,0x20,0x7b #◘↕↑αÅ {
|
||||||
|
.byte 0xfc,0x06,0x00,0x20,0xe7,0xc7,0x05,0x00 #ⁿ♠ τ╟♣
|
||||||
|
.byte 0x0f,0xe0,0x1f,0x01,0x5f,0x0f,0x07,0x07 #☼α▼☺_☼••
|
||||||
|
.byte 0x00,0x3f,0xe0,0x20,0x9b,0x0f,0x01,0x00 # ?α ¢☼☺
|
||||||
|
.byte 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff #λλλλλλλλ
|
||||||
|
.byte 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff #λλλλλλλλ
|
||||||
|
.byte 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff #λλλλλλλλ
|
||||||
|
.byte 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff #λλλλλλλλ
|
||||||
|
.byte 0x0b,0x1f,0x3f,0xfc,0x1f,0xff,0xff,0xff #♂▼?ⁿ▼λλλ
|
||||||
|
.byte 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff #λλλλλλλλ
|
||||||
|
.byte 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff #λλλλλλλλ
|
||||||
|
.byte 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff #λλλλλλλλ
|
||||||
|
.byte 0xff,0xff,0xff,0xff,0xff,0x08,0x50,0xff #λλλλλ◘Pλ
|
||||||
|
.byte 0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00
|
||||||
|
.endobj kEastAsianWidthLz4,globl,hidden
|
||||||
|
.previous
|
|
@ -1,92 +0,0 @@
|
||||||
// o/$(MODE)/tool/build/lz4toasm.com -o o/$(MODE)/libc/str/EastAsianWidth.s -s kEastAsianWidth o/$(MODE)/libc/str/EastAsianWidth.bin.lz4
|
|
||||||
.include "libc/macros.internal.inc"
|
|
||||||
|
|
||||||
.rodata
|
|
||||||
.align 4
|
|
||||||
kEastAsianWidthBits:
|
|
||||||
.long 32768 * 8
|
|
||||||
.endobj kEastAsianWidthBits,globl,hidden
|
|
||||||
.previous
|
|
||||||
|
|
||||||
.initbss 500,_init_kEastAsianWidth
|
|
||||||
kEastAsianWidth:
|
|
||||||
.zero 32768
|
|
||||||
.endobj kEastAsianWidth,globl,hidden
|
|
||||||
.previous
|
|
||||||
|
|
||||||
.init.start 500,_init_kEastAsianWidth
|
|
||||||
push %rsi
|
|
||||||
mov $500,%edx
|
|
||||||
call lz4cpy
|
|
||||||
mov %rax,%rdi
|
|
||||||
pop %rsi
|
|
||||||
add $504,%rsi
|
|
||||||
.init.end 500,_init_kEastAsianWidth
|
|
||||||
|
|
||||||
.initro 500,_init_kEastAsianWidth
|
|
||||||
kEastAsianWidthLz4:
|
|
||||||
.byte 0x1f,0x00,0x01,0x00,0xff,0xff,0x0e,0x17 #▼ ☺ λλ♫↨
|
|
||||||
.byte 0xff,0x01,0x00,0x0f,0x30,0x01,0xff,0x12 #λ☺ ☼0☺λ↕
|
|
||||||
.byte 0xaf,0x88,0x99,0xf0,0xad,0xae,0xfb,0x2b #»êÖ≡¡«√+
|
|
||||||
.byte 0x00,0x81,0xfb,0x13,0x01,0xf6,0x3f,0x0c # ü√‼☺÷?♀
|
|
||||||
.byte 0x00,0x06,0x1a,0x00,0x04,0x2f,0x1e,0x09 # ♠→ ♦/▲○
|
|
||||||
.byte 0x5c,0x00,0x2d,0x43,0x60,0x00,0x00,0x30 #\ -C` 0
|
|
||||||
.byte 0xa9,0x02,0x10,0x0f,0x06,0x00,0xf3,0x0d #⌐☻►☼♠ ≤♪
|
|
||||||
.byte 0x80,0x00,0x00,0x08,0x00,0x02,0x0c,0x00 #Ç ◘ ☻♀
|
|
||||||
.byte 0x60,0x30,0x40,0x10,0x00,0x00,0x04,0x2c #`0@► ♦,
|
|
||||||
.byte 0x24,0x20,0x0c,0x00,0x00,0x00,0x01,0x00 #$ ♀ ☺
|
|
||||||
.byte 0x00,0x00,0x50,0xb8,0x33,0x00,0x10,0xe0 # P╕3 ►α
|
|
||||||
.byte 0x11,0x00,0x1f,0x80,0x00,0x01,0x58,0x12 #◄ ▼Ç ☺X↕
|
|
||||||
.byte 0x18,0x07,0x00,0x1f,0x21,0xb0,0x03,0x55 #↑• ▼!░♥U
|
|
||||||
.byte 0x16,0xfb,0xb2,0x03,0x3f,0x0f,0x00,0xff #▬√▓♥?☼ λ
|
|
||||||
.byte 0x01,0x00,0x06,0x11,0x3f,0x35,0x01,0x03 #☺ ♠◄?5☺♥
|
|
||||||
.byte 0x0d,0x00,0x4e,0x7f,0xfe,0xff,0xff,0x0b #♪ N⌂■λλ♂
|
|
||||||
.byte 0x00,0x41,0xff,0xff,0xff,0xe0,0x06,0x00 # Aλλλα♠
|
|
||||||
.byte 0x07,0x13,0x00,0x11,0x7f,0x06,0x00,0x17 #•‼ ◄⌂♠ ↨
|
|
||||||
.byte 0x07,0x5e,0x00,0x02,0x12,0x00,0x2f,0x00 #•^ ☻↕ /
|
|
||||||
.byte 0xff,0x01,0x00,0xff,0xff,0xff,0x5d,0x0e #λ☺ λλλ]♫
|
|
||||||
.byte 0xa0,0x07,0x0f,0x01,0x00,0xff,0xff,0xff #á•☼☺ λλλ
|
|
||||||
.byte 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xbe #λλλλλλλ╛
|
|
||||||
.byte 0x13,0x1f,0x67,0x0e,0x0f,0x0c,0x13,0x83 #‼▼g♫☼♀‼â
|
|
||||||
.byte 0x1f,0x1f,0x60,0x13,0x3d,0x0f,0x63,0x06 #▼▼`‼=☼c♠
|
|
||||||
.byte 0xff,0xff,0xff,0xff,0xff,0x66,0x2f,0x0f #λλλλλf/☼
|
|
||||||
.byte 0x00,0x01,0x00,0xff,0xff,0xf9,0x04,0xb0 # ☺ λλ∙♦░
|
|
||||||
.byte 0x1a,0x2f,0xd1,0xe0,0x00,0x1d,0xff,0x10 #→/╤α ↔λ►
|
|
||||||
.byte 0x0f,0xa8,0x15,0x21,0x0f,0xa2,0x00,0x50 #☼¿§!☼ó P
|
|
||||||
.byte 0x12,0x03,0xa6,0x00,0x3f,0xf7,0xff,0x7f #↕♥ª ?≈λ⌂
|
|
||||||
.byte 0xd9,0x04,0x00,0x08,0xcd,0x19,0x1b,0x01 #┘♦ ◘═↓←☺
|
|
||||||
.byte 0x1c,0x00,0x2f,0x7f,0x00,0x01,0x00,0xff #∟ /⌂ ☺ λ
|
|
||||||
.byte 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff #λλλλλλλλ
|
|
||||||
.byte 0xff,0xff,0xff,0xff,0xf8,0x1f,0x0f,0x80 #λλλλ°▼☼Ç
|
|
||||||
.byte 0x18,0xff,0xff,0xf1,0x0f,0x00,0x03,0x4c #↑λλ±☼ ♥L
|
|
||||||
.byte 0x1f,0x07,0x04,0x08,0xff,0xff,0xff,0xff #▼•♦◘λλλλ
|
|
||||||
.byte 0x92,0x0f,0xc5,0x04,0x10,0x03,0x27,0x16 #Æ☼┼♦►♥'▬
|
|
||||||
.byte 0x4f,0x07,0x00,0xf0,0x00,0x6b,0x1b,0x1f #O• ≡ k←▼
|
|
||||||
.byte 0x0f,0x04,0x10,0xff,0xff,0xff,0xff,0xff #☼♦►λλλλλ
|
|
||||||
.byte 0xff,0xff,0x94,0x1f,0x10,0x19,0x00,0x05 #λλö▼►↓ ♣
|
|
||||||
.byte 0x0f,0x22,0x39,0x05,0x29,0x40,0xfe,0xd5 #☼.9♣)@■╒
|
|
||||||
.byte 0x0c,0x12,0x07,0x14,0x08,0x6f,0x0f,0xff #♀↕•¶◘o☼λ
|
|
||||||
.byte 0x01,0x03,0x00,0x3f,0x60,0x08,0x04,0x34 #☺♥ ?`◘♦4
|
|
||||||
.byte 0x01,0xe0,0xbf,0x10,0x08,0x15,0xdf,0x36 #☺α┐►◘§▀6
|
|
||||||
.byte 0x38,0x10,0x87,0x08,0x00,0x15,0x11,0x64 #8►ç◘ §◄d
|
|
||||||
.byte 0x08,0x1f,0xfd,0x40,0x08,0x03,0x15,0x9f #◘▼²@◘♥§ƒ
|
|
||||||
.byte 0xad,0x38,0x11,0x78,0x4d,0x1f,0x10,0x04 #¡8◄xM▼►♦
|
|
||||||
.byte 0xf3,0x39,0x07,0xb4,0x00,0x1c,0xf8,0x6a #≤9•┤ ∟°j
|
|
||||||
.byte 0x1f,0x05,0xde,0x38,0x6f,0x10,0x27,0x00 #▼♣▐8o►'
|
|
||||||
.byte 0x00,0x18,0xf0,0x81,0x0d,0x0a,0x0f,0x9e # ↑≡ü♪◙☼€
|
|
||||||
.byte 0x08,0x12,0x18,0xe0,0x8f,0x00,0x20,0x7b #◘↕↑αÅ {
|
|
||||||
.byte 0xfc,0x06,0x00,0x20,0xe7,0xc7,0x05,0x00 #ⁿ♠ τ╟♣
|
|
||||||
.byte 0x0f,0xe0,0x1f,0x01,0x5f,0x0f,0x07,0x07 #☼α▼☺_☼••
|
|
||||||
.byte 0x00,0x3f,0xe0,0x20,0x9b,0x0f,0x01,0x00 # ?α ¢☼☺
|
|
||||||
.byte 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff #λλλλλλλλ
|
|
||||||
.byte 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff #λλλλλλλλ
|
|
||||||
.byte 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff #λλλλλλλλ
|
|
||||||
.byte 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff #λλλλλλλλ
|
|
||||||
.byte 0x0b,0x1f,0x3f,0xfc,0x1f,0xff,0xff,0xff #♂▼?ⁿ▼λλλ
|
|
||||||
.byte 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff #λλλλλλλλ
|
|
||||||
.byte 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff #λλλλλλλλ
|
|
||||||
.byte 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff #λλλλλλλλ
|
|
||||||
.byte 0xff,0xff,0xff,0xff,0xff,0x08,0x50,0xff #λλλλλ◘Pλ
|
|
||||||
.byte 0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00
|
|
||||||
.endobj kEastAsianWidthLz4,globl,hidden
|
|
||||||
.previous
|
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon misc,ABORTED_COMMAND,11,0,0,0,0,0
|
|
2
libc/sysv/consts/ABORTED_COMMAND.s
Normal file
2
libc/sysv/consts/ABORTED_COMMAND.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon misc,ABORTED_COMMAND,11,0,0,0,0,0
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon misc,ACCT_BYTEORDER,0,0,0,0,0,0
|
|
2
libc/sysv/consts/ACCT_BYTEORDER.s
Normal file
2
libc/sysv/consts/ACCT_BYTEORDER.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon misc,ACCT_BYTEORDER,0,0,0,0,0,0
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon misc,ACCT_COMM,0x10,0,0,0,0,0
|
|
2
libc/sysv/consts/ACCT_COMM.s
Normal file
2
libc/sysv/consts/ACCT_COMM.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon misc,ACCT_COMM,0x10,0,0,0,0,0
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon misc,ACK,4,4,4,4,4,0
|
|
2
libc/sysv/consts/ACK.s
Normal file
2
libc/sysv/consts/ACK.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon misc,ACK,4,4,4,4,4,0
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon misc,ACORE,0,8,8,8,8,0
|
|
2
libc/sysv/consts/ACORE.s
Normal file
2
libc/sysv/consts/ACORE.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon misc,ACORE,0,8,8,8,8,0
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon misc,AFORK,0,1,1,1,1,0
|
|
2
libc/sysv/consts/AFORK.s
Normal file
2
libc/sysv/consts/AFORK.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon misc,AFORK,0,1,1,1,1,0
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon af,AF_ALG,38,0,0,0,0,0
|
|
2
libc/sysv/consts/AF_ALG.s
Normal file
2
libc/sysv/consts/AF_ALG.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon af,AF_ALG,38,0,0,0,0,0
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon af,AF_APPLETALK,5,0x10,0x10,0x10,0x10,0x10
|
|
2
libc/sysv/consts/AF_APPLETALK.s
Normal file
2
libc/sysv/consts/AF_APPLETALK.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon af,AF_APPLETALK,5,0x10,0x10,0x10,0x10,0x10
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon af,AF_ASH,18,0,0,0,0,0
|
|
2
libc/sysv/consts/AF_ASH.s
Normal file
2
libc/sysv/consts/AF_ASH.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon af,AF_ASH,18,0,0,0,0,0
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon af,AF_ATMPVC,8,0,0,0,0,0
|
|
2
libc/sysv/consts/AF_ATMPVC.s
Normal file
2
libc/sysv/consts/AF_ATMPVC.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon af,AF_ATMPVC,8,0,0,0,0,0
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon af,AF_ATMSVC,20,0,0,0,0,0
|
|
2
libc/sysv/consts/AF_ATMSVC.s
Normal file
2
libc/sysv/consts/AF_ATMSVC.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon af,AF_ATMSVC,20,0,0,0,0,0
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon af,AF_AX25,3,0,0,0,0,0
|
|
2
libc/sysv/consts/AF_AX25.s
Normal file
2
libc/sysv/consts/AF_AX25.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon af,AF_AX25,3,0,0,0,0,0
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon af,AF_BLUETOOTH,31,0,36,0x20,31,0
|
|
2
libc/sysv/consts/AF_BLUETOOTH.s
Normal file
2
libc/sysv/consts/AF_BLUETOOTH.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon af,AF_BLUETOOTH,31,0,36,0x20,31,0
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon af,AF_BRIDGE,7,0,0,0,0,0
|
|
2
libc/sysv/consts/AF_BRIDGE.s
Normal file
2
libc/sysv/consts/AF_BRIDGE.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon af,AF_BRIDGE,7,0,0,0,0,0
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon af,AF_CAIF,37,0,0,0,0,0
|
|
2
libc/sysv/consts/AF_CAIF.s
Normal file
2
libc/sysv/consts/AF_CAIF.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon af,AF_CAIF,37,0,0,0,0,0
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon af,AF_CAN,29,0,0,0,35,0
|
|
2
libc/sysv/consts/AF_CAN.s
Normal file
2
libc/sysv/consts/AF_CAN.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon af,AF_CAN,29,0,0,0,35,0
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon af,AF_ECONET,19,0,0,0,0,0
|
|
2
libc/sysv/consts/AF_ECONET.s
Normal file
2
libc/sysv/consts/AF_ECONET.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon af,AF_ECONET,19,0,0,0,0,0
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon af,AF_FILE,1,0,0,0,0,0
|
|
2
libc/sysv/consts/AF_FILE.s
Normal file
2
libc/sysv/consts/AF_FILE.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon af,AF_FILE,1,0,0,0,0,0
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon af,AF_IB,27,0,0,0,0,0
|
|
2
libc/sysv/consts/AF_IB.s
Normal file
2
libc/sysv/consts/AF_IB.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon af,AF_IB,27,0,0,0,0,0
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon af,AF_IEEE802154,36,0,0,0,0,0
|
|
2
libc/sysv/consts/AF_IEEE802154.s
Normal file
2
libc/sysv/consts/AF_IEEE802154.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon af,AF_IEEE802154,36,0,0,0,0,0
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon af,AF_INET,2,2,2,2,2,2
|
|
2
libc/sysv/consts/AF_INET.s
Normal file
2
libc/sysv/consts/AF_INET.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon af,AF_INET,2,2,2,2,2,2
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon af,AF_INET6,10,30,28,24,24,23
|
|
2
libc/sysv/consts/AF_INET6.s
Normal file
2
libc/sysv/consts/AF_INET6.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon af,AF_INET6,10,30,28,24,24,23
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon af,AF_IPX,4,23,23,23,23,6
|
|
2
libc/sysv/consts/AF_IPX.s
Normal file
2
libc/sysv/consts/AF_IPX.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon af,AF_IPX,4,23,23,23,23,6
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon af,AF_IRDA,23,0,0,0,0,0
|
|
2
libc/sysv/consts/AF_IRDA.s
Normal file
2
libc/sysv/consts/AF_IRDA.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon af,AF_IRDA,23,0,0,0,0,0
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon af,AF_ISDN,34,28,26,26,26,0
|
|
2
libc/sysv/consts/AF_ISDN.s
Normal file
2
libc/sysv/consts/AF_ISDN.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon af,AF_ISDN,34,28,26,26,26,0
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon af,AF_IUCV,0x20,0,0,0,0,0
|
|
2
libc/sysv/consts/AF_IUCV.s
Normal file
2
libc/sysv/consts/AF_IUCV.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon af,AF_IUCV,0x20,0,0,0,0,0
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon af,AF_KCM,41,0,0,0,0,0
|
|
2
libc/sysv/consts/AF_KCM.s
Normal file
2
libc/sysv/consts/AF_KCM.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon af,AF_KCM,41,0,0,0,0,0
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon af,AF_KEY,15,0,0,30,0,0
|
|
2
libc/sysv/consts/AF_KEY.s
Normal file
2
libc/sysv/consts/AF_KEY.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon af,AF_KEY,15,0,0,30,0,0
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon af,AF_LINK,0,18,18,18,18,0
|
|
2
libc/sysv/consts/AF_LINK.s
Normal file
2
libc/sysv/consts/AF_LINK.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon af,AF_LINK,0,18,18,18,18,0
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon af,AF_LLC,26,0,0,0,0,0
|
|
2
libc/sysv/consts/AF_LLC.s
Normal file
2
libc/sysv/consts/AF_LLC.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon af,AF_LLC,26,0,0,0,0,0
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon af,AF_LOCAL,1,1,1,1,1,1
|
|
2
libc/sysv/consts/AF_LOCAL.s
Normal file
2
libc/sysv/consts/AF_LOCAL.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon af,AF_LOCAL,1,1,1,1,1,1
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon af,AF_MAX,42,40,42,36,37,35
|
|
2
libc/sysv/consts/AF_MAX.s
Normal file
2
libc/sysv/consts/AF_MAX.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon af,AF_MAX,42,40,42,36,37,35
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon af,AF_MPLS,28,0,0,33,33,0
|
|
2
libc/sysv/consts/AF_MPLS.s
Normal file
2
libc/sysv/consts/AF_MPLS.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon af,AF_MPLS,28,0,0,33,33,0
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon af,AF_NETBEUI,13,0,0,0,0,0
|
|
2
libc/sysv/consts/AF_NETBEUI.s
Normal file
2
libc/sysv/consts/AF_NETBEUI.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon af,AF_NETBEUI,13,0,0,0,0,0
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon af,AF_NETLINK,16,0,0,0,0,0
|
|
2
libc/sysv/consts/AF_NETLINK.s
Normal file
2
libc/sysv/consts/AF_NETLINK.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon af,AF_NETLINK,16,0,0,0,0,0
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon af,AF_NETROM,6,0,0,0,0,0
|
|
2
libc/sysv/consts/AF_NETROM.s
Normal file
2
libc/sysv/consts/AF_NETROM.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon af,AF_NETROM,6,0,0,0,0,0
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon af,AF_NFC,39,0,0,0,0,0
|
|
2
libc/sysv/consts/AF_NFC.s
Normal file
2
libc/sysv/consts/AF_NFC.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon af,AF_NFC,39,0,0,0,0,0
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon af,AF_PACKET,17,0,0,0,0,0
|
|
2
libc/sysv/consts/AF_PACKET.s
Normal file
2
libc/sysv/consts/AF_PACKET.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon af,AF_PACKET,17,0,0,0,0,0
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon af,AF_PHONET,35,0,0,0,0,0
|
|
2
libc/sysv/consts/AF_PHONET.s
Normal file
2
libc/sysv/consts/AF_PHONET.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon af,AF_PHONET,35,0,0,0,0,0
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon af,AF_PPPOX,24,0,0,0,0,0
|
|
2
libc/sysv/consts/AF_PPPOX.s
Normal file
2
libc/sysv/consts/AF_PPPOX.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon af,AF_PPPOX,24,0,0,0,0,0
|
|
@ -1,2 +0,0 @@
|
||||||
#include "libc/sysv/consts/syscon.internal.h"
|
|
||||||
.syscon af,AF_RDS,21,0,0,0,0,0
|
|
2
libc/sysv/consts/AF_RDS.s
Normal file
2
libc/sysv/consts/AF_RDS.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||||
|
.syscon af,AF_RDS,21,0,0,0,0,0
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue