binutils-gdb/ld/testsuite/ld-avr
Senthil Kumar Selvaraj 7622049e0b Fix PR 24571 - Relaxation does not shorten jmp or call to target at pc-relative range boundary
The range check done to transform an absolute call/jump to a pc-relative one is
off-by-one, and that causes this shortening optimization to be missed if the
branch target is right at the range boundary.

In the non-shrinkable case, the range is what is mentioned in the ISA - -4094
bytes in the backward direction, and 4096 bytes in the positive direction.

In the shrinkable case, the forward jump range increases by two bytes (deleted
because of the shortening from call/jmp to rcall/rjmp), and therefore, the
range is -4094 in the reverse, and 4098 in the positive direction.

Fix the ranges for !shrinkable and shrinkable cases, and add a test caes to
ensure jumps to max forward and backward ranges get relaxed to rjmp.
2019-05-21 12:48:06 +05:30
..
avr-prop-1.d
avr-prop-1.s
avr-prop-2.d
avr-prop-2.s
avr-prop-3.d
avr-prop-3.s
avr-prop-4.d
avr-prop-4.s
avr-prop-5.d
avr-prop-5.s
avr-prop-6.d
avr-prop-6.s
avr-prop-7.d
avr-prop-7.s
avr-prop-8.d
avr-prop-8.s
avr.exp
gc-section-debugline.d
lds-mega.d
lds-mega.s
lds-tiny.d
lds-tiny.s
norelax_diff.d
per-function-debugline.s
pr13402.d
pr13402.s
pr20789.d
pr20789.s
pr21404-1.d
pr21404-1.s
pr21404-2.d
pr21404-2.s
pr21404-3.d
pr21404-3.s
pr21404-4.d
pr21404-4.s
pr21404-5.d
pr21404-5.s
pr21404-6.d
pr21404-6.s
pr21404-7.d
pr21404-7.s
pr21404-8.d
pr21404-8.s
region_overflow.d
region_overflow.s
relax_diff.d
relax-02.d
relax-02.s
relax-03.d
relax-03.s
relax-elf-flags-01.d
relax-elf-flags-02.d
relax-elf-flags-03.d
relax-elf-flags-04.d
relax-elf-flags-05.d
relax-elf-flags-06.d
relax-elf-flags-07.d
relax-elf-flags-08.d
relax-elf-flags-a.s
relax-elf-flags-b.s
relax-insn-at-range-boundary.d
relax-insn-at-range-boundary.s
relax.s
wraparound-range-boundary.d
wraparound-range-boundary.s