rework langinfo code for ABI compat and for use by time code
[musl] / src / thread / i386 / syscall_cp.s
index 5190513..3bf52c1 100644 (file)
@@ -1,35 +1,29 @@
 .text
 .global __syscall_cp_asm
-.type   __syscall_cp_asm,%function
+.type   __syscall_cp_asm,@function
 __syscall_cp_asm:
+       mov 4(%esp),%ecx
        pushl %ebx
        pushl %esi
        pushl %edi
        pushl %ebp
-       leal 20(%esp),%ebp
-       call 1f
-1:     popl %eax
-       movl (%ebp),%ecx
-       addl $[1f-1b],%eax
-       movl %eax,4(%ecx)
-       movl %esp,(%ecx)
-       movl 8(%ecx),%eax
+.global __cp_begin
+__cp_begin:
+       movl (%ecx),%eax
        testl %eax,%eax
-       jnz 2f
-       movl 4(%ebp),%eax
-       movl 8(%ebp),%ebx
-       movl 12(%ebp),%ecx
-       movl 16(%ebp),%edx
-       movl 20(%ebp),%esi
-       movl 24(%ebp),%edi
-       movl 28(%ebp),%ebp
-1:     int $128
+       jnz __cancel
+       movl 24(%esp),%eax
+       movl 28(%esp),%ebx
+       movl 32(%esp),%ecx
+       movl 36(%esp),%edx
+       movl 40(%esp),%esi
+       movl 44(%esp),%edi
+       movl 48(%esp),%ebp
+       int $128
+.global __cp_end
+__cp_end:
        popl %ebp
        popl %edi
        popl %esi
        popl %ebx
-       xorl %edx,%edx
-       movl 4(%esp),%ecx
-       movl %edx,(%ecx)
        ret
-2:     call __cancel