[AVR] Fix inaccurate offsets in PC relative branch instructions
In avr-gcc, the destination of "rjmp label + offset" is address 'label + offset', while destination of "rjmp . + offset" is 'address_of_rjmp + offset + 2'. Clang is in accordance with avr-gcc for "rjmp label + offset", but emits incorrect destination of "rjmp . + offset" to 'address_of_rjmp + offset', in which the expected offset 2 is missing. This patch fixes the above issue. Fixes https://github.com/llvm/llvm-project/issues/60019 Reviewed By: jacquesguan, aykevl Differential Revision: https://reviews.llvm.org/D143901
Loading
Please sign in to comment