This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][AsmParser] Fix debug output in a few instructions
ClosedPublic

Authored by c-rhodes on May 27 2020, 3:50 AM.

Details

Summary

In the parsing of BTIHint, PSBHint and Prefetch the identifier token
should be lexed after creating the operand, otherwise the StringRef is
moved before being copied and the debug output is incorrect.

Prefetch example:

$ echo "prfm   pldl1keep, [x2]" | ./bin/llvm-mc \
    -triple aarch64-none-linux-gnu -show-encoding -debug

Before:

  Matching formal operand class MCK_Prefetch against actual operand at
  index 1 (<prfop ,>): match success using generic matcher

After:

  Matching formal operand class MCK_Prefetch against actual operand at
  index 1 (<prfop pldl1keep>): match success using generic matcher

Diff Detail

Event Timeline

c-rhodes created this revision.May 27 2020, 3:50 AM
david-arm accepted this revision.Jun 8 2020, 6:04 AM

LGTM!

This revision is now accepted and ready to land.Jun 8 2020, 6:04 AM
This revision was automatically updated to reflect the committed changes.