Subject: Re: Code w/ 680x0 (x<=4) instructions not implemented in 68060
To: Gordon W. Ross <gwr@mc.com>
From: Ignatios Souvatzis <is@jocelyn.rhein.de>
List: port-m68k
Date: 06/23/1998 22:14:30
On Tue, Jun 23, 1998 at 11:30:46AM -0400, Gordon W. Ross wrote:
> I don't have my mc68060 book here, but I thought the
> introduction said it handled all mc68020 instructions.
> Is that not the case?

Well... yes... but part of the instructions are emulated in software, were
the emulation software (sans some OS callbacks needed) is provided by
Motorola. The 68060 just has more cases were it needs software assistance.

> If not, which mc68020 instructions don't work?

		68020/30+881		68040		68060
MUL64		hardware		hardware	emulated
DIV64		hardware		hardware	emulated
MOVEP		hardware		hardware	emulated
CAS2		hardware		hardware	emulated
unaligned CAS	hardware		hardware	emulated 

sqrt,exp,log,sin,cos,tan,
		hardware		emulated	emulated
FSCALE		hardware		emulated	emulated
FMOVEM of multiple FP control regs or with dynamic register list
		hardware		hardware	emulated

In addition, the 68040 and 60 need to emulate some FP data types, or need
some software assistance to store the default result for some exception
cases. Here the 68060 does a bit less in hardware.

The gnu multiprecision library most probably uses the integer 32x32->64bit
multiplication to build multiprecision multiplications.

68040 software assistance/emulation is in the FPSP package (in our kernel
tree, sys/arch/m68k/fpsp).
68060 software assistance/emulation is in sys/arch/m68k/060sp.

(Both provided by Motorola).

Regards,
	Ignatios