diff options
author | mortimer <mortimer@cvs.openbsd.org> | 2019-07-29 02:08:33 +0000 |
---|---|---|
committer | mortimer <mortimer@cvs.openbsd.org> | 2019-07-29 02:08:33 +0000 |
commit | 06244faed33605df894c0780258d828f56dc8915 (patch) | |
tree | 86f071ee27f1edc06a62dc8ce4ffa5ce566bfa1e | |
parent | 80ca41df275af01360f25a16cd6928f8a87aee4b (diff) |
regress: Add mips64 stack pivot asm for octeon in stackpivot tests
-rw-r--r-- | regress/sys/kern/stackpivot/Makefile | 3 | ||||
-rw-r--r-- | regress/sys/kern/stackpivot/pivot.h | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/regress/sys/kern/stackpivot/Makefile b/regress/sys/kern/stackpivot/Makefile index 0dd6af71e8c..c5cdb14313d 100644 --- a/regress/sys/kern/stackpivot/Makefile +++ b/regress/sys/kern/stackpivot/Makefile @@ -1,6 +1,7 @@ .if ${MACHINE} != "amd64" && \ - ${MACHINE} != "i386" + ${MACHINE} != "i386" && \ + ${MACHINE} != "octeon" REGRESS_TARGETS=run-regress-skiparch run-regress-skiparch: # Need stack pivot asm for this arch diff --git a/regress/sys/kern/stackpivot/pivot.h b/regress/sys/kern/stackpivot/pivot.h index 4f13a45bacf..7fd948b3f2f 100644 --- a/regress/sys/kern/stackpivot/pivot.h +++ b/regress/sys/kern/stackpivot/pivot.h @@ -6,6 +6,8 @@ static void pivot(size_t *newstack) { asm("mov %0, %%rsp; retq;" ::"r"(newstack)); #elif defined(__i386__) asm("mov %0, %%esp; retl;" ::"r"(newstack)); +#elif defined(__mips64__) + asm("move $sp, %0; ld $ra, 0($sp); jr $ra;" ::"r"(newstack)); #endif } |