forked from llvm-mirror/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mips] [IAS] Add missing constraints and improve testing for the .mod…
…ule directive. Summary: None of the .set directives can be used before the .module directives. The .set mips0/pop/push were not triggering this constraint. Also added testing for all the other implemented directives which are supposed to trigger this constraint. Reviewers: dsanders Reviewed By: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7140 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231465 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
Toma Tabacu
committed
Mar 6, 2015
1 parent
90e6a21
commit 25c2850
Showing
5 changed files
with
303 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,262 @@ | ||
# RUN: not llvm-mc -triple mips-unknown-unknown %s 2>%t1 | ||
# RUN: FileCheck %s < %t1 | ||
|
||
.set mips0 | ||
.module fp=64 | ||
# CHECK: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.llvm_internal_mips_reallow_module_directive | ||
.module fp=32 | ||
# CHECK-NOT: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.set mips1 | ||
.module fp=64 | ||
# CHECK: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.llvm_internal_mips_reallow_module_directive | ||
.module fp=32 | ||
# CHECK-NOT: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.set mips2 | ||
.module fp=64 | ||
# CHECK: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.llvm_internal_mips_reallow_module_directive | ||
.module fp=32 | ||
# CHECK-NOT: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.set mips3 | ||
.module fp=64 | ||
# CHECK: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.llvm_internal_mips_reallow_module_directive | ||
.module fp=32 | ||
# CHECK-NOT: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.set mips4 | ||
.module fp=64 | ||
# CHECK: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.llvm_internal_mips_reallow_module_directive | ||
.module fp=32 | ||
# CHECK-NOT: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.set mips5 | ||
.module fp=64 | ||
# CHECK: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.llvm_internal_mips_reallow_module_directive | ||
.module fp=32 | ||
# CHECK-NOT: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.set mips32 | ||
.module fp=64 | ||
# CHECK: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.llvm_internal_mips_reallow_module_directive | ||
.module fp=32 | ||
# CHECK-NOT: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.set mips32r2 | ||
.module fp=64 | ||
# CHECK: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.llvm_internal_mips_reallow_module_directive | ||
.module fp=32 | ||
# CHECK-NOT: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.set mips32r6 | ||
.module fp=64 | ||
# CHECK: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.llvm_internal_mips_reallow_module_directive | ||
.module fp=32 | ||
# CHECK-NOT: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.set mips64 | ||
.module fp=64 | ||
# CHECK: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.llvm_internal_mips_reallow_module_directive | ||
.module fp=32 | ||
# CHECK-NOT: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.set mips64r2 | ||
.module fp=64 | ||
# CHECK: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.llvm_internal_mips_reallow_module_directive | ||
.module fp=32 | ||
# CHECK-NOT: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.set mips64r6 | ||
.module fp=64 | ||
# CHECK: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.llvm_internal_mips_reallow_module_directive | ||
.module fp=32 | ||
# CHECK-NOT: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.set arch=mips32 | ||
.module fp=64 | ||
# CHECK: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.llvm_internal_mips_reallow_module_directive | ||
.module fp=32 | ||
# CHECK-NOT: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.set mips16 | ||
.module fp=64 | ||
# CHECK: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.llvm_internal_mips_reallow_module_directive | ||
.module fp=32 | ||
# CHECK-NOT: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.set nomips16 | ||
.module fp=64 | ||
# CHECK: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.llvm_internal_mips_reallow_module_directive | ||
.module fp=32 | ||
# CHECK-NOT: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.set micromips | ||
.module fp=64 | ||
# CHECK: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.llvm_internal_mips_reallow_module_directive | ||
.module fp=32 | ||
# CHECK-NOT: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.set nomicromips | ||
.module fp=64 | ||
# CHECK: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.llvm_internal_mips_reallow_module_directive | ||
.module fp=32 | ||
# CHECK-NOT: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.set msa | ||
.module fp=64 | ||
# CHECK: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.llvm_internal_mips_reallow_module_directive | ||
.module fp=32 | ||
# CHECK-NOT: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.set nomsa | ||
.module fp=64 | ||
# CHECK: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.llvm_internal_mips_reallow_module_directive | ||
.module fp=32 | ||
# CHECK-NOT: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.set dsp | ||
.module fp=64 | ||
# CHECK: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.llvm_internal_mips_reallow_module_directive | ||
.module fp=32 | ||
# CHECK-NOT: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.set nodsp | ||
.module fp=64 | ||
# CHECK: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.llvm_internal_mips_reallow_module_directive | ||
.module fp=32 | ||
# CHECK-NOT: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.set push | ||
.module fp=64 | ||
# CHECK: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.llvm_internal_mips_reallow_module_directive | ||
.module fp=32 | ||
# CHECK-NOT: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.set pop | ||
.module fp=64 | ||
# CHECK: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.llvm_internal_mips_reallow_module_directive | ||
.module fp=32 | ||
# CHECK-NOT: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.set reorder | ||
.module fp=64 | ||
# CHECK: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.llvm_internal_mips_reallow_module_directive | ||
.module fp=32 | ||
# CHECK-NOT: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.set noreorder | ||
.module fp=64 | ||
# CHECK: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.llvm_internal_mips_reallow_module_directive | ||
.module fp=32 | ||
# CHECK-NOT: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.set macro | ||
.module fp=64 | ||
# FIXME: emitDirectiveSetMacro should call forbidModuleDirective(). | ||
|
||
.llvm_internal_mips_reallow_module_directive | ||
.module fp=32 | ||
# CHECK-NOT: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.set nomacro | ||
.module fp=64 | ||
# FIXME: emitDirectiveSetNoMacro should call forbidModuleDirective(). | ||
|
||
.llvm_internal_mips_reallow_module_directive | ||
.module fp=32 | ||
# CHECK-NOT: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.set at | ||
.module fp=64 | ||
# CHECK: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.llvm_internal_mips_reallow_module_directive | ||
.module fp=32 | ||
# CHECK-NOT: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.set at=$3 | ||
.module fp=64 | ||
# CHECK: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.llvm_internal_mips_reallow_module_directive | ||
.module fp=32 | ||
# CHECK-NOT: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.set noat | ||
.module fp=64 | ||
# CHECK: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.llvm_internal_mips_reallow_module_directive | ||
.module fp=32 | ||
# CHECK-NOT: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.set fp=32 | ||
.module fp=64 | ||
# CHECK: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.llvm_internal_mips_reallow_module_directive | ||
.module fp=32 | ||
# CHECK-NOT: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.cpload $25 | ||
.module fp=64 | ||
# CHECK: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.llvm_internal_mips_reallow_module_directive | ||
.module fp=32 | ||
# CHECK-NOT: :[[@LINE-1]]:13: error: .module directive must appear before any code | ||
|
||
.cpsetup $25, 8, __cerror | ||
.module fp=64 | ||
# CHECK: :[[@LINE-1]]:13: error: .module directive must appear before any code |