[Bug target/92729] [avr] Convert the backend to MODE_CC so it can be kept in future releases

pipcet at gmail dot com gcc-bugzilla@gcc.gnu.org
Wed Jul 29 23:16:14 GMT 2020


pipcet at gmail dot com changed:

           What    |Removed                     |Added
                 CC|                            |pipcet at gmail dot com

--- Comment #5 from pipcet at gmail dot com ---
I'm interested in working on this.

There's some initial code at

I've followed the instructions at https://gcc.gnu.org/wiki/CC0Transition . I
believe AVR is an architecture which fits case #2 best: reload requires
arithmetic insns which clobber condition codes.

I decided to add explicit CC clobbers to the patterns for most insns rather
than relying on a post-reload splitter adding the CC clobbers, mostly because
that seemed simpler.

I've used a single REG_CC register in an 8-bit CCmode, representing all bits of
SREG except for the interrupt flag. (Once things are up and running, I plan to
investigate whether it's worth it to treat the carry flag and the transfer bit

The current state is that most code, particularly the gcc.c-torture/compile/
collection, appears to compile, but I haven't run the execution tests to figure
out what's working and what isn't.

More information about the Gcc-bugs mailing list