Skip to content

Commit

Permalink
[ms] [llvm-ml] Disable C-style comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ericastor committed Jun 26, 2021
1 parent 36003c2 commit e074d58
Show file tree
Hide file tree
Showing 17 changed files with 35 additions and 34 deletions.
1 change: 1 addition & 0 deletions llvm/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
Expand Up @@ -144,6 +144,7 @@ X86MCAsmInfoMicrosoftMASM::X86MCAsmInfoMicrosoftMASM(const Triple &Triple)
DollarIsPC = true;
SeparatorString = "\n";
CommentString = ";";
AllowAdditionalComments = false;
AllowQuestionAtStartOfIdentifier = true;
AllowDollarAtStartOfIdentifier = true;
AllowAtAtStartOfIdentifier = true;
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/tools/llvm-ml/basic_data.asm
@@ -1,4 +1,4 @@
# RUN: llvm-ml -filetype=s %s /Fo - | FileCheck %s
; RUN: llvm-ml -filetype=s %s /Fo - | FileCheck %s

.data
BYTE 2, 4, 6, 8
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/tools/llvm-ml/builtin_types.asm
@@ -1,4 +1,4 @@
# RUN: llvm-ml -filetype=s %s /Fo - | FileCheck %s
; RUN: llvm-ml -filetype=s %s /Fo - | FileCheck %s

.data

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/tools/llvm-ml/dot_operator.asm
@@ -1,4 +1,4 @@
# RUN: llvm-ml -m64 -filetype=s %s /Fo - | FileCheck %s
; RUN: llvm-ml -m64 -filetype=s %s /Fo - | FileCheck %s

.data

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/tools/llvm-ml/include.asm
@@ -1,4 +1,4 @@
# RUN: llvm-ml -filetype=s %s /I %S /Fo - | FileCheck %s
; RUN: llvm-ml -filetype=s %s /I %S /Fo - | FileCheck %s

include included.inc

Expand Down
10 changes: 5 additions & 5 deletions llvm/test/tools/llvm-ml/line_continuations.asm
@@ -1,17 +1,17 @@
# RUN: llvm-ml -filetype=s %s /Fo - | FileCheck %s
; RUN: llvm-ml -filetype=s %s /Fo - | FileCheck %s

.code

t1:
mov eax, \
ebx
# CHECK: t1:
# CHECK-NEXT: mov eax, ebx
; CHECK: t1:
; CHECK-NEXT: mov eax, ebx

t2:
mov eax, [ebx + \
1]
# CHECK: t2:
# CHECK-NEXT: mov eax, dword ptr [ebx + 1]
; CHECK: t2:
; CHECK-NEXT: mov eax, dword ptr [ebx + 1]

END
2 changes: 1 addition & 1 deletion llvm/test/tools/llvm-ml/ml32-context.asm
@@ -1,4 +1,4 @@
# RUN: llvm-ml -m32 -filetype=s %s /Fo - | FileCheck %s
; RUN: llvm-ml -m32 -filetype=s %s /Fo - | FileCheck %s

.386p
.model flat
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/tools/llvm-ml/proc.asm
@@ -1,5 +1,5 @@
# RUN: llvm-ml -m32 -filetype=s %s /Fo - | FileCheck %s
# RUN: llvm-ml -m64 -filetype=s %s /Fo - | FileCheck %s
; RUN: llvm-ml -m32 -filetype=s %s /Fo - | FileCheck %s
; RUN: llvm-ml -m64 -filetype=s %s /Fo - | FileCheck %s

.code

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/tools/llvm-ml/proc_frame.asm
@@ -1,4 +1,4 @@
# RUN: llvm-ml -m64 -filetype=s %s /Fo - | FileCheck %s
; RUN: llvm-ml -m64 -filetype=s %s /Fo - | FileCheck %s

.code

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/tools/llvm-ml/radix.asm
@@ -1,4 +1,4 @@
# RUN: llvm-ml -filetype=s %s /Fo - | FileCheck %s
; RUN: llvm-ml -filetype=s %s /Fo - | FileCheck %s

.code

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/tools/llvm-ml/reserved_words_conflict.asm
@@ -1,4 +1,4 @@
# RUN: llvm-ml -filetype=s %s /Fo - | FileCheck %s
; RUN: llvm-ml -filetype=s %s /Fo - | FileCheck %s

.code

Expand Down
4 changes: 2 additions & 2 deletions llvm/test/tools/llvm-ml/rip-relative-addressing.asm
@@ -1,5 +1,5 @@
# RUN: llvm-ml -m32 -filetype=s %s /Fo - | FileCheck %s --check-prefix=CHECK-32
# RUN: llvm-ml -m64 -filetype=s %s /Fo - | FileCheck %s --check-prefix=CHECK-64
; RUN: llvm-ml -m32 -filetype=s %s /Fo - | FileCheck %s --check-prefix=CHECK-32
; RUN: llvm-ml -m64 -filetype=s %s /Fo - | FileCheck %s --check-prefix=CHECK-64

.code
mov eax, [4]
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/tools/llvm-ml/run.asm
@@ -1,3 +1,3 @@
# RUN: llvm-ml --help | FileCheck %s
; RUN: llvm-ml --help | FileCheck %s

# CHECK: USAGE: llvm-ml
; CHECK: USAGE: llvm-ml
2 changes: 1 addition & 1 deletion llvm/test/tools/llvm-ml/struct.asm
@@ -1,4 +1,4 @@
# RUN: llvm-ml -m64 -filetype=s %s /Fo - | FileCheck %s
; RUN: llvm-ml -m64 -filetype=s %s /Fo - | FileCheck %s

.data
BAZ STRUCT
Expand Down
24 changes: 12 additions & 12 deletions llvm/test/tools/llvm-ml/struct_errors.asm
@@ -1,4 +1,4 @@
# RUN: not llvm-ml -filetype=s %s /Fo /dev/null 2>&1 | FileCheck %s --dump-input=always
; RUN: not llvm-ml -filetype=s %s /Fo /dev/null 2>&1 | FileCheck %s --dump-input=always

.data
int_test STRUCT
Expand All @@ -7,27 +7,27 @@ int_test STRUCT
int_test ENDS

t1 int_test <<1,2,3>>
// CHECK: error: Initializer too long for field; expected at most 2 elements, got 3
; CHECK: error: Initializer too long for field; expected at most 2 elements, got 3

t2 int_test <4>
// CHECK: error: Cannot initialize array field with scalar value
; CHECK: error: Cannot initialize array field with scalar value

t3 int_test <,<5,6>>
// CHECK: error: Cannot initialize scalar field with array value
; CHECK: error: Cannot initialize scalar field with array value

real_test STRUCT
real_arr REAL4 ?, ?, ?
real_scalar REAL4 ?
real_test ENDS

t4 real_test <<1.0,0.0,-1.0,-2.0>>
// CHECK: error: Initializer too long for field; expected at most 3 elements, got 4
; CHECK: error: Initializer too long for field; expected at most 3 elements, got 4

t5 real_test <2.0>
// CHECK: error: Cannot initialize array field with scalar value
; CHECK: error: Cannot initialize array field with scalar value

t6 real_test <,<2.0,-2.0>>
// CHECK: error: Cannot initialize scalar field with array value
; CHECK: error: Cannot initialize scalar field with array value

inner_struct STRUCT
a BYTE ?
Expand All @@ -39,19 +39,19 @@ struct_test STRUCT
struct_test ENDS

t7 struct_test <<<>, <>, <>, <>, <>>>
// CHECK: error: Initializer too long for field; expected at most 4 elements, got 5
; CHECK: error: Initializer too long for field; expected at most 4 elements, got 5

t8 struct_test <,<<>, <>>>
// CHECK: error: 'inner_struct' initializer initializes too many fields
; CHECK: error: 'inner_struct' initializer initializes too many fields

t9 STRUCT 3
// CHECK: error: alignment must be a power of two; was 3
; CHECK: error: alignment must be a power of two; was 3
t9 ENDS

t10 STRUCT 1, X
// CHECK: error: Unrecognized qualifier for 'STRUCT' directive; expected none or NONUNIQUE
; CHECK: error: Unrecognized qualifier for 'STRUCT' directive; expected none or NONUNIQUE
t10 ENDS

t11 STRUCT
different_struct ENDS
// CHECK: error: mismatched name in ENDS directive; expected 't11'
; CHECK: error: mismatched name in ENDS directive; expected 't11'
2 changes: 1 addition & 1 deletion llvm/test/tools/llvm-ml/type_operators.asm
@@ -1,4 +1,4 @@
# RUN: llvm-ml -filetype=s %s /Fo - | FileCheck %s
; RUN: llvm-ml -filetype=s %s /Fo - | FileCheck %s

.data

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/tools/llvm-ml/variable.asm
@@ -1,4 +1,4 @@
# RUN: llvm-ml -filetype=s %s /Fo - | FileCheck %s
; RUN: llvm-ml -filetype=s %s /Fo - | FileCheck %s

.data
t1_value equ 1 or 2
Expand Down

0 comments on commit e074d58

Please sign in to comment.