[comp.os.minix] 68000 clr instruction -- useless?

HBO043%DJUKFA11.BITNET@cunyvm.cuny.edu (Christoph van Wuellen) (03/11/91)

I learned that the 68000 reads the operand which it overwrites with
zeroes later upon a clr instruction.

This may have unwanted effects when programming interface registers --
so I will withdraw the clr instruction from the peephole optimizer of
c68.

There is only a single case where clr is faster than move #0.
this is clr.b or clr.w Dn. There are cases where clr is slower:
clr.w -(An) and clr.l -(An)

The advantage of the clr instruction is that it is shorter.

The next c68 patch will generate only clr.b and clr.w to data registers.

C.v.W.