diff options
Diffstat (limited to 'libc/sysdeps/linux/vax/__longjmp.S')
-rw-r--r-- | libc/sysdeps/linux/vax/__longjmp.S | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/libc/sysdeps/linux/vax/__longjmp.S b/libc/sysdeps/linux/vax/__longjmp.S index a48581fa9..61b37a3b9 100644 --- a/libc/sysdeps/linux/vax/__longjmp.S +++ b/libc/sysdeps/linux/vax/__longjmp.S @@ -1,24 +1,28 @@ #include <features.h> -# longjmp.S atp sept 2001 -# restore regs and info and jmp back to a previous setjmp +/* + * longjmp.S atp sept 2001 + * Jan-Benedict Glaw <jbglaw@lug-owl.de> 2006 + * + * Restore regs and info and jmp back to a previous setjmp + */ -.globl __longjmp -.align 4 +.globl __longjmp +.align 4 __longjmp: - .word 0x0040 # this matches setjmp and PLT - movl 0x4(%ap), %r0 # our scratch reg -# movl $0, %r0 -# movl (%r0), %r0 - # we are going to modify our stack frame - # to the same as that of the setjmp we called earlier - movl (%r0), (%fp) # cond handler - movl 0x4(%r0), 0x4(%fp) # psw - movl 0x8(%r0), 0x8(%fp) # ap - movl 0xc(%r0), 0xc(%fp) # fp - movl 0x10(%r0), 0x10(%fp) # pc + .word 0x0040 /* This matches setjmp and PLT */ + movl 0x4(%ap), %r0 /* Our scratch reg */ +/* movl $0, %r0 */ +/* movl (%r0), %r0 */ + /* We are going to modify our stack frame */ + /* to the same as that of the setjmp we called earlier */ + movl (%r0), (%fp) /* cond handler */ + movl 0x4(%r0), 0x4(%fp) /* psw */ + movl 0x8(%r0), 0x8(%fp) /* ap */ + movl 0xc(%r0), 0xc(%fp) /* fp */ + movl 0x10(%r0), 0x10(%fp) /* pc */ - # restore the regs + /* Restore the regs */ movl 0x14(%r0), %r1 movl 0x18(%r0), %r2 movl 0x1c(%r0), %r3 @@ -31,7 +35,7 @@ __longjmp: movl 0x38(%r0), %r10 movl 0x3c(%r0), %r11 - # check val and set to 1 if set to zero + /* Check val and set to 1 if set to zero */ movl 0x8(%ap), %r0 tstl %r0 bneq exit_ok |