[all-commits] [llvm/llvm-project] b8dcd9: [AsmParser][SystemZ][z/OS] Introducing HLASM Parse...

Anirudh Prasad via All-commits all-commits at lists.llvm.org
Mon May 31 08:27:25 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b8dcd920ec286d70976521dbc4692dc5f24dabe8
      https://github.com/llvm/llvm-project/commit/b8dcd920ec286d70976521dbc4692dc5f24dabe8
  Author: Anirudh Prasad <anirudh_prasad at hotmail.com>
  Date:   2021-05-31 (Mon, 31 May 2021)

  Changed paths:
    M llvm/lib/MC/MCParser/AsmParser.cpp

  Log Message:
  -----------
  [AsmParser][SystemZ][z/OS] Introducing HLASM Parser support to AsmParser - Part 2

- 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.

Reviewed By: uweigand

Differential Revision: https://reviews.llvm.org/D103320




More information about the All-commits mailing list