__longjmp.S 912 B

1234567891011121314151617181920212223242526272829303132333435363738
  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 from which regs will be restored
  8. ;@ r1 = value that setjmp( ) will return due to this longjmp
  9. ENTRY(__longjmp)
  10. ld_s r13, [r0]
  11. ld_s r14, [r0,4]
  12. ld r15, [r0,8]
  13. ld r16, [r0,12]
  14. ld r17, [r0,16]
  15. ld r18, [r0,20]
  16. ld r19, [r0,24]
  17. ld r20, [r0,28]
  18. ld r21, [r0,32]
  19. ld r22, [r0,36]
  20. ld r23, [r0,40]
  21. ld r24, [r0,44]
  22. ld r25, [r0,48]
  23. ld blink, [r0,60] ; load it early enough to not stall the pipeline
  24. ld fp, [r0,52]
  25. ld sp, [r0,56]
  26. mov.f r0, r1 ; get the setjmp return value(due to longjmp) in place
  27. j.d [blink] ; to caller of setjmp location, right after the call
  28. mov.z r0, 1 ; can't let setjmp return 0 when it is due to longjmp
  29. END(__longjmp)
  30. libc_hidden_def(__longjmp)