[WWW] simtest-howto.html clarifications, additions

Michael Meissner gcc-pat@the-meissners.org
Wed Jun 11 21:23:00 GMT 2003


On Wed, Jun 11, 2003 at 01:54:59PM -0700, Dan Kegel wrote:
> Janis Johnson wrote:
> >+    <p>The target characteristic can help you determine which targets to
> >+    use to broaden the scope of your testing.  A CC0 target causes
> >+    significantly different code to be generated and can matter more
> >+    than word size and endianness in terms of detecting new breakage.</p>
> 
> What's a CC0 target?  I've googled and googled, and can't find a clue.

The original version of GCC assumed there was only one condition code (aka CC0)
and that all/most instructions would set this code.  I believe the 68k or the
VAX was the first target, and both of these are CC0 machines.  In a CC0
machine, you do conditional branches by:

	(set (cc0) (reg:SI <n>))
	(set (pc) (if_then_else (gt (cc0)
				    (const_int 0))
				(label_ref <m>)
				(pc)))

All of the passes of the compiler need to make sure nothing ever gets inserted
between the cc0 setter, and the user.

Later RISC ports allowed for allocatable registers to be used to hold
comparisons, etc. and no longer need to make sure the test is immediately
followed by the use of the condition code, and normal register allocation will
work on this.

-- 
Michael Meissner
email: gnu@the-meissners.org
http://www.the-meissners.org



More information about the Gcc-patches mailing list