This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: AVR: CC0 to CCmode conversion
- From: Paul Schlie <schlie at comcast dot net>
- To: Denis Chertykov <denisc at overta dot ru>
- Cc: <gcc at gcc dot gnu dot org>,Jan-Benedict Glaw <jbglaw at lug-owl dot de>
- Date: Mon, 21 Mar 2005 13:20:12 -0500
- Subject: Re: AVR: CC0 to CCmode conversion
> From: Denis Chertykov <denisc@overta.ru>
>> Paul Schlie <schlie@comcast.net> writes:
>> ...
>> (Observing that I'm basically suggesting treating the cc-status register
>> like any other hard register, who's value would need to be saved/restored
>> around any corrupting operation if it's value has live dependants; what's
>> preventing GCC's register and value dependency tracking logic from being
>> able to manage its value properly just like it can for other register
>> allocated values ?)
>
> Why not CCmode register ?
- For what? As it would seem that as along as all rtl instruction data-flow
dependencies are satisfied, the code will execute the program correctly ?
(as all conditionals are effectively based upon a comparison of a result
against 0, and GCC always converts both operands to the same type, so
all that's necessary to know is if that type is signed or unsigned, as
even floats compare just like signed integers. Therefore it would seem
that the only difference between a compare operation and a subtract, is
that it doesn't produce a value result which clobbers one of it's
operands; otherwise they're identical, therefore arguably just an
optimization to be used instead of a subtract when the result value
isn't needed or invalid when comparing floats. It would seem ?)