On Fri, Oct 27, 2000 at 10:26:29AM +0200, Mark Koek wrote:
> Quick suggestion after a first glance at the patch: IIRC, 'teq' is
> slightly faster than 'cmp', so where you only test for equality it's
> better to use 'teq'. Maybe I'm wrong.

i don't believe that to be true for any current processor.  it might well
be true for amulet-derived designs.  teq is EOR without a destination
register, cmp is SUB without a destination.  clearly EOR is easier than
SUB.  but unless you're using shifts on an ARM 8 core then they'll be
equal speeds.  also note that teq preserves the C and V flags.  this can
be used to good effect for a three-way if condition, but it can be fatal
if you blindly substitute teq for cmp without thinking about it properly.

in short, it is better to use teq rather than cmp where possible, but
don't fret about it, and don't change it without understanding what
you're doing.

-- 
Revolutions do not require corporate support.

_______________________________________________
http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm

Reply via email to