#else
jmp C_SYMBOL_NAME (__sigsetjmp)
#endif
-PSEUDO_END (_setjmp)
+END (_setjmp)
#else
jmp C_SYMBOL_NAME (__sigsetjmp)
#endif
-PSEUDO_END (setjmp)
+END (setjmp)
.text
ENTRY (__clone)
- CALL_MCOUNT
/* Sanity check arguments. */
movel #-EINVAL, %d0
rts
- SYSCALL_ERROR_HANDLER
-
thread_start:
subl %fp, %fp /* terminate the stack frame */
jsr (%a0)
movel %d0, -(%sp)
-#ifdef PIC
- bsrl _exit@PLTPC
-#else
- jbsr _exit
-#endif
+ jbsr JUMPTARGET (_exit)
+
PSEUDO_END (__clone)
weak_alias (__clone, clone)
#include <sysdep.h>
.text
- SYSCALL_ERROR_HANDLER
-
ENTRY (__mmap)
- CALL_MCOUNT
move.l #SYS_ify (mmap), %d0 /* System call number in %d0. */
.text
ENTRY (__sigreturn)
- CALL_MCOUNT
-
addq.l #4, %sp /* Pop the return PC. */
DO_CALL (#SYS_ify (sigreturn), 0)
/* Do the system call; it never returns. */
/* NOTREACHED */
-PSEUDO_END (__sigreturn)
+END (__sigreturn)
weak_alias (__sigreturn, sigreturn)
#define P2(a, b) a##b
.text
- SYSCALL_ERROR_HANDLER
-
/* The socket-oriented system calls are handled unusally in Linux.
They are all gated through the single `socketcall' system call number.
`socketcall' takes two arguments: the first is the subcode, specifying
.globl P(__,socket)
ENTRY (P(__,socket))
- CALL_MCOUNT
/* Save registers. */
move.l %d2, %a0
more information about the value -128 used below.*/
.text
- SYSCALL_ERROR_HANDLER
ENTRY (syscall)
- CALL_MCOUNT
-
move.l 4(%sp), %d0 /* Load syscall number. */
_DOARGS_5 (24) /* Frob arguments. */
trap &0 /* Do the system call. */
/* The syscall stubs jump here when they detect an error. */
-ENTRY (__syscall_error)
+ .globl __syscall_error
+ .type __syscall_error, @function
+ .align 4
+__syscall_error:
neg.l %d0
move.l %d0, errno
#ifdef _LIBC_REENTRANT
return a pointer. */
move.l %d0, %a0
rts
-PSEUDO_END (__syscall_error)
+END (__syscall_error)
#endif /* PIC */
ENTRY (__errno_location)
- CALL_MCOUNT
#ifdef PIC
move.l (%pc, errno@GOTPC), %a0
#else
lea errno, %a0
#endif
rts
-PSEUDO_END (__errno_location)
+END (__errno_location)
C_LABEL(name) \
CALL_MCOUNT
+#undef END
+#define END(name) .size name, . - name
+
/* If compiled for profiling, call `_mcount' at the start of each function. */
#ifdef PROF
/* The mcount code relies on a normal frame pointer being on the stack
error values. */
#define PSEUDO(name, syscall_name, args) \
.text; \
- SYSCALL_ERROR_HANDLER \
ENTRY (name) \
DO_CALL (&SYS_ify (syscall_name), args); \
moveq.l &-128, %d1; \
jcc syscall_error
#undef PSEUDO_END
-#define PSEUDO_END(name) .size name, . - name
+#define PSEUDO_END(name) \
+ SYSCALL_ERROR_HANDLER; \
+ END (name)
#ifdef PIC
/* Store (- %d0) into errno through the GOT. */
#ifdef _LIBC_REENTRANT
#define SYSCALL_ERROR_HANDLER \
- .type syscall_error, @function; \
syscall_error: \
move.l (errno@GOTPC, %pc), %a0; \
neg.l %d0; \
rts;
#else
#define SYSCALL_ERROR_HANDLER \
- .type syscall_error, @function; \
syscall_error: \
move.l (errno@GOTPC, %pc), %a0; \
neg.l %d0; \