This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Questions about comparison insns in mips.md
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