__longjmp.S 883 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #define _SETJMP_H
  2. #define _ASM
  3. #include <bits/setjmp.h>
  4. #include <libc-symbols.h>
  5. .text
  6. .global C_SYMBOL_NAME(__longjmp)
  7. .type C_SYMBOL_NAME(__longjmp),@function
  8. .align 4
  9. C_SYMBOL_NAME(__longjmp):
  10. /* load registers relative from r5 (arg0) */
  11. lw r11, (r1+0)
  12. lw r12, (r1+4)
  13. lw r13, (r1+8)
  14. lw r14, (r1+12)
  15. lw r15, (r1+16)
  16. lw r16, (r1+20)
  17. lw r17, (r1+24)
  18. lw r18, (r1+28)
  19. lw r19, (r1+32)
  20. lw r20, (r1+36)
  21. lw r21, (r1+40)
  22. lw r22, (r1+44)
  23. lw r23, (r1+48)
  24. lw r24, (r1+52)
  25. lw r25, (r1+56)
  26. lw gp, (r1+60)
  27. lw fp, (r1+64)
  28. lw sp, (r1+68)
  29. lw ra, (r1+72)
  30. mv r1, r2 /* copy val */
  31. bne r1, r0, 1f
  32. mvi r1, 1 /* val was zero, set it to 1 */
  33. 1:
  34. ret
  35. libc_hidden_def(__longjmp)