07 July 2020, 01:04 | #1 |
Registered User
Join Date: Jun 2020
Location: Druidia
Posts: 387
|
68000 instruction cycle times
Hello EAB
I've just started getting back into Amiga coding after 25 years. I've been using the VSCode framework by Bartman/Abyss which I heartily recommend! https://marketplace.visualstudio.com...nuZrUPjWtNNucI I'm slowly working on some demo code using the framework and inline asm. Back in the day I was never "leet" enough to count cycles and just stuck with what seemed fast and leaned on the copper a lot (those Atari guys were right about lazy Amiga coders in my case). I'd like to be a little more informed this time around and have been using this page for reference: https://oldwww.nvg.ntnu.no/amiga/MC6...000timing.HTML Anyway I have some questions: Do I just add the EA cycle times on to the instruction cycle times for the total? For example is: add.l (#1234,a0),d0 -> 12+6=18 cycles? Or is there some other rule such as rounding up to 4 cycles? I should say that I'm only really interested in times for OCS with a standard 68000. I'm also curious if there are modern tools available to analyze 68000 code and report the cycle counts for me rather than doing it by hand (the lazy thing again). Is there maybe even an optimizer out there that will help catch obvious optimizations? I know that Devpak had optimizations but I honestly don't remember using those back in the day and it would be great if something new could do the same while cross compiling. Thanks for any insight! |
07 July 2020, 03:19 | #2 |
Registered User
Join Date: Jun 2016
Location: europe
Posts: 1,039
|
> Do I just add the EA cycle times on to the instruction cycle times for the total?
In general, yes. > Or is there some other rule such as rounding up to 4 cycles? In general, no. There are exceptions, usually marked with */**/etc, where you have to figure out what's going on and add extra cycles. Code:
+---------------------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |mnemonic |syntax |dy |ay |(ay) |(ay)+|-(ay)|(d,ay)|(d,ay,r)|(m).w|(m).l|(d,pc)|(d,pc,r)|#d |ccr |sr |usp | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |abcd.b |dx,<> | 6 | | | | | | | | | | | | | | | | |-(ax),<> | | | | | 18 | | | | | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |add.bw |dx,<> | 4 | | 12 | 12 | 14 | 16 | 18 | 16 | 20 | | | | | | | | |<>,dx | 4 | 4 | 8 | 8 | 10 | 12 | 14 | 12 | 16 | 12 | 14 | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |add.l |dx,<> | 8 | | 20 | 20 | 22 | 24 | 26 | 24 | 28 | | | | | | | | |<>,dx | 8 | 8 | 14 | 14 | 16 | 18 | 20 | 18 | 22 | 18 | 20 | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |adda.w |<>,ax | 8 | 8 | 12 | 12 | 14 | 16 | 18 | 16 | 20 | 16 | 18 | 12 | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |adda.l |<>,ax | 8 | 8 | 14 | 14 | 16 | 18 | 20 | 18 | 22 | 18 | 20 | 16 | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |addi.bw |#d,<> | 8 | | 16 | 16 | 18 | 20 | 22 | 20 | 24 | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |addi.l |#d,<> | 16 | | 28 | 28 | 30 | 32 | 34 | 32 | 36 | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |addq.bw |#d,<> | 4 | 8 | 12 | 12 | 14 | 16 | 18 | 16 | 20 | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |addq.l |#d,<> | 8 | 8 | 20 | 20 | 22 | 24 | 26 | 24 | 28 | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |addx.bw |dx,<> | 4 | | | | | | | | | | | | | | | | |-(ax),<> | | | | | 18 | | | | | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |addx.l |dx,<> | 8 | | | | | | | | | | | | | | | | |-(ax),<> | | | | | 30 | | | | | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |and.bw |dx,<> | 4 | | 12 | 12 | 14 | 16 | 18 | 16 | 20 | | | | | | | | |<>,dx | 4 | | 8 | 8 | 10 | 12 | 14 | 12 | 16 | 12 | 14 | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |and.l |dx,<> | 8 | | 20 | 20 | 22 | 24 | 26 | 24 | 28 | | | | | | | | |<>,dx | 8 | | 14 | 14 | 16 | 18 | 20 | 18 | 22 | 18 | 20 | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |andi.bw |#d,<> | 8 | | 16 | 16 | 18 | 20 | 22 | 20 | 24 | | | | 20 | 20 | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |andi.l |#d,<> | 16 | | 28 | 28 | 30 | 32 | 34 | 32 | 36 | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |||||||||||||||||||||||dy |ay |(ay) |(ay)+|-(ay)|(d,ay)|(d,ay,r)|(m).w|(m).l|(d,pc)|(d,pc,r)|#d |ccr |sr |usp | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |asl.bw |dx,<> |6+2n| | | | | | | | | | | | | | | |asr.bw |#d,<> |6+2n| | | | | | | | | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |asl.l |dx,<> |8+2n| | | | | | | | | | | | | | | |asr.l |#d,<> |8+2n| | | | | | | | | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |asl.w |<> | | | 12 | 12 | 14 | 16 | 18 | 16 | 20 | | | | | | | |asr.w | | | | | | | | | | | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |bcc.b |label | 10/8 (taken/not taken) | +---------+-----------+-------------------------------------------------------------------------------------------+ |bcc.w |label | 10/12 (taken/not taken) | +---------+-----------+-------------------------------------------------------------------------------------------+ |bra.bw |label | 10 | +---------+-----------+-------------------------------------------------------------------------------------------+ |bsr.bw |label | 18 | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |bchg |dx,<> | 6+x| | 12 | 12 | 14 | 16 | 18 | 16 | 20 | | | | | | | | |#d,<> |10+x| | 16 | 16 | 18 | 20 | 22 | 20 | 24 | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |bclr |dx,<> | 8+x| | 12 | 12 | 14 | 16 | 18 | 16 | 20 | | | | | | | | |#d,<> |12+x| | 16 | 16 | 18 | 20 | 22 | 20 | 24 | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |bset |dx,<> | 6+x| | 12 | 12 | 14 | 16 | 18 | 16 | 20 | | | | | | | | |#d,<> |10+x| | 16 | 16 | 18 | 20 | 22 | 20 | 24 | | | | | | | | | | x = 0 if bit is lower than 16, 2 otherwise | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |btst |dx,<> | 6 | | 8 | 8 | 10 | 12 | 14 | 12 | 16 | 12 | 14 | | | | | | |#d,<> | 10 | | 12 | 12 | 14 | 16 | 18 | 16 | 20 | 16 | 18 | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |chk |<>,dx |10+x| | 14+x| 14+x| 16+x| 18+x | 20+x | 18+x| 22+x| 18+x | 20+x |14+x| | | | | | | x = 30 if trap taken | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |clr.bw |<> | 4 | | 12 | 12 | 14 | 16 | 18 | 16 | 20 | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |clr.l |<> | 6 | | 20 | 20 | 22 | 24 | 26 | 24 | 28 | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |||||||||||||||||||||||dy |ay |(ay) |(ay)+|-(ay)|(d,ay)|(d,ay,r)|(m).w|(m).l|(d,pc)|(d,pc,r)|#d |ccr |sr |usp | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |cmp.bw |<>,dx | 4 | 4 | 8 | 8 | 10 | 12 | 14 | 12 | 16 | 12 | 14 | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |cmp.l |<>,dx | 6 | 6 | 14 | 14 | 16 | 18 | 20 | 18 | 22 | 18 | 20 | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |cmpa.w |<>,ax | 6 | 6 | 10 | 10 | 12 | 14 | 16 | 14 | 18 | 14 | 16 | 10 | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |cmpa.l |<>,ax | 6 | 6 | 14 | 14 | 16 | 18 | 20 | 18 | 22 | 18 | 20 | 14 | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |cmpi.w |#d,<> | 8 | | 12 | 12 | 14 | 16 | 18 | 16 | 20 | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |cmpi.l |#d,<> | 14 | | 20 | 20 | 22 | 24 | 26 | 24 | 28 | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |cmpm.bw |(ax)+,<> | | | | 12 | | | | | | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |cmpm.l |(ax)+,<> | | | | 20 | | | | | | | | | | | | +---------+-----------+-------------------------------------------------------------------------------------------+ |dbcc |dx,label | 10/12/14 (taken/cc true/not taken) | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |divs.w |<>,dx | 0+x| | 4+x | 4+x | 6+x | 8+x | 10+x | 8+x | 12+x| 8+x | 10+x | 4+x| | | | |divu.w | | | | | | | | | | | | | | | | | | | | x = 140-158 (less than 10% difference between the best and worst case) | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |eor.bw |dx,<> | 4 | | 12 | 12 | 14 | 16 | 18 | 16 | 20 | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |eor.l |dx,<> | 8 | | 20 | 20 | 22 | 24 | 26 | 24 | 28 | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |eori.bw |#d,<> | 8 | | 16 | 16 | 18 | 20 | 22 | 20 | 24 | | | | 20 | 20 | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |eori.l |#d,<> | 16 | | 28 | 28 | 30 | 32 | 34 | 32 | 36 | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |exg |<>,<> | 6 | 6 | | | | | | | | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |ext.wl |<> | 4 | | | | | | | | | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |illegal | | 34 | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |||||||||||||||||||||||dy |ay |(ay) |(ay)+|-(ay)|(d,ay)|(d,ay,r)|(m).w|(m).l|(d,pc)|(d,pc,r)|#d |ccr |sr |usp | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |jmp |<> | | | 8 | | | 10 | 14 | 10 | 12 | 10 | 14 | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |jsr |<> | | | 16 | | | 18 | 22 | 18 | 20 | 18 | 22 | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |lea |<>,ax | | | 4 | | | 8 | 12 | 8 | 12 | 8 | 12 | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |link |<>,#d | | 16 | | | | | | | | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |lsl.bw |dx,<> |6+2n| | | | | | | | | | | | | | | |lsr.bw |#d,<> |6+2n| | | | | | | | | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |lsl.l |dx,<> |8+2n| | | | | | | | | | | | | | | |lsr.l |#d,<> |8+2n| | | | | | | | | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |lsl.w |<> | | | 12 | 12 | 14 | 16 | 18 | 16 | 20 | | | | | | | |lsr.w | | | | | | | | | | | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |move.bw |dx,<> | 4 | | 8 | 8 | 8 | 12 | 14 | 12 | 16 | | | | 12 | 12 | | | |ax,<> | 4 | | 8 | 8 | 8 | 12 | 14 | 12 | 16 | | | | | | | | |(ax),<> | 8 | | 12 | 12 | 12 | 16 | 18 | 16 | 20 | | | | 16 | 16 | | | |(ax)+,<> | 8 | | 12 | 12 | 12 | 16 | 18 | 16 | 20 | | | | 16 | 16 | | | |-(ax),<> | 10 | | 14 | 14 | 14 | 18 | 20 | 18 | 22 | | | | 18 | 18 | | | |(d,ax),<> | 12 | | 16 | 16 | 16 | 20 | 22 | 20 | 24 | | | | 20 | 20 | | | |(d,ax,r),<>| 14 | | 18 | 18 | 18 | 22 | 24 | 22 | 26 | | | | 22 | 22 | | | |(m).w,<> | 12 | | 16 | 16 | 16 | 20 | 22 | 20 | 24 | | | | 20 | 20 | | | |(m).l,<> | 16 | | 20 | 20 | 20 | 24 | 26 | 24 | 28 | | | | 24 | 24 | | | |(d,pc),<> | 12 | | 16 | 16 | 16 | 20 | 22 | 20 | 24 | | | | 20 | 20 | | | |(d,pc,r),<>| 14 | | 18 | 18 | 18 | 22 | 24 | 22 | 26 | | | | 22 | 22 | | | |#d,<> | 8 | | 12 | 12 | 12 | 16 | 18 | 16 | 20 | | | | 16 | 16 | | | |ccr/sr,<> | 6 | | 12 | 12 | 14 | 16 | 18 | 16 | 20 | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |||||||||||||||||||||||dy |ay |(ay) |(ay)+|-(ay)|(d,ay)|(d,ay,r)|(m).w|(m).l|(d,pc)|(d,pc,r)|#d |ccr |sr |usp | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |move.l |dx,<> | 4 | | 12 | 12 | 12 | 16 | 18 | 16 | 20 | | | | | | | | |ax,<> | 4 | | 12 | 12 | 12 | 16 | 18 | 16 | 20 | | | | | | 4 | | |(ax),<> | 12 | | 20 | 20 | 20 | 24 | 26 | 24 | 28 | | | | | | | | |(ax)+,<> | 12 | | 20 | 20 | 20 | 24 | 26 | 24 | 28 | | | | | | | | |-(ax),<> | 14 | | 22 | 22 | 22 | 26 | 28 | 26 | 30 | | | | | | | | |(d,ax),<> | 16 | | 24 | 24 | 24 | 28 | 30 | 28 | 32 | | | | | | | | |(d,ax,r),<>| 18 | | 26 | 26 | 26 | 30 | 32 | 30 | 34 | | | | | | | | |(m).w,<> | 16 | | 24 | 24 | 24 | 28 | 30 | 28 | 32 | | | | | | | | |(m).l,<> | 20 | | 28 | 28 | 28 | 32 | 34 | 32 | 36 | | | | | | | | |(d,pc),<> | 16 | | 24 | 24 | 24 | 28 | 30 | 28 | 32 | | | | | | | | |(d,pc,r),<>| 18 | | 26 | 26 | 26 | 30 | 32 | 30 | 34 | | | | | | | | |#d,<> | 12 | | 20 | 20 | 20 | 24 | 26 | 24 | 28 | | | | | | | | |usp,<> | | 4 | | | | | | | | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |
07 July 2020, 03:20 | #3 |
Registered User
Join Date: Jun 2016
Location: europe
Posts: 1,039
|
part2:
Code:
|movea.w |<>,ax | 4 | 4 | 8 | 8 | 10 | 12 | 14 | 12 | 16 | 12 | 14 | 8 | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |movea.l |<>,ax | 4 | 4 | 12 | 12 | 14 | 16 | 18 | 16 | 20 | 16 | 18 | 12 | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |movem.w |list,<> | | | 8+4n| | 8+4n| 12+4n| 14+4n |12+4n|16+4n| | | | | | | | |<>,list | | |12+4n|12+4n| | 16+4n| 18+4n |16+4n|20+4n| 18+4n| 18+4n | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |movem.l |list,<> | | | 8+8n| | 8+8n| 12+8n| 14+8n |12+8n|16+8n| | | | | | | | |<>,list | | |12+8n|12+8n| | 16+8n| 18+8n |16+8n|20+8n| 18+8n| 18+8n | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |movep.w |dx,<> | | | | | | 16 | | | | | | | | | | | |(d,ax),<> | 16 | | | | | | | | | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |movep.l |dx,<> | | | | | | 24 | | | | | | | | | | | |(d,ax),<> | 24 | | | | | | | | | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |moveq |#d,<> | 4 | | | | | | | | | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |muls.w |<>,dx | 0+x| | 4+x | 4+x | 6+x | 8+x | 10+x | 8+x | 12+x| 8+x | 10+x | 4+x| | | | |mulu.w | | | | | | | | | | | | | | | | | | | | x = 38+2n (s: the number of 10 or 01 pairs in <>0, u: the number of 1s in <>) | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |||||||||||||||||||||||dy |ay |(ay) |(ay)+|-(ay)|(d,ay)|(d,ay,r)|(m).w|(m).l|(d,pc)|(d,pc,r)|#d |ccr |sr |usp | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |nbcd.b |<> | 6 | | 12 | 12 | 14 | 16 | 18 | 16 | 20 | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |neg.bw |<> | 4 | | 12 | 12 | 14 | 16 | 18 | 16 | 20 | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |neg.l |<> | 6 | | 20 | 20 | 22 | 24 | 26 | 24 | 28 | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |negx.bw |<> | 4 | | 12 | 12 | 14 | 16 | 18 | 16 | 20 | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |negx.l |<> | 6 | | 20 | 20 | 22 | 24 | 26 | 24 | 28 | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |nop | | 4 | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |not.bw |<> | 4 | | 12 | 12 | 14 | 16 | 18 | 16 | 20 | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |not.l |<> | 6 | | 20 | 20 | 22 | 24 | 26 | 24 | 28 | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |or.bw |dx,<> | 4 | | 12 | 12 | 14 | 16 | 18 | 16 | 20 | | | | | | | | |<>,dx | 4 | | 8 | 8 | 10 | 12 | 14 | 12 | 16 | 12 | 14 | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |or.l |dx,<> | 8 | | 20 | 20 | 22 | 24 | 26 | 24 | 28 | | | | | | | | |<>,dx | 8 | | 14 | 14 | 16 | 18 | 20 | 18 | 22 | 18 | 20 | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |ori.bw |#d,<> | 8 | | 16 | 16 | 18 | 20 | 22 | 20 | 24 | | | | 20 | 20 | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |ori.l |#d,<> | 16 | | 28 | 28 | 30 | 32 | 34 | 32 | 36 | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |pea |<> | | | 12 | | | 16 | 20 | 16 | 20 | 16 | 20 | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |reset | | 132 | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |||||||||||||||||||||||dy |ay |(ay) |(ay)+|-(ay)|(d,ay)|(d,ay,r)|(m).w|(m).l|(d,pc)|(d,pc,r)|#d |ccr |sr |usp | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |rol.bw |dx,<> |6+2n| | | | | | | | | | | | | | | |ror.bw |#d,<> |6+2n| | | | | | | | | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |rol.l |dx,<> |8+2n| | | | | | | | | | | | | | | |ror.l |#d,<> |8+2n| | | | | | | | | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |rol.w |<> | | | 12 | 12 | 14 | 16 | 18 | 16 | 20 | | | | | | | |ror.w | | | | | | | | | | | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |roxl.bw |dx,<> |6+2n| | | | | | | | | | | | | | | |roxr.bw |#d,<> |6+2n| | | | | | | | | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |roxl.l |dx,<> |8+2n| | | | | | | | | | | | | | | |roxr.l |#d,<> |8+2n| | | | | | | | | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |roxl.w |<> | | | 12 | 12 | 14 | 16 | 18 | 16 | 20 | | | | | | | |roxr.w | | | | | | | | | | | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |rte | | 20 | +---------+-----------+-------------------------------------------------------------------------------------------+ |rtr | | 20 | +---------+-----------+-------------------------------------------------------------------------------------------+ |rts | | 16 | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |sbcd.b |dx,<> | 6 | | | | | | | | | | | | | | | | |-(ax),<> | | | | | 18 | | | | | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |scc |<> | 4+x| | 12 | 12 | 14 | 16 | 18 | 16 | 20 | | | | | | | | | | x=2 if cc is true | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |stop |#d | 4 | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |||||||||||||||||||||||dy |ay |(ay) |(ay)+|-(ay)|(d,ay)|(d,ay,r)|(m).w|(m).l|(d,pc)|(d,pc,r)|#d |ccr |sr |usp | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |sub.bw |dx,<> | 4 | | 12 | 12 | 14 | 16 | 18 | 16 | 20 | | | | | | | | |<>,dx | 4 | 4 | 8 | 8 | 10 | 12 | 14 | 12 | 16 | 12 | 14 | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |sub.l |dx,<> | 8 | | 20 | 20 | 22 | 24 | 26 | 24 | 28 | | | | | | | | |<>,dx | 8 | 8 | 14 | 14 | 16 | 18 | 20 | 18 | 22 | 18 | 20 | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |suba.w |<>,ax | 8 | 8 | 12 | 12 | 14 | 16 | 18 | 16 | 20 | 16 | 18 | 12 | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |suba.l |<>,ax | 8 | 8 | 14 | 14 | 16 | 18 | 20 | 18 | 22 | 18 | 20 | 16 | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |subi.bw |#d,<> | 8 | | 16 | 16 | 18 | 20 | 22 | 20 | 24 | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |subi.l |#d,<> | 16 | | 28 | 28 | 30 | 32 | 34 | 32 | 36 | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |subq.bw |#d,<> | 4 | 8 | 12 | 12 | 14 | 16 | 18 | 16 | 20 | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |subq.l |#d,<> | 8 | 8 | 20 | 20 | 22 | 24 | 26 | 24 | 28 | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |subx.bw |dx,<> | 4 | | | | | | | | | | | | | | | | |-(ax),<> | | | | | 18 | | | | | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |subx.l |dx,<> | 8 | | | | | | | | | | | | | | | | |-(ax),<> | | | | | 30 | | | | | | | | | | | +---------+-----------+-------------------------------------------------------------------------------------------+ |swap |dx | 4 | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |tas |<> | 4 | | 14 | 14 | 16 | 18 | 20 | 18 | 22 | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |trap |#d | 38 | +---------+-----------+-------------------------------------------------------------------------------------------+ |trapv | | 34/4 (taken, not taken) | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |tst.bw |<> | 4 | | 8 | 8 | 10 | 12 | 14 | 12 | 16 | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |tst.l |<> | 4 | | 12 | 12 | 14 | 16 | 18 | 16 | 20 | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |unlk |<> | | 12 | | | | | | | | | | | | | | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |||||||||||||||||||||||dy |ay |(ay) |(ay)+|-(ay)|(d,ay)|(d,ay,r)|(m).w|(m).l|(d,pc)|(d,pc,r)|#d |ccr |sr |usp | +---------+-----------+----+----+-----+-----+-----+------+--------+-----+-----+------+--------+----+----+----+----+ |
07 July 2020, 04:10 | #4 |
Registered User
Join Date: Jun 2020
Location: Druidia
Posts: 387
|
Thats a much easier table to work with, thanks!
|
07 July 2020, 06:11 | #5 |
Registered User
Join Date: Mar 2016
Location: Australia
Posts: 881
|
You could make an argument that the "modern tool" used to count instruction cycles is the C compiler
|
07 July 2020, 08:50 | #6 |
OCS forever!
Join Date: Mar 2019
Location: Birmingham, UK
Posts: 418
|
Download easy68k. I only recently found it and it’s great for copying in a subroutine then you can “run” it and step through debug it and get an automatic cycle count.
|
08 July 2020, 00:01 | #7 |
Registered User
Join Date: Jun 2020
Location: Druidia
Posts: 387
|
EASy68K is a great tool thanks!
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
AGA Scroll Instruction | Auscoder | Coders. Asm / Hardware | 9 | 13 February 2020 10:47 |
Trying to find author of 68000 instruction set documentation | prb28 | Coders. Asm / Hardware | 4 | 08 June 2019 15:29 |
Question about the TAS instruction. | Thorham | Coders. General | 7 | 03 April 2011 13:12 |
Please help me: one by one instruction needed | JewStrangler | support.WinUAE | 15 | 20 September 2010 18:55 |
$48e70000 instruction | Asman | Coders. General | 5 | 10 February 2006 23:00 |
|
|