blob: cc451037a80d5446bdf3397c49bb06c35a420b00 [file] [log] [blame]
#
# arch/cris/setjmp.S
#
# setjmp/longjmp for the cris architecture
#
#
# The jmp_buf is assumed to contain the following, in order:
# $r8..$r0 (in that order)
# $sp ($r14)
# return address
#
.text
.balign 4
.globl _setjmp
.type _setjmp, @function
_setjmp:
movem $r8,[$r10+] /* Save $r8..$r0 at $r10... */
move.d $sp,[$r10+]
ret
move $srp,[$r10+]
.size _setjmp,.-_setjmp
.text
.balign 4
.globl _longjmp
.type _longjmp, @function
_longjmp:
movem [$r10+],$r8 /* Load $r8..$r0 from $r10... */
move.d [$r10+],$sp
jump [$r10+]
move.d $r11,$r10
.size _longjmp,.-_longjmp