llvm-6502/test/MC/Mips/module-directive-bad.s
Toma Tabacu 25c2850952 [mips] [IAS] Add missing constraints and improve testing for the .module 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
2015-03-06 12:15:12 +00:00

263 lines
8.5 KiB
ArmAsm

# 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