[patch] h8300: Fix target/11805

Roger Sayle roger@eyesopen.com
Fri Aug 22 21:38:00 GMT 2003


Hi Kazu,
> Fixing PR 1532 might be a step towards converting h8300 to MODE_CC.

Well, you've got me there! ;)  The problem with PR optimization/1532 is
that the i386 backend uses different modes for condition codes calculated
by testing for equality vs. testing for less/greater than.  Currently
GCC has no way of knowing/representing that one MODE_CC mode is a super
or subset of another MODE_CC mode.  Then ultimately i386.md ends up
using the same "cmp" instruction to generate both.


Fortunately, the above failure shouldn't affect the "easy" port to
MODE_CC, which uses a single condition code register with a single
machine mode.


> By the way, I guess converting a cc0 target to MODE_CC would be easy
> if one does not care about redundant test instructions.  One could
> simply embed comparisons into wherever cc0 is.  Am I correct?

I believe so.  However, I'm not a back-end expert so I can't guarantee
that it really is that simple.

Roger
--



More information about the Gcc-patches mailing list