aboutsummaryrefslogtreecommitdiffstats
path: root/test/MC/AsmParser
diff options
context:
space:
mode:
Diffstat (limited to 'test/MC/AsmParser')
-rw-r--r--test/MC/AsmParser/cfi-unfinished-frame.s5
-rw-r--r--test/MC/AsmParser/dg.exp5
-rw-r--r--test/MC/AsmParser/directive_file-errors.s9
-rw-r--r--test/MC/AsmParser/lit.local.cfg13
-rw-r--r--test/MC/AsmParser/pr11865.s6
-rw-r--r--test/MC/AsmParser/variables-invalid.s12
6 files changed, 44 insertions, 6 deletions
diff --git a/test/MC/AsmParser/cfi-unfinished-frame.s b/test/MC/AsmParser/cfi-unfinished-frame.s
new file mode 100644
index 0000000..1182d52
--- /dev/null
+++ b/test/MC/AsmParser/cfi-unfinished-frame.s
@@ -0,0 +1,5 @@
+// RUN: not llvm-mc -filetype=asm -triple x86_64-pc-linux-gnu %s -o %t 2>%t.out
+// RUN: FileCheck -input-file=%t.out %s
+
+.cfi_startproc
+// CHECK: Unfinished frame
diff --git a/test/MC/AsmParser/dg.exp b/test/MC/AsmParser/dg.exp
deleted file mode 100644
index a6d81da..0000000
--- a/test/MC/AsmParser/dg.exp
+++ /dev/null
@@ -1,5 +0,0 @@
-load_lib llvm.exp
-
-if { [llvm_supports_target X86] } {
- RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{s}]]
-}
diff --git a/test/MC/AsmParser/directive_file-errors.s b/test/MC/AsmParser/directive_file-errors.s
new file mode 100644
index 0000000..5ae2bbe
--- /dev/null
+++ b/test/MC/AsmParser/directive_file-errors.s
@@ -0,0 +1,9 @@
+// RUN: not llvm-mc -g -triple i386-unknown-unknown %s 2> %t.err | FileCheck %s
+// RUN: FileCheck --check-prefix=CHECK-ERRORS %s < %t.err
+// Test for Bug 11740
+
+ .file "hello"
+ .file 1 "world"
+
+// CHECK: .file "hello"
+// CHECK-ERRORS:6:9: error: input can't have .file dwarf directives when -g is used to generate dwarf debug info for assembly code
diff --git a/test/MC/AsmParser/lit.local.cfg b/test/MC/AsmParser/lit.local.cfg
new file mode 100644
index 0000000..1f53769
--- /dev/null
+++ b/test/MC/AsmParser/lit.local.cfg
@@ -0,0 +1,13 @@
+config.suffixes = ['.s']
+
+def getRoot(config):
+ if not config.parent:
+ return config
+ return getRoot(config.parent)
+
+root = getRoot(config)
+
+targets = set(root.targets_to_build.split())
+if not 'X86' in targets:
+ config.unsupported = True
+
diff --git a/test/MC/AsmParser/pr11865.s b/test/MC/AsmParser/pr11865.s
new file mode 100644
index 0000000..1c03e11
--- /dev/null
+++ b/test/MC/AsmParser/pr11865.s
@@ -0,0 +1,6 @@
+// RUN: llvm-mc -triple i386-unknown-unknown %s
+
+i:
+ .long g
+g = h
+h = i
diff --git a/test/MC/AsmParser/variables-invalid.s b/test/MC/AsmParser/variables-invalid.s
index 9656889..21758d2 100644
--- a/test/MC/AsmParser/variables-invalid.s
+++ b/test/MC/AsmParser/variables-invalid.s
@@ -2,7 +2,7 @@
// RUN: FileCheck --input-file %t %s
.data
-// CHECK: invalid assignment to 't0_v0'
+// CHECK: Recursive use of 't0_v0'
t0_v0 = t0_v0 + 1
t1_v1 = 1
@@ -15,3 +15,13 @@ t2_s0:
t3_s0 = t2_s0 + 1
// CHECK: invalid reassignment of non-absolute variable 't3_s0'
t3_s0 = 1
+
+
+// CHECK: Recursive use of 't4_s2'
+ t4_s0 = t4_s1
+ t4_s1 = t4_s2
+ t4_s2 = t4_s0
+
+// CHECK: Recursive use of 't5_s1'
+ t5_s0 = t5_s1 + 1
+ t5_s1 = t5_s0