summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/i386
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1/dietlibc/i386')
-rw-r--r--mdk-stage1/dietlibc/i386/Makefile.add3
-rw-r--r--mdk-stage1/dietlibc/i386/__longjmp.S18
-rw-r--r--mdk-stage1/dietlibc/i386/__testandset.S8
-rw-r--r--mdk-stage1/dietlibc/i386/clone.S51
-rw-r--r--mdk-stage1/dietlibc/i386/mmap.c16
-rw-r--r--mdk-stage1/dietlibc/i386/select.S3
-rw-r--r--mdk-stage1/dietlibc/i386/setjmp.S62
-rw-r--r--mdk-stage1/dietlibc/i386/start.S42
-rw-r--r--mdk-stage1/dietlibc/i386/unified.S34
9 files changed, 0 insertions, 237 deletions
diff --git a/mdk-stage1/dietlibc/i386/Makefile.add b/mdk-stage1/dietlibc/i386/Makefile.add
deleted file mode 100644
index b685cc360..000000000
--- a/mdk-stage1/dietlibc/i386/Makefile.add
+++ /dev/null
@@ -1,3 +0,0 @@
-
-CFLAGS+=-march=i386 -mcpu=i386 -Os -fomit-frame-pointer
-VPATH:=i386:syscalls.s:$(VPATH)
diff --git a/mdk-stage1/dietlibc/i386/__longjmp.S b/mdk-stage1/dietlibc/i386/__longjmp.S
deleted file mode 100644
index 098275037..000000000
--- a/mdk-stage1/dietlibc/i386/__longjmp.S
+++ /dev/null
@@ -1,18 +0,0 @@
-#include <setjmp.h>
-
-.text
-.global __longjmp
-__longjmp:
- movl 4(%esp), %ecx /* User's jmp_buf in %ecx. */
- movl 8(%esp), %eax /* Second argument is return value. */
- /* Save the return address now. */
- movl (JB_PC*4)(%ecx), %edx
- /* Restore registers. */
- movl (JB_BX*4)(%ecx), %ebx
- movl (JB_SI*4)(%ecx), %esi
- movl (JB_DI*4)(%ecx), %edi
- movl (JB_BP*4)(%ecx), %ebp
- movl (JB_SP*4)(%ecx), %esp
- /* Jump to saved PC. */
- jmp *%edx
-.size __longjmp,.-__longjmp;
diff --git a/mdk-stage1/dietlibc/i386/__testandset.S b/mdk-stage1/dietlibc/i386/__testandset.S
deleted file mode 100644
index af7b4d5a0..000000000
--- a/mdk-stage1/dietlibc/i386/__testandset.S
+++ /dev/null
@@ -1,8 +0,0 @@
-.text
-.global __testandset
-__testandset:
- xorl %eax, %eax
- movl 0x4(%esp),%edx
- incl %eax
- xchgl %eax,(%edx)
- ret
diff --git a/mdk-stage1/dietlibc/i386/clone.S b/mdk-stage1/dietlibc/i386/clone.S
deleted file mode 100644
index ac02eb468..000000000
--- a/mdk-stage1/dietlibc/i386/clone.S
+++ /dev/null
@@ -1,51 +0,0 @@
-#include <asm/unistd.h>
-
-.text
-.weak clone
-clone:
-.global __clone
-__clone:
- movl 4(%esp), %ecx /* have non null thread_funcion */
- testl %ecx, %ecx
- je .Lclone_error
-
- movl 8(%esp), %ecx /* have non null child_stack pointer */
- testl %ecx, %ecx
- je .Lclone_error
-
- /* put the parameter on thread stack */
- subl $8, %ecx
-
- movl 16(%esp), %eax /* arg */
- movl %eax, 4(%ecx)
-
- movl 4(%esp), %eax /* thread_func */
- movl %eax, 0(%ecx)
-
- /* the syscall */
- pushl %ebx
- movl 16(%esp), %ebx /* flags */
- movl $__NR_clone, %eax
- int $0x80
- popl %ebx
-
- testl %eax, %eax
- jl .Lclone_error
- je .Lstart_thread
- ret
-
-.Lstart_thread:
- xorl %ebp,%ebp
- call *%ebx
- pushl %eax
- call _exit
-
-.Lclone_error:
- negl %eax
- pushl %eax
- call __errno_location
- popl %ecx
- movl %ecx, (%eax)
- xorl %eax, %eax
- decl %eax
- ret
diff --git a/mdk-stage1/dietlibc/i386/mmap.c b/mdk-stage1/dietlibc/i386/mmap.c
deleted file mode 100644
index 26ecb55c0..000000000
--- a/mdk-stage1/dietlibc/i386/mmap.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <linux/types.h>
-#include <linux/unistd.h>
-
-#define __NR__mmap __NR_mmap
-_syscall1(int,_mmap,unsigned long *,buffer)
-
-char *mmap(char *addr, size_t len, int prot, int flags, int fd, unsigned long off) {
- unsigned long buffer[6];
- buffer[0] = (unsigned long)addr;
- buffer[1] = (unsigned long)len;
- buffer[2] = (unsigned long)prot;
- buffer[3] = (unsigned long)flags;
- buffer[4] = (unsigned long)fd;
- buffer[5] = (unsigned long)off;
- return (char*) _mmap(buffer);
-}
diff --git a/mdk-stage1/dietlibc/i386/select.S b/mdk-stage1/dietlibc/i386/select.S
deleted file mode 100644
index 9e7066eae..000000000
--- a/mdk-stage1/dietlibc/i386/select.S
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "syscalls.h"
-
-syscall_weak(_newselect,select,__libc_select)
diff --git a/mdk-stage1/dietlibc/i386/setjmp.S b/mdk-stage1/dietlibc/i386/setjmp.S
deleted file mode 100644
index 9bfecf565..000000000
--- a/mdk-stage1/dietlibc/i386/setjmp.S
+++ /dev/null
@@ -1,62 +0,0 @@
-#include <setjmp.h>
-
-/* setjmp for i386.
- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-.section .rodata
-.text
-.weak setjmp
-setjmp:
-.globl __setjmp
-__setjmp:
- popl %eax /* Pop return address. */
- popl %ecx /* Pop jmp_buf. */
- pushl $0 /* Push zero argument. */
- pushl %ecx /* Push jmp_buf. */
- pushl %eax /* Push back return address. */
-
-.globl __sigsetjmp
-__sigsetjmp:
- movl 4(%esp), %eax /* User's jmp_buf in %eax. */
- /* Save registers. */
- movl %ebx, (JB_BX*4)(%eax)
- movl %esi, (JB_SI*4)(%eax)
- movl %edi, (JB_DI*4)(%eax)
- movl %ebp, (JB_BP*4)(%eax)
- leal 4(%esp), %ecx /* Save SP as it will be after we return. */
- movl %ecx, (JB_SP*4)(%eax)
- movl 0(%esp), %ecx /* Save PC we are returning to now. */
- movl %ecx, (JB_PC*4)(%eax)
-
- /* Make a tail call to __sigjmp_save; it takes the same args. */
-#ifdef PIC
- /* We cannot use the PLT, because it requires that %ebx be set, but
- we can't save and restore our caller's value. Instead, we do an
- indirect jump through the GOT, using for the temporary register
- %ecx, which is call-clobbered. */
- call L(here)
-L(here):
- popl %ecx
- addl $_GLOBAL_OFFSET_TABLE_+[.-L(here)], %ecx
- movl C_SYMBOL_NAME(__sigjmp_save@GOT)(%ecx), %ecx
- jmp *%ecx
-#else
- jmp __sigjmp_save
-#endif
-.size __sigsetjmp,.-__sigsetjmp;
diff --git a/mdk-stage1/dietlibc/i386/start.S b/mdk-stage1/dietlibc/i386/start.S
deleted file mode 100644
index 167bb779c..000000000
--- a/mdk-stage1/dietlibc/i386/start.S
+++ /dev/null
@@ -1,42 +0,0 @@
-#include "start.h"
-
-#ifdef __i386__
-.text
-.globl _start
-_start:
-#if 0
- popl %ecx
- movl %esp, %esi
- leal 4(%esp,%ecx,4),%eax
-#else
- movl (%esp),%ecx /* %ecx = argc */
- leal 4(%esp),%esi /* %esi = argv */
-
- leal 4(%esi,%ecx,4),%eax /* eax = 4*ecx+4 = envp */
-#endif
- pushl %eax
- pushl %esi
- pushl %ecx
- movl %eax,environ
-
-#ifdef WANT_DYNAMIC
-/* in %edx we have the dynamic _fini ( register this if non null ) */
- test %edx, %edx
- je .Linit
- push %edx
- call atexit
- pop %edx
-.Linit:
- call _init
- push $_fini
- call atexit
- pop %edx
-#endif
-
- call main
- pushl %eax
- call exit
-.Lfefe:
- .size _start,.Lfefe-_start
-#endif
-
diff --git a/mdk-stage1/dietlibc/i386/unified.S b/mdk-stage1/dietlibc/i386/unified.S
deleted file mode 100644
index f182bdb4b..000000000
--- a/mdk-stage1/dietlibc/i386/unified.S
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <dietfeatures.h>
-
-.text
-.global __unified_syscall
-__unified_syscall:
- movzbl %al, %eax
- push %edi
- push %esi
- push %ebx
- movl %esp,%edi
- movl 0x10(%edi),%ebx
- movl 0x14(%edi),%ecx
- movl 0x18(%edi),%edx
- movl 0x1c(%edi),%esi
- movl 0x20(%edi),%edi
- int $0x80
- cmp $-124,%eax
- jbe .Lnoerror
-#ifdef WANT_THREAD_SAVE
- movl %eax,%ebx
- call __errno_location
- neg %ebx
- movl %ebx,(%eax)
-#else
- neg %eax
- mov %eax,errno
-#endif
- xor %eax,%eax
- dec %eax
-.Lnoerror:
- pop %ebx
- pop %esi
- pop %edi
- ret