]> git.ipfire.org Git - thirdparty/gcc.git/commit
AVR: target/122527 -- Don't use __load_N to load from __flash1.
authorGeorg-Johann Lay <avr@gjlay.de>
Sun, 2 Nov 2025 14:12:59 +0000 (15:12 +0100)
committerGeorg-Johann Lay <avr@gjlay.de>
Sun, 2 Nov 2025 15:11:25 +0000 (16:11 +0100)
commit0b2c031cca4017c5f87af519f0977b33b4bcb284
tree80d7ffd3259c6d6bced053ff731290306ef30b90
parent1267fce9aeb860717f6473f077f844027d872644
AVR: target/122527 -- Don't use __load_N to load from __flash1.

This patch fixes a case where a 3 byte or 4 byte load from __flash1
uses __load_3/4 to read the value, which is wrong.

This only occured when the device has ELPM but not ELPMx (avr31).

PR target/122527
gcc/
* config/avr/avr.cc (avr_load_libgcc_p): Return false if
the address-space is not ADDR_SPACE_FLASH.
(avr_out_lpm_no_lpmx [addr=REG]): Handle sizes of 3 and 4 bytes.
gcc/config/avr/avr.cc