]> git.ipfire.org Git - thirdparty/gcc.git/commit
AVR: target/116407 - Fix linker error "relocation truncated to fit".
authorGeorg-Johann Lay <avr@gjlay.de>
Sun, 18 Aug 2024 13:00:55 +0000 (15:00 +0200)
committerGeorg-Johann Lay <avr@gjlay.de>
Sun, 18 Aug 2024 13:28:50 +0000 (15:28 +0200)
commitdfb2e8caa85d1059a0ab8ed4f19568c04c9f13a4
treef3b5050a68214ac6b2d8715a0762c812e3bd5280
parent3ae8794665ee7cbefee755d4b4be8d1ecb8c2a81
AVR: target/116407 - Fix linker error "relocation truncated to fit".

Some text peepholes output extra instructions prior to a branch
instruction and that increase the jump offset of backward branches.

PR target/116407
gcc/
* config/avr/avr-protos.h (avr_jump_mode): Add an int argument.
* config/avr/avr.cc (avr_jump_mode): Add an int argument to increase
the computed jump offset of backwards branches.
* config/avr/avr.md (*dec-and-branchhi!=-1, *dec-and-branchsi!=-1):
Increase the jump offset used by avr_jump_mode() as needed.
gcc/testsuite/
* gcc.target/avr/torture/pr116407-2.c: New test.
* gcc.target/avr/torture/pr116407-4.c: New test.
gcc/config/avr/avr-protos.h
gcc/config/avr/avr.cc
gcc/config/avr/avr.md
gcc/testsuite/gcc.target/avr/torture/pr116407-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/avr/torture/pr116407-4.c [new file with mode: 0644]