[AVR] Generate 'rcall' instead of 'call' on avr2 and avr25
authorBen Shi <ben.shi@streamcomputing.com>
Sun, 13 Mar 2022 06:35:49 +0000 (06:35 +0000)
committerBen Shi <ben.shi@streamcomputing.com>
Wed, 23 Mar 2022 02:00:15 +0000 (02:00 +0000)
commit45638931fb7c7a1b9c850e47601541b398868538
tree7c697e68fdc825b87a57a91c8209400a9cb2bf0b
parent6edfe45a63125a8938a5bea13534a118b0e31023
[AVR] Generate 'rcall' instead of 'call' on avr2 and avr25

The 'call' (long call) instruction is available on avr3 and above,
and devices in avr2 and avr25 should use the 'rcall' (short call)
instruction for function calls.

Reviewed By: aykevl, dylanmckay

Differential Revision: https://reviews.llvm.org/D121539
llvm/lib/Target/AVR/AVRInstrInfo.td
llvm/test/CodeGen/AVR/call.ll