mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 06:48:31 +00:00
Make progress towards aarch64 build
This commit is contained in:
parent
08ff26c817
commit
ca2860947f
15428 changed files with 25694 additions and 23138 deletions
|
@ -39,6 +39,7 @@
|
|||
privileged wontreturn void _Exit(int exitcode) {
|
||||
int i;
|
||||
STRACE("_Exit(%d)", exitcode);
|
||||
#ifdef __x86_64__
|
||||
if (!IsWindows() && !IsMetal()) {
|
||||
// On Linux _Exit1 (exit) must be called in pledge("") mode. If we
|
||||
// call _Exit (exit_group) when we haven't used pledge("stdio") then
|
||||
|
@ -64,4 +65,13 @@ privileged wontreturn void _Exit(int exitcode) {
|
|||
"cli\n\t"
|
||||
"lidt\t(%rsp)");
|
||||
for (;;) asm("ud2");
|
||||
#elif defined(__aarch64__)
|
||||
register long x0 asm("x0") = exitcode;
|
||||
asm volatile("mov\tx8,%1\n"
|
||||
"svc\t0"
|
||||
: /* no outputs */
|
||||
: "i"(94), "r"(x0)
|
||||
: "x8", "memory");
|
||||
notpossible;
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue