--- tme/ic/m68k/m68k-iset.txt 2018/04/24 16:37:52 1.1.1.1 +++ tme/ic/m68k/m68k-iset.txt 2018/04/24 16:41:57 1.1.1.4 @@ -1,6 +1,35 @@ -! m68k-iset.txt: the m68k instruction set +! $Id: m68k-iset.txt,v 1.1.1.4 2018/04/24 16:41:57 root Exp $ -! $Id: m68k-iset.txt,v 1.1.1.1 2018/04/24 16:37:52 root Exp $ +! ic/m68k/m68k-iset.txt: the m68k instruction set + +! Copyright (c) 2002, 2003, 2004 Matt Fredette +! All rights reserved. +! +! Redistribution and use in source and binary forms, with or without +! modification, are permitted provided that the following conditions +! are met: +! 1. Redistributions of source code must retain the above copyright +! notice, this list of conditions and the following disclaimer. +! 2. Redistributions in binary form must reproduce the above copyright +! notice, this list of conditions and the following disclaimer in the +! documentation and/or other materials provided with the distribution. +! 3. All advertising materials mentioning features or use of this software +! must display the following acknowledgement: +! This product includes software developed by Matt Fredette. +! 4. The name of the author may not be used to endorse or promote products +! derived from this software without specific prior written permission. +! +! THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +! IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +! WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +! DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, +! INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +! (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +! SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +! HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +! STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +! ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +! POSSIBILITY OF SUCH DAMAGE. ! load some common EA categories: eax-cat all ro yyyyyyyyyyyynnn @@ -30,11 +59,13 @@ eax-cat control un nnynnyyyyyynnnn .if m68020 || m68030 specop specop16 cmp2_chk2 0000 0ss0 11xx xxxx cmp2_chk2 X, x0/control ! chk2 pp 174, cmp2 pp 185 -specop specop16 cas -0000 1SS0 11xx xxxx cas.S X, x0/memalt/un ! cas pp 169 -specop cas2 cas2 -0000 1100 1111 1100 cas2_16 ! cas2 pp 169 -0000 1110 1111 1100 cas2_32 ! cas2 pp 169 +specop specop16 cas.s +0000 1010 11xx xxxx cas8 X, x0/memalt/un ! cas pp 169 +0000 1100 11xx xxxx cas16 X, x0/memalt/un ! cas pp 169 +0000 1110 11xx xxxx cas32 X, x0/memalt/un ! cas pp 169 +specop specop16 cas2_16 cas2_32 +0000 1100 1111 1100 cas2_16 #16 ! cas2 pp 169 +0000 1110 1111 1100 cas2_32 #16 ! cas2 pp 169 .endif 0000 1010 0011 1100 eori_ccr #8 ! eori_ccr pp 207 @@ -64,9 +95,8 @@ eax-cat bitrw rw nnyyyyyyynnnnnn 0000 1000 11xx xxxx bset8 #8, x8/bitrw ! bset pp 159 .if m68010 || m68020 || m68030 -! the moves specop handling forces the right EA cycles: -specop moves moves.s -0000 1110 ssxx xxxx moves.s X, xs/memalt ! moves pp 477 +specop specop16 moves.s +0000 1110 ssxx xxxx moves.s X, x0/memalt/un ! moves pp 477 .endif 0000 ddd1 0000 0DDD btst32 %d.8, %D.32 ! btst pp 164 @@ -137,7 +167,6 @@ specop moves moves.s 0100 1000 01xx xxxx pea X, x0/control ! pea pp 262 -specop illegal illegal 0100 1010 1111 1100 illegal ! illegal pp 210 0100 1010 1100 0ddd tas_r X, %d.8 ! tas pp 289 @@ -155,10 +184,9 @@ eax-cat tst ro ynyyyyyyynnnnnn .endif .if m68020 || m68030 -specop mulul mulul -specop divul divul -0100 1100 00xx xxxx mulul X, x32/data ! mulsl pp 238, mulul pp 241 -0100 1100 01xx xxxx divul X, x32/data ! divsl pp 195, divul pp 199 +specop specop16 mull divl +0100 1100 00xx xxxx mull X, x32/data ! mulsl pp 238, mulul pp 241 +0100 1100 01xx xxxx divl X, x32/data ! divsl pp 195, divul pp 199 .endif 0100 1110 0100 ???? trap ! trap pp 291 @@ -225,9 +253,16 @@ eax-cat alterable rw ynyyyyyyynnnnnn 0101 cccc 11xx xxxx scc X, x8/datalt ! scc pp 275 -! bcc pp 128, bra pp 158, bsr pp 162 -specop bcc bcc -0110 cccc ???? ???? bcc +0110 0001 0000 0000 bsrl*** #16S32 ! bsr pp 162 +.if m68020 || m68030 +0110 0001 1111 1111 bsrl*** #32 ! bsr pp 162 +.endif +0110 0001 ???? ???? bsr* ! bsr pp 162 +0110 cccc 0000 0000 bccl* #16S32 ! bcc pp 128 +.if m68020 || m68030 +0110 cccc 1111 1111 bccl* #32 ! bcc pp 128 +.endif +0110 cccc ???? ???? bcc ! bcc pp 128 0111 ddd0 ???? ???? moveq32 X, %d.32 ! moveq pp 237 @@ -332,3 +367,18 @@ specop specop16 bftst bfextu bfchg bfext 1110 DDD0 ss11 1ddd ror.s %D.8, %d.s ! ror pp 263 1110 qqq1 ss01 1ddd rol.s #q.8, %d.s ! rol pp 263 1110 DDD1 ss11 1ddd rol.s %D.8, %d.s ! rol pp 263 + +.if m68020 || m68030 +specop fpgen fpgen +1111 0010 00xx xxxx fpgen X, x32/all ! cpgen pp 189 +specop specop16 fdbcc ftrapcc fscc +1111 0010 0100 1ddd fdbcc %d.16, #16 ! fdbcc pp 335 +1111 0010 0111 1010 ftrapcc #16 ! ftrapcc pp 446 +1111 0010 0111 1011 ftrapcc #32 ! ftrapcc pp 446 +1111 0010 0111 1100 ftrapcc ! ftrapcc pp 446 +1111 0010 01xx xxxx fscc X, x8/datalt ! fscc pp 411 +1111 0010 10?? ???? fbcc #16S32 ! fbcc pp 324 +1111 0010 11?? ???? fbcc #32 ! fbcc pp 324 +1111 0011 00xx xxxx fsave X, x0/movem_rm ! fsave pp 467 +1111 0011 01xx xxxx frestore X, x0/movem_mr ! frestore pp 464 +.endif