View Single Post
Old 04 February 2020, 15:19   #168
Registered User

sparhawk's Avatar
Join Date: Sep 2019
Location: Essen/Germany
Age: 51
Posts: 304
Maybe there is a faster way to clear the upper word of a register?

Replace this (16 cycles):
    and.l   #$ffff,d0
With this (12 cycles):
    moveq   #0,d1
    move.w  d0,d1
    move.l  d1,d0
I try to avoid (if possible) the second move by arranging the registers appropriatly, in which case the count would go down to 8 cycles.

Also 12 Cycles but only one register needed:
    swap    d0
    clr.w   d0
    swap    d0

Last edited by sparhawk; 04 February 2020 at 15:24.
sparhawk is offline  
Page generated in 0.04197 seconds with 11 queries