Initial revision
This commit is contained in:
parent
4e21aced73
commit
eef9b6237b
22 changed files with 424 additions and 0 deletions
21
mach/sun3/libce/.distr
Normal file
21
mach/sun3/libce/.distr
Normal file
|
@ -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
|
34
mach/sun3/libce/Makefile
Normal file
34
mach/sun3/libce/Makefile
Normal file
|
@ -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)
|
11
mach/sun3/libce/adf4.s
Normal file
11
mach/sun3/libce/adf4.s
Normal file
|
@ -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
|
15
mach/sun3/libce/adf8.s
Normal file
15
mach/sun3/libce/adf8.s
Normal file
|
@ -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
|
26
mach/sun3/libce/cff.s
Normal file
26
mach/sun3/libce/cff.s
Normal file
|
@ -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
|
21
mach/sun3/libce/cfi.s
Normal file
21
mach/sun3/libce/cfi.s
Normal file
|
@ -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
|
21
mach/sun3/libce/cfu.s
Normal file
21
mach/sun3/libce/cfu.s
Normal file
|
@ -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
|
23
mach/sun3/libce/cif.s
Normal file
23
mach/sun3/libce/cif.s
Normal file
|
@ -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
|
||||||
|
|
20
mach/sun3/libce/cmf4.s
Normal file
20
mach/sun3/libce/cmf4.s
Normal file
|
@ -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
|
||||||
|
|
26
mach/sun3/libce/cmf8.s
Normal file
26
mach/sun3/libce/cmf8.s
Normal file
|
@ -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
|
||||||
|
|
34
mach/sun3/libce/cuf.s
Normal file
34
mach/sun3/libce/cuf.s
Normal file
|
@ -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
|
11
mach/sun3/libce/dvf4.s
Normal file
11
mach/sun3/libce/dvf4.s
Normal file
|
@ -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
|
15
mach/sun3/libce/dvf8.s
Normal file
15
mach/sun3/libce/dvf8.s
Normal file
|
@ -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
|
17
mach/sun3/libce/fef4.s
Normal file
17
mach/sun3/libce/fef4.s
Normal file
|
@ -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)
|
||||||
|
|
17
mach/sun3/libce/fef8.s
Normal file
17
mach/sun3/libce/fef8.s
Normal file
|
@ -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)
|
||||||
|
|
23
mach/sun3/libce/fif4.s
Normal file
23
mach/sun3/libce/fif4.s
Normal file
|
@ -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
|
17
mach/sun3/libce/fif8.s
Normal file
17
mach/sun3/libce/fif8.s
Normal file
|
@ -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
|
11
mach/sun3/libce/mlf4.s
Normal file
11
mach/sun3/libce/mlf4.s
Normal file
|
@ -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
|
15
mach/sun3/libce/mlf8.s
Normal file
15
mach/sun3/libce/mlf8.s
Normal file
|
@ -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
|
11
mach/sun3/libce/sbf4.s
Normal file
11
mach/sun3/libce/sbf4.s
Normal file
|
@ -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
|
15
mach/sun3/libce/sbf8.s
Normal file
15
mach/sun3/libce/sbf8.s
Normal file
|
@ -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
|
20
mach/sun3/libce/vars.s
Normal file
20
mach/sun3/libce/vars.s
Normal file
|
@ -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?
|
Loading…
Add table
Reference in a new issue