__longjmp.S 343 B

1234567891011121314151617181920212223242526
  1. #define _ASM
  2. #define _SETJMP_H
  3. #include <bits/setjmp.h>
  4. #ifdef __H8300S__
  5. .h8300s
  6. #else
  7. .h8300h
  8. #endif
  9. .text
  10. .global ___longjmp
  11. ___longjmp:
  12. mov.l er1,er1
  13. bne 1f
  14. sub.l er1,er1
  15. inc.l #1,er1
  16. 1:
  17. mov.l @er0+,er4
  18. mov.l @er0+,er5
  19. mov.l @er0+,er6
  20. mov.l @er0+,sp
  21. mov.l @er0+,er3 ; return PC
  22. adds #4,sp ; adjust return stack
  23. jmp @er3