1 # RUN: llvm-mc %s -arch=mips -mcpu=mips32r2 -show-encoding 2>&1 | \
2 # RUN: FileCheck %s --check-prefix=ALL
6 beql $a2
, 0x1ffff, foo
# ALL: lui $1, 1
7 # ALL: ori $1, $1, 65535
8 # ALL: beql $6, $1, foo
9 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
11 beql $a2
, -4096, foo
# ALL: addiu $1, $zero, -4096
12 # ALL: beql $6, $1, foo
13 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
14 beql $a2
, -0x10000, foo
# ALL: lui $1, 65535
15 # ALL: beql $6, $1, foo
16 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
17 beql $a2
, 16, foo
# ALL: addiu $1, $zero, 16
18 # ALL: beql $6, $1, foo
19 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
21 bnel $a2
, 0x1ffff, foo
# ALL: lui $1, 1
22 # ALL: ori $1, $1, 65535
23 # ALL: bnel $6, $1, foo
24 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
26 bnel $a2
, -4096, foo
# ALL: addiu $1, $zero, -4096
27 # ALL: bnel $6, $1, foo
28 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
29 bnel $a2
, -0x10000, foo
# ALL: lui $1, 65535
30 # ALL: bnel $6, $1, foo
31 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
32 bnel $a2
, 16, foo
# ALL: addiu $1, $zero, 16
33 # ALL: bnel $6, $1, foo
34 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
36 beql $a2
, 32767, foo
# ALL: addiu $1, $zero, 32767
37 # ALL: beql $6, $1, foo
38 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
40 bnel $a2
, 32768, foo
# ALL: ori $1, $zero, 32768
41 # ALL: bnel $6, $1, foo
42 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
44 blt $a2
, 16, foo
# ALL: addiu $1, $zero, 16
47 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
48 ble $a2
, 16, foo
# ALL: addiu $1, $zero, 16
51 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
52 bge $a2
, 32767, foo
# ALL: addiu $1, $zero, 32767
55 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
56 bgt $a2
, 32768, foo
# ALL: ori $1, $zero, 32768
59 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
60 bltu $a2
, 16, foo
# ALL: addiu $1, $zero, 16
61 # ALL: sltu $1, $6, $1
63 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
64 bleu $a2
, 16, foo
# ALL: addiu $1, $zero, 16
65 # ALL: sltu $1, $1, $6
67 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
68 bgeu $a2
, 32767, foo
# ALL: addiu $1, $zero, 32767
69 # ALL: sltu $1, $6, $1
71 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
72 bgtu $a2
, 32768, foo
# ALL: ori $1, $zero, 32768
73 # ALL: sltu $1, $1, $6
75 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
76 bltl $a2
, 16, foo
# ALL: addiu $1, $zero, 16
79 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
80 blel $a2
, 16, foo
# ALL: addiu $1, $zero, 16
83 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
84 bgel $a2
, 32767, foo
# ALL: addiu $1, $zero, 32767
87 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
88 bgtl $a2
, 32768, foo
# ALL: ori $1, $zero, 32768
91 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
92 bltul $a2
, 16, foo
# ALL: addiu $1, $zero, 16
93 # ALL: sltu $1, $6, $1
95 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
96 bleul $a2
, 16, foo
# ALL: addiu $1, $zero, 16
97 # ALL: sltu $1, $1, $6
99 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
100 bgeul $a2
, 32767, foo
# ALL: addiu $1, $zero, 32767
101 # ALL: sltu $1, $6, $1
103 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
104 bgtul $a2
, 65536, foo
# ALL: lui $1, 1
105 # ALL: sltu $1, $1, $6
107 # ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16