This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PowerPC - user variables referring to CRs
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Sun, 12 Jan 2003 15:33:55 -0500
- Subject: Re: PowerPC - user variables referring to CRs
Instead of declaring the variable with a mode, could you use the
GCC local register variable extension associating the variable with
register cr0?
The more general case is something that John Carr once mentioned
and is recommended by IBM for compiler implementations: use PowerPC
condition registers for booleans and small bitfields. Instead of
comparing the bitfield with a mask, reload the value into a condition
register and synthesize the appropriate type of comparison operator to
test the bits of interest directly.
David