__longjmp.S 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /* longjmp for Nios II.
  2. Copyright (C) 2015-2016 Free Software Foundation, Inc.
  3. This file is part of the GNU C Library.
  4. The GNU C Library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Lesser General Public License as
  6. published by the Free Software Foundation; either version 2.1 of the
  7. License, or (at your option) any later version.
  8. The GNU C Library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public
  13. License along with the GNU C Library. If not, see
  14. <http://www.gnu.org/licenses/>. */
  15. #include <sysdep.h>
  16. #include <jmpbuf-offsets.h>
  17. ENTRY (__longjmp)
  18. mov r2, r5
  19. ldw r16, (JB_R16*4)(r4)
  20. ldw r17, (JB_R17*4)(r4)
  21. ldw r18, (JB_R18*4)(r4)
  22. ldw r19, (JB_R19*4)(r4)
  23. ldw r20, (JB_R20*4)(r4)
  24. ldw r21, (JB_R21*4)(r4)
  25. ldw r22, (JB_R22*4)(r4)
  26. ldw fp, (JB_FP*4)(r4)
  27. ldw ra, (JB_RA*4)(r4)
  28. ldw sp, (JB_SP*4)(r4)
  29. ret
  30. END (__longjmp)
  31. libc_hidden_def(__longjmp)