1# source file to test assembly of mips32 instructions
2
3        .set noreorder
4      .set noat
5
6      .text
7text_label:
8
9      # unprivileged CPU instructions
10
11      clo     $1, $2
12      clz     $3, $4
13      madd    $5, $6
14      maddu   $7, $8
15      msub    $9, $10
16      msubu   $11, $12
17      mul     $13, $14, $15
18      pref    4, ($16)
19      pref    4, 32767($17)
20      pref    4, -32768($18)
21      ssnop
22
23
24      # unprivileged coprocessor instructions.
25      # these tests use cp2 to avoid other (cp0, fpu, prefetch) opcodes.
26
27      bc2f    text_label
28      nop
29      bc2fl   text_label
30      nop
31      bc2t    text_label
32      nop
33      bc2tl   text_label
34      nop
35      # XXX other BCzCond encodings not currently expressable
36      cfc2    $1, $2
37      cop2    0x1234567               # disassembles as c2 ...
38      ctc2    $2, $3
39      mfc2    $3, $4
40      mfc2    $4, $5, 0               # disassembles without sel
41      mfc2    $5, $6, 7
42      mtc2    $6, $7
43      mtc2    $7, $8, 0               # disassembles without sel
44      mtc2    $8, $9, 7
45
46
47      # privileged instructions
48
49      cache   5, ($1)
50      cache   5, 32767($2)
51      cache   5, -32768($3)
52      eret
53      tlbp
54      tlbr
55      tlbwi
56      tlbwr
57      wait
58      wait    0                       # disassembles without code
59      wait    0x56789
60
61      # For a while break for the mips32 ISA interpreted a single argument
62      # as a 20-bit code, placing it in the opcode differently to
63      # traditional ISAs.  This turned out to cause problems, so it has
64      # been removed.  This test is to assure consistent interpretation.
65      break
66      break   0                       # disassembles without code
67      break   0x345
68      break   0x48,0x345              # this still specifies a 20-bit code
69
70      # Instructions in previous ISAs or CPUs which are now slightly
71      # different.
72      sdbbp
73      sdbbp   0                       # disassembles without code
74      sdbbp   0x56789
75
76# Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
77      .space  8
78