mips64: elide emulation of the magic flag crap glibc does

master
Ariadne Conill 2020-03-29 13:40:32 +00:00
parent e8115eb013
commit 7c60f4576c
4 changed files with 1 additions and 19 deletions

View File

@ -22,10 +22,6 @@ FUNC(__getcontext)
PUSH_FRAME(__getcontext)
/* set the magic flag */
li $v0, 1
sd $v0, ((0 * REG_SZ) + MCONTEXT_GREGS)($a0)
/* set registers */
sd $s0, ((16 * REG_SZ) + MCONTEXT_GREGS)($a0)
sd $s1, ((17 * REG_SZ) + MCONTEXT_GREGS)($a0)

View File

@ -17,11 +17,6 @@ LOCALSZ = 1
FUNC(__setcontext)
PUSH_FRAME(__setcontext)
/* check for the magic flag. */
li $v0, 1
dla $v1, ((0 * REG_SZ) + MCONTEXT_GREGS)($a0)
bne $v0, $v1, fail
/* move the context to $v0 */
move $v0, $a0
@ -53,12 +48,7 @@ FUNC(__setcontext)
move $v0, $zero
jr $t9
fail:
dla $t9, exit
POP_FRAME(__setcontext)
jalr $t9
END(__setcontext)
.weak setcontext;

View File

@ -24,7 +24,7 @@ FUNC(__start_context)
move $a0, $s0
dla $t9, __setcontext
jalr $t9
jr $t9
no_linked_context:
move $a0, $zero

View File

@ -24,10 +24,6 @@ FUNC(__swapcontext)
PUSH_FRAME(__swapcontext)
/* set the magic flag */
li $v0, 1
sd $v0, ((0 * REG_SZ) + MCONTEXT_GREGS)($a0)
/* set registers */
sd $s0, ((16 * REG_SZ) + MCONTEXT_GREGS)($a0)
sd $s1, ((17 * REG_SZ) + MCONTEXT_GREGS)($a0)