everywhere: rename __swapcontext to libucontext_swapcontext
parent
37fe7afd5f
commit
e65e485630
|
@ -12,9 +12,9 @@
|
|||
|
||||
#include "defs.h"
|
||||
|
||||
ALIAS(swapcontext, __swapcontext)
|
||||
ALIAS(swapcontext, libucontext_swapcontext)
|
||||
|
||||
FUNC(__swapcontext)
|
||||
FUNC(libucontext_swapcontext)
|
||||
str xzr, [x0, #REG_OFFSET(0)]
|
||||
|
||||
/* save GPRs */
|
||||
|
@ -55,4 +55,4 @@ FUNC(__swapcontext)
|
|||
/* hmm, we came back here try to return */
|
||||
mov x30, x28
|
||||
ret
|
||||
END(__swapcontext)
|
||||
END(libucontext_swapcontext)
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
|
||||
#include "defs.h"
|
||||
|
||||
ALIAS(swapcontext, __swapcontext)
|
||||
ALIAS(swapcontext, libucontext_swapcontext)
|
||||
|
||||
FUNC(__swapcontext)
|
||||
FUNC(libucontext_swapcontext)
|
||||
/* copy all of the current registers into the ucontext structure */
|
||||
add r2, r0, #REG_OFFSET(0)
|
||||
stmia r2, {r0-r12}
|
||||
|
@ -27,4 +27,4 @@ FUNC(__swapcontext)
|
|||
ldr r13, [r14, #52]
|
||||
add r14, r14, #56
|
||||
ldmia r14, {r14, pc}
|
||||
END(__swapcontext)
|
||||
END(libucontext_swapcontext)
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
|
||||
#include "defs.h"
|
||||
|
||||
ALIAS(swapcontext, __swapcontext)
|
||||
ALIAS(swapcontext, libucontext_swapcontext)
|
||||
|
||||
FUNC(__swapcontext)
|
||||
FUNC(libucontext_swapcontext)
|
||||
move.l 4(%sp), %a0 /* load save ucontext_t pointer from stack */
|
||||
|
||||
movem.l %d2-%d7, REG_OFFSET(REG_D2)(%a0) /* preserve $d2 through $d7 */
|
||||
|
@ -36,4 +36,4 @@ FUNC(__swapcontext)
|
|||
move.l REG_OFFSET(REG_PC)(%a0), %a1 /* load jump target */
|
||||
|
||||
jmp (%a1) /* jump to *$a1 */
|
||||
END(__swapcontext)
|
||||
END(libucontext_swapcontext)
|
||||
|
|
|
@ -16,14 +16,14 @@ LOCALSZ = 2
|
|||
|
||||
A1_OFFSET = FRAMESZ - (1 * REG_SZ)
|
||||
|
||||
ALIAS(swapcontext, __swapcontext)
|
||||
ALIAS(swapcontext, libucontext_swapcontext)
|
||||
|
||||
FUNC(__swapcontext)
|
||||
FUNC(libucontext_swapcontext)
|
||||
/* copy $gp, $sp, $fp to temporary registers so we don't clobber them */
|
||||
move $a2, $gp
|
||||
move $a3, $sp
|
||||
|
||||
PUSH_FRAME(__swapcontext)
|
||||
PUSH_FRAME(libucontext_swapcontext)
|
||||
|
||||
/* set registers */
|
||||
sd $s0, REG_OFFSET(16)($a0)
|
||||
|
@ -74,8 +74,8 @@ FUNC(__swapcontext)
|
|||
fail:
|
||||
la $t9, exit
|
||||
|
||||
POP_FRAME(__swapcontext)
|
||||
POP_FRAME(libucontext_swapcontext)
|
||||
|
||||
move $v0, $zero
|
||||
jalr $t9
|
||||
END(__swapcontext)
|
||||
END(libucontext_swapcontext)
|
||||
|
|
|
@ -16,15 +16,15 @@ LOCALSZ = 2
|
|||
|
||||
A1_OFFSET = FRAMESZ - (1 * REG_SZ)
|
||||
|
||||
ALIAS(swapcontext, __swapcontext)
|
||||
ALIAS(swapcontext, libucontext_swapcontext)
|
||||
|
||||
FUNC(__swapcontext)
|
||||
FUNC(libucontext_swapcontext)
|
||||
/* copy $gp, $sp, $fp to temporary registers so we don't clobber them */
|
||||
move $a2, $gp
|
||||
move $a3, $sp
|
||||
move $a4, $fp
|
||||
|
||||
PUSH_FRAME(__swapcontext)
|
||||
PUSH_FRAME(libucontext_swapcontext)
|
||||
|
||||
/* set registers */
|
||||
sd $s0, REG_OFFSET(16)($a0)
|
||||
|
@ -79,8 +79,8 @@ FUNC(__swapcontext)
|
|||
fail:
|
||||
dla $t9, exit
|
||||
|
||||
POP_FRAME(__swapcontext)
|
||||
POP_FRAME(libucontext_swapcontext)
|
||||
|
||||
move $v0, $zero
|
||||
jalr $t9
|
||||
END(__swapcontext)
|
||||
END(libucontext_swapcontext)
|
||||
|
|
|
@ -11,10 +11,10 @@
|
|||
*/
|
||||
|
||||
.global libucontext_getcontext
|
||||
.hidden __swapcontext
|
||||
.hidden libucontext_swapcontext
|
||||
libucontext_getcontext:
|
||||
li 4, 0
|
||||
b __swapcontext@local
|
||||
b libucontext_swapcontext@local
|
||||
|
||||
.weak getcontext
|
||||
getcontext = libucontext_getcontext
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
*/
|
||||
|
||||
.global libucontext_setcontext
|
||||
.hidden __swapcontext
|
||||
.hidden libucontext_swapcontext
|
||||
libucontext_setcontext:
|
||||
mr 4, 3
|
||||
li 3, 0
|
||||
b __swapcontext@local
|
||||
b libucontext_swapcontext@local
|
||||
|
||||
.weak setcontext
|
||||
setcontext = libucontext_setcontext
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
* from the use of this software.
|
||||
*/
|
||||
|
||||
.global __swapcontext
|
||||
__swapcontext:
|
||||
.global libucontext_swapcontext
|
||||
libucontext_swapcontext:
|
||||
li 0, 249 # SYS_swapcontext
|
||||
li 5, 1184 # sizeof(ucontext_t)
|
||||
sc
|
||||
|
@ -20,4 +20,4 @@ __swapcontext:
|
|||
b __retfromsyscall@local
|
||||
|
||||
.weak swapcontext
|
||||
swapcontext = __swapcontext
|
||||
swapcontext = libucontext_swapcontext
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
*/
|
||||
|
||||
.global libucontext_getcontext
|
||||
.hidden __swapcontext
|
||||
.hidden libucontext_swapcontext
|
||||
libucontext_getcontext:
|
||||
addis 2, 12, .TOC.-libucontext_getcontext@ha
|
||||
addi 2, 12, .TOC.-libucontext_getcontext@l
|
||||
|
@ -19,7 +19,7 @@ libucontext_getcontext:
|
|||
.localentry libucontext_getcontext,.-libucontext_getcontext
|
||||
|
||||
li 4, 0
|
||||
b __swapcontext
|
||||
b libucontext_swapcontext
|
||||
|
||||
.weak getcontext
|
||||
getcontext = libucontext_getcontext
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
*/
|
||||
|
||||
.global libucontext_setcontext
|
||||
.hidden __swapcontext
|
||||
.hidden libucontext_swapcontext
|
||||
libucontext_setcontext:
|
||||
addis 2, 12, .TOC.-libucontext_setcontext@ha
|
||||
addi 2, 12, .TOC.-libucontext_setcontext@l
|
||||
|
@ -20,7 +20,7 @@ libucontext_setcontext:
|
|||
|
||||
mr 4, 3
|
||||
li 3, 0
|
||||
b __swapcontext
|
||||
b libucontext_swapcontext
|
||||
|
||||
.weak setcontext
|
||||
setcontext = libucontext_setcontext
|
||||
|
|
|
@ -10,12 +10,12 @@
|
|||
* from the use of this software.
|
||||
*/
|
||||
|
||||
.global __swapcontext
|
||||
__swapcontext:
|
||||
addis 2, 12, .TOC.-__swapcontext@ha
|
||||
addi 2, 12, .TOC.-__swapcontext@l
|
||||
.global libucontext_swapcontext
|
||||
libucontext_swapcontext:
|
||||
addis 2, 12, .TOC.-libucontext_swapcontext@ha
|
||||
addi 2, 12, .TOC.-libucontext_swapcontext@l
|
||||
|
||||
.localentry __swapcontext,.-__swapcontext
|
||||
.localentry libucontext_swapcontext,.-libucontext_swapcontext
|
||||
|
||||
li 0, 249 # SYS_swapcontext
|
||||
li 5, 1696 # sizeof(ucontext_t)
|
||||
|
@ -25,4 +25,4 @@ __swapcontext:
|
|||
b __retfromsyscall
|
||||
|
||||
.weak swapcontext
|
||||
swapcontext = __swapcontext
|
||||
swapcontext = libucontext_swapcontext
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
|
||||
#include "defs.h"
|
||||
|
||||
ALIAS(swapcontext, __swapcontext)
|
||||
ALIAS(swapcontext, libucontext_swapcontext)
|
||||
|
||||
FUNC(__swapcontext)
|
||||
FUNC(libucontext_swapcontext)
|
||||
/* move $a1 to $t0 to avoid clobbering. */
|
||||
mv t0, a1
|
||||
|
||||
|
@ -77,4 +77,4 @@ FUNC(__swapcontext)
|
|||
|
||||
/* done swapping, return */
|
||||
ret
|
||||
END(__swapcontext)
|
||||
END(libucontext_swapcontext)
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
|
||||
#include "defs.h"
|
||||
|
||||
ALIAS(swapcontext, __swapcontext)
|
||||
ALIAS(swapcontext, libucontext_swapcontext)
|
||||
|
||||
FUNC(__swapcontext)
|
||||
FUNC(libucontext_swapcontext)
|
||||
lgr %r1, %r2 /* use %r1 to save current context to */
|
||||
lgr %r0, %r3 /* use %r0 for source context */
|
||||
|
||||
|
@ -26,4 +26,4 @@ FUNC(__swapcontext)
|
|||
lmg %r0, %r15, REG_OFFSET(0)(%r2) /* load general-purpose registers */
|
||||
|
||||
br %r14 /* return to new link register address */
|
||||
END(__swapcontext)
|
||||
END(libucontext_swapcontext)
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
|
||||
#include "defs.h"
|
||||
|
||||
ALIAS(swapcontext, __swapcontext)
|
||||
ALIAS(swapcontext, libucontext_swapcontext)
|
||||
|
||||
FUNC(__swapcontext)
|
||||
FUNC(libucontext_swapcontext)
|
||||
/* load address of the ucontext structure */
|
||||
movl 4(%esp), %eax
|
||||
|
||||
|
@ -69,4 +69,4 @@ FUNC(__swapcontext)
|
|||
movl REG_OFFSET(REG_EAX)(%eax), %eax
|
||||
|
||||
ret
|
||||
END(__swapcontext)
|
||||
END(libucontext_swapcontext)
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
|
||||
#include "defs.h"
|
||||
|
||||
ALIAS(swapcontext, __swapcontext)
|
||||
ALIAS(swapcontext, libucontext_swapcontext)
|
||||
|
||||
FUNC(__swapcontext)
|
||||
FUNC(libucontext_swapcontext)
|
||||
/* copy all of the current registers into the ucontext structure pointed by
|
||||
the first argument */
|
||||
movq %r8, REG_OFFSET(REG_R8)(%rdi)
|
||||
|
@ -71,4 +71,4 @@ FUNC(__swapcontext)
|
|||
/* we're all done here, return 0 */
|
||||
xorl %eax, %eax
|
||||
ret
|
||||
END(__swapcontext)
|
||||
END(libucontext_swapcontext)
|
||||
|
|
Loading…
Reference in New Issue