Quote:
Originally Posted by mcgeezer
Thanks - indeed this is 68000
That code won't assemble as I'm getting an out of range displacement.
|
the displacement must fit into 1 byte. Thus the code needs to be very close to the table.
used cycles: 4 + 14 = 18
the lea approach will work within a +-32k range
used cycles 8 + 4 + 14 = 26
If you end up putting that code into a subroutine...
... shift/add is faster (40 cycles), since bsr/rts eats the advantage up.
and the shift/add code can be inlined everywhere - ok, you need a scratch register...
... so if that is not available or size matters: use the mul ^^