This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][AsmParser] Split index parsing from vector list.
ClosedPublic

Authored by sdesmalen on Apr 9 2018, 2:34 AM.

Details

Summary

Place parsing of a vector index into a separate function to reduce
duplication, since the code is duplicated in both the parsing of a
Neon vector register operand and a Neon vector list.

This is patch [2/6] in a series to add assembler/disassembler support for
SVE's contiguous ST1 (scalar+imm) instructions.

Diff Detail

Repository
rL LLVM

Event Timeline

sdesmalen created this revision.Apr 9 2018, 2:34 AM
rengolin added inline comments.Apr 9 2018, 12:10 PM
lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
2963 ↗(On Diff #141602)

This function doesn't look NEON specific, why the name change?

sdesmalen added inline comments.Apr 10 2018, 1:43 AM
lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
2963 ↗(On Diff #141602)

This is because matching the trailing index operand after a vector list is not used for SVE, so this patch makes the parseVectorList function generic and adds the index-operand parsing (Neon-specific) to parseNeonVectorList.

rengolin accepted this revision.Apr 10 2018, 10:29 AM

LGTM.

lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
2963 ↗(On Diff #141602)

I see, makes sense.

This revision is now accepted and ready to land.Apr 10 2018, 10:29 AM
This revision was automatically updated to reflect the committed changes.