#include <mach/i386/syscall_sw.h>
- .text
- .align 2, 0x90
- .globl ___pthread_set_self
-___pthread_set_self:
- movl $0, %esi // 0 as the second argument
- movl $ SYSCALL_CONSTRUCT_MDEP(3), %eax // Machine-dependent syscall number 3
- MACHDEP_SYSCALL_TRAP
- ret
-
#ifndef VARIANT_DYLD
.align 2, 0x90
#include <mach/i386/syscall_sw.h>
- .text
- .align 2, 0x90
- .globl ___pthread_set_self
-___pthread_set_self:
- pushl 4(%esp)
- pushl $0
- movl $3,%eax
- MACHDEP_SYSCALL_TRAP
- addl $8,%esp
- ret
-
#ifndef VARIANT_DYLD
.align 2, 0x90
push %ebp
mov %esp,%ebp
sub $28,%esp // align the stack
+ mov %esi,20(%esp) //arg5
mov %edi,16(%esp) //arg5
mov %edx,12(%esp) //arg4
mov %ecx,8(%esp) //arg3
#include <mach/arm/syscall_sw.h>
- .text
- .align 2
- .globl ___pthread_set_self
-___pthread_set_self:
- /* fast trap for thread_set_cthread */
- mov r3, #2
- mov r12, #0x80000000
- swi #SWI_SYSCALL
- bx lr
-
#ifndef VARIANT_DYLD
// This routine is never called directly by user code, jumped from kernel
.align 2
.globl _start_wqthread
_start_wqthread:
+#if __ARM_ARCH_7K__
+ /* align stack to 16 bytes before calling C */
+ sub sp, sp, #8
+#endif
stmfd sp!, {r4, r5}
bl __pthread_wqthread
// Stackshots will show the routine that happens to link immediately following
.align 2
.globl _thread_start
_thread_start:
+#if __ARM_ARCH_7K__
+ /* align stack to 16 bytes before calling C */
+ sub sp, sp, #8
+#endif
stmfd sp!, {r4, r5}
bl __pthread_start
// See above