]> git.ipfire.org Git - thirdparty/gcc.git/commit
AVR: Use REG_<n> constants instead of magic numbers <n>.
authorGeorg-Johann Lay <avr@gjlay.de>
Sat, 2 Mar 2024 12:37:00 +0000 (13:37 +0100)
committerGeorg-Johann Lay <avr@gjlay.de>
Sat, 2 Mar 2024 12:47:45 +0000 (13:47 +0100)
commit9ca5e579d3e1acdbf0519f7a43928ecc9bb0193f
tree7afe8aece89382ebf86ffb8d7bd39b94b9560457
parentc8d12343a9417055f3fc89bbdbb6e0ea508bcca2
AVR: Use REG_<n> constants instead of magic numbers <n>.

There are some places where avr.cc uses magic numbers like 17 that
are actually register numbers.  This patch defines constants like
REG_17 and uses them instead of the magic numbers when a register
number is meant.

gcc/
* config/avr/avr.md (REG_0, ... REG_36): New define_constants.
* config/avr/avr.cc: Use them instead of magic numbers when it
means a register number.
gcc/config/avr/avr.cc
gcc/config/avr/avr.md