setjmp.S 845 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  3. *
  4. * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  5. */
  6. #include <sysdep.h>
  7. ;@ r0 = jump buffer into which regs will be saved
  8. ;@ r1 = do we need to save signals
  9. ENTRY(__sigsetjmp)
  10. st_s r13, [r0]
  11. st_s r14, [r0,4]
  12. st r15, [r0,8]
  13. st r16, [r0,12]
  14. st r17, [r0,16]
  15. st r18, [r0,20]
  16. st r19, [r0,24]
  17. st r20, [r0,28]
  18. st r21, [r0,32]
  19. st r22, [r0,36]
  20. st r23, [r0,40]
  21. st r24, [r0,44]
  22. st r25, [r0,48]
  23. st fp, [r0,52]
  24. st sp, [r0,56]
  25. ; make a note of where longjmp will return to.
  26. ; that will be right next to this setjmp call-site which will be
  27. ; contained in blink, since "C" caller of this routine will do
  28. ; a branch-n-link
  29. st blink, [r0,60]
  30. b __sigjmp_save
  31. END(__sigsetjmp)
  32. libc_hidden_def(__sigsetjmp)