everywhere: rename __getcontext to libucontext_getcontext
parent
2f31efaa95
commit
99ed5bbe12
|
@ -12,9 +12,9 @@
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
|
|
||||||
ALIAS(getcontext, __getcontext)
|
ALIAS(getcontext, libucontext_getcontext)
|
||||||
|
|
||||||
FUNC(__getcontext)
|
FUNC(libucontext_getcontext)
|
||||||
str xzr, [x0, #REG_OFFSET(0)]
|
str xzr, [x0, #REG_OFFSET(0)]
|
||||||
|
|
||||||
/* save GPRs */
|
/* save GPRs */
|
||||||
|
@ -49,4 +49,4 @@ FUNC(__getcontext)
|
||||||
|
|
||||||
mov x0, #0
|
mov x0, #0
|
||||||
ret
|
ret
|
||||||
END(__getcontext)
|
END(libucontext_getcontext)
|
||||||
|
|
|
@ -12,9 +12,9 @@
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
|
|
||||||
ALIAS(getcontext, __getcontext)
|
ALIAS(getcontext, libucontext_getcontext)
|
||||||
|
|
||||||
FUNC(__getcontext)
|
FUNC(libucontext_getcontext)
|
||||||
/* copy all of the current registers into the ucontext structure */
|
/* copy all of the current registers into the ucontext structure */
|
||||||
add r1, r0, #REG_OFFSET(4)
|
add r1, r0, #REG_OFFSET(4)
|
||||||
stmia r1, {r4-r12}
|
stmia r1, {r4-r12}
|
||||||
|
@ -24,4 +24,4 @@ FUNC(__getcontext)
|
||||||
/* return 0 */
|
/* return 0 */
|
||||||
mov r0, #0
|
mov r0, #0
|
||||||
mov pc, lr
|
mov pc, lr
|
||||||
END(__getcontext)
|
END(libucontext_getcontext)
|
||||||
|
|
|
@ -12,9 +12,9 @@
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
|
|
||||||
ALIAS(getcontext, __getcontext)
|
ALIAS(getcontext, libucontext_getcontext)
|
||||||
|
|
||||||
FUNC(__getcontext)
|
FUNC(libucontext_getcontext)
|
||||||
move.l 4(%sp), %a0 /* load ucontext_t pointer from stack */
|
move.l 4(%sp), %a0 /* load ucontext_t pointer from stack */
|
||||||
|
|
||||||
movem.l %d2-%d7, REG_OFFSET(REG_D2)(%a0) /* preserve $d2 through $d7 */
|
movem.l %d2-%d7, REG_OFFSET(REG_D2)(%a0) /* preserve $d2 through $d7 */
|
||||||
|
@ -26,4 +26,4 @@ FUNC(__getcontext)
|
||||||
|
|
||||||
clr.l %d0 /* return 0 */
|
clr.l %d0 /* return 0 */
|
||||||
rts
|
rts
|
||||||
END(__getcontext)
|
END(libucontext_getcontext)
|
||||||
|
|
|
@ -14,15 +14,15 @@ LOCALSZ = 1
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
|
|
||||||
ALIAS(getcontext, __getcontext)
|
ALIAS(getcontext, libucontext_getcontext)
|
||||||
|
|
||||||
FUNC(__getcontext)
|
FUNC(libucontext_getcontext)
|
||||||
/* copy $gp, $sp, $fp to temporary registers so we don't clobber them */
|
/* copy $gp, $sp, $fp to temporary registers so we don't clobber them */
|
||||||
move $a2, $gp
|
move $a2, $gp
|
||||||
move $a3, $sp
|
move $a3, $sp
|
||||||
move $a1, $fp
|
move $a1, $fp
|
||||||
|
|
||||||
PUSH_FRAME(__getcontext)
|
PUSH_FRAME(libucontext_getcontext)
|
||||||
|
|
||||||
/* set registers */
|
/* set registers */
|
||||||
sw $s0, REG_OFFSET(16)($a0)
|
sw $s0, REG_OFFSET(16)($a0)
|
||||||
|
@ -40,7 +40,7 @@ FUNC(__getcontext)
|
||||||
sw $ra, REG_OFFSET(31)($a0)
|
sw $ra, REG_OFFSET(31)($a0)
|
||||||
sw $ra, (MCONTEXT_PC)($a0)
|
sw $ra, (MCONTEXT_PC)($a0)
|
||||||
|
|
||||||
POP_FRAME(__getcontext)
|
POP_FRAME(libucontext_getcontext)
|
||||||
|
|
||||||
jr $ra
|
jr $ra
|
||||||
END(__getcontext)
|
END(libucontext_getcontext)
|
||||||
|
|
|
@ -14,15 +14,15 @@ LOCALSZ = 1
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
|
|
||||||
ALIAS(getcontext, __getcontext)
|
ALIAS(getcontext, libucontext_getcontext)
|
||||||
|
|
||||||
FUNC(__getcontext)
|
FUNC(libucontext_getcontext)
|
||||||
/* copy $gp, $sp, $fp to temporary registers so we don't clobber them */
|
/* copy $gp, $sp, $fp to temporary registers so we don't clobber them */
|
||||||
move $a2, $gp
|
move $a2, $gp
|
||||||
move $a3, $sp
|
move $a3, $sp
|
||||||
move $a4, $fp
|
move $a4, $fp
|
||||||
|
|
||||||
PUSH_FRAME(__getcontext)
|
PUSH_FRAME(libucontext_getcontext)
|
||||||
|
|
||||||
/* set registers */
|
/* set registers */
|
||||||
sd $s0, REG_OFFSET(16)($a0)
|
sd $s0, REG_OFFSET(16)($a0)
|
||||||
|
@ -40,7 +40,7 @@ FUNC(__getcontext)
|
||||||
sd $ra, REG_OFFSET(31)($a0)
|
sd $ra, REG_OFFSET(31)($a0)
|
||||||
sd $ra, (MCONTEXT_PC)($a0)
|
sd $ra, (MCONTEXT_PC)($a0)
|
||||||
|
|
||||||
POP_FRAME(__getcontext)
|
POP_FRAME(libucontext_getcontext)
|
||||||
|
|
||||||
jr $ra
|
jr $ra
|
||||||
END(__getcontext)
|
END(libucontext_getcontext)
|
||||||
|
|
|
@ -10,11 +10,11 @@
|
||||||
* from the use of this software.
|
* from the use of this software.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.global __getcontext
|
.global libucontext_getcontext
|
||||||
.hidden __swapcontext
|
.hidden __swapcontext
|
||||||
__getcontext:
|
libucontext_getcontext:
|
||||||
li 4, 0
|
li 4, 0
|
||||||
b __swapcontext@local
|
b __swapcontext@local
|
||||||
|
|
||||||
.weak getcontext
|
.weak getcontext
|
||||||
getcontext = __getcontext
|
getcontext = libucontext_getcontext
|
||||||
|
|
|
@ -10,16 +10,16 @@
|
||||||
* from the use of this software.
|
* from the use of this software.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.global __getcontext
|
.global libucontext_getcontext
|
||||||
.hidden __swapcontext
|
.hidden __swapcontext
|
||||||
__getcontext:
|
libucontext_getcontext:
|
||||||
addis 2, 12, .TOC.-__getcontext@ha
|
addis 2, 12, .TOC.-libucontext_getcontext@ha
|
||||||
addi 2, 12, .TOC.-__getcontext@l
|
addi 2, 12, .TOC.-libucontext_getcontext@l
|
||||||
|
|
||||||
.localentry __getcontext,.-__getcontext
|
.localentry libucontext_getcontext,.-libucontext_getcontext
|
||||||
|
|
||||||
li 4, 0
|
li 4, 0
|
||||||
b __swapcontext
|
b __swapcontext
|
||||||
|
|
||||||
.weak getcontext
|
.weak getcontext
|
||||||
getcontext = __getcontext
|
getcontext = libucontext_getcontext
|
||||||
|
|
|
@ -12,9 +12,9 @@
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
|
|
||||||
ALIAS(getcontext, __getcontext)
|
ALIAS(getcontext, libucontext_getcontext)
|
||||||
|
|
||||||
FUNC(__getcontext)
|
FUNC(libucontext_getcontext)
|
||||||
sd ra, REG_OFFSET(REG_PC)(a0)
|
sd ra, REG_OFFSET(REG_PC)(a0)
|
||||||
sd ra, REG_OFFSET(REG_RA)(a0)
|
sd ra, REG_OFFSET(REG_RA)(a0)
|
||||||
sd sp, REG_OFFSET(REG_SP)(a0)
|
sd sp, REG_OFFSET(REG_SP)(a0)
|
||||||
|
@ -41,4 +41,4 @@ FUNC(__getcontext)
|
||||||
|
|
||||||
/* done saving, return */
|
/* done saving, return */
|
||||||
ret
|
ret
|
||||||
END(__getcontext)
|
END(libucontext_getcontext)
|
||||||
|
|
|
@ -12,9 +12,9 @@
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
|
|
||||||
ALIAS(getcontext, __getcontext)
|
ALIAS(getcontext, libucontext_getcontext)
|
||||||
|
|
||||||
FUNC(__getcontext)
|
FUNC(libucontext_getcontext)
|
||||||
lgr %r1, %r2 /* use %r1 as our working register */
|
lgr %r1, %r2 /* use %r1 as our working register */
|
||||||
la %r2, 0 /* we will return 0 */
|
la %r2, 0 /* we will return 0 */
|
||||||
|
|
||||||
|
@ -22,4 +22,4 @@ FUNC(__getcontext)
|
||||||
stmg %r0, %r15, REG_OFFSET(0)(%r1) /* store general-purpose registers */
|
stmg %r0, %r15, REG_OFFSET(0)(%r1) /* store general-purpose registers */
|
||||||
|
|
||||||
br %r14 /* return to where we came from */
|
br %r14 /* return to where we came from */
|
||||||
END(__getcontext)
|
END(libucontext_getcontext)
|
||||||
|
|
|
@ -12,9 +12,9 @@
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
|
|
||||||
ALIAS(getcontext, __getcontext)
|
ALIAS(getcontext, libucontext_getcontext)
|
||||||
|
|
||||||
FUNC(__getcontext)
|
FUNC(libucontext_getcontext)
|
||||||
/* load address of the ucontext structure */
|
/* load address of the ucontext structure */
|
||||||
movl 4(%esp), %eax
|
movl 4(%esp), %eax
|
||||||
|
|
||||||
|
@ -46,4 +46,4 @@ FUNC(__getcontext)
|
||||||
/* we're all done here, return 0 */
|
/* we're all done here, return 0 */
|
||||||
xorl %eax, %eax
|
xorl %eax, %eax
|
||||||
ret
|
ret
|
||||||
END(__getcontext)
|
END(libucontext_getcontext)
|
||||||
|
|
|
@ -12,9 +12,9 @@
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
|
|
||||||
ALIAS(getcontext, __getcontext)
|
ALIAS(getcontext, libucontext_getcontext)
|
||||||
|
|
||||||
FUNC(__getcontext)
|
FUNC(libucontext_getcontext)
|
||||||
/* copy all of the current registers into the ucontext structure */
|
/* copy all of the current registers into the ucontext structure */
|
||||||
movq %r8, REG_OFFSET(REG_R8)(%rdi)
|
movq %r8, REG_OFFSET(REG_R8)(%rdi)
|
||||||
movq %r9, REG_OFFSET(REG_R9)(%rdi)
|
movq %r9, REG_OFFSET(REG_R9)(%rdi)
|
||||||
|
@ -45,4 +45,4 @@ FUNC(__getcontext)
|
||||||
/* we're all done here, return 0 */
|
/* we're all done here, return 0 */
|
||||||
xorl %eax, %eax
|
xorl %eax, %eax
|
||||||
ret
|
ret
|
||||||
END(__getcontext)
|
END(libucontext_getcontext)
|
||||||
|
|
Loading…
Reference in New Issue