This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] ARM vclt broken


Hi Paul/ Daniel,

The ARM NEON vclt and vcle instructions are aliases for vcgt and vcge
respectively.
Err, isn't that the other way around ?  Ie vclt is an alias for vcge and
vcle is an alias for vcgt ?
Nope - in fact that's how everyone seems to get these particular
instructions wrong.  "a < b" is "!(a >= b)", but there's an extra
negation, so you can't use the same instruction for both.  However
"a < b" is "b > a", so by swapping operands, you can use the same
instruction.

If I'm remembering Paul's explanation correctly, then binutils
currently has this reversed and tries to encode "a > b" as "b <= a".

Ah! Thanks for the explanation. You know, a comment explaining this in the code might not go amiss...


Cheers
  Nick


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]