diff options
Diffstat (limited to 'libc/sysdeps/linux/m68k')
| -rw-r--r-- | libc/sysdeps/linux/m68k/clone.S | 6 | ||||
| -rw-r--r-- | libc/sysdeps/linux/m68k/crt1.S | 15 |
2 files changed, 18 insertions, 3 deletions
diff --git a/libc/sysdeps/linux/m68k/clone.S b/libc/sysdeps/linux/m68k/clone.S index 2735bcba0..8ef916e91 100644 --- a/libc/sysdeps/linux/m68k/clone.S +++ b/libc/sysdeps/linux/m68k/clone.S @@ -21,11 +21,11 @@ clone: movel 4(%sp), %d1 /* no NULL function pointers */ movel %d1, %a0 tstl %d1 - beq.w __syscall_error + jbeq __syscall_error movel 8(%sp), %d1 /* no NULL stack pointers */ movel %d1, %a1 tstl %d1 - beq.w __syscall_error + jbeq __syscall_error /* Allocate space and copy the argument onto the new stack. */ movel 16(%sp), -(%a1) @@ -50,7 +50,7 @@ clone: #endif tstl %d0 - bmi.w __syscall_error + jbmi __syscall_error beq.w thread_start rts diff --git a/libc/sysdeps/linux/m68k/crt1.S b/libc/sysdeps/linux/m68k/crt1.S index ee25e48eb..9ce14e594 100644 --- a/libc/sysdeps/linux/m68k/crt1.S +++ b/libc/sysdeps/linux/m68k/crt1.S @@ -51,6 +51,13 @@ (4*(argc+1))(%sp) envp[0] ... NULL + + The uclinux conventions are different. %a1 is not defined on entry + and the stack is laid out as follows: + + 0(%sp) argc + 4(%sp) argv + 8(%sp) envp */ #include <features.h> @@ -73,15 +80,23 @@ _start: arguments for `main': argc, argv. envp will be determined later in __libc_start_main. */ move.l (%sp)+, %d0 /* Pop the argument count. */ +#ifndef __ARCH_USE_MMU__ + move.l (%sp)+, %a0 +#else move.l %sp, %a0 /* The argument vector starts just at the current stack top. */ +#endif /* Provide the highest stack address to the user code (for stacks which grow downward). */ pea (%sp) +#ifndef __ARCH_USE_MMU__ + clr.l -(%sp) +#else pea (%a1) /* Push address of the shared library termination function. */ +#endif /* Push the address of our own entry points to `.fini' and `.init'. */ |
