everywhere: rename __getcontext to libucontext_getcontext

pull/21/head
Ariadne Conill 2020-12-06 03:02:25 -06:00
parent 2f31efaa95
commit 99ed5bbe12
11 changed files with 40 additions and 40 deletions

View File

@ -12,9 +12,9 @@
#include "defs.h"
ALIAS(getcontext, __getcontext)
ALIAS(getcontext, libucontext_getcontext)
FUNC(__getcontext)
FUNC(libucontext_getcontext)
str xzr, [x0, #REG_OFFSET(0)]
/* save GPRs */
@ -49,4 +49,4 @@ FUNC(__getcontext)
mov x0, #0
ret
END(__getcontext)
END(libucontext_getcontext)

View File

@ -12,9 +12,9 @@
#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 */
add r1, r0, #REG_OFFSET(4)
stmia r1, {r4-r12}
@ -24,4 +24,4 @@ FUNC(__getcontext)
/* return 0 */
mov r0, #0
mov pc, lr
END(__getcontext)
END(libucontext_getcontext)

View File

@ -12,9 +12,9 @@
#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 */
movem.l %d2-%d7, REG_OFFSET(REG_D2)(%a0) /* preserve $d2 through $d7 */
@ -26,4 +26,4 @@ FUNC(__getcontext)
clr.l %d0 /* return 0 */
rts
END(__getcontext)
END(libucontext_getcontext)

View File

@ -14,15 +14,15 @@ LOCALSZ = 1
#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 */
move $a2, $gp
move $a3, $sp
move $a1, $fp
PUSH_FRAME(__getcontext)
PUSH_FRAME(libucontext_getcontext)
/* set registers */
sw $s0, REG_OFFSET(16)($a0)
@ -40,7 +40,7 @@ FUNC(__getcontext)
sw $ra, REG_OFFSET(31)($a0)
sw $ra, (MCONTEXT_PC)($a0)
POP_FRAME(__getcontext)
POP_FRAME(libucontext_getcontext)
jr $ra
END(__getcontext)
END(libucontext_getcontext)

View File

@ -14,15 +14,15 @@ LOCALSZ = 1
#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 */
move $a2, $gp
move $a3, $sp
move $a4, $fp
PUSH_FRAME(__getcontext)
PUSH_FRAME(libucontext_getcontext)
/* set registers */
sd $s0, REG_OFFSET(16)($a0)
@ -40,7 +40,7 @@ FUNC(__getcontext)
sd $ra, REG_OFFSET(31)($a0)
sd $ra, (MCONTEXT_PC)($a0)
POP_FRAME(__getcontext)
POP_FRAME(libucontext_getcontext)
jr $ra
END(__getcontext)
END(libucontext_getcontext)

View File

@ -10,11 +10,11 @@
* from the use of this software.
*/
.global __getcontext
.global libucontext_getcontext
.hidden __swapcontext
__getcontext:
libucontext_getcontext:
li 4, 0
b __swapcontext@local
.weak getcontext
getcontext = __getcontext
getcontext = libucontext_getcontext

View File

@ -10,16 +10,16 @@
* from the use of this software.
*/
.global __getcontext
.global libucontext_getcontext
.hidden __swapcontext
__getcontext:
addis 2, 12, .TOC.-__getcontext@ha
addi 2, 12, .TOC.-__getcontext@l
libucontext_getcontext:
addis 2, 12, .TOC.-libucontext_getcontext@ha
addi 2, 12, .TOC.-libucontext_getcontext@l
.localentry __getcontext,.-__getcontext
.localentry libucontext_getcontext,.-libucontext_getcontext
li 4, 0
b __swapcontext
.weak getcontext
getcontext = __getcontext
getcontext = libucontext_getcontext

View File

@ -12,9 +12,9 @@
#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_RA)(a0)
sd sp, REG_OFFSET(REG_SP)(a0)
@ -41,4 +41,4 @@ FUNC(__getcontext)
/* done saving, return */
ret
END(__getcontext)
END(libucontext_getcontext)

View File

@ -12,9 +12,9 @@
#include "defs.h"
ALIAS(getcontext, __getcontext)
ALIAS(getcontext, libucontext_getcontext)
FUNC(__getcontext)
FUNC(libucontext_getcontext)
lgr %r1, %r2 /* use %r1 as our working register */
la %r2, 0 /* we will return 0 */
@ -22,4 +22,4 @@ FUNC(__getcontext)
stmg %r0, %r15, REG_OFFSET(0)(%r1) /* store general-purpose registers */
br %r14 /* return to where we came from */
END(__getcontext)
END(libucontext_getcontext)

View File

@ -12,9 +12,9 @@
#include "defs.h"
ALIAS(getcontext, __getcontext)
ALIAS(getcontext, libucontext_getcontext)
FUNC(__getcontext)
FUNC(libucontext_getcontext)
/* load address of the ucontext structure */
movl 4(%esp), %eax
@ -46,4 +46,4 @@ FUNC(__getcontext)
/* we're all done here, return 0 */
xorl %eax, %eax
ret
END(__getcontext)
END(libucontext_getcontext)

View File

@ -12,9 +12,9 @@
#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 */
movq %r8, REG_OFFSET(REG_R8)(%rdi)
movq %r9, REG_OFFSET(REG_R9)(%rdi)
@ -45,4 +45,4 @@ FUNC(__getcontext)
/* we're all done here, return 0 */
xorl %eax, %eax
ret
END(__getcontext)
END(libucontext_getcontext)