diff options
Diffstat (limited to 'test/MC/Mips')
-rw-r--r-- | test/MC/Mips/elf-bigendian.ll | 6 | ||||
-rw-r--r-- | test/MC/Mips/mips-abi-bad.s | 6 | ||||
-rw-r--r-- | test/MC/Mips/mips1/valid.s | 1 | ||||
-rw-r--r-- | test/MC/Mips/mips2/valid.s | 1 | ||||
-rw-r--r-- | test/MC/Mips/mips3/valid.s | 1 | ||||
-rw-r--r-- | test/MC/Mips/mips32/valid.s | 1 | ||||
-rw-r--r-- | test/MC/Mips/mips32r2/valid.s | 1 | ||||
-rw-r--r-- | test/MC/Mips/mips32r3/valid.s | 1 | ||||
-rw-r--r-- | test/MC/Mips/mips32r5/valid.s | 1 | ||||
-rw-r--r-- | test/MC/Mips/mips32r6/valid.s | 1 | ||||
-rw-r--r-- | test/MC/Mips/mips4/valid.s | 1 | ||||
-rw-r--r-- | test/MC/Mips/mips5/valid.s | 1 | ||||
-rw-r--r-- | test/MC/Mips/mips64/valid.s | 1 | ||||
-rw-r--r-- | test/MC/Mips/mips64r2/valid.s | 1 | ||||
-rw-r--r-- | test/MC/Mips/mips64r3/valid.s | 1 | ||||
-rw-r--r-- | test/MC/Mips/mips64r5/valid.s | 1 | ||||
-rw-r--r-- | test/MC/Mips/mips64r6/valid.s | 1 | ||||
-rw-r--r-- | test/MC/Mips/module-directive-bad.s | 262 | ||||
-rw-r--r-- | test/MC/Mips/sym-offset.ll | 2 |
19 files changed, 281 insertions, 10 deletions
diff --git a/test/MC/Mips/elf-bigendian.ll b/test/MC/Mips/elf-bigendian.ll index a92fe33..4990f4e 100644 --- a/test/MC/Mips/elf-bigendian.ll +++ b/test/MC/Mips/elf-bigendian.ll @@ -43,16 +43,16 @@ target triple = "mips-unknown-linux" define i32 @main() nounwind { entry: - %0 = load i32* @x, align 4 + %0 = load i32, i32* @x, align 4 %tobool = icmp eq i32 %0, 0 br i1 %tobool, label %if.end, label %foo if.end: ; preds = %entry - %puts = tail call i32 @puts(i8* getelementptr inbounds ([4 x i8]* @str, i32 0, i32 0)) + %puts = tail call i32 @puts(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str, i32 0, i32 0)) br label %foo foo: ; preds = %entry, %if.end - %puts2 = tail call i32 @puts(i8* getelementptr inbounds ([4 x i8]* @str2, i32 0, i32 0)) + %puts2 = tail call i32 @puts(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str2, i32 0, i32 0)) ret i32 0 } diff --git a/test/MC/Mips/mips-abi-bad.s b/test/MC/Mips/mips-abi-bad.s index ba6564f..0e065bf 100644 --- a/test/MC/Mips/mips-abi-bad.s +++ b/test/MC/Mips/mips-abi-bad.s @@ -22,9 +22,3 @@ # CHECK: :[[@LINE-1]]:13: error: expected .module option identifier # CHECK-NEXT: .module 34 # CHECK-NEXT: ^ - - .set mips16 - .module fp=32 -# CHECK: :[[@LINE-1]]:13: error: .module directive must appear before any code -# CHECK-NEXT: .module fp=32 -# CHECK-NEXT: ^ diff --git a/test/MC/Mips/mips1/valid.s b/test/MC/Mips/mips1/valid.s index 53ff6a0..d18f6f5 100644 --- a/test/MC/Mips/mips1/valid.s +++ b/test/MC/Mips/mips1/valid.s @@ -116,3 +116,4 @@ tlbwi # CHECK: tlbwi # encoding: [0x42,0x00,0x00,0x02] tlbwr # CHECK: tlbwr # encoding: [0x42,0x00,0x00,0x06] xor $s2,$a0,$s8 + xor $2, 4 # CHECK: xori $2, $2, 4 # encoding: [0x38,0x42,0x00,0x04] diff --git a/test/MC/Mips/mips2/valid.s b/test/MC/Mips/mips2/valid.s index 34843bc..6ee6512 100644 --- a/test/MC/Mips/mips2/valid.s +++ b/test/MC/Mips/mips2/valid.s @@ -165,3 +165,4 @@ trunc.w.d $f22,$f15 trunc.w.s $f28,$f30 xor $s2,$a0,$s8 + xor $2, 4 # CHECK: xori $2, $2, 4 # encoding: [0x38,0x42,0x00,0x04] diff --git a/test/MC/Mips/mips3/valid.s b/test/MC/Mips/mips3/valid.s index a55576d..6d55079 100644 --- a/test/MC/Mips/mips3/valid.s +++ b/test/MC/Mips/mips3/valid.s @@ -228,3 +228,4 @@ trunc.w.d $f22,$f15 trunc.w.s $f28,$f30 xor $s2,$a0,$s8 + xor $2, 4 # CHECK: xori $2, $2, 4 # encoding: [0x38,0x42,0x00,0x04] diff --git a/test/MC/Mips/mips32/valid.s b/test/MC/Mips/mips32/valid.s index d79c390..ba75d77 100644 --- a/test/MC/Mips/mips32/valid.s +++ b/test/MC/Mips/mips32/valid.s @@ -195,3 +195,4 @@ trunc.w.d $f22,$f15 trunc.w.s $f28,$f30 xor $s2,$a0,$s8 + xor $2, 4 # CHECK: xori $2, $2, 4 # encoding: [0x38,0x42,0x00,0x04] diff --git a/test/MC/Mips/mips32r2/valid.s b/test/MC/Mips/mips32r2/valid.s index 97cfa36..61be290 100644 --- a/test/MC/Mips/mips32r2/valid.s +++ b/test/MC/Mips/mips32r2/valid.s @@ -233,4 +233,5 @@ trunc.w.s $f28,$f30 wsbh $k1,$9 xor $s2,$a0,$s8 + xor $2, 4 # CHECK: xori $2, $2, 4 # encoding: [0x38,0x42,0x00,0x04] synci -15842($a2) # CHECK: synci -15842($6) # encoding: [0x04,0xdf,0xc2,0x1e] diff --git a/test/MC/Mips/mips32r3/valid.s b/test/MC/Mips/mips32r3/valid.s index 4280de5..ff6589d 100644 --- a/test/MC/Mips/mips32r3/valid.s +++ b/test/MC/Mips/mips32r3/valid.s @@ -233,4 +233,5 @@ trunc.w.s $f28,$f30 wsbh $k1,$9 xor $s2,$a0,$s8 + xor $2, 4 # CHECK: xori $2, $2, 4 # encoding: [0x38,0x42,0x00,0x04] synci -15842($a2) # CHECK: synci -15842($6) # encoding: [0x04,0xdf,0xc2,0x1e] diff --git a/test/MC/Mips/mips32r5/valid.s b/test/MC/Mips/mips32r5/valid.s index 13341d5..408d0cc 100644 --- a/test/MC/Mips/mips32r5/valid.s +++ b/test/MC/Mips/mips32r5/valid.s @@ -233,4 +233,5 @@ trunc.w.s $f28,$f30 wsbh $k1,$9 xor $s2,$a0,$s8 + xor $2, 4 # CHECK: xori $2, $2, 4 # encoding: [0x38,0x42,0x00,0x04] synci -15842($a2) # CHECK: synci -15842($6) # encoding: [0x04,0xdf,0xc2,0x1e] diff --git a/test/MC/Mips/mips32r6/valid.s b/test/MC/Mips/mips32r6/valid.s index 362785b..7033d4a 100644 --- a/test/MC/Mips/mips32r6/valid.s +++ b/test/MC/Mips/mips32r6/valid.s @@ -175,3 +175,4 @@ tltu $16,$29,1016 # CHECK: tltu $16, $sp, 1016 # encoding: [0x02,0x1d,0xfe,0x33] tne $6,$17 # CHECK: tne $6, $17 # encoding: [0x00,0xd1,0x00,0x36] tne $7,$8,885 # CHECK: tne $7, $8, 885 # encoding: [0x00,0xe8,0xdd,0x76] + xor $2, 4 # CHECK: xori $2, $2, 4 # encoding: [0x38,0x42,0x00,0x04] diff --git a/test/MC/Mips/mips4/valid.s b/test/MC/Mips/mips4/valid.s index fc747a5..7fcf781 100644 --- a/test/MC/Mips/mips4/valid.s +++ b/test/MC/Mips/mips4/valid.s @@ -257,3 +257,4 @@ trunc.w.d $f22,$f15 trunc.w.s $f28,$f30 xor $s2,$a0,$s8 + xor $2, 4 # CHECK: xori $2, $2, 4 # encoding: [0x38,0x42,0x00,0x04] diff --git a/test/MC/Mips/mips5/valid.s b/test/MC/Mips/mips5/valid.s index 995d1a5..4b1282e 100644 --- a/test/MC/Mips/mips5/valid.s +++ b/test/MC/Mips/mips5/valid.s @@ -259,3 +259,4 @@ trunc.w.d $f22,$f15 trunc.w.s $f28,$f30 xor $s2,$a0,$s8 + xor $2, 4 # CHECK: xori $2, $2, 4 # encoding: [0x38,0x42,0x00,0x04] diff --git a/test/MC/Mips/mips64/valid.s b/test/MC/Mips/mips64/valid.s index f481a28..d900ab7 100644 --- a/test/MC/Mips/mips64/valid.s +++ b/test/MC/Mips/mips64/valid.s @@ -276,3 +276,4 @@ trunc.w.d $f22,$f15 trunc.w.s $f28,$f30 xor $s2,$a0,$s8 + xor $2, 4 # CHECK: xori $2, $2, 4 # encoding: [0x38,0x42,0x00,0x04] diff --git a/test/MC/Mips/mips64r2/valid.s b/test/MC/Mips/mips64r2/valid.s index 7717238..7193451 100644 --- a/test/MC/Mips/mips64r2/valid.s +++ b/test/MC/Mips/mips64r2/valid.s @@ -302,4 +302,5 @@ trunc.w.d $f22,$f15 trunc.w.s $f28,$f30 xor $s2,$a0,$s8 + xor $2, 4 # CHECK: xori $2, $2, 4 # encoding: [0x38,0x42,0x00,0x04] wsbh $k1,$9 diff --git a/test/MC/Mips/mips64r3/valid.s b/test/MC/Mips/mips64r3/valid.s index d8f1721..3a3f7ad 100644 --- a/test/MC/Mips/mips64r3/valid.s +++ b/test/MC/Mips/mips64r3/valid.s @@ -302,4 +302,5 @@ trunc.w.d $f22,$f15 trunc.w.s $f28,$f30 xor $s2,$a0,$s8 + xor $2, 4 # CHECK: xori $2, $2, 4 # encoding: [0x38,0x42,0x00,0x04] wsbh $k1,$9 diff --git a/test/MC/Mips/mips64r5/valid.s b/test/MC/Mips/mips64r5/valid.s index 1706852..5ba102d 100644 --- a/test/MC/Mips/mips64r5/valid.s +++ b/test/MC/Mips/mips64r5/valid.s @@ -302,4 +302,5 @@ trunc.w.d $f22,$f15 trunc.w.s $f28,$f30 xor $s2,$a0,$s8 + xor $2, 4 # CHECK: xori $2, $2, 4 # encoding: [0x38,0x42,0x00,0x04] wsbh $k1,$9 diff --git a/test/MC/Mips/mips64r6/valid.s b/test/MC/Mips/mips64r6/valid.s index 3e8fc41..600cb48 100644 --- a/test/MC/Mips/mips64r6/valid.s +++ b/test/MC/Mips/mips64r6/valid.s @@ -198,3 +198,4 @@ tltu $16,$29,1016 # CHECK: tltu $16, $sp, 1016 # encoding: [0x02,0x1d,0xfe,0x33] tne $6,$17 # CHECK: tne $6, $17 # encoding: [0x00,0xd1,0x00,0x36] tne $7,$8,885 # CHECK: tne $7, $8, 885 # encoding: [0x00,0xe8,0xdd,0x76] + xor $2, 4 # CHECK: xori $2, $2, 4 # encoding: [0x38,0x42,0x00,0x04] diff --git a/test/MC/Mips/module-directive-bad.s b/test/MC/Mips/module-directive-bad.s new file mode 100644 index 0000000..963d651 --- /dev/null +++ b/test/MC/Mips/module-directive-bad.s @@ -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 diff --git a/test/MC/Mips/sym-offset.ll b/test/MC/Mips/sym-offset.ll index c7450f7..55adc22 100644 --- a/test/MC/Mips/sym-offset.ll +++ b/test/MC/Mips/sym-offset.ll @@ -17,7 +17,7 @@ entry: ; CHECK: 0000: 00001C3C 00009C27 21E09903 0000828F ; CHECK-NEXT: 0010: 0E004188 0B004198 - %call = tail call i32 @memcmp(i8* getelementptr inbounds ([11 x i8]* @string1, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8]* @string2, i32 0, i32 0), i32 4) nounwind readonly + %call = tail call i32 @memcmp(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @string1, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @string2, i32 0, i32 0), i32 4) nounwind readonly %cmp = icmp eq i32 %call, 0 %conv = zext i1 %cmp to i32 ret i32 %conv |