[all-commits] [llvm/llvm-project] c41d42: [AVR][MC] Fix illegal operand forms.

Ben Shi via All-commits all-commits at lists.llvm.org
Thu Dec 22 17:48:31 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c41d425030dfd5cd84eb89b861e157821f2bf45f
      https://github.com/llvm/llvm-project/commit/c41d425030dfd5cd84eb89b861e157821f2bf45f
  Author: Ben Shi <powerman1st at 163.com>
  Date:   2022-12-23 (Fri, 23 Dec 2022)

  Changed paths:
    M llvm/lib/Target/AVR/AsmParser/AVRAsmParser.cpp
    M llvm/lib/Target/AVR/MCTargetDesc/AVRMCExpr.cpp
    M llvm/test/CodeGen/AVR/elpm.ll
    M llvm/test/CodeGen/AVR/lpmx.ll
    M llvm/test/MC/AVR/modifiers.s
    M llvm/test/MC/AVR/relocations.s

  Log Message:
  -----------
  [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




More information about the All-commits mailing list