From eef9b6237bb6eede822d978f25f20bce0548db95 Mon Sep 17 00:00:00 2001 From: ceriel Date: Wed, 22 Mar 1989 15:06:05 +0000 Subject: [PATCH] Initial revision --- mach/sun3/libce/.distr | 21 +++++++++++++++++++++ mach/sun3/libce/Makefile | 34 ++++++++++++++++++++++++++++++++++ mach/sun3/libce/adf4.s | 11 +++++++++++ mach/sun3/libce/adf8.s | 15 +++++++++++++++ mach/sun3/libce/cff.s | 26 ++++++++++++++++++++++++++ mach/sun3/libce/cfi.s | 21 +++++++++++++++++++++ mach/sun3/libce/cfu.s | 21 +++++++++++++++++++++ mach/sun3/libce/cif.s | 23 +++++++++++++++++++++++ mach/sun3/libce/cmf4.s | 20 ++++++++++++++++++++ mach/sun3/libce/cmf8.s | 26 ++++++++++++++++++++++++++ mach/sun3/libce/cuf.s | 34 ++++++++++++++++++++++++++++++++++ mach/sun3/libce/dvf4.s | 11 +++++++++++ mach/sun3/libce/dvf8.s | 15 +++++++++++++++ mach/sun3/libce/fef4.s | 17 +++++++++++++++++ mach/sun3/libce/fef8.s | 17 +++++++++++++++++ mach/sun3/libce/fif4.s | 23 +++++++++++++++++++++++ mach/sun3/libce/fif8.s | 17 +++++++++++++++++ mach/sun3/libce/mlf4.s | 11 +++++++++++ mach/sun3/libce/mlf8.s | 15 +++++++++++++++ mach/sun3/libce/sbf4.s | 11 +++++++++++ mach/sun3/libce/sbf8.s | 15 +++++++++++++++ mach/sun3/libce/vars.s | 20 ++++++++++++++++++++ 22 files changed, 424 insertions(+) create mode 100644 mach/sun3/libce/.distr create mode 100644 mach/sun3/libce/Makefile create mode 100644 mach/sun3/libce/adf4.s create mode 100644 mach/sun3/libce/adf8.s create mode 100644 mach/sun3/libce/cff.s create mode 100644 mach/sun3/libce/cfi.s create mode 100644 mach/sun3/libce/cfu.s create mode 100644 mach/sun3/libce/cif.s create mode 100644 mach/sun3/libce/cmf4.s create mode 100644 mach/sun3/libce/cmf8.s create mode 100644 mach/sun3/libce/cuf.s create mode 100644 mach/sun3/libce/dvf4.s create mode 100644 mach/sun3/libce/dvf8.s create mode 100644 mach/sun3/libce/fef4.s create mode 100644 mach/sun3/libce/fef8.s create mode 100644 mach/sun3/libce/fif4.s create mode 100644 mach/sun3/libce/fif8.s create mode 100644 mach/sun3/libce/mlf4.s create mode 100644 mach/sun3/libce/mlf8.s create mode 100644 mach/sun3/libce/sbf4.s create mode 100644 mach/sun3/libce/sbf8.s create mode 100644 mach/sun3/libce/vars.s diff --git a/mach/sun3/libce/.distr b/mach/sun3/libce/.distr new file mode 100644 index 000000000..d5e42aeec --- /dev/null +++ b/mach/sun3/libce/.distr @@ -0,0 +1,21 @@ +Makefile +adf4.s +adf8.s +cff.s +cfi.s +cfu.s +cif.s +cmf4.s +cmf8.s +cuf.s +dvf4.s +dvf8.s +fef4.s +fef8.s +fif4.s +fif8.s +mlf4.s +mlf8.s +sbf4.s +sbf8.s +vars.s diff --git a/mach/sun3/libce/Makefile b/mach/sun3/libce/Makefile new file mode 100644 index 000000000..ca33a7c50 --- /dev/null +++ b/mach/sun3/libce/Makefile @@ -0,0 +1,34 @@ +# $Header$ + +EMOBJ = aar.o cii.o cmi.o cms.o cmu.o csa.o csb.o cuu.o dia.o exg.o fat.o \ + inn.o lar.o los.o mon.o nop.o sar.o set.o shp.o sts.o trp.o trpstr.o + +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 + +.s.o: + sun3 -c $*.s + +libext.a: $(OBJ) + for i in $(OBJ) ; do ../../../lib/sun3/cv -u $$i $$i.X ; mv $$i.X $$i ; done + ar rv libext.a $(OBJ) + ranlib libext.a + +install: all + ../../install libext.a tail_ext + +cmp: all + -../../compare libext.a tail_ext + +clean: + rm -f *.[oa] + +pr: + +opr: + +$(EMOBJ): ../../../lib/m68020/tail_em + aal x ../../../lib/m68020/tail_em $(EMOBJ) diff --git a/mach/sun3/libce/adf4.s b/mach/sun3/libce/adf4.s new file mode 100644 index 000000000..a177c5a52 --- /dev/null +++ b/mach/sun3/libce/adf4.s @@ -0,0 +1,11 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss +.sect .text +.define adf4 +adf4: + move.l (sp)+,a0 + move.l (sp)+,d1 + move.l (sp),d0 + move.l a0,-(sp) + jsr (Fadds) + move.l d0,(4,sp) + rts diff --git a/mach/sun3/libce/adf8.s b/mach/sun3/libce/adf8.s new file mode 100644 index 000000000..20299ef4b --- /dev/null +++ b/mach/sun3/libce/adf8.s @@ -0,0 +1,15 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss +.sect .text +.define adf8 +adf8: + move.l (sp)+,a1 + lea (8,sp),a0 + move.l (a0),d0 + move.l (4,a0),d1 + move.l (sp)+,(a0) + move.l (sp)+,(4,a0) + move.l a1,-(sp) + jsr (Faddd) + move.l d0,(4,sp) + move.l d1,(8,sp) + rts diff --git a/mach/sun3/libce/cff.s b/mach/sun3/libce/cff.s new file mode 100644 index 000000000..6a5a225dd --- /dev/null +++ b/mach/sun3/libce/cff.s @@ -0,0 +1,26 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss +.sect .text +.define cff +cff: + move.l (sp)+,a0 + move.l (sp)+,d1 + move.l (sp)+,d0 + cmp.l d0,d1 + beq 2f + cmp.l #4,d0 + bne 1f + move.l (sp),d0 + tst.l -(sp) + move.l a0,-(sp) + jsr (Fstod) + move.l d0,(4,sp) + move.l d1,(8,sp) +2: + rts +1: + move.l (sp),d0 + move.l (4,sp),d1 + move.l a0,(sp) + jsr (Fdtos) + move.l d0,(4,sp) + rts diff --git a/mach/sun3/libce/cfi.s b/mach/sun3/libce/cfi.s new file mode 100644 index 000000000..36b817c3f --- /dev/null +++ b/mach/sun3/libce/cfi.s @@ -0,0 +1,21 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss +.sect .text +.define cfi +cfi: + move.l (sp)+,a0 + move.l (sp)+,d1 ! should be 4 + move.l (sp)+,d0 + cmp.l #4,d0 + bne 1f + move.l (sp),d0 + move.l a0,-(sp) + jsr (Fints) + move.l d0,(4,sp) + rts +1: + move.l (sp)+,d0 + move.l (sp),d1 + move.l a0,-(sp) + jsr (Fintd) + move.l d0,(4,sp) + rts diff --git a/mach/sun3/libce/cfu.s b/mach/sun3/libce/cfu.s new file mode 100644 index 000000000..a1eda239c --- /dev/null +++ b/mach/sun3/libce/cfu.s @@ -0,0 +1,21 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss +.sect .text +.define cfu +cfu: + move.l (sp)+,a0 + move.l (sp)+,d1 ! should be 4 + move.l (sp)+,d0 + cmp.l #4,d0 + bne 1f + move.l (sp),d0 + move.l a0,-(sp) + jsr (Funs) + move.l d0,(4,sp) + rts +1: + move.l (sp)+,d0 + move.l (sp),d1 + move.l a0,-(sp) + jsr (Fund) + move.l d0,(4,sp) + rts diff --git a/mach/sun3/libce/cif.s b/mach/sun3/libce/cif.s new file mode 100644 index 000000000..4b96076d7 --- /dev/null +++ b/mach/sun3/libce/cif.s @@ -0,0 +1,23 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss +.sect .text +.define cif +cif: + move.l (sp)+,a0 + move.l (sp)+,d1 + move.l (sp)+,d0 ! should be 4 + cmp.l #4,d1 + bne 1f + move.l (sp),d0 + move.l a0,-(sp) + jsr (Fflts) + move.l d0,(4,sp) + rts +1: + move.l (sp),d0 + tst.l -(sp) + move.l a0,-(sp) + jsr (Ffltd) + move.l d1,(8,sp) + move.l d0,(4,sp) + rts + diff --git a/mach/sun3/libce/cmf4.s b/mach/sun3/libce/cmf4.s new file mode 100644 index 000000000..146d2a109 --- /dev/null +++ b/mach/sun3/libce/cmf4.s @@ -0,0 +1,20 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss +.sect .text +.define cmf4 +cmf4: + move.l (sp)+,a0 + move.l (sp)+,d1 + move.l (sp),d0 + move.l a0,-(sp) + jsr (Fcmps) + blt 1f + bgt 2f + clr.l (4,sp) + rts +1: + move.l #-1,(4,sp) + rts +2: + move.l #1,(4,sp) + rts + diff --git a/mach/sun3/libce/cmf8.s b/mach/sun3/libce/cmf8.s new file mode 100644 index 000000000..294cd7b19 --- /dev/null +++ b/mach/sun3/libce/cmf8.s @@ -0,0 +1,26 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss +.sect .text +.define cmf8 +cmf8: + move.l (sp)+,a1 + lea (8,sp),a0 + move.l (a0),d0 + move.l (4,a0),d1 + move.l (sp)+,(a0) + move.l (sp)+,(4,a0) + move.l a1,-(sp) + jsr (Fcmpd) + blt 1f + bgt 2f + clr.l (8,sp) +3: + move.l (sp)+,a1 + tst.l (sp)+ + jmp (a1) +1: + move.l #-1,(8,sp) + bra 3b +2: + move.l #1,(8,sp) + bra 3b + diff --git a/mach/sun3/libce/cuf.s b/mach/sun3/libce/cuf.s new file mode 100644 index 000000000..d781f3c95 --- /dev/null +++ b/mach/sun3/libce/cuf.s @@ -0,0 +1,34 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss +.define cuf +.sect .rom +L1: .data4 0x41f00000, 0x0 +.sect .text +cuf: + move.l (sp)+,a0 + move.l (sp)+,d1 + move.l (sp)+,d0 ! should be 4 + cmp.l #4,d1 + bne 1f + move.l (sp),d0 + move.l a0,-(sp) + jsr (Fflts) + tst.l d0 + bpl 2f + move.l #0x4f800000,d1 + jsr (Fadds) +2: + move.l d0,(4,sp) + rts +1: + move.l (sp),d0 + tst.l -(sp) + move.l a0,-(sp) + jsr (Ffltd) + tst.l d0 + bpl 2f + lea (L1),a0 + jsr (Faddd) +2: + move.l d1,(8,sp) + move.l d0,(4,sp) + rts diff --git a/mach/sun3/libce/dvf4.s b/mach/sun3/libce/dvf4.s new file mode 100644 index 000000000..4764efca4 --- /dev/null +++ b/mach/sun3/libce/dvf4.s @@ -0,0 +1,11 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss +.sect .text +.define dvf4 +dvf4: + move.l (sp)+,a0 + move.l (sp)+,d1 + move.l (sp),d0 + move.l a0,-(sp) + jsr (Fdivs) + move.l d0,(4,sp) + rts diff --git a/mach/sun3/libce/dvf8.s b/mach/sun3/libce/dvf8.s new file mode 100644 index 000000000..f1b699067 --- /dev/null +++ b/mach/sun3/libce/dvf8.s @@ -0,0 +1,15 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss +.sect .text +.define dvf8 +dvf8: + move.l (sp)+,a1 + lea (8,sp),a0 + move.l (a0),d0 + move.l (4,a0),d1 + move.l (sp)+,(a0) + move.l (sp)+,(4,a0) + move.l a1,-(sp) + jsr (Fdivd) + move.l d0,(4,sp) + move.l d1,(8,sp) + rts diff --git a/mach/sun3/libce/fef4.s b/mach/sun3/libce/fef4.s new file mode 100644 index 000000000..c6563246a --- /dev/null +++ b/mach/sun3/libce/fef4.s @@ -0,0 +1,17 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss +.sect .text +.define fef4 +fef4: + move.l (4,sp),d0 + jsr (Fstod) ! convert to double + lea (4,sp),a0 ! build stack for frexp + move.l a0,-(sp) + move.l d1,-(sp) + move.l d0,-(sp) + jsr (_frexp) + lea (12,sp),sp + jsr (Fdtos) ! convert result to single + move.l (sp),a0 + move.l d0,(sp) + jmp (a0) + diff --git a/mach/sun3/libce/fef8.s b/mach/sun3/libce/fef8.s new file mode 100644 index 000000000..548f12555 --- /dev/null +++ b/mach/sun3/libce/fef8.s @@ -0,0 +1,17 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss +.sect .text +.define fef8 +fef8: + move.l (4,sp),d0 + move.l (8,sp),d1 + lea (8,sp),a0 ! build stack for frexp + move.l a0,-(sp) + move.l d1,-(sp) + move.l d0,-(sp) + jsr (_frexp) + lea (12,sp),sp + move.l (sp),a0 + move.l d1,(4,sp) + move.l d0,(sp) + jmp (a0) + diff --git a/mach/sun3/libce/fif4.s b/mach/sun3/libce/fif4.s new file mode 100644 index 000000000..8ce1832f6 --- /dev/null +++ b/mach/sun3/libce/fif4.s @@ -0,0 +1,23 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss +.sect .text +.define fif4 +fif4: + move.l (4,sp),d1 + move.l (8,sp),d0 + jsr (Fmuls) ! result in d0 + jsr (Fstod) ! convert to double + lea (4,sp),a0 ! build stack for modf + move.l a0,-(sp) + move.l d1,-(sp) + move.l d0,-(sp) + jsr (_modf) + lea (12,sp),sp + jsr (Fdtos) ! convert result to single + move.l d0,-(sp) ! save it + move.l (8,sp),d0 ! also convert integer part to single + move.l (12,sp),d1 + jsr (Fdtos) + move.l d0,(8,sp) ! integer part + move.l (sp)+,d0 + move.l d0,(8,sp) ! fraction part + rts diff --git a/mach/sun3/libce/fif8.s b/mach/sun3/libce/fif8.s new file mode 100644 index 000000000..8adda1b73 --- /dev/null +++ b/mach/sun3/libce/fif8.s @@ -0,0 +1,17 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss +.sect .text +.define fif8 +fif8: + move.l (4,sp),d1 + move.l (8,sp),d0 + lea (12,sp),a0 + jsr (Fmuld) ! result in d0/d1 + lea (4,sp),a0 ! build stack for modf + move.l a0,-(sp) + move.l d1,-(sp) + move.l d0,-(sp) + jsr (_modf) + lea (12,sp),sp + move.l d0,(12,sp) + move.l d1,(16,sp) + rts diff --git a/mach/sun3/libce/mlf4.s b/mach/sun3/libce/mlf4.s new file mode 100644 index 000000000..0910bd350 --- /dev/null +++ b/mach/sun3/libce/mlf4.s @@ -0,0 +1,11 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss +.sect .text +.define mlf4 +mlf4: + move.l (sp)+,a0 + move.l (sp)+,d1 + move.l (sp),d0 + move.l a0,-(sp) + jsr (Fmuls) + move.l d0,(4,sp) + rts diff --git a/mach/sun3/libce/mlf8.s b/mach/sun3/libce/mlf8.s new file mode 100644 index 000000000..7191f79ac --- /dev/null +++ b/mach/sun3/libce/mlf8.s @@ -0,0 +1,15 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss +.sect .text +.define mlf8 +mlf8: + move.l (sp)+,a1 + lea (8,sp),a0 + move.l (a0),d0 + move.l (4,a0),d1 + move.l (sp)+,(a0) + move.l (sp)+,(4,a0) + move.l a1,-(sp) + jsr (Fmuld) + move.l d0,(4,sp) + move.l d1,(8,sp) + rts diff --git a/mach/sun3/libce/sbf4.s b/mach/sun3/libce/sbf4.s new file mode 100644 index 000000000..5a3219742 --- /dev/null +++ b/mach/sun3/libce/sbf4.s @@ -0,0 +1,11 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss +.sect .text +.define sbf4 +sbf4: + move.l (sp)+,a0 + move.l (sp)+,d1 + move.l (sp),d0 + move.l a0,-(sp) + jsr (Fsubs) + move.l d0,(4,sp) + rts diff --git a/mach/sun3/libce/sbf8.s b/mach/sun3/libce/sbf8.s new file mode 100644 index 000000000..7474c88f7 --- /dev/null +++ b/mach/sun3/libce/sbf8.s @@ -0,0 +1,15 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss +.sect .text +.define sbf8 +sbf8: + move.l (sp)+,a1 + lea (8,sp),a0 + move.l (a0),d0 + move.l (4,a0),d1 + move.l (sp)+,(a0) + move.l (sp)+,(4,a0) + move.l a1,-(sp) + jsr (Fsubd) + move.l d0,(4,sp) + move.l d1,(8,sp) + rts diff --git a/mach/sun3/libce/vars.s b/mach/sun3/libce/vars.s new file mode 100644 index 000000000..133d663ba --- /dev/null +++ b/mach/sun3/libce/vars.s @@ -0,0 +1,20 @@ +.define .lino,.filn +.define hol0,.reghp,.limhp,.trpim,.trppc +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .data +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? -- 2.34.1