Hi there;
What is faster?
clr.l d0 or move.l #$00000000,d0
What is faster ? Clear or Load ?
Re: What is faster ? Clear or Load ?
Well, after some digging I found out that:
move.l #$00000000,d0 takes 4 cycles
clr.l d0 takes 6 cycles
move.l #$00000000,d0 takes 4 cycles
clr.l d0 takes 6 cycles
Re: What is faster ? Clear or Load ?
Can I ask where you saw that, as it's counter intuitive to what I assumed, so I'd like to see what document you found to refer to for my own reference.
I thought the whole point of CLR commands is they don't take a parameter, which should reduce the amount of data 'Loaded' by the CPU, by definition loading a 32 bit long immediate to a register requires an Extra 4 bytes of program bytes, whereas CLR should need nothing more than the command itself. On a simple CPU like the Z80, command timing is generally calculated by the total bytes' a command takes.
The manuals I usually use for 68000 reference don't give timings (I'm sure it varies depending on 68000/20/30 etc) but I found these:
https://oldwww.nvg.ntnu.no/amiga/MC680x ... gleop.HTML
https://oldwww.nvg.ntnu.no/amiga/MC680x ... mmove.HTML
I thought the whole point of CLR commands is they don't take a parameter, which should reduce the amount of data 'Loaded' by the CPU, by definition loading a 32 bit long immediate to a register requires an Extra 4 bytes of program bytes, whereas CLR should need nothing more than the command itself. On a simple CPU like the Z80, command timing is generally calculated by the total bytes' a command takes.
The manuals I usually use for 68000 reference don't give timings (I'm sure it varies depending on 68000/20/30 etc) but I found these:
https://oldwww.nvg.ntnu.no/amiga/MC680x ... gleop.HTML
https://oldwww.nvg.ntnu.no/amiga/MC680x ... mmove.HTML
Chibi Akuma(s) Comedy-Horror 8-bit Bullet Hell shooter! // 「チビ悪魔」可笑しいゴシックSTG ! // Work in Progress: ChibiAliens
Interested in CPU's :Z80,6502,68000,6809,ARM,8086,RISC-V
Learning: 65816,ARM,8086,6809
Interested in CPU's :Z80,6502,68000,6809,ARM,8086,RISC-V
Learning: 65816,ARM,8086,6809
Re: What is faster ? Clear or Load ?
Sure, beside of those two that you had indicated I also found these:
https://mrjester.hapisan.com/04_MC68/CycleTimes.htm (Mega Drive oriented)
https://nguillaumin.github.io/perihelio ... -times.txt (Atari ST oriented)
https://mrjester.hapisan.com/04_MC68/CycleTimes.htm (Mega Drive oriented)
https://nguillaumin.github.io/perihelio ... -times.txt (Atari ST oriented)