mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-06 11:18:30 +00:00
Improve aarch64 native support some more
This change introduces partial support for automating remote testing of aarch64 binaries on Raspberry Pi and Apple Silicon.
This commit is contained in:
parent
fc34ba2596
commit
4aa1d09b9e
20 changed files with 185 additions and 82 deletions
|
@ -601,8 +601,8 @@ syscon clock CLOCK_MONOTONIC_PRECISE 1 1 1 6 11 3 3 1 #
|
|||
syscon clock CLOCK_MONOTONIC_FAST 1 1 1 6 12 3 3 1 #
|
||||
syscon clock CLOCK_MONOTONIC_COARSE 6 6 1 6 12 3 3 1 # Linux 2.6.32+; bsd consensus; not available on RHEL5
|
||||
syscon clock CLOCK_MONOTONIC_RAW 4 4 127 4 127 127 127 127 # actually monotonic; not subject to NTP adjustments; Linux 2.6.28+; XNU/NT/FreeBSD/OpenBSD faked; not available on RHEL5
|
||||
syscon clock CLOCK_PROCESS_CPUTIME_ID 2 2 127 127 15 2 0x40000000 127 #
|
||||
syscon clock CLOCK_THREAD_CPUTIME_ID 3 3 127 127 14 4 0x20000000 127 #
|
||||
syscon clock CLOCK_PROCESS_CPUTIME_ID 2 2 127 12 15 2 0x40000000 127 #
|
||||
syscon clock CLOCK_THREAD_CPUTIME_ID 3 3 127 16 14 4 0x20000000 127 #
|
||||
syscon clock CLOCK_PROF 127 127 127 127 2 127 2 127 #
|
||||
syscon clock CLOCK_BOOTTIME 7 7 127 127 127 6 127 127 #
|
||||
syscon clock CLOCK_REALTIME_ALARM 8 8 127 127 127 127 127 127 #
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon clock,CLOCK_PROCESS_CPUTIME_ID,2,2,127,127,15,2,0x40000000,127
|
||||
.syscon clock,CLOCK_PROCESS_CPUTIME_ID,2,2,127,12,15,2,0x40000000,127
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon clock,CLOCK_THREAD_CPUTIME_ID,3,3,127,127,14,4,0x20000000,127
|
||||
.syscon clock,CLOCK_THREAD_CPUTIME_ID,3,3,127,16,14,4,0x20000000,127
|
||||
|
|
|
@ -21,10 +21,7 @@
|
|||
// clang-format off
|
||||
|
||||
#ifdef __x86_64__
|
||||
#define ENCODE .uleb128
|
||||
.yoink _init_systemfive
|
||||
#else
|
||||
#define ENCODE .balign 8 ; .quad
|
||||
#endif
|
||||
|
||||
.macro .syscon group:req name:req linux:req linux_aarch64:req xnu:req xnu_aarch64:req freebsd:req openbsd:req netbsd:req windows:req
|
||||
|
@ -38,9 +35,9 @@
|
|||
#if SupportsLinux() || SupportsMetal()
|
||||
.section .sort.rodata.syscon.linux.2.\group\().\name,"a",@progbits
|
||||
#ifdef __aarch64__
|
||||
ENCODE \linux_aarch64
|
||||
.uleb128 \linux_aarch64
|
||||
#else
|
||||
ENCODE \linux
|
||||
.uleb128 \linux
|
||||
#endif
|
||||
.previous
|
||||
#endif
|
||||
|
@ -48,34 +45,34 @@
|
|||
#if SupportsXnu()
|
||||
.section .sort.rodata.syscon.xnu.2.\group\().\name,"a",@progbits
|
||||
#ifdef __aarch64__
|
||||
ENCODE \xnu_aarch64
|
||||
.uleb128 \xnu_aarch64
|
||||
#else
|
||||
ENCODE \xnu
|
||||
.uleb128 \xnu
|
||||
#endif
|
||||
.previous
|
||||
#endif
|
||||
|
||||
#if SupportsFreebsd()
|
||||
.section .sort.rodata.syscon.freebsd.2.\group\().\name,"a",@progbits
|
||||
ENCODE \freebsd
|
||||
.uleb128 \freebsd
|
||||
.previous
|
||||
#endif
|
||||
|
||||
#if SupportsOpenbsd()
|
||||
.section .sort.rodata.syscon.openbsd.2.\group\().\name,"a",@progbits
|
||||
ENCODE \openbsd
|
||||
.uleb128 \openbsd
|
||||
.previous
|
||||
#endif
|
||||
|
||||
#if SupportsNetbsd()
|
||||
.section .sort.rodata.syscon.netbsd.2.\group\().\name,"a",@progbits
|
||||
ENCODE \netbsd
|
||||
.uleb128 \netbsd
|
||||
.previous
|
||||
#endif
|
||||
|
||||
#if SupportsWindows()
|
||||
.section .sort.rodata.syscon.windows.2.\group\().\name,"a",@progbits
|
||||
ENCODE \windows
|
||||
.uleb128 \windows
|
||||
.previous
|
||||
#endif
|
||||
|
||||
|
|
|
@ -19,12 +19,6 @@
|
|||
#include "libc/dce.h"
|
||||
#include "libc/macros.internal.h"
|
||||
|
||||
#ifdef __x86_64__
|
||||
#define ROALIGN 1
|
||||
#else
|
||||
#define ROALIGN 8
|
||||
#endif
|
||||
|
||||
// Sections for varint encoded magic numbers.
|
||||
//
|
||||
// These sections are all ordered by (group_name, constant_name).
|
||||
|
@ -46,7 +40,6 @@ syscon_end:
|
|||
.globl syscon_end
|
||||
#if SupportsLinux() || SupportsMetal()
|
||||
.section .sort.rodata.syscon.linux.1,"a",@progbits
|
||||
.balign ROALIGN
|
||||
syscon_linux:/*
|
||||
...decentralized leb128...
|
||||
*/.previous
|
||||
|
@ -55,7 +48,6 @@ syscon_linux:/*
|
|||
#endif
|
||||
#if SupportsXnu()
|
||||
.section .sort.rodata.syscon.xnu.1,"a",@progbits
|
||||
.balign ROALIGN
|
||||
syscon_xnu:/*
|
||||
...decentralized leb128...
|
||||
*/.previous
|
||||
|
@ -64,7 +56,6 @@ syscon_xnu:/*
|
|||
#endif
|
||||
#if SupportsFreebsd()
|
||||
.section .sort.rodata.syscon.freebsd.1,"a",@progbits
|
||||
.balign ROALIGN
|
||||
syscon_freebsd:/*
|
||||
...decentralized leb128...
|
||||
*/.previous
|
||||
|
@ -73,7 +64,6 @@ syscon_freebsd:/*
|
|||
#endif
|
||||
#if SupportsOpenbsd()
|
||||
.section .sort.rodata.syscon.openbsd.1,"a",@progbits
|
||||
.balign ROALIGN
|
||||
syscon_openbsd:/*
|
||||
...decentralized leb128...
|
||||
*/.previous
|
||||
|
@ -82,7 +72,6 @@ syscon_openbsd:/*
|
|||
#endif
|
||||
#if SupportsNetbsd()
|
||||
.section .sort.rodata.syscon.netbsd.1,"a",@progbits
|
||||
.balign ROALIGN
|
||||
syscon_netbsd:/*
|
||||
...decentralized leb128...
|
||||
*/.previous
|
||||
|
@ -91,7 +80,6 @@ syscon_netbsd:/*
|
|||
#endif
|
||||
#if SupportsWindows()
|
||||
.section .sort.rodata.syscon.windows.1,"a",@progbits
|
||||
.balign ROALIGN
|
||||
syscon_windows:/*
|
||||
...decentralized leb128...
|
||||
*/.previous
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue