__start_context.S 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /* Copyright (C) 2012-2017 Free Software Foundation, Inc.
  2. The GNU C Library is free software; you can redistribute it and/or
  3. modify it under the terms of the GNU Lesser General Public
  4. License as published by the Free Software Foundation; either
  5. version 2.1 of the License, or (at your option) any later version.
  6. The GNU C Library is distributed in the hope that it will be useful,
  7. but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  9. Lesser General Public License for more details.
  10. You should have received a copy of the GNU Lesser General Public
  11. License along with the GNU C Library; if not, see
  12. <http://www.gnu.org/licenses/>. */
  13. #include <sysdep.h>
  14. .text
  15. /* This is the helper code which gets called if a function which is
  16. registered with 'makecontext' returns. In this case we have to
  17. install the context listed in the uc_link element of the context
  18. 'makecontext' manipulated at the time of the 'makecontext' call.
  19. If the pointer is NULL the process must terminate. */
  20. ENTRY(__start_context)
  21. brz,pn %i0, 1f
  22. mov 1, %o1
  23. call __setcontext
  24. mov %i0, %o0
  25. 1: call HIDDEN_JUMPTARGET(exit)
  26. mov 0, %o0
  27. unimp 0
  28. END(__start_context)