Andrew Hutchinson schreef:
One might argue that carry is the result of a compare with largest
integer value (255 for bytes). But these situation do not directly arise
in "C" - or I assume any other supported language - so it is not
considered. (Though the ability to propage carry would indeed help
create mode independent arithmetic operation.).
Having carry as a condition code indeed seems not very useful
But the most benefit from teaching gcc about the carry is the
propagation of the carry, that is my main concern. Is not possible to
create a special register for carry, (not in cc0) just for doing
arithmetics using carry? This would lead to an expand of the
sub/add/shift/cmp(?) in to simple byte patterns.
Giving gcc much more knowledge on what's going on.
This is close to what Dave has suggested in the other thread.
I have to little knowledge on gcc's further internals to over see all
consequences, I guess there are very good reason not to do this.
Wouter
_______________________________________________
AVR-GCC-list mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list