diff options
author | mortimer <mortimer@cvs.openbsd.org> | 2019-08-04 15:27:38 +0000 |
---|---|---|
committer | mortimer <mortimer@cvs.openbsd.org> | 2019-08-04 15:27:38 +0000 |
commit | fdb828f265ab637de52d53e8325ca0c616498158 (patch) | |
tree | f7ab225410b831050e4ff74e0366b57434e8d060 /regress/sys | |
parent | bacbc8a6271d36c35f0dcfabe4f57d351acbe09e (diff) |
Add arm64 asm for stackpivot regress test.
Diffstat (limited to 'regress/sys')
-rw-r--r-- | regress/sys/kern/stackpivot/Makefile | 3 | ||||
-rw-r--r-- | regress/sys/kern/stackpivot/pivot.h | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/regress/sys/kern/stackpivot/Makefile b/regress/sys/kern/stackpivot/Makefile index c5cdb14313d..0aa38ce558a 100644 --- a/regress/sys/kern/stackpivot/Makefile +++ b/regress/sys/kern/stackpivot/Makefile @@ -1,5 +1,6 @@ -.if ${MACHINE} != "amd64" && \ +.if ${MACHINE} != "arm64" && \ + ${MACHINE} != "amd64" && \ ${MACHINE} != "i386" && \ ${MACHINE} != "octeon" REGRESS_TARGETS=run-regress-skiparch diff --git a/regress/sys/kern/stackpivot/pivot.h b/regress/sys/kern/stackpivot/pivot.h index 7fd948b3f2f..1982e479cf3 100644 --- a/regress/sys/kern/stackpivot/pivot.h +++ b/regress/sys/kern/stackpivot/pivot.h @@ -2,7 +2,9 @@ #define REGRESS_PIVOT_H static void pivot(size_t *newstack) { -#if defined(__amd64__) +#if defined(__aarch64__) + asm("mov sp, %0; ldr lr, [sp]; ret;" ::"r"(newstack)); +#elif defined(__amd64__) asm("mov %0, %%rsp; retq;" ::"r"(newstack)); #elif defined(__i386__) asm("mov %0, %%esp; retl;" ::"r"(newstack)); |