From: Toni Wilen Date: Fri, 13 Sep 2019 14:04:05 +0000 (+0300) Subject: Separate 68040 only file because standard gcc .arch sucks. X-Git-Tag: 4300~122 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=9731ee6f9324143b0b438de593f8d997e118d767;p=francis%2Fwinuae.git Separate 68040 only file because standard gcc .arch sucks. --- diff --git a/cputest/amiga.S b/cputest/amiga.S index c7b4dd94..488e0096 100644 --- a/cputest/amiga.S +++ b/cputest/amiga.S @@ -93,9 +93,7 @@ scpucheck: move.l a1,0x10(a0) move.l sp,a1 moveq #4,d0 -.arch 68060 - movec pcr,d0 -.arch 68020 + dc.l 0x4e7a0808 | movec pcr,d0 moveq #5,d0 illg: move.l d1,0x10(a0) diff --git a/cputest/asm.S b/cputest/asm.S index 6835dbb8..bf18aad7 100644 --- a/cputest/asm.S +++ b/cputest/asm.S @@ -92,16 +92,11 @@ _setcpu: _flushcache: move.l 4(sp),d1 | cpu_lvl cmp.w #4,d1 - bcc.s .fc040 + bcc flushcache040 movec cacr,d0 bset #3,d0 movec d0,cacr rts -.fc040: - .arch 68040 - cpusha bc - .arch 68020 - rts | set and return old VBR _setvbr: diff --git a/cputest/asm040.S b/cputest/asm040.S new file mode 100644 index 00000000..8738c2ae --- /dev/null +++ b/cputest/asm040.S @@ -0,0 +1,10 @@ + + .text + + .globl flushcache040 + + .arch 68040 + +flushcache040: + cpusha bc + rts diff --git a/cputest/makefile b/cputest/makefile index ed34c980..67c5f999 100644 --- a/cputest/makefile +++ b/cputest/makefile @@ -8,7 +8,7 @@ AS=/opt/amiga/bin/m68k-amigaos-as CFLAGS = -mcrt=nix13 -O2 -m68000 -fomit-frame-pointer -msmall-code -msoft-float -DREVDATE=$(NOWDATE) -DREVTIME=$(NOWTIME) -DAMIGA -DM68K LINK_CFLAGS = -mcrt=nix13 -lm -s -OBJS = main.o asm.o amiga.o \ +OBJS = main.o asm.o asm040.o amiga.o \ decode_ea.o globals.o opcode_handler_cpu.o opcode_handler_fpu.o \ opcode_handler_mmu.o opcodes_cpu.o opcodes_fpu.o opcodes_mmu.o util.o @@ -48,5 +48,8 @@ util.o: adis/util.c asm.o: asm.S $(AS) -m68020 -o $@ asm.S +asm040.o: asm040.S + $(AS) -m68020 -o $@ asm040.S + amiga.o: amiga.S $(AS) -m68020 -o $@ amiga.S