[all-commits] [llvm/llvm-project] dc0c3f: [ms] [llvm-ml] Disambiguate size directives and va...

Eric Astor via All-commits all-commits at lists.llvm.org
Tue Jun 8 12:46:55 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dc0c3fe5f35eb5fc8d5b36bb79761fb374a87269
      https://github.com/llvm/llvm-project/commit/dc0c3fe5f35eb5fc8d5b36bb79761fb374a87269
  Author: Eric Astor <epastor at google.com>
  Date:   2021-06-08 (Tue, 08 Jun 2021)

  Changed paths:
    M llvm/lib/MC/MCParser/MasmParser.cpp
    A llvm/test/tools/llvm-ml/reserved_words_conflict.asm

  Log Message:
  -----------
  [ms] [llvm-ml] Disambiguate size directives and variable declarations

MASM allows statements of the form:
	<VAR> DWORD 5
to declare a variable with name <VAR>, while:
	call dword ptr [<value>]
is a valid instruction. To disambiguate, we recognize size directives by the trailing "ptr" token.

As discussed in https://lists.llvm.org/pipermail/llvm-dev/2021-May/150774.html

Reviewed By: rnk

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




More information about the All-commits mailing list