On Fri, Jun 29, 2007 at 11:43:49AM +1000, Hasjim Williams wrote: > I guess I will need to define a new "maverick_cc_register". My question > is can I reuse the same CC_REGNUM? Or do I also need another new > CC_REGNUM_MAVERICK pseudo register?
See below. > How do I get a new reg number allocated, if I need one? new_hard_regnum = FIRST_PSEUDO_REGISTER ++; [snip] > The only problem would be, is that anything that clobbers CC_REGNUM > needs to clobber CC_REGNUM_MAVERICK too (and vice-versa), since even > though they are pseudo-registers, they both are the NZCV flags in > pc/r15. Exactly. The condition code register is not a pseudo register, it is a hard register and GCC needs to know that a MaverickCrunch comparison will clobber the result of a previous non-MaverickCrunch comparison and vice versa. You must keep the same CC_REGNUM because it's the same NZCV bits in hardware. -- Rask Ingemann Lambertsen