mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-28 05:20:28 +00:00
Get TEST_LIBC_STR passing on AARCH64
It's now possible to run commands like: make -j8 m=aarch64 o/aarch64/test/libc/str Which will cross-compile and run the test suites in a qemu-aarch64 binary that's vendored in the third_party/qemu/ folder within your x86_64 build environment.
This commit is contained in:
parent
45186c74ac
commit
414667b1c9
24 changed files with 657 additions and 61 deletions
|
@ -25,8 +25,6 @@
|
|||
#include "libc/str/str.h"
|
||||
#include "libc/thread/tls.h"
|
||||
|
||||
#ifdef __x86_64__
|
||||
|
||||
forceinline bool PointerNotOwnedByParentStackFrame(struct StackFrame *frame,
|
||||
struct StackFrame *parent,
|
||||
void *ptr) {
|
||||
|
@ -88,7 +86,9 @@ static void DeferFunction(struct StackFrame *frame, void *fn, void *arg) {
|
|||
g->p[g->i].arg = (intptr_t)arg;
|
||||
g->p[g->i].ret = frame->addr;
|
||||
g->i++;
|
||||
#ifdef __x86_64__
|
||||
frame->addr = (intptr_t)__gc;
|
||||
#endif
|
||||
}
|
||||
|
||||
// the gnu extension macros for _gc / _defer point here
|
||||
|
@ -146,5 +146,3 @@ void *(_defer)(void *fn, void *arg) {
|
|||
DeferFunction(frame->next, fn, arg);
|
||||
return arg;
|
||||
}
|
||||
|
||||
#endif /* __x86_64__ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue