gcc subdir for combined gcc/ack library build

This commit is contained in:
Ben Gras
2005-10-10 15:28:15 +00:00
parent 8c53e4007e
commit 1da5b5ccee
20 changed files with 759 additions and 0 deletions

10
lib/gnu/rts/Makefile Normal file
View File

@@ -0,0 +1,10 @@
LIBRARIES = libc
libc_OBJECTS = \
_longjmp.o \
_setjmp.o \
longjmp.o \
setjmp.o \
include ../../Makefile.gnu.inc

27
lib/gnu/rts/Makefile.gnu Normal file
View File

@@ -0,0 +1,27 @@
CC=gcc
AR=gar
AS=gas
VPATH=$(SRCDIR)/gnu/rts
#Makefile for lib/gcc/mach/minix.i386/libsys.
LIBRARY = ../../libc.a
OBJECTS = \
_longjmp.o \
_setjmp.o \
longjmp.o \
setjmp.o \
all: $(LIBRARY)
$(LIBRARY): $(OBJECTS)
$(AR) cr $@ *.o
_longjmp.o: _longjmp.s
_setjmp.o: _setjmp.s
longjmp.o: longjmp.s
setjmp.o: setjmp.s
# $PchId: Makefile,v 1.4 1996/02/22 21:54:11 philip Exp $

38
lib/gnu/rts/_longjmp.gs Normal file
View File

@@ -0,0 +1,38 @@
/ _longjmp.gnu.s
/
/ Created: Oct 15, 1993 by Philip Homburg <philip@cs.vu.nl>
.text
.globl __longjmp
__longjmp:
movl 4(%esp), %eax # jmp_buf
cmpl $0, 0(%eax) # save mask?
je 1f
leal 4(%eax), %ebx # pointer to sigset_t
pushl %ebx
call ___oldsigset # restore mask
addl $4, %esp
movl 4(%esp), %eax # jmp_buf
1:
movl 8(%esp), %ecx # result value
movl 12(%eax), %esp # restore stack pointer
movl 8(%eax), %ebx # restore program counter
movl %ebx, 0(%esp)
pushl %ecx # save result code
movl 16(%eax), %ebp # restore frame pointer
movl 20(%eax), %ebx
movl 24(%eax), %ecx
movl 28(%eax), %edx
movl 32(%eax), %esi
movl 36(%eax), %edi
pop %eax
testl %eax, %eax
jz 1f
ret
1: movl $1, %eax
ret
/ $PchId: _longjmp.gnu.s,v 1.4 1996/03/12 19:30:02 philip Exp $

32
lib/gnu/rts/_setjmp.gs Normal file
View File

@@ -0,0 +1,32 @@
/ _setjmp.gnu.s
/
/ Created: Oct 14, 1993 by Philip Homburg <philip@cs.vu.nl>
.text
.globl ___setjmp
___setjmp:
movl 4(%esp), %eax # jmp_buf
movl %ebx, 20(%eax) # save ebx
movl 0(%esp), %ebx
movl %ebx, 8(%eax) # save program counter
movl %esp, 12(%eax) # save stack pointer
movl %ebp, 16(%eax) # save frame pointer
movl 20(%eax), %ebx # restore ebx
movl %ecx, 24(%eax)
movl %edx, 28(%eax)
movl %esi, 32(%eax)
movl %edi, 36(%eax)
movl 8(%esp), %ebx # save mask?
movl %ebx, 0(%eax) # save whether to restore mask
testl %ebx, %ebx
jz 1f
leal 4(%eax), %ebx # pointer to sigset_t
pushl %ebx
call ___newsigset # save mask
addl $4, %esp
1:
movl $0, %eax
ret
/ $PchId: _setjmp.gnu.s,v 1.4 1996/03/12 19:30:54 philip Exp $

6
lib/gnu/rts/longjmp.gs Normal file
View File

@@ -0,0 +1,6 @@
.text
.globl _longjmp
_longjmp:
jmp __longjmp
/ $PchId: longjmp.gnu.s,v 1.4 1996/03/12 19:31:18 philip Exp $

6
lib/gnu/rts/setjmp.gs Normal file
View File

@@ -0,0 +1,6 @@
.text
.globl _setjmp
_setjmp:
jmp ___setjmp
/ $PchId: setjmp.gnu.s,v 1.4 1996/03/12 19:31:18 philip Exp $