__longjmp.S 691 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Copyright (C) 2017 Hangzhou C-SKY Microsystems co.,ltd.
  3. *
  4. * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB
  5. * in this tarball.
  6. */
  7. #include <sysdep.h>
  8. ENTRY(__longjmp)
  9. ldw sp, (a0, 0)
  10. ldw lr, (a0, 4)
  11. ldw l0, (a0, 8)
  12. ldw l1, (a0, 12)
  13. ldw l2, (a0, 16)
  14. ldw l3, (a0, 20)
  15. ldw l4, (a0, 24)
  16. ldw l5, (a0, 28)
  17. #ifdef __CSKYABIV2__
  18. ldw l6, (a0, 32)
  19. ldw l7, (a0, 36)
  20. ldw l8, (a0, 40)
  21. ldw l9, (a0, 44)
  22. ldw r26, (a0, 48)
  23. ldw r27, (a0, 52)
  24. ldw gb, (a0, 56)
  25. ldw r29, (a0, 60)
  26. ldw r30, (a0, 64)
  27. ldw tls, (a0, 68)
  28. #else
  29. ldw gb, (a0, 32)
  30. #endif
  31. mov a0, a1
  32. cmpnei a1, 0
  33. bt 1f
  34. movi a0, 1
  35. 1:
  36. rts
  37. END(__longjmp)
  38. libc_hidden_def(__longjmp)