CC_MODE and cc0
Kazu Hirata
kazu@cs.umass.edu
Wed Feb 18 23:00:00 GMT 2004
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
More information about the Gcc
mailing list