This is an archive of the discontinued LLVM Phabricator instance.

[AVR][MC] Fix illegal operand forms.
ClosedPublic

Authored by benshi001 on Dec 21 2022, 4:25 AM.

Details

Summary
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))

Diff Detail

Event Timeline

benshi001 created this revision.Dec 21 2022, 4:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 21 2022, 4:25 AM
Herald added subscribers: Jim, hiraditya. · View Herald Transcript
benshi001 requested review of this revision.Dec 21 2022, 4:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 21 2022, 4:26 AM
aykevl accepted this revision.Dec 22 2022, 7:29 AM

LGTM

This revision is now accepted and ready to land.Dec 22 2022, 7:29 AM
This revision was landed with ongoing or failed builds.Dec 22 2022, 5:48 PM
This revision was automatically updated to reflect the committed changes.