This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: CC_MODE and cc0
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: pkoning at equallogic dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 18 Feb 2004 17:30:07 -0500 (EST)
- Subject: Re: CC_MODE and cc0
- References: <20040216.112544.15269207.kazu@cs.umass.edu><orsmhan8sf.fsf@free.redhat.lsd.ic.unicamp.br><16435.57874.57407.216047@gargle.gargle.HOWL>
Hi Paul,
> It sounds like i386 is supposed to be an example of how to do things.
> But looking at i386.md, the first thing I see is patterns that match
> compare/jump pairs. That doesn't seem the way to optimal code, and
> sure enough, in a simple test program I end up with
> cmpl $4, %eax
> je .L4
> cmpl $4, %eax
> jle .L3
> which looks like a redundant compare, unless I misunderstand i386
> machine code. (By comparison, the pdp11 back end, which uses cc0,
> produces the desired result: one compare, two branches.)
This has just been fixed by Ian. See PR 1532.
> Is there a recipe documented anywhere that shows how the move away
> from cc0 is supposed to happen, and in particular how to make it work
> in such a way that the code quality doesn't suffer? It would be nice
> if this were captured in documentation somewhere that can be found...
I haven't seen any, but I am thinking about writing down my
experiences on H8 once that's done.
Kazu Hirata