This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: Vector comparison


On 08/15/2010 12:15 PM, Artem Shinkarov wrote:
> SSE and AltiVec at least define vector comparison result as a vector
> of 0 and -1. So I think that this would be an exotic architecture (but
> I'm not sure). Anyway, if the target returns boolean value, then the
> implementation of the hook should return constant vector of zeros for
> false and constant vector of -1-s for true.

MIPS isn't so exotic.  The result of a float-pair comparison is to
set a pair of condition codes.  One can then use a branch that examines
both CC results, or a special move instruction for the SELECT operation.


r~


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