__longjmp.S 943 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #include <features.h>
  2. # longjmp.S atp sept 2001
  3. # restore regs and info and jmp back to a previous setjmp
  4. .globl __longjmp
  5. .align 4
  6. __longjmp:
  7. .word 0x0040 # this matches setjmp and PLT
  8. movl 0x4(%ap), %r0 # our scratch reg
  9. # movl $0, %r0
  10. # movl (%r0), %r0
  11. # we are going to modify our stack frame
  12. # to the same as that of the setjmp we called earlier
  13. movl (%r0), (%fp) # cond handler
  14. movl 0x4(%r0), 0x4(%fp) # psw
  15. movl 0x8(%r0), 0x8(%fp) # ap
  16. movl 0xc(%r0), 0xc(%fp) # fp
  17. movl 0x10(%r0), 0x10(%fp) # pc
  18. # restore the regs
  19. movl 0x14(%r0), %r1
  20. movl 0x18(%r0), %r2
  21. movl 0x1c(%r0), %r3
  22. movl 0x20(%r0), %r4
  23. movl 0x24(%r0), %r5
  24. movl 0x28(%r0), %r6
  25. movl 0x2c(%r0), %r7
  26. movl 0x30(%r0), %r8
  27. movl 0x34(%r0), %r9
  28. movl 0x38(%r0), %r10
  29. movl 0x3c(%r0), %r11
  30. # check val and set to 1 if set to zero
  31. movl 0x8(%ap), %r0
  32. tstl %r0
  33. bneq exit_ok
  34. movl $0x1, %r0
  35. exit_ok:
  36. ret
  37. .size __longjmp,.-__longjmp
  38. libc_hidden_def(__longjmp)