[AVR][MC] Fix illegal operand forms.
authorBen Shi <powerman1st@163.com>
Wed, 21 Dec 2022 12:17:54 +0000 (20:17 +0800)
committerBen Shi <powerman1st@163.com>
Fri, 23 Dec 2022 01:48:06 +0000 (09:48 +0800)
commitc41d425030dfd5cd84eb89b861e157821f2bf45f
tree863f459dd1d8e5aba215bd7d714d11d36154016a
parent006340baf753648ea8fd0344556d878851a00d09
[AVR][MC] Fix illegal operand forms.

These operands are illegal and rejected by avr-gcc.
    subi r24, -lo8(symobl+offset)
    sbci r25, -hi8(symobl+offset)

And their correct form should be
    subi r24, lo8(-(symobl+offset))
    sbci r25, hi8(-(symobl+offset))

Reviewed By: aykevl

Differential Revision: https://reviews.llvm.org/D140473
llvm/lib/Target/AVR/AsmParser/AVRAsmParser.cpp
llvm/lib/Target/AVR/MCTargetDesc/AVRMCExpr.cpp
llvm/test/CodeGen/AVR/elpm.ll
llvm/test/CodeGen/AVR/lpmx.ll
llvm/test/MC/AVR/modifiers.s
llvm/test/MC/AVR/relocations.s