Questions about comparison insns in mips.md

Ian Lance Taylor ian@airs.com
Sun Oct 9 05:29:00 GMT 2005


Eric Fisher <joefoxreal@gmail.com> writes:

> Thanks for the help. Since ARM has condition codes, I'm wondering why it uses
> a psuedo register internally to represent things that use or set the
> condition codes?
> I think it should use CPSR directly.

ARM actually does use the CPSR directly.  See CC_REGNUM.  The
comparison instructions are not generated directly because ARM uses
different comparison modes depending upon how the comparison is being
used, and it uses those modes for optimizations.  See
arm_select_cc_mode in arm.c.  See uses of CC_NOOV in arm.md.

Ian



More information about the Gcc mailing list