From 284bd607fd2a5ea1e3ab6a9eb657a73a41a37c32 Mon Sep 17 00:00:00 2001 From: ceriel Date: Fri, 13 Oct 1989 14:35:50 +0000 Subject: [PATCH] Added head_em.s for Sun floating point emulation --- mach/sun3/libce/.distr | 1 + mach/sun3/libce/Makefile | 8 ++++- mach/sun3/libce/head_em.s | 71 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 mach/sun3/libce/head_em.s diff --git a/mach/sun3/libce/.distr b/mach/sun3/libce/.distr index d5e42aeec..168bedb1f 100644 --- a/mach/sun3/libce/.distr +++ b/mach/sun3/libce/.distr @@ -19,3 +19,4 @@ mlf8.s sbf4.s sbf8.s vars.s +head_em.s diff --git a/mach/sun3/libce/Makefile b/mach/sun3/libce/Makefile index 09260da7e..5514d34e3 100644 --- a/mach/sun3/libce/Makefile +++ b/mach/sun3/libce/Makefile @@ -9,7 +9,8 @@ FOBJ = adf4.o adf8.o cff.o cfi.o cfu.o cif.o cmf4.o cmf8.o cuf.o dvf4.o \ dvf8.o fef4.o fef8.o fif4.o fif8.o mlf4.o mlf8.o sbf4.o sbf8.o vars.o OBJ = $(EMOBJ) $(FOBJ) -all: libext.a + +all: libext.a head_em.sun.o .s.o: sun3 -c $*.s @@ -19,11 +20,16 @@ libext.a: $(OBJ) ar rv libext.a $(OBJ) ranlib libext.a +head_em.sun.o: head_em.o + ../../../lib/sun3/cv -u head_em.o head_em.sun.o + install: all ../../install libext.a tail_ext + ../../install head_em.sun.o head_em.sun cmp: all -../../compare libext.a tail_ext + -../../compare head_em.sun.o head_em.sun clean: rm -f *.[oa] diff --git a/mach/sun3/libce/head_em.s b/mach/sun3/libce/head_em.s new file mode 100644 index 000000000..f4543e6ca --- /dev/null +++ b/mach/sun3/libce/head_em.s @@ -0,0 +1,71 @@ +.define .lino,.filn +.define EXIT +.define begtext,begdata,begbss +.define EARRAY,ERANGE,ESET,EIDIVZ,EHEAP,EILLINS,ECASE,EBADGTO +.define hol0,.reghp,.limhp,.trpim,.trppc +.define fsoft_used,start_float +.sect .text +.sect .rom +.sect .data +.sect .bss + + + +! runtime startof for 68020 machine + + +LINO_AD = 0 +FILN_AD = 4 + +EARRAY = 0 +ERANGE = 1 +ESET = 2 +EIDIVZ = 6 +EHEAP = 17 +EILLINS = 18 +ECASE = 20 +EBADGTO = 27 + + .sect .text +begtext: + move.l (sp),d2 + lea (4,sp),a0 + move.l d2,d1 + add.l #1,d1 + asl.l #2,d1 + move.l a0,a1 + add.l d1,a1 + pea (a1) + pea (a0) + move.l d2,-(sp) + move.l #0,a6 + jsr (fsoft_used) + jsr (_m_a_i_n) + move.l d0,(sp) ! no stack cleanup needed +EXIT: + jsr (_exit) + +fsoft_used: +start_float: + jmp (_finitfp_) + + .sect .data +begdata: + .data4 0 ! may be at virtual address 0 with no problem +hol0: +.lino: + .data4 0 ! lino +.filn: + .data4 0 ! filn +.reghp: + .data4 _end +.limhp: + .data4 _end +.trppc: + .data4 0 +.trpim: + .data4 0 ! USED TO BE 2 BYTES; IS THIS RIGHT? + + + .sect .bss +begbss: !initialization is not needed because ALL entries are in zero space! -- 2.34.1