1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00
llvm-mirror/test/tools/llvm-ml/reserved_words_conflict.asm
Eric Astor c4ebd16614 [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
2021-06-08 15:44:31 -04:00

17 lines
182 B
NASM

# RUN: llvm-ml -filetype=s %s /Fo - | FileCheck %s
.code
t1:
call dword ptr [eax]
; CHECK-LABEL: t1:
; CHECK-NEXT: call
t2 dword 5
; CHECK-LABEL: t2:
; CHECK-NEXT: .long 5
END