summaryrefslogtreecommitdiffstats
path: root/llvm/test/MC
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/MC')
-rw-r--r--llvm/test/MC/Mips/branch-pseudos-bad.s17
-rw-r--r--llvm/test/MC/Mips/branch-pseudos.s180
-rw-r--r--llvm/test/MC/Mips/mips32r6/invalid.s22
-rw-r--r--llvm/test/MC/Mips/mips64r6/invalid.s18
4 files changed, 227 insertions, 10 deletions
diff --git a/llvm/test/MC/Mips/branch-pseudos-bad.s b/llvm/test/MC/Mips/branch-pseudos-bad.s
index fcbf84af84d..3a0193b2e94 100644
--- a/llvm/test/MC/Mips/branch-pseudos-bad.s
+++ b/llvm/test/MC/Mips/branch-pseudos-bad.s
@@ -19,3 +19,20 @@ local_label:
# CHECK: :[[@LINE-1]]:3: error: pseudo-instruction requires $at, which is not available
bgtu $7, $8, local_label
# CHECK: :[[@LINE-1]]:3: error: pseudo-instruction requires $at, which is not available
+
+ bltl $7, $8, local_label
+# CHECK: :[[@LINE-1]]:3: error: pseudo-instruction requires $at, which is not available
+ bltul $7, $8, local_label
+# CHECK: :[[@LINE-1]]:3: error: pseudo-instruction requires $at, which is not available
+ blel $7, $8, local_label
+# CHECK: :[[@LINE-1]]:3: error: pseudo-instruction requires $at, which is not available
+ bleul $7, $8, local_label
+# CHECK: :[[@LINE-1]]:3: error: pseudo-instruction requires $at, which is not available
+ bgel $7, $8, local_label
+# CHECK: :[[@LINE-1]]:3: error: pseudo-instruction requires $at, which is not available
+ bgeul $7, $8, local_label
+# CHECK: :[[@LINE-1]]:3: error: pseudo-instruction requires $at, which is not available
+ bgtl $7, $8, local_label
+# CHECK: :[[@LINE-1]]:3: error: pseudo-instruction requires $at, which is not available
+ bgtul $7, $8, local_label
+# CHECK: :[[@LINE-1]]:3: error: pseudo-instruction requires $at, which is not available
diff --git a/llvm/test/MC/Mips/branch-pseudos.s b/llvm/test/MC/Mips/branch-pseudos.s
index d5b06f78d80..56841e29f42 100644
--- a/llvm/test/MC/Mips/branch-pseudos.s
+++ b/llvm/test/MC/Mips/branch-pseudos.s
@@ -187,3 +187,183 @@ local_label:
# CHECK: bnez $zero, local_label # encoding: [0x14,0x00,A,A]
# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
# CHECK: nop
+
+ bltl $7,$8,local_label
+# CHECK: slt $1, $7, $8 # encoding: [0x00,0xe8,0x08,0x2a]
+# CHECK: bnel $1, $zero, local_label # encoding: [0x54,0x20,A,A]
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+ bltl $7,$8,global_label
+# CHECK: slt $1, $7, $8 # encoding: [0x00,0xe8,0x08,0x2a]
+# CHECK: bnel $1, $zero, global_label # encoding: [0x54,0x20,A,A]
+# CHECK: # fixup A - offset: 0, value: global_label-4, kind: fixup_Mips_PC16
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+ bltl $7,$0,local_label
+# CHECK: bltz $7, local_label # encoding: [0x04,0xe0,A,A]
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+ bltl $0,$8,local_label
+# CHECK: bgtz $8, local_label # encoding: [0x1d,0x00,A,A]
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+ bltl $0,$0,local_label
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+
+ blel $7,$8,local_label
+# CHECK: slt $1, $8, $7 # encoding: [0x01,0x07,0x08,0x2a]
+# CHECK: beql $1, $zero, local_label # encoding: [0x50,0x20,A,A]
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+ blel $7,$8,global_label
+# CHECK: slt $1, $8, $7 # encoding: [0x01,0x07,0x08,0x2a]
+# CHECK: beql $1, $zero, global_label # encoding: [0x50,0x20,A,A]
+# CHECK: # fixup A - offset: 0, value: global_label-4, kind: fixup_Mips_PC16
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+ blel $7,$0,local_label
+# CHECK: blez $7, local_label # encoding: [0x18,0xe0,A,A]
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+ blel $0,$8,local_label
+# CHECK: bgez $8, local_label # encoding: [0x05,0x01,A,A]
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+ blel $0,$0,local_label
+# WARNING: :[[@LINE-1]]:3: warning: branch is always taken
+# CHECK: b local_label # encoding: [0x10,0x00,A,A]
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+
+ bgel $7,$8,local_label
+# CHECK: slt $1, $7, $8 # encoding: [0x00,0xe8,0x08,0x2a]
+# CHECK: beql $1, $zero, local_label # encoding: [0x50,0x20,A,A]
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+ bgel $7,$8,global_label
+# CHECK: slt $1, $7, $8 # encoding: [0x00,0xe8,0x08,0x2a]
+# CHECK: beql $1, $zero, global_label # encoding: [0x50,0x20,A,A]
+# CHECK: # fixup A - offset: 0, value: global_label-4, kind: fixup_Mips_PC16
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+ bgel $7,$0,local_label
+# CHECK: bgez $7, local_label # encoding: [0x04,0xe1,A,A]
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+ bgel $0,$8,local_label
+# CHECK: blez $8, local_label # encoding: [0x19,0x00,A,A]
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+ bgel $0,$0,local_label
+# WARNING: :[[@LINE-1]]:3: warning: branch is always taken
+# CHECK: b local_label # encoding: [0x10,0x00,A,A]
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+
+ bgtl $7,$8,local_label
+# CHECK: slt $1, $8, $7 # encoding: [0x01,0x07,0x08,0x2a]
+# CHECK: bnel $1, $zero, local_label # encoding: [0x54,0x20,A,A]
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+ bgtl $7,$8,global_label
+# CHECK: slt $1, $8, $7 # encoding: [0x01,0x07,0x08,0x2a]
+# CHECK: bnel $1, $zero, global_label # encoding: [0x54,0x20,A,A]
+# CHECK: # fixup A - offset: 0, value: global_label-4, kind: fixup_Mips_PC16
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+ bgtl $7,$0,local_label
+# CHECK: bgtz $7, local_label # encoding: [0x1c,0xe0,A,A]
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+ bgtl $0,$8,local_label
+# CHECK: bltz $8, local_label # encoding: [0x05,0x00,A,A]
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+ bgtl $0,$0,local_label
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+
+ bltul $7,$8,local_label
+# CHECK: sltu $1, $7, $8 # encoding: [0x00,0xe8,0x08,0x2b]
+# CHECK: bnel $1, $zero, local_label # encoding: [0x54,0x20,A,A]
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+ bltul $7,$8,global_label
+# CHECK: sltu $1, $7, $8 # encoding: [0x00,0xe8,0x08,0x2b]
+# CHECK: bnel $1, $zero, global_label # encoding: [0x54,0x20,A,A]
+# CHECK: # fixup A - offset: 0, value: global_label-4, kind: fixup_Mips_PC16
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+ bltul $7,$0,local_label
+# CHECK: bnez $7, local_label # encoding: [0x14,0xe0,A,A]
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+ bltul $0,$8,local_label
+# CHECK: bnez $8, local_label # encoding: [0x15,0x00,A,A]
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+ bltul $0,$0,local_label
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+
+ bleul $7,$8,local_label
+# CHECK: sltu $1, $8, $7 # encoding: [0x01,0x07,0x08,0x2b]
+# CHECK: beql $1, $zero, local_label # encoding: [0x50,0x20,A,A]
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+ bleul $7,$8,global_label
+# CHECK: sltu $1, $8, $7 # encoding: [0x01,0x07,0x08,0x2b]
+# CHECK: beql $1, $zero, global_label # encoding: [0x50,0x20,A,A]
+# CHECK: # fixup A - offset: 0, value: global_label-4, kind: fixup_Mips_PC16
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+ bleul $7,$0,local_label
+# CHECK: beqz $7, local_label # encoding: [0x10,0xe0,A,A]
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+ bleul $0,$8,local_label
+# CHECK: beqz $8, local_label # encoding: [0x11,0x00,A,A]
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+ bleul $0,$0,local_label
+# WARNING: :[[@LINE-1]]:3: warning: branch is always taken
+# CHECK: b local_label # encoding: [0x10,0x00,A,A]
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+
+ bgeul $7,$8,local_label
+# CHECK: sltu $1, $7, $8 # encoding: [0x00,0xe8,0x08,0x2b]
+# CHECK: beql $1, $zero, local_label # encoding: [0x50,0x20,A,A]
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+ bgeul $7,$8,global_label
+# CHECK: sltu $1, $7, $8 # encoding: [0x00,0xe8,0x08,0x2b]
+# CHECK: beql $1, $zero, global_label # encoding: [0x50,0x20,A,A]
+# CHECK: # fixup A - offset: 0, value: global_label-4, kind: fixup_Mips_PC16
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+ bgeul $7,$0,local_label
+# CHECK: beqz $7, local_label # encoding: [0x10,0xe0,A,A]
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+ bgeul $0,$8,local_label
+# CHECK: beqz $8, local_label # encoding: [0x11,0x00,A,A]
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+ bgeul $0,$0,local_label
+# WARNING: :[[@LINE-1]]:3: warning: branch is always taken
+# CHECK: b local_label # encoding: [0x10,0x00,A,A]
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+
+ bgtul $7,$8,local_label
+# CHECK: sltu $1, $8, $7 # encoding: [0x01,0x07,0x08,0x2b]
+# CHECK: bnel $1, $zero, local_label # encoding: [0x54,0x20,A,A]
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+ bgtul $7,$8,global_label
+# CHECK: sltu $1, $8, $7 # encoding: [0x01,0x07,0x08,0x2b]
+# CHECK: bnel $1, $zero, global_label # encoding: [0x54,0x20,A,A]
+# CHECK: # fixup A - offset: 0, value: global_label-4, kind: fixup_Mips_PC16
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+ bgtul $7,$0,local_label
+# CHECK: bnez $7, local_label # encoding: [0x14,0xe0,A,A]
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+ bgtul $0,$8,local_label
+# CHECK: bnez $8, local_label # encoding: [0x15,0x00,A,A]
+# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+ bgtul $0,$0,local_label
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
diff --git a/llvm/test/MC/Mips/mips32r6/invalid.s b/llvm/test/MC/Mips/mips32r6/invalid.s
index 0ce75e6143c..d10a945e3ba 100644
--- a/llvm/test/MC/Mips/mips32r6/invalid.s
+++ b/llvm/test/MC/Mips/mips32r6/invalid.s
@@ -2,17 +2,27 @@
# the assembler (e.g. invalid set of operands or operand's restrictions not met).
# RUN: not llvm-mc %s -triple=mips-unknown-linux -mcpu=mips32r6 2>%t1
-# RUN: FileCheck %s < %t1 -check-prefix=ASM
+# RUN: FileCheck %s < %t1
.text
+local_label:
.set noreorder
.set noat
- jalr.hb $31 # ASM: :[[@LINE]]:9: error: source and destination must be different
- jalr.hb $31, $31 # ASM: :[[@LINE]]:9: error: source and destination must be different
- ldc2 $8,-21181($at) # ASM: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
- sdc2 $20,23157($s2) # ASM: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
- swc2 $25,24880($s0) # ASM: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
+ jalr.hb $31 # CHECK: :[[@LINE]]:9: error: source and destination must be different
+ jalr.hb $31, $31 # CHECK: :[[@LINE]]:9: error: source and destination must be different
+ ldc2 $8,-21181($at) # CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
+ sdc2 $20,23157($s2) # CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
+ swc2 $25,24880($s0) # CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
break 1024 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: invalid operand for instruction
break 1024, 5 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: invalid operand for instruction
break 7, 1024 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: invalid operand for instruction
break 1024, 1024 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: invalid operand for instruction
+ // FIXME: Following tests are temporarely disabled, until "PredicateControl not in hierarchy" problem is resolved
+ bltl $7, $8, local_label # -CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
+ bltul $7, $8, local_label # -CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
+ blel $7, $8, local_label # -CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
+ bleul $7, $8, local_label # -CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
+ bgel $7, $8, local_label # -CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
+ bgeul $7, $8, local_label # -CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
+ bgtl $7, $8, local_label # -CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
+ bgtul $7, $8, local_label # -CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
diff --git a/llvm/test/MC/Mips/mips64r6/invalid.s b/llvm/test/MC/Mips/mips64r6/invalid.s
index ae980347f30..24a766727a1 100644
--- a/llvm/test/MC/Mips/mips64r6/invalid.s
+++ b/llvm/test/MC/Mips/mips64r6/invalid.s
@@ -2,15 +2,25 @@
# the assembler (e.g. invalid set of operands or operand's restrictions not met).
# RUN: not llvm-mc %s -triple=mips64-unknown-linux -mcpu=mips64r6 2>%t1
-# RUN: FileCheck %s < %t1 -check-prefix=ASM
+# RUN: FileCheck %s < %t1
.text
+local_label:
.set noreorder
.set noat
- jalr.hb $31 # ASM: :[[@LINE]]:9: error: source and destination must be different
- jalr.hb $31, $31 # ASM: :[[@LINE]]:9: error: source and destination must be different
- ldc2 $8,-21181($at) # ASM: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
+ jalr.hb $31 # CHECK: :[[@LINE]]:9: error: source and destination must be different
+ jalr.hb $31, $31 # CHECK: :[[@LINE]]:9: error: source and destination must be different
+ ldc2 $8,-21181($at) # CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
break 1024 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: invalid operand for instruction
break 1024, 5 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: invalid operand for instruction
break 7, 1024 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: invalid operand for instruction
break 1024, 1024 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: invalid operand for instruction
+ // FIXME: Following tests are temporarely disabled, until "PredicateControl not in hierarchy" problem is resolved
+ bltl $7, $8, local_label # -CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
+ bltul $7, $8, local_label # -CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
+ blel $7, $8, local_label # -CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
+ bleul $7, $8, local_label # -CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
+ bgel $7, $8, local_label # -CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
+ bgeul $7, $8, local_label # -CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
+ bgtl $7, $8, local_label # -CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
+ bgtul $7, $8, local_label # -CHECK: :[[@LINE]]:{{[0-9]+}}: error: instruction requires a CPU feature not currently enabled
OpenPOWER on IntegriCloud