Make considerably more progress on AARCH64

- Utilities like pledge.com now build
- kprintf() will no longer balk at 48-bit addresses
- There's a new aarch64-dbg build mode that should work
- gc() and defer() are mostly pacified; avoid using them on aarch64
- THIRD_PART_STB now has Arm Neon intrinsics for fast image handling
This commit is contained in:
Justine Tunney 2023-05-12 22:42:57 -07:00
parent 1bfb3aab1b
commit fd34ef732d
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
91 changed files with 1288 additions and 1192 deletions

View file

@ -1,73 +0,0 @@
/*-*- mode:unix-assembly; indent-tabs-mode:t; tab-width:8; coding:utf-8 -*-│
vi: set et ft=asm ts=8 tw=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 "ape/relocations.h"
#include "ape/relocations.h"
#include "libc/macros.internal.h"
.Lrows = 0 # w/ 2 cols
.macro .tab sym:req str
.section .rodata.str1.1,"aSM",@progbits,1
.L\@: .asciz "\str"
.previous
.long RVA(\sym)
.long RVA(.L\@)
.Lrows = .Lrows + 1
.endm
.initro 301,_init_kPollNames
kPollNamesRo:
.tab POLLNVAL "POLLNVAL"
.tab POLLWRNORM "POLLWRNORM"
.tab POLLWRBAND "POLLWRBAND"
.tab POLLRDNORM "POLLRDNORM"
.tab POLLRDHUP "POLLRDHUP"
.tab POLLRDBAND "POLLRDBAND"
.tab POLLHUP "POLLHUP"
.tab POLLERR "POLLERR"
.tab POLLPRI "POLLPRI"
.tab POLLOUT "POLLOUT"
.tab POLLIN "POLLIN"
.endobj kPollNamesRo,globl,hidden
.previous
// Mapping of poll() flags to their string names.
// @see RecreateFlags()
.initbss 301,_init_kPollNames
kPollNames:
.rept .Lrows
.quad 0 # unsigned long id
.quad 0 # const char *const name
.endr
.quad 0,0 # terminator row
.endobj kPollNames,globl
.previous
.init.start 301,_init_kPollNames
pushpop .Lrows,%rcx # relocate ROBSS b/c -fPIE crap
0: lodsl
.weak _base
mov _base(%rax),%rax # read what systemfive.S decoded
stosq
lodsl
add $_base,%rax
stosq
.loop 0b
add $16,%rdi
.init.end 301,_init_kPollNames

View file

@ -1,11 +0,0 @@
#ifndef COSMOPOLITAN_TOOL_DECODE_LIB_POLLNAMES_H_
#define COSMOPOLITAN_TOOL_DECODE_LIB_POLLNAMES_H_
#include "tool/decode/lib/idname.h"
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
extern struct IdName kPollNames[];
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMOPOLITAN_TOOL_DECODE_LIB_POLLNAMES_H_ */