vfork.S 594 B

123456789101112131415161718192021222324252627282930
  1. /*-
  2. * Copyright (c) 2011
  3. * Thorsten Glaser <tg@freewrt.org>
  4. *
  5. * This file is available either under the terms and conditions of
  6. * the MirOS Licence, or the same terms as klibc or uClibc.
  7. */
  8. #include "sysdep.h"
  9. .syntax no_register_prefix
  10. /*
  11. * vfork is special, but PSEUDO() would probably work were it not broken;
  12. * there must be nothing at all on the stack above the stack frame of the
  13. * enclosing function
  14. */
  15. HIDDEN_ENTRY(__vfork)
  16. movu.w __NR_vfork,$r9
  17. break 13
  18. cmps.w -4096,$r10
  19. bhs 0f
  20. nop
  21. Ret
  22. nop
  23. PSEUDO_END(__vfork)
  24. weak_alias(__vfork,vfork)
  25. libc_hidden_def(vfork)