This is an archive of the discontinued LLVM Phabricator instance.

[M68k] Factoring out memory operand printer into a separate file
ClosedPublic

Authored by myhsu on Feb 7 2023, 2:45 PM.

Details

Summary

In order to support inline asm with memory constraints, AsmPrinter::PrintAsmMemOperand needs to be implemented, which has lots of overlaps with MCInstPrinter especially on the format of complex addressing modes. This patch factors out the common printing logics from MCInstPrinter into a separate class inherited by both AsmPrinter and MCInstPrinter, in which the derived classes only need to provide primitives like printOperand and printDisp.

This change is basically NFC. See D143529 for changes on AsmPrinter

Diff Detail

Event Timeline

myhsu created this revision.Feb 7 2023, 2:45 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 7 2023, 2:45 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
myhsu requested review of this revision.Feb 7 2023, 2:45 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 7 2023, 2:45 PM
myhsu edited the summary of this revision. (Show Details)Feb 8 2023, 9:26 AM
0x59616e accepted this revision.Feb 28 2023, 3:23 AM

LGTM. Thanks

This revision is now accepted and ready to land.Feb 28 2023, 3:23 AM