]> git.ipfire.org Git - thirdparty/gcc.git/commit
Add new constraints for upcoming autoinc fixes
authorJeff Law <jeffreyalaw@gmail.com>
Sun, 16 Oct 2022 16:43:25 +0000 (12:43 -0400)
committerJeff Law <jeffreyalaw@gmail.com>
Sun, 16 Oct 2022 16:43:25 +0000 (12:43 -0400)
commit6366e3e8847af98d4728d55951534769d034d02a
tree3f95e3a96125948f2535b5e6cd22c85d01dec018
parent709b2160bcd8f6f57c8754c73d40550895339c7b
Add new constraints for upcoming autoinc fixes

GCC does not allow a the operand of an autoinc addressing mode to
overlap with another soure operand in the same insn.  This is primarly
enforced with insn conditions.  However, cases can slip through LRA
and reload.  To address those scenarios we'll take an idea from the
pdp11 port for describing the restriction in constraints as well.

To implement that we need register classes and constraints which are
"all general purpose hardware registers except r0".  And similarly for
r1..r7(sp).

This patch adds those register classes and constraints, but does not
yet use them.

gcc/
* config/h8300/constraints.md (Z0..Z7): New register
constraints.
* config/h8300/h8300.h (reg_class): Add new classes.
(REG_CLASS_NAMES): Similarly.
(REG_CLASS_CONTENTS): Similarly.
gcc/config/h8300/constraints.md
gcc/config/h8300/h8300.h