mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-30 16:28:30 +00:00
Get LIBC_MEM and LIBC_STDIO building with aarch64
This commit is contained in:
parent
ae0ee59614
commit
d04430f4ef
81 changed files with 440 additions and 1064 deletions
|
@ -19,6 +19,7 @@
|
|||
#include "libc/testlib/testlib.h"
|
||||
|
||||
void testlib_clearxmmregisters(void) {
|
||||
#ifdef __x86_64__
|
||||
asm("pxor\t%xmm0,%xmm0\n\t"
|
||||
"pxor\t%xmm1,%xmm1\n\t"
|
||||
"pxor\t%xmm2,%xmm2\n\t"
|
||||
|
@ -27,4 +28,5 @@ void testlib_clearxmmregisters(void) {
|
|||
"pxor\t%xmm5,%xmm5\n\t"
|
||||
"pxor\t%xmm6,%xmm6\n\t"
|
||||
"pxor\t%xmm7,%xmm7");
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -20,7 +20,11 @@
|
|||
#include "libc/testlib/ezbench.h"
|
||||
|
||||
int __testlib_getcore(void) {
|
||||
#ifdef __x86__
|
||||
long tscaux;
|
||||
tscaux = rdpid();
|
||||
return TSC_AUX_CORE(tscaux);
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "libc/log/color.internal.h"
|
||||
#include "libc/log/internal.h"
|
||||
#include "libc/log/libfatal.internal.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/testlib/testlib.h"
|
||||
|
||||
|
@ -51,8 +52,8 @@ void testlib_showerror(const char *file, int line, const char *func,
|
|||
RED2, UNBOLD, BLUE1, file, (long)line, RESET, method, func,
|
||||
g_fixturename, hostname, getpid(), gettid(), code, v1, symbol, v2,
|
||||
SUBTLE, strerror(errno), GetProgramExecutableName(), RESET);
|
||||
free_s(&v1);
|
||||
free_s(&v2);
|
||||
free(v1);
|
||||
free(v2);
|
||||
}
|
||||
|
||||
/* TODO(jart): Pay off tech debt re duplication */
|
||||
|
@ -89,8 +90,8 @@ void testlib_showerror_(int line, const char *wantcode, const char *gotcode,
|
|||
"\t%s%s @ %s%s\n",
|
||||
SUBTLE, strerror(e), RESET, SUBTLE,
|
||||
firstnonnull(program_invocation_name, "unknown"), hostname, RESET);
|
||||
free_s(&FREED_want);
|
||||
free_s(&FREED_got);
|
||||
free(FREED_want);
|
||||
free(FREED_got);
|
||||
++g_testlib_failed;
|
||||
if (testlib_showerror_isfatal) {
|
||||
testlib_abort();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue