Page MenuHomePhabricator

[ARM][Asm] Debug trace for the processInstruction loop

Authored by olista01 on Nov 23 2018, 3:36 AM.



In the Arm assembly parser, we first match an instruction, then call
processInstruction to possibly change it to a different encoding, to
match rules in the architecture manual which can't be expressed by the
table-generated matcher.

This adds debug printing so that this process is visible when using the
-debug option.

To support this, I've added a new overload of MCInst::dump_pretty which
takes the opcode name as a StringRef, since we don't have an InstPrinter
instance in the assembly parser. Instead, we can get the same
information directly from the MCInstrInfo.

Diff Detail


Event Timeline

olista01 created this revision.Nov 23 2018, 3:36 AM
rengolin accepted this revision.Dec 1 2018, 12:01 PM

That's very useful, thanks! LGTM.

This revision is now accepted and ready to land.Dec 1 2018, 12:01 PM
This revision was automatically updated to reflect the committed changes.