Make it build on ELF toolchain.

This commit is contained in:
itohy 1999-12-09 09:08:00 +00:00
parent 650e62ebf5
commit 0a24593bda
8 changed files with 138 additions and 136 deletions

View File

@ -1,7 +1,9 @@
.globl _print_str,_print_num
#include <m68k/asm.h>
Lprint_str: jmp _print_str
Lprint_num: jmp _print_num
.globl _C_LABEL(print_str),_C_LABEL(print_num)
Lprint_str: jmp _C_LABEL(print_str)
Lprint_num: jmp _C_LABEL(print_num)
_060FPSP_TEST:
.long Lprint_str - _060FPSP_TEST
@ -15,13 +17,12 @@ _060ISP_TEST:
.space 120
#include "itest.S"
.globl _itest,_ftest1,_ftest2,_ftest3
_itest:
ENTRY_NOPROFILE(itest)
bra _060ISP_TEST+128+0
_ftest1:
ENTRY_NOPROFILE(ftest1)
bra _060FPSP_TEST+128+0
_ftest2:
ENTRY_NOPROFILE(ftest2)
bra _060FPSP_TEST+128+8
_ftest3:
ENTRY_NOPROFILE(ftest3)
bra _060FPSP_TEST+128+16

View File

@ -1,9 +1,9 @@
# $NetBSD: Makefile,v 1.3 1999/02/13 02:54:33 lukem Exp $
# $NetBSD: Makefile,v 1.4 1999/12/09 09:08:00 itohy Exp $
#
PROG=emuspeed
MKMAN=no
SRCS=emuspeed.c test.s mul64.s div64.s # movepto.c movepfrom.c
SRCS=emuspeed.c test.S mul64.S div64.S # movepto.c movepfrom.c
/* don't install: */
proginstall:

View File

@ -0,0 +1,50 @@
/* $NetBSD: div64.S,v 1.1 1999/12/09 09:08:00 itohy Exp $ */
#include <m68k/asm.h>
/*
* stack:
* + 8: count
* + 4: retads
* + 0: d2
*/
ENTRY_NOPROFILE(div64ureg)
movl %d2,%sp@-
movl %sp@(8),%d2
L1:
divul %d2,%d1:%d0
subql #1,%d2
jne L1
movl %sp@+,%d2
rts
ENTRY_NOPROFILE(div64sreg)
movl %d2,%sp@-
movl %sp@(8),%d2
L2:
divsl %d2,%d1:%d0
subql #1,%d2
jne L2
movl %sp@+,%d2
rts
ENTRY_NOPROFILE(div64umem)
movl %d2,%sp@-
movl %sp@(8),%d2
L3:
divul %sp@(8),%d1:%d0
subql #1,%d2
jne L3
movl %sp@+,%d2
rts
ENTRY_NOPROFILE(div64smem)
movl %d2,%sp@-
movl %sp@(8),%d2
L4:
divsl %sp@(8),%d1:%d0
subql #1,%d2
jne L4
movl %sp@+,%d2
rts

View File

@ -1,50 +0,0 @@
/*
* stack:
* + 8: count
* + 4: retads
* + 0: d2
*/
.globl _div64ureg
_div64ureg:
movl d2,sp@-
movl sp@(8),d2
L1:
divul d2,d1:d0
subql #1,d2
jne L1
movl sp@+,d2
rts
.globl _div64sreg
_div64sreg:
movl d2,sp@-
movl sp@(8),d2
L2:
divsl d2,d1:d0
subql #1,d2
jne L2
movl sp@+,d2
rts
.globl _div64umem
_div64umem:
movl d2,sp@-
movl sp@(8),d2
L3:
divul sp@(8),d1:d0
subql #1,d2
jne L3
movl sp@+,d2
rts
.globl _div64smem
_div64smem:
movl d2,sp@-
movl sp@(8),d2
L4:
divsl sp@(8),d1:d0
subql #1,d2
jne L4
movl sp@+,d2
rts

View File

@ -0,0 +1,50 @@
/* $NetBSD: mul64.S,v 1.1 1999/12/09 09:08:00 itohy Exp $ */
#include <m68k/asm.h>
/*
* stack:
* + 8: count
* + 4: retads
* + 0: d2
*/
ENTRY_NOPROFILE(mul64ureg)
movl %d2,%sp@-
movl %sp@(8),%d2
L1:
mulul %d2,%d1:%d0
subql #1,%d2
jne L1
movl %sp@+,%d2
rts
ENTRY_NOPROFILE(mul64sreg)
movl %d2,%sp@-
movl %sp@(8),%d2
L2:
mulsl %d2,%d1:%d0
subql #1,%d2
jne L2
movl %sp@+,%d2
rts
ENTRY_NOPROFILE(mul64umem)
movl %d2,%sp@-
movl %sp@(8),%d2
L3:
mulul %sp@(8),%d1:%d0
subql #1,%d2
jne L3
movl %sp@+,%d2
rts
ENTRY_NOPROFILE(mul64smem)
movl %d2,%sp@-
movl %sp@(8),%d2
L4:
mulsl %sp@(8),%d1:%d0
subql #1,%d2
jne L4
movl %sp@+,%d2
rts

View File

@ -1,50 +0,0 @@
/*
* stack:
* + 8: count
* + 4: retads
* + 0: d2
*/
.globl _mul64ureg
_mul64ureg:
movl d2,sp@-
movl sp@(8),d2
L1:
mulul d2,d1:d0
subql #1,d2
jne L1
movl sp@+,d2
rts
.globl _mul64sreg
_mul64sreg:
movl d2,sp@-
movl sp@(8),d2
L2:
mulsl d2,d1:d0
subql #1,d2
jne L2
movl sp@+,d2
rts
.globl _mul64umem
_mul64umem:
movl d2,sp@-
movl sp@(8),d2
L3:
mulul sp@(8),d1:d0
subql #1,d2
jne L3
movl sp@+,d2
rts
.globl _mul64smem
_mul64smem:
movl d2,sp@-
movl sp@(8),d2
L4:
mulsl sp@(8),d1:d0
subql #1,d2
jne L4
movl sp@+,d2
rts

View File

@ -0,0 +1,27 @@
/* $NetBSD: test.S,v 1.1 1999/12/09 09:08:00 itohy Exp $ */
#include <m68k/asm.h>
ENTRY_NOPROFILE(mul32smem)
movl %d2,%sp@-
movl %sp@(8),%d2
L1:
mulsl %sp@(8),%d1
subql #1,%d2
jne L1
movl %sp@+,%d2
rts
ENTRY_NOPROFILE(mul32sreg)
movl %d2,%sp@-
movl %sp@(8),%d2
L2:
mulsl %d0,%d1
subql #1,%d2
jne L2
movl %sp@+,%d2
rts
ENTRY_NOPROFILE(illegal)
illegal
rts

View File

@ -1,26 +0,0 @@
.globl _mul32smem
_mul32smem:
movl d2,sp@-
movl sp@(8),d2
L1:
mulsl sp@(8),d1
subql #1,d2
jne L1
movl sp@+,d2
rts
.globl _mul32sreg
_mul32sreg:
movl d2,sp@-
movl sp@(8),d2
L2:
mulsl d0,d1
subql #1,d2
jne L2
movl sp@+,d2
rts
.globl _illegal
_illegal:
illegal
rts