xref: /aosp_15_r20/external/llvm/test/MC/Mips/mips64r6/valid.s (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker# Instructions that are valid
2*9880d681SAndroid Build Coastguard Worker#
3*9880d681SAndroid Build Coastguard Worker# Branches have some unusual encoding rules in MIPS32r6 so we need to test:
4*9880d681SAndroid Build Coastguard Worker#   rs == 0
5*9880d681SAndroid Build Coastguard Worker#   rs != 0
6*9880d681SAndroid Build Coastguard Worker#   rt == 0
7*9880d681SAndroid Build Coastguard Worker#   rt != 0
8*9880d681SAndroid Build Coastguard Worker#   rs < rt
9*9880d681SAndroid Build Coastguard Worker#   rs == rt
10*9880d681SAndroid Build Coastguard Worker#   rs > rt
11*9880d681SAndroid Build Coastguard Worker# appropriately for each branch instruction
12*9880d681SAndroid Build Coastguard Worker#
13*9880d681SAndroid Build Coastguard Worker# RUN: llvm-mc %s -triple=mips-unknown-linux -show-encoding -mcpu=mips64r6 2> %t0 | FileCheck %s
14*9880d681SAndroid Build Coastguard Worker# RUN: FileCheck %s -check-prefix=WARNING < %t0
15*9880d681SAndroid Build Coastguard Workera:
16*9880d681SAndroid Build Coastguard Worker        .set noat
17*9880d681SAndroid Build Coastguard Worker        # FIXME: Add the instructions carried forward from older ISA's
18*9880d681SAndroid Build Coastguard Worker        addiupc $4, 100          # CHECK: addiupc $4, 100     # encoding: [0xec,0x80,0x00,0x19]
19*9880d681SAndroid Build Coastguard Worker        addu    $9,10            # CHECK: addiu $9, $9, 10    # encoding: [0x25,0x29,0x00,0x0a]
20*9880d681SAndroid Build Coastguard Worker        align   $4, $2, $3, 2    # CHECK: align $4, $2, $3, 2 # encoding: [0x7c,0x43,0x22,0xa0]
21*9880d681SAndroid Build Coastguard Worker        aluipc  $3, 56           # CHECK: aluipc $3, 56       # encoding: [0xec,0x7f,0x00,0x38]
22*9880d681SAndroid Build Coastguard Worker        and     $2,4             # CHECK: andi $2, $2, 4      # encoding: [0x30,0x42,0x00,0x04]
23*9880d681SAndroid Build Coastguard Worker        aui     $3,$2,-23        # CHECK: aui $3, $2, -23     # encoding: [0x3c,0x62,0xff,0xe9]
24*9880d681SAndroid Build Coastguard Worker        auipc   $3, -1           # CHECK: auipc $3, -1        # encoding: [0xec,0x7e,0xff,0xff]
25*9880d681SAndroid Build Coastguard Worker        bal     21100            # CHECK: bal 21100           # encoding: [0x04,0x11,0x14,0x9b]
26*9880d681SAndroid Build Coastguard Worker        balc 14572256            # CHECK: balc 14572256       # encoding: [0xe8,0x37,0x96,0xb8]
27*9880d681SAndroid Build Coastguard Worker        bc 14572256              # CHECK: bc 14572256         # encoding: [0xc8,0x37,0x96,0xb8]
28*9880d681SAndroid Build Coastguard Worker        bc1eqz  $f0,4            # CHECK: bc1eqz $f0, 4       # encoding: [0x45,0x20,0x00,0x01]
29*9880d681SAndroid Build Coastguard Worker        bc1eqz  $f31,4           # CHECK: bc1eqz $f31, 4      # encoding: [0x45,0x3f,0x00,0x01]
30*9880d681SAndroid Build Coastguard Worker        bc1nez  $f0,4            # CHECK: bc1nez $f0, 4       # encoding: [0x45,0xa0,0x00,0x01]
31*9880d681SAndroid Build Coastguard Worker        bc1nez  $f31,4           # CHECK: bc1nez $f31, 4      # encoding: [0x45,0xbf,0x00,0x01]
32*9880d681SAndroid Build Coastguard Worker        bc2eqz  $0,8             # CHECK: bc2eqz $0, 8        # encoding: [0x49,0x20,0x00,0x02]
33*9880d681SAndroid Build Coastguard Worker        bc2eqz  $31,8            # CHECK: bc2eqz $31, 8       # encoding: [0x49,0x3f,0x00,0x02]
34*9880d681SAndroid Build Coastguard Worker        bc2nez  $0,8             # CHECK: bc2nez $0, 8        # encoding: [0x49,0xa0,0x00,0x02]
35*9880d681SAndroid Build Coastguard Worker        bc2nez  $31,8            # CHECK: bc2nez $31, 8       # encoding: [0x49,0xbf,0x00,0x02]
36*9880d681SAndroid Build Coastguard Worker        # beqc requires rs < rt && rs != 0 but we accept this and fix it. See also bovc.
37*9880d681SAndroid Build Coastguard Worker        beqc    $5, $6, 256      # CHECK: beqc $5, $6, 256    # encoding: [0x20,0xa6,0x00,0x40]
38*9880d681SAndroid Build Coastguard Worker        beqc    $6, $5, 256      # CHECK: beqc $6, $5, 256    # encoding: [0x20,0xa6,0x00,0x40]
39*9880d681SAndroid Build Coastguard Worker        beqzalc $2, 1332         # CHECK: beqzalc $2, 1332    # encoding: [0x20,0x02,0x01,0x4d]
40*9880d681SAndroid Build Coastguard Worker        beqzc $5, 72256          # CHECK: beqzc $5, 72256     # encoding: [0xd8,0xa0,0x46,0x90]
41*9880d681SAndroid Build Coastguard Worker        bgec $2, $3, 256         # CHECK: bgec $2, $3, 256    # encoding: [0x58,0x43,0x00,0x40]
42*9880d681SAndroid Build Coastguard Worker        bgeuc $2, $3, 256        # CHECK: bgeuc $2, $3, 256   # encoding: [0x18,0x43,0x00,0x40]
43*9880d681SAndroid Build Coastguard Worker        bgezalc $2, 1332         # CHECK: bgezalc $2, 1332    # encoding: [0x18,0x42,0x01,0x4d]
44*9880d681SAndroid Build Coastguard Worker        bgezc $5, 256            # CHECK: bgezc $5, 256       # encoding: [0x58,0xa5,0x00,0x40]
45*9880d681SAndroid Build Coastguard Worker        bgtzalc $2, 1332         # CHECK: bgtzalc $2, 1332    # encoding: [0x1c,0x02,0x01,0x4d]
46*9880d681SAndroid Build Coastguard Worker        bgtzc $5, 256            # CHECK: bgtzc $5, 256       # encoding: [0x5c,0x05,0x00,0x40]
47*9880d681SAndroid Build Coastguard Worker        bitswap $4, $2           # CHECK: bitswap $4, $2      # encoding: [0x7c,0x02,0x20,0x20]
48*9880d681SAndroid Build Coastguard Worker        blezalc $2, 1332         # CHECK: blezalc $2, 1332    # encoding: [0x18,0x02,0x01,0x4d]
49*9880d681SAndroid Build Coastguard Worker        blezc $5, 256            # CHECK: blezc $5, 256       # encoding: [0x58,0x05,0x00,0x40]
50*9880d681SAndroid Build Coastguard Worker        bltc $5, $6, 256         # CHECK: bltc $5, $6, 256    # encoding: [0x5c,0xa6,0x00,0x40]
51*9880d681SAndroid Build Coastguard Worker        bltuc $5, $6, 256        # CHECK: bltuc $5, $6, 256   # encoding: [0x1c,0xa6,0x00,0x40]
52*9880d681SAndroid Build Coastguard Worker        bltzalc $2, 1332         # CHECK: bltzalc $2, 1332    # encoding: [0x1c,0x42,0x01,0x4d]
53*9880d681SAndroid Build Coastguard Worker        bltzc $5, 256            # CHECK: bltzc $5, 256       # encoding: [0x5c,0xa5,0x00,0x40]
54*9880d681SAndroid Build Coastguard Worker        # bnec requires rs < rt && rs != 0 but we accept this and fix it. See also bnvc.
55*9880d681SAndroid Build Coastguard Worker        bnec $5, $6, 256         # CHECK: bnec $5, $6, 256    # encoding: [0x60,0xa6,0x00,0x40]
56*9880d681SAndroid Build Coastguard Worker        bnec $6, $5, 256         # CHECK: bnec $6, $5, 256    # encoding: [0x60,0xa6,0x00,0x40]
57*9880d681SAndroid Build Coastguard Worker        bnezalc $2, 1332         # CHECK: bnezalc $2, 1332    # encoding: [0x60,0x02,0x01,0x4d]
58*9880d681SAndroid Build Coastguard Worker        bnezc $5, 72256          # CHECK: bnezc $5, 72256     # encoding: [0xf8,0xa0,0x46,0x90]
59*9880d681SAndroid Build Coastguard Worker        # bnvc requires that rs >= rt but we accept both and fix this. See also bnec.
60*9880d681SAndroid Build Coastguard Worker        bnvc     $0, $0, 4       # CHECK: bnvc $zero, $zero, 4 # encoding: [0x60,0x00,0x00,0x01]
61*9880d681SAndroid Build Coastguard Worker        bnvc     $2, $0, 4       # CHECK: bnvc $2, $zero, 4    # encoding: [0x60,0x40,0x00,0x01]
62*9880d681SAndroid Build Coastguard Worker        bnvc     $2, $4, 4       # CHECK: bnvc $2, $4, 4      # encoding: [0x60,0x82,0x00,0x01]
63*9880d681SAndroid Build Coastguard Worker        # bovc requires that rs >= rt but we accept both and fix this. See also beqc.
64*9880d681SAndroid Build Coastguard Worker        bovc     $0, $0, 4       # CHECK: bovc $zero, $zero, 4 # encoding: [0x20,0x00,0x00,0x01]
65*9880d681SAndroid Build Coastguard Worker        bovc     $2, $0, 4       # CHECK: bovc $2, $zero, 4    # encoding: [0x20,0x40,0x00,0x01]
66*9880d681SAndroid Build Coastguard Worker        bovc     $2, $4, 4       # CHECK: bovc $2, $4, 4      # encoding: [0x20,0x82,0x00,0x01]
67*9880d681SAndroid Build Coastguard Worker        cache    1, 8($5)        # CHECK: cache 1, 8($5)         # encoding: [0x7c,0xa1,0x04,0x25]
68*9880d681SAndroid Build Coastguard Worker        class.d $f2, $f4         # CHECK: class.d $f2, $f4       # encoding: [0x46,0x20,0x20,0x9b]
69*9880d681SAndroid Build Coastguard Worker        class.s $f2, $f4         # CHECK: class.s $f2, $f4       # encoding: [0x46,0x00,0x20,0x9b]
70*9880d681SAndroid Build Coastguard Worker        clo     $11,$a1          # CHECK: clo $11, $5            # encoding: [0x00,0xa0,0x58,0x51]
71*9880d681SAndroid Build Coastguard Worker        clz     $sp,$gp          # CHECK: clz $sp, $gp           # encoding: [0x03,0x80,0xe8,0x50]
72*9880d681SAndroid Build Coastguard Worker        cmp.af.d   $f2,$f3,$f4      # CHECK: cmp.af.d $f2, $f3, $f4  # encoding: [0x46,0xa4,0x18,0x80]
73*9880d681SAndroid Build Coastguard Worker        cmp.af.s   $f2,$f3,$f4      # CHECK: cmp.af.s $f2, $f3, $f4  # encoding: [0x46,0x84,0x18,0x80]
74*9880d681SAndroid Build Coastguard Worker        cmp.eq.d   $f2,$f3,$f4      # CHECK: cmp.eq.d $f2, $f3, $f4  # encoding: [0x46,0xa4,0x18,0x82]
75*9880d681SAndroid Build Coastguard Worker        cmp.eq.s   $f2,$f3,$f4      # CHECK: cmp.eq.s $f2, $f3, $f4  # encoding: [0x46,0x84,0x18,0x82]
76*9880d681SAndroid Build Coastguard Worker        cmp.le.d   $f2,$f3,$f4      # CHECK: cmp.le.d  $f2, $f3, $f4  # encoding: [0x46,0xa4,0x18,0x86]
77*9880d681SAndroid Build Coastguard Worker        cmp.le.s   $f2,$f3,$f4      # CHECK: cmp.le.s  $f2, $f3, $f4  # encoding: [0x46,0x84,0x18,0x86]
78*9880d681SAndroid Build Coastguard Worker        cmp.lt.d   $f2,$f3,$f4      # CHECK: cmp.lt.d  $f2, $f3, $f4  # encoding: [0x46,0xa4,0x18,0x84]
79*9880d681SAndroid Build Coastguard Worker        cmp.lt.s   $f2,$f3,$f4      # CHECK: cmp.lt.s  $f2, $f3, $f4  # encoding: [0x46,0x84,0x18,0x84]
80*9880d681SAndroid Build Coastguard Worker        cmp.saf.d  $f2,$f3,$f4      # CHECK: cmp.saf.d $f2, $f3, $f4  # encoding: [0x46,0xa4,0x18,0x88]
81*9880d681SAndroid Build Coastguard Worker        cmp.saf.s  $f2,$f3,$f4      # CHECK: cmp.saf.s $f2, $f3, $f4  # encoding: [0x46,0x84,0x18,0x88]
82*9880d681SAndroid Build Coastguard Worker        cmp.seq.d  $f2,$f3,$f4      # CHECK: cmp.seq.d $f2, $f3, $f4  # encoding: [0x46,0xa4,0x18,0x8a]
83*9880d681SAndroid Build Coastguard Worker        cmp.seq.s  $f2,$f3,$f4      # CHECK: cmp.seq.s $f2, $f3, $f4  # encoding: [0x46,0x84,0x18,0x8a]
84*9880d681SAndroid Build Coastguard Worker        cmp.sle.d  $f2,$f3,$f4      # CHECK: cmp.sle.d $f2, $f3, $f4  # encoding: [0x46,0xa4,0x18,0x8e]
85*9880d681SAndroid Build Coastguard Worker        cmp.sle.s  $f2,$f3,$f4      # CHECK: cmp.sle.s $f2, $f3, $f4  # encoding: [0x46,0x84,0x18,0x8e]
86*9880d681SAndroid Build Coastguard Worker        cmp.slt.d  $f2,$f3,$f4      # CHECK: cmp.slt.d $f2, $f3, $f4  # encoding: [0x46,0xa4,0x18,0x8c]
87*9880d681SAndroid Build Coastguard Worker        cmp.slt.s  $f2,$f3,$f4      # CHECK: cmp.slt.s $f2, $f3, $f4  # encoding: [0x46,0x84,0x18,0x8c]
88*9880d681SAndroid Build Coastguard Worker        cmp.sueq.d $f2,$f3,$f4      # CHECK: cmp.sueq.d $f2, $f3, $f4 # encoding: [0x46,0xa4,0x18,0x8b]
89*9880d681SAndroid Build Coastguard Worker        cmp.sueq.s $f2,$f3,$f4      # CHECK: cmp.sueq.s $f2, $f3, $f4 # encoding: [0x46,0x84,0x18,0x8b]
90*9880d681SAndroid Build Coastguard Worker        cmp.sule.d $f2,$f3,$f4      # CHECK: cmp.sule.d $f2, $f3, $f4 # encoding: [0x46,0xa4,0x18,0x8f]
91*9880d681SAndroid Build Coastguard Worker        cmp.sule.s $f2,$f3,$f4      # CHECK: cmp.sule.s $f2, $f3, $f4 # encoding: [0x46,0x84,0x18,0x8f]
92*9880d681SAndroid Build Coastguard Worker        cmp.sult.d $f2,$f3,$f4      # CHECK: cmp.sult.d $f2, $f3, $f4 # encoding: [0x46,0xa4,0x18,0x8d]
93*9880d681SAndroid Build Coastguard Worker        cmp.sult.s $f2,$f3,$f4      # CHECK: cmp.sult.s $f2, $f3, $f4 # encoding: [0x46,0x84,0x18,0x8d]
94*9880d681SAndroid Build Coastguard Worker        cmp.sun.d  $f2,$f3,$f4      # CHECK: cmp.sun.d $f2, $f3, $f4  # encoding: [0x46,0xa4,0x18,0x89]
95*9880d681SAndroid Build Coastguard Worker        cmp.sun.s  $f2,$f3,$f4      # CHECK: cmp.sun.s $f2, $f3, $f4  # encoding: [0x46,0x84,0x18,0x89]
96*9880d681SAndroid Build Coastguard Worker        cmp.ueq.d  $f2,$f3,$f4      # CHECK: cmp.ueq.d $f2, $f3, $f4  # encoding: [0x46,0xa4,0x18,0x83]
97*9880d681SAndroid Build Coastguard Worker        cmp.ueq.s  $f2,$f3,$f4      # CHECK: cmp.ueq.s $f2, $f3, $f4  # encoding: [0x46,0x84,0x18,0x83]
98*9880d681SAndroid Build Coastguard Worker        cmp.ule.d  $f2,$f3,$f4      # CHECK: cmp.ule.d $f2, $f3, $f4  # encoding: [0x46,0xa4,0x18,0x87]
99*9880d681SAndroid Build Coastguard Worker        cmp.ule.s  $f2,$f3,$f4      # CHECK: cmp.ule.s $f2, $f3, $f4  # encoding: [0x46,0x84,0x18,0x87]
100*9880d681SAndroid Build Coastguard Worker        cmp.ult.d  $f2,$f3,$f4      # CHECK: cmp.ult.d $f2, $f3, $f4  # encoding: [0x46,0xa4,0x18,0x85]
101*9880d681SAndroid Build Coastguard Worker        cmp.ult.s  $f2,$f3,$f4      # CHECK: cmp.ult.s $f2, $f3, $f4  # encoding: [0x46,0x84,0x18,0x85]
102*9880d681SAndroid Build Coastguard Worker        cmp.un.d   $f2,$f3,$f4      # CHECK: cmp.un.d $f2, $f3, $f4  # encoding: [0x46,0xa4,0x18,0x81]
103*9880d681SAndroid Build Coastguard Worker        cmp.un.s   $f2,$f3,$f4      # CHECK: cmp.un.s $f2, $f3, $f4  # encoding: [0x46,0x84,0x18,0x81]
104*9880d681SAndroid Build Coastguard Worker        daddu   $19,26943        # CHECK: daddiu $19, $19, 26943 # encoding: [0x66,0x73,0x69,0x3f]
105*9880d681SAndroid Build Coastguard Worker        daddu   $24,$2,18079     # CHECK: daddiu $24, $2, 18079  # encoding: [0x64,0x58,0x46,0x9f]
106*9880d681SAndroid Build Coastguard Worker        dahi     $3,0x5678       # CHECK: dahi $3, 22136     # encoding: [0x04,0x66,0x56,0x78]
107*9880d681SAndroid Build Coastguard Worker        dalign  $4,$2,$3,5       # CHECK: dalign $4, $2, $3, 5 # encoding: [0x7c,0x43,0x23,0x64]
108*9880d681SAndroid Build Coastguard Worker        dati     $3,0xabcd       # CHECK: dati $3, -21555    # encoding: [0x04,0x7e,0xab,0xcd]
109*9880d681SAndroid Build Coastguard Worker        daui     $3,$2,0x1234    # CHECK: daui $3, $2, 4660  # encoding: [0x74,0x62,0x12,0x34]
110*9880d681SAndroid Build Coastguard Worker        dbitswap $4, $2          # CHECK: dbitswap $4, $2    # encoding: [0x7c,0x02,0x20,0x24]
111*9880d681SAndroid Build Coastguard Worker        dclo    $s2,$a2          # CHECK: dclo $18, $6           # encoding: [0x00,0xc0,0x90,0x53]
112*9880d681SAndroid Build Coastguard Worker        dclz    $s0,$25          # CHECK: dclz $16, $25          # encoding: [0x03,0x20,0x80,0x52]
113*9880d681SAndroid Build Coastguard Worker        ddiv    $2,$3,$4         # CHECK: ddiv $2, $3, $4  # encoding: [0x00,0x64,0x10,0x9e]
114*9880d681SAndroid Build Coastguard Worker        ddivu   $2,$3,$4         # CHECK: ddivu $2, $3, $4 # encoding: [0x00,0x64,0x10,0x9f]
115*9880d681SAndroid Build Coastguard Worker        di                       # CHECK: di               # encoding: [0x41,0x60,0x60,0x00]
116*9880d681SAndroid Build Coastguard Worker        di      $s8              # CHECK: di  $fp          # encoding: [0x41,0x7e,0x60,0x00]
117*9880d681SAndroid Build Coastguard Worker        div     $2,$3,$4         # CHECK: div $2, $3, $4   # encoding: [0x00,0x64,0x10,0x9a]
118*9880d681SAndroid Build Coastguard Worker        divu    $2,$3,$4         # CHECK: divu $2, $3, $4  # encoding: [0x00,0x64,0x10,0x9b]
119*9880d681SAndroid Build Coastguard Worker        dlsa    $2, $3, $4, 3    # CHECK: dlsa $2, $3, $4, 3 # encoding: [0x00,0x64,0x10,0x95]
120*9880d681SAndroid Build Coastguard Worker        dmfc0   $10, $16, 2      # CHECK: dmfc0 $10, $16, 2  # encoding: [0x40,0x2a,0x80,0x02]
121*9880d681SAndroid Build Coastguard Worker        dmod    $2,$3,$4         # CHECK: dmod $2, $3, $4  # encoding: [0x00,0x64,0x10,0xde]
122*9880d681SAndroid Build Coastguard Worker        dmodu   $2,$3,$4         # CHECK: dmodu $2, $3, $4 # encoding: [0x00,0x64,0x10,0xdf]
123*9880d681SAndroid Build Coastguard Worker        dmtc0   $4, $10, 0       # CHECK: dmtc0 $4, $10, 0 # encoding: [0x40,0xa4,0x50,0x00]
124*9880d681SAndroid Build Coastguard Worker        dmuh    $2,$3,$4         # CHECK: dmuh $2, $3, $4  # encoding: [0x00,0x64,0x10,0xdc]
125*9880d681SAndroid Build Coastguard Worker        dmuhu   $2,$3,$4         # CHECK: dmuhu $2, $3, $4 # encoding: [0x00,0x64,0x10,0xdd]
126*9880d681SAndroid Build Coastguard Worker        dmul    $2,$3,$4         # CHECK: dmul $2, $3, $4  # encoding: [0x00,0x64,0x10,0x9c]
127*9880d681SAndroid Build Coastguard Worker        dmulu   $2,$3,$4         # CHECK: dmulu $2, $3, $4 # encoding: [0x00,0x64,0x10,0x9d]
128*9880d681SAndroid Build Coastguard Worker        dneg      $2                   # CHECK: dneg $2, $2                 # encoding: [0x00,0x02,0x10,0x2e]
129*9880d681SAndroid Build Coastguard Worker        dneg      $2,$3                # CHECK: dneg $2, $3                 # encoding: [0x00,0x03,0x10,0x2e]
130*9880d681SAndroid Build Coastguard Worker        dnegu     $2,$3                # CHECK: dnegu $2, $3                # encoding: [0x00,0x03,0x10,0x2f]
131*9880d681SAndroid Build Coastguard Worker        dsubu   $14,-4586        # CHECK: daddiu $14, $14, 4586  # encoding: [0x65,0xce,0x11,0xea]
132*9880d681SAndroid Build Coastguard Worker        dsubu   $15,$11,5025     # CHECK: daddiu $15, $11, -5025 # encoding: [0x65,0x6f,0xec,0x5f]
133*9880d681SAndroid Build Coastguard Worker        ei                       # CHECK: ei               # encoding: [0x41,0x60,0x60,0x20]
134*9880d681SAndroid Build Coastguard Worker        ei      $14              # CHECK: ei  $14          # encoding: [0x41,0x6e,0x60,0x20]
135*9880d681SAndroid Build Coastguard Worker        eretnc                   # CHECK: eretnc                 # encoding: [0x42,0x00,0x00,0x58]
136*9880d681SAndroid Build Coastguard Worker        j       1f               # CHECK: j $tmp0                # encoding: [0b000010AA,A,A,A]
137*9880d681SAndroid Build Coastguard Worker                                 # CHECK:                        #   fixup A - offset: 0, value: ($tmp0), kind: fixup_Mips_26
138*9880d681SAndroid Build Coastguard Worker        j       a                # CHECK: j a                    # encoding: [0b000010AA,A,A,A]
139*9880d681SAndroid Build Coastguard Worker                                 # CHECK:                        #   fixup A - offset: 0, value: a, kind: fixup_Mips_26
140*9880d681SAndroid Build Coastguard Worker        j       1328             # CHECK: j 1328                 # encoding: [0x08,0x00,0x01,0x4c]
141*9880d681SAndroid Build Coastguard Worker        jal     21100            # CHECK: jal 21100              # encoding: [0x0c,0x00,0x14,0x9b]
142*9880d681SAndroid Build Coastguard Worker        jr.hb   $4               # CHECK: jr.hb $4               # encoding: [0x00,0x80,0x04,0x09]
143*9880d681SAndroid Build Coastguard Worker        jr      $ra              # CHECK: jr $ra                 # encoding: [0x03,0xe0,0x00,0x09]
144*9880d681SAndroid Build Coastguard Worker        jr      $25              # CHECK: jr $25                 # encoding: [0x03,0x20,0x00,0x09]
145*9880d681SAndroid Build Coastguard Worker        jrc     $27              # CHECK: jrc $27                # encoding: [0xd8,0x1b,0x00,0x00]
146*9880d681SAndroid Build Coastguard Worker        jalr.hb $4               # CHECK: jalr.hb $4             # encoding: [0x00,0x80,0xfc,0x09]
147*9880d681SAndroid Build Coastguard Worker        jalr.hb $4, $5           # CHECK: jalr.hb $4, $5         # encoding: [0x00,0xa0,0x24,0x09]
148*9880d681SAndroid Build Coastguard Worker        jalrc   $25              # CHECK: jalrc $25              # encoding: [0xf8,0x19,0x00,0x00]
149*9880d681SAndroid Build Coastguard Worker        jialc   $5, 256          # CHECK: jialc $5, 256    # encoding: [0xf8,0x05,0x01,0x00]
150*9880d681SAndroid Build Coastguard Worker        jic     $5, 256          # CHECK: jic $5, 256      # encoding: [0xd8,0x05,0x01,0x00]
151*9880d681SAndroid Build Coastguard Worker        ldc2    $8, -701($at)    # CHECK: ldc2 $8, -701($1)      # encoding: [0x49,0xc8,0x0d,0x43]
152*9880d681SAndroid Build Coastguard Worker        ldpc    $2,123456        # CHECK: ldpc $2, 123456  # encoding: [0xec,0x58,0x3c,0x48]
153*9880d681SAndroid Build Coastguard Worker        ll      $v0,-153($s2)    # CHECK: ll $2, -153($18)       # encoding: [0x7e,0x42,0xb3,0xb6]
154*9880d681SAndroid Build Coastguard Worker        lld     $zero,112($ra)   # CHECK: lld $zero, 112($ra)    # encoding: [0x7f,0xe0,0x38,0x37]
155*9880d681SAndroid Build Coastguard Worker        lsa     $2, $3, $4, 3    # CHECK: lsa  $2, $3, $4, 3     # encoding: [0x00,0x64,0x10,0x85]
156*9880d681SAndroid Build Coastguard Worker        lwc2    $18,-841($a2)    # CHECK: lwc2 $18, -841($6)     # encoding: [0x49,0x52,0x34,0xb7]
157*9880d681SAndroid Build Coastguard Worker        lwpc    $2,268           # CHECK: lwpc $2, 268     # encoding: [0xec,0x48,0x00,0x43]
158*9880d681SAndroid Build Coastguard Worker        lwupc   $2,268           # CHECK: lwupc $2, 268    # encoding: [0xec,0x50,0x00,0x43]
159*9880d681SAndroid Build Coastguard Worker        maddf.d $f2,$f3,$f4      # CHECK: maddf.d $f2, $f3, $f4  # encoding: [0x46,0x24,0x18,0x98]
160*9880d681SAndroid Build Coastguard Worker        maddf.s $f2,$f3,$f4      # CHECK: maddf.s $f2, $f3, $f4  # encoding: [0x46,0x04,0x18,0x98]
161*9880d681SAndroid Build Coastguard Worker        max.d   $f0, $f2, $f4    # CHECK: max.d $f0, $f2, $f4 # encoding: [0x46,0x24,0x10,0x1d]
162*9880d681SAndroid Build Coastguard Worker        max.s   $f0, $f2, $f4    # CHECK: max.s $f0, $f2, $f4 # encoding: [0x46,0x04,0x10,0x1d]
163*9880d681SAndroid Build Coastguard Worker        maxa.d  $f0, $f2, $f4    # CHECK: maxa.d $f0, $f2, $f4 # encoding: [0x46,0x24,0x10,0x1f]
164*9880d681SAndroid Build Coastguard Worker        maxa.s  $f0, $f2, $f4    # CHECK: maxa.s $f0, $f2, $f4 # encoding: [0x46,0x04,0x10,0x1f]
165*9880d681SAndroid Build Coastguard Worker        min.d   $f0, $f2, $f4    # CHECK: min.d $f0, $f2, $f4 # encoding: [0x46,0x24,0x10,0x1c]
166*9880d681SAndroid Build Coastguard Worker        min.s   $f0, $f2, $f4    # CHECK: min.s $f0, $f2, $f4 # encoding: [0x46,0x04,0x10,0x1c]
167*9880d681SAndroid Build Coastguard Worker        mina.d  $f0, $f2, $f4    # CHECK: mina.d $f0, $f2, $f4 # encoding: [0x46,0x24,0x10,0x1e]
168*9880d681SAndroid Build Coastguard Worker        mina.s  $f0, $f2, $f4    # CHECK: mina.s $f0, $f2, $f4 # encoding: [0x46,0x04,0x10,0x1e]
169*9880d681SAndroid Build Coastguard Worker        mfc0    $8,$15,1         # CHECK: mfc0 $8, $15, 1      # encoding: [0x40,0x08,0x78,0x01]
170*9880d681SAndroid Build Coastguard Worker        mod     $2,$3,$4         # CHECK: mod $2, $3, $4   # encoding: [0x00,0x64,0x10,0xda]
171*9880d681SAndroid Build Coastguard Worker        modu    $2,$3,$4         # CHECK: modu $2, $3, $4  # encoding: [0x00,0x64,0x10,0xdb]
172*9880d681SAndroid Build Coastguard Worker        move    $a0,$a3          # CHECK: move $4, $7             # encoding: [0x00,0xe0,0x20,0x25]
173*9880d681SAndroid Build Coastguard Worker        move    $s5,$a0          # CHECK: move $21, $4            # encoding: [0x00,0x80,0xa8,0x25]
174*9880d681SAndroid Build Coastguard Worker        move    $s8,$a0          # CHECK: move $fp, $4            # encoding: [0x00,0x80,0xf0,0x25]
175*9880d681SAndroid Build Coastguard Worker        move    $25,$a2          # CHECK: move $25, $6            # encoding: [0x00,0xc0,0xc8,0x25]
176*9880d681SAndroid Build Coastguard Worker        mtc0    $9,$15,1         # CHECK: mtc0 $9, $15, 1        # encoding: [0x40,0x89,0x78,0x01]
177*9880d681SAndroid Build Coastguard Worker        msubf.d $f2,$f3,$f4      # CHECK: msubf.d $f2, $f3, $f4  # encoding: [0x46,0x24,0x18,0x99]
178*9880d681SAndroid Build Coastguard Worker        msubf.s $f2,$f3,$f4      # CHECK: msubf.s $f2, $f3, $f4  # encoding: [0x46,0x04,0x18,0x99]
179*9880d681SAndroid Build Coastguard Worker        muh     $2,$3,$4         # CHECK: muh $2, $3, $4   # encoding: [0x00,0x64,0x10,0xd8]
180*9880d681SAndroid Build Coastguard Worker        muhu    $2,$3,$4         # CHECK: muhu $2, $3, $4  # encoding: [0x00,0x64,0x10,0xd9]
181*9880d681SAndroid Build Coastguard Worker        mul     $2,$3,$4         # CHECK: mul $2, $3, $4   # encoding: [0x00,0x64,0x10,0x98]
182*9880d681SAndroid Build Coastguard Worker        mulu    $2,$3,$4         # CHECK: mulu $2, $3, $4  # encoding: [0x00,0x64,0x10,0x99]
183*9880d681SAndroid Build Coastguard Worker        or      $2, 4            # CHECK: ori $2, $2, 4          # encoding: [0x34,0x42,0x00,0x04]
184*9880d681SAndroid Build Coastguard Worker        pref    1, 8($5)         # CHECK: pref 1, 8($5)          # encoding: [0x7c,0xa1,0x04,0x35]
185*9880d681SAndroid Build Coastguard Worker        # FIXME: Use the code generator in order to print the .set directives
186*9880d681SAndroid Build Coastguard Worker        #        instead of the instruction printer.
187*9880d681SAndroid Build Coastguard Worker        rdhwr   $sp,$11          # CHECK:      .set  push
188*9880d681SAndroid Build Coastguard Worker                                 # CHECK-NEXT: .set  mips32r2
189*9880d681SAndroid Build Coastguard Worker                                 # CHECK-NEXT: rdhwr $sp, $11
190*9880d681SAndroid Build Coastguard Worker                                 # CHECK-NEXT: .set  pop         # encoding: [0x7c,0x1d,0x58,0x3b]
191*9880d681SAndroid Build Coastguard Worker        rint.d $f2, $f4          # CHECK: rint.d $f2, $f4        # encoding: [0x46,0x20,0x20,0x9a]
192*9880d681SAndroid Build Coastguard Worker        rint.s $f2, $f4          # CHECK: rint.s $f2, $f4        # encoding: [0x46,0x00,0x20,0x9a]
193*9880d681SAndroid Build Coastguard Worker        sc      $15,-40($s3)     # CHECK: sc $15, -40($19)       # encoding: [0x7e,0x6f,0xec,0x26]
194*9880d681SAndroid Build Coastguard Worker        scd     $15,-51($sp)     # CHECK: scd $15, -51($sp)      # encoding: [0x7f,0xaf,0xe6,0xa7]
195*9880d681SAndroid Build Coastguard Worker        sdbbp                    # CHECK: sdbbp                  # encoding: [0x00,0x00,0x00,0x0e]
196*9880d681SAndroid Build Coastguard Worker        sdbbp     34             # CHECK: sdbbp 34               # encoding: [0x00,0x00,0x08,0x8e]
197*9880d681SAndroid Build Coastguard Worker        sdc2    $20,629($s2)     # CHECK: sdc2 $20, 629($18)     # encoding: [0x49,0xf4,0x92,0x75]
198*9880d681SAndroid Build Coastguard Worker        sel.d   $f0,$f1,$f2      # CHECK: sel.d $f0, $f1, $f2 # encoding: [0x46,0x22,0x08,0x10]
199*9880d681SAndroid Build Coastguard Worker        sel.s   $f0,$f1,$f2      # CHECK: sel.s $f0, $f1, $f2 # encoding: [0x46,0x02,0x08,0x10]
200*9880d681SAndroid Build Coastguard Worker        seleqz  $2,$3,$4         # CHECK: seleqz $2, $3, $4 # encoding: [0x00,0x64,0x10,0x35]
201*9880d681SAndroid Build Coastguard Worker        seleqz.d $f0, $f2, $f4   # CHECK: seleqz.d $f0, $f2, $f4 # encoding: [0x46,0x24,0x10,0x14]
202*9880d681SAndroid Build Coastguard Worker        seleqz.s $f0, $f2, $f4   # CHECK: seleqz.s $f0, $f2, $f4 # encoding: [0x46,0x04,0x10,0x14]
203*9880d681SAndroid Build Coastguard Worker        selnez  $2,$3,$4         # CHECK: selnez $2, $3, $4 # encoding: [0x00,0x64,0x10,0x37]
204*9880d681SAndroid Build Coastguard Worker        selnez.d $f0, $f2, $f4   # CHECK: selnez.d $f0, $f2, $f4 # encoding: [0x46,0x24,0x10,0x17]
205*9880d681SAndroid Build Coastguard Worker        selnez.s $f0, $f2, $f4   # CHECK: selnez.s $f0, $f2, $f4 # encoding: [0x46,0x04,0x10,0x17]
206*9880d681SAndroid Build Coastguard Worker        ssnop                    # CHECK: ssnop                  # encoding: [0x00,0x00,0x00,0x40]
207*9880d681SAndroid Build Coastguard Worker        ssnop                    # WARNING: [[@LINE]]:9: warning: ssnop is deprecated for MIPS64r6 and is equivalent to a nop instruction
208*9880d681SAndroid Build Coastguard Worker        swc2    $25,304($s0)     # CHECK: swc2 $25, 304($16)     # encoding: [0x49,0x79,0x81,0x30]
209*9880d681SAndroid Build Coastguard Worker        sync                     # CHECK: sync                   # encoding: [0x00,0x00,0x00,0x0f]
210*9880d681SAndroid Build Coastguard Worker        sync    1                # CHECK: sync 1                 # encoding: [0x00,0x00,0x00,0x4f]
211*9880d681SAndroid Build Coastguard Worker        syscall                  # CHECK: syscall                # encoding: [0x00,0x00,0x00,0x0c]
212*9880d681SAndroid Build Coastguard Worker        syscall   256            # CHECK: syscall 256            # encoding: [0x00,0x00,0x40,0x0c]
213*9880d681SAndroid Build Coastguard Worker        teq     $0,$3            # CHECK: teq $zero, $3          # encoding: [0x00,0x03,0x00,0x34]
214*9880d681SAndroid Build Coastguard Worker        teq     $5,$7,620        # CHECK: teq $5, $7, 620        # encoding: [0x00,0xa7,0x9b,0x34]
215*9880d681SAndroid Build Coastguard Worker        tge     $5,$19,340       # CHECK: tge $5, $19, 340       # encoding: [0x00,0xb3,0x55,0x30]
216*9880d681SAndroid Build Coastguard Worker        tge     $7,$10           # CHECK: tge $7, $10            # encoding: [0x00,0xea,0x00,0x30]
217*9880d681SAndroid Build Coastguard Worker        tgeu    $20,$14,379      # CHECK: tgeu $20, $14, 379     # encoding: [0x02,0x8e,0x5e,0xf1]
218*9880d681SAndroid Build Coastguard Worker        tgeu    $22,$28          # CHECK: tgeu $22, $gp          # encoding: [0x02,0xdc,0x00,0x31]
219*9880d681SAndroid Build Coastguard Worker        tlt     $15,$13          # CHECK: tlt $15, $13           # encoding: [0x01,0xed,0x00,0x32]
220*9880d681SAndroid Build Coastguard Worker        tlt     $2,$19,133       # CHECK: tlt $2, $19, 133       # encoding: [0x00,0x53,0x21,0x72]
221*9880d681SAndroid Build Coastguard Worker        tltu    $11,$16          # CHECK: tltu $11, $16          # encoding: [0x01,0x70,0x00,0x33]
222*9880d681SAndroid Build Coastguard Worker        tltu    $16,$29,1016     # CHECK: tltu $16, $sp, 1016    # encoding: [0x02,0x1d,0xfe,0x33]
223*9880d681SAndroid Build Coastguard Worker        tne     $6,$17           # CHECK: tne $6, $17            # encoding: [0x00,0xd1,0x00,0x36]
224*9880d681SAndroid Build Coastguard Worker        tne     $7,$8,885        # CHECK: tne $7, $8, 885        # encoding: [0x00,0xe8,0xdd,0x76]
225*9880d681SAndroid Build Coastguard Worker        xor     $2, 4            # CHECK: xori $2, $2, 4         # encoding: [0x38,0x42,0x00,0x04]
226*9880d681SAndroid Build Coastguard Worker
227*9880d681SAndroid Build Coastguard Worker1:
228*9880d681SAndroid Build Coastguard Worker
229*9880d681SAndroid Build Coastguard Worker        # Check that we accept traditional %relocation(symbol) offsets for stores
230*9880d681SAndroid Build Coastguard Worker        # and loads, not just a sign 16 bit offset.
231*9880d681SAndroid Build Coastguard Worker
232*9880d681SAndroid Build Coastguard Worker        lui     $2, %hi(g_8)            # CHECK:  encoding: [0x3c,0x02,A,A]
233*9880d681SAndroid Build Coastguard Worker        lb      $3, %lo(g_8)($2)        # CHECK:  encoding: [0x80,0x43,A,A]
234*9880d681SAndroid Build Coastguard Worker        lh      $3, %lo(g_8)($2)        # CHECK:  encoding: [0x84,0x43,A,A]
235*9880d681SAndroid Build Coastguard Worker        lhu     $3, %lo(g_8)($2)        # CHECK:  encoding: [0x94,0x43,A,A]
236*9880d681SAndroid Build Coastguard Worker        lw      $3, %lo(g_8)($2)        # CHECK:  encoding: [0x8c,0x43,A,A]
237*9880d681SAndroid Build Coastguard Worker        sb      $3, %lo(g_8)($2)        # CHECK:  encoding: [0xa0,0x43,A,A]
238*9880d681SAndroid Build Coastguard Worker        sh      $3, %lo(g_8)($2)        # CHECK:  encoding: [0xa4,0x43,A,A]
239*9880d681SAndroid Build Coastguard Worker        sw      $3, %lo(g_8)($2)        # CHECK:  encoding: [0xac,0x43,A,A]
240*9880d681SAndroid Build Coastguard Worker
241*9880d681SAndroid Build Coastguard Worker        lwc1    $f0, %lo(g_8)($2)       # CHECK:  encoding: [0xc4,0x40,A,A]
242*9880d681SAndroid Build Coastguard Worker        ldc1    $f0, %lo(g_8)($2)       # CHECK:  encoding: [0xd4,0x40,A,A]
243*9880d681SAndroid Build Coastguard Worker        swc1    $f0, %lo(g_8)($2)       # CHECK:  encoding: [0xe4,0x40,A,A]
244*9880d681SAndroid Build Coastguard Worker        sdc1    $f0, %lo(g_8)($2)       # CHECK:  encoding: [0xf4,0x40,A,A]
245*9880d681SAndroid Build Coastguard Worker        lwu     $3, %lo(g_8)($2)        # CHECK:  encoding: [0x9c,0x43,A,A]
246*9880d681SAndroid Build Coastguard Worker        ld      $3, %lo(g_8)($2)        # CHECK:  encoding: [0xdc,0x43,A,A]
247*9880d681SAndroid Build Coastguard Worker        sd      $3, %lo(g_8)($2)        # CHECK:  encoding: [0xfc,0x43,A,A]
248*9880d681SAndroid Build Coastguard Worker        .type   g_8,@object
249*9880d681SAndroid Build Coastguard Worker        .comm   g_8,16,16
250