[Freemint-list] [PATCH] 68060 detection

Vincent Rivière vincent.riviere at freesbee.fr
Mon Jun 27 02:04:02 MSD 2016


Hello.

Here is a patch to improve 68060 detection.

Instead of assuming that mulu.l is always missing on 68060, detect 68060 by 
checking that the PCR control register is present.
The current method is not reliable, as some underlying layer (i.e. WinUAE 
"Unimplemented CPU emu") may emulate the missing instruction.
On the other hand, checking a feature which can only be present on 68060 is 
reliable.
EmuTOS has been patched like this for a few years, and it works perfectly.

Alan, please commit.

68060.patch
Improve 68060 detection on WinUAE.
Contributed by Vincent Riviere.

-- 
Vincent Rivière

-------------- next part --------------
diff -aurN -x CVS freemint.orig/sys/arch/detect.S freemint/sys/arch/detect.S
--- freemint.orig/sys/arch/detect.S	2016-03-08 20:40:21.843750000 +0100
+++ freemint/sys/arch/detect.S	2016-06-26 22:34:49.703125000 +0200
@@ -281,11 +281,11 @@
 
 	bra.s	exit
 
-// 68040 or 68060. Quad word mulu test.
+// 68040 or 68060.
 
-x040:	moveq	#60,d0		// assume 68060
-	dc.l	0x4c102401	// mulu.l (a0),d1-d2
-	moveq	#40,d0		// no fault -> this is 68040
+x040:	moveq	#40,d0		// assume 68040
+	dc.l	0x4e7a1808	// attempt to access the PCR
+	moveq	#60,d0		// no fault -> this is 68060
 
 exit:	move.l	a1,sp
 


More information about the Freemint-list mailing list