Quote:
Originally Posted by Mrs Beanbag
Well ok, but it's also not just about memory used by the code but about time wasted reading instructions to execute. And a word-read doesn't cost less than a longword-read on 68020+, so...
|
A word doesn't cost less than a longword to read, but it costs more space in the dcache. So if the table gets read repetitively, it has better be small.
Quote:
Originally Posted by Mrs Beanbag
But anyway, supposing we had instruction that did this in 4 bytes:
Code:
add.w d16(An),An
jmp (An)
and it would be nice not to have to trash An while doing it.
|
But there, d16 is a constant.
Did you mean, rather :
Code:
add.w (An,Dn.w*2),An
jmp (An)
In that case it would even be better to replace :
Code:
lea table(pc),An
add.w (An,Dn.w*2),An
jmp (An)
By :