From 0a24593bda5ed6db67287ccd7945b5d0bdeeb7e8 Mon Sep 17 00:00:00 2001 From: itohy Date: Thu, 9 Dec 1999 09:08:00 +0000 Subject: [PATCH] Make it build on ELF toolchain. --- regress/sys/arch/m68k/060sp/dotestsubs.S | 17 ++++---- regress/sys/arch/m68k/emuspeed/Makefile | 4 +- regress/sys/arch/m68k/emuspeed/div64.S | 50 ++++++++++++++++++++++++ regress/sys/arch/m68k/emuspeed/div64.s | 50 ------------------------ regress/sys/arch/m68k/emuspeed/mul64.S | 50 ++++++++++++++++++++++++ regress/sys/arch/m68k/emuspeed/mul64.s | 50 ------------------------ regress/sys/arch/m68k/emuspeed/test.S | 27 +++++++++++++ regress/sys/arch/m68k/emuspeed/test.s | 26 ------------ 8 files changed, 138 insertions(+), 136 deletions(-) create mode 100644 regress/sys/arch/m68k/emuspeed/div64.S delete mode 100644 regress/sys/arch/m68k/emuspeed/div64.s create mode 100644 regress/sys/arch/m68k/emuspeed/mul64.S delete mode 100644 regress/sys/arch/m68k/emuspeed/mul64.s create mode 100644 regress/sys/arch/m68k/emuspeed/test.S delete mode 100644 regress/sys/arch/m68k/emuspeed/test.s diff --git a/regress/sys/arch/m68k/060sp/dotestsubs.S b/regress/sys/arch/m68k/060sp/dotestsubs.S index 32074c233ee0..24f1253f2c05 100644 --- a/regress/sys/arch/m68k/060sp/dotestsubs.S +++ b/regress/sys/arch/m68k/060sp/dotestsubs.S @@ -1,7 +1,9 @@ - .globl _print_str,_print_num +#include -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 diff --git a/regress/sys/arch/m68k/emuspeed/Makefile b/regress/sys/arch/m68k/emuspeed/Makefile index 20b421a12a8a..cb83a9ab8e8a 100644 --- a/regress/sys/arch/m68k/emuspeed/Makefile +++ b/regress/sys/arch/m68k/emuspeed/Makefile @@ -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: diff --git a/regress/sys/arch/m68k/emuspeed/div64.S b/regress/sys/arch/m68k/emuspeed/div64.S new file mode 100644 index 000000000000..257b1ded4eb0 --- /dev/null +++ b/regress/sys/arch/m68k/emuspeed/div64.S @@ -0,0 +1,50 @@ +/* $NetBSD: div64.S,v 1.1 1999/12/09 09:08:00 itohy Exp $ */ + +#include + +/* + * 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 diff --git a/regress/sys/arch/m68k/emuspeed/div64.s b/regress/sys/arch/m68k/emuspeed/div64.s deleted file mode 100644 index b75235a492f3..000000000000 --- a/regress/sys/arch/m68k/emuspeed/div64.s +++ /dev/null @@ -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 diff --git a/regress/sys/arch/m68k/emuspeed/mul64.S b/regress/sys/arch/m68k/emuspeed/mul64.S new file mode 100644 index 000000000000..288f5729e504 --- /dev/null +++ b/regress/sys/arch/m68k/emuspeed/mul64.S @@ -0,0 +1,50 @@ +/* $NetBSD: mul64.S,v 1.1 1999/12/09 09:08:00 itohy Exp $ */ + +#include + +/* + * 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 diff --git a/regress/sys/arch/m68k/emuspeed/mul64.s b/regress/sys/arch/m68k/emuspeed/mul64.s deleted file mode 100644 index 1586b423b58c..000000000000 --- a/regress/sys/arch/m68k/emuspeed/mul64.s +++ /dev/null @@ -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 diff --git a/regress/sys/arch/m68k/emuspeed/test.S b/regress/sys/arch/m68k/emuspeed/test.S new file mode 100644 index 000000000000..bdf94e2f0a5b --- /dev/null +++ b/regress/sys/arch/m68k/emuspeed/test.S @@ -0,0 +1,27 @@ +/* $NetBSD: test.S,v 1.1 1999/12/09 09:08:00 itohy Exp $ */ + +#include + +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 diff --git a/regress/sys/arch/m68k/emuspeed/test.s b/regress/sys/arch/m68k/emuspeed/test.s deleted file mode 100644 index 7c91f4f58f50..000000000000 --- a/regress/sys/arch/m68k/emuspeed/test.s +++ /dev/null @@ -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