This is an archive of the discontinued LLVM Phabricator instance.

[AsmParser][SystemZ][z/OS] Introducing HLASM Parser support to AsmParser - Part 2
ClosedPublic

Authored by anirudhp on May 28 2021, 8:05 AM.

Details

Summary
  • This patch is the second (and hopefully final) part of providing HLASM syntax for inline asm statements for z/OS to LLVM (continuing on from https://reviews.llvm.org/D98276)
  • This second part deals with providing label support
  • As mentioned in https://reviews.llvm.org/D98276, if the first token is not a space we process the first token as a label, and the remaining tokens as a possible machine instruction
  • To achieve this, a new parseAsHLASMLabel function is introduced. This function processes the first token, validates whether it is an "acceptable" label according to HLASM standards, and then emits it
  • After handling and emitting the label, call the parseAsMachineInstruction instruction to process the remaining tokens as a machine instruction.

Diff Detail