__longjmp.S 512 B

123456789101112131415161718192021222324
  1. /* Copyright (C) 2002, David McCullough <davidm@snapgear.com> */
  2. /* This file is released under the LGPL, any version you like */
  3. #include <features.h>
  4. #include <jmpbuf-offsets.h>
  5. .globl __longjmp
  6. .type __longjmp,@function
  7. .align 4
  8. __longjmp:
  9. moveal %sp@(4), %a0
  10. movel %sp@(8), %d0
  11. bne 1f
  12. movel #1, %d0
  13. 1:
  14. moveml %a0@(JB_REGS), %d2-%d7/%a2-%a7
  15. #if defined __HAVE_68881__ || defined __UCLIBC_HAS_FPU__
  16. fmovemx %a0@(JB_FPREGS), %fp2-%fp7
  17. #endif
  18. movel %a0@(JB_PC), %sp@
  19. rts
  20. libc_hidden_def(__longjmp)