_setjmp.S 650 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * Copyright (c) 1995 David Mosberger (davidm@cs.arizona.edu)
  3. */
  4. #include <setjmp.h>
  5. .globl _setjmp
  6. .ent _setjmp
  7. _setjmp:
  8. stq $29, JB_GP($16)
  9. stq $30, JB_SP($16)
  10. stq $9, JB_S0($16)
  11. stq $10, JB_S1($16)
  12. stq $11, JB_S2($16)
  13. stq $12, JB_S3($16)
  14. stq $13, JB_S4($16)
  15. stq $14, JB_S5($16)
  16. stq $15, JB_S6($16)
  17. stq $26, JB_RA($16)
  18. #ifdef FPU
  19. stt $f2, JB_F2($16)
  20. stt $f3, JB_F3($16)
  21. stt $f4, JB_F4($16)
  22. stt $f5, JB_F5($16)
  23. stt $f6, JB_F6($16)
  24. stt $f7, JB_F7($16)
  25. stt $f8, JB_F8($16)
  26. stt $f9, JB_F9($16)
  27. #endif
  28. lda $1, JBMAGIC & 0xffff
  29. ldah $1, ((JBMAGIC >> 16) & 0xffff)($1)
  30. stq $1, JB_MAGIC($16)
  31. clr $0
  32. ret ($26)
  33. .end _setjmp