bfd/
[deliverable/binutils-gdb.git] / gas / testsuite / gas / mips / micromips-size-1.s
1 # Source file used to test microMIPS instruction size overrides (#1).
2
3 .text
4 foo:
5 # Smoke-test a trivial case.
6 nop
7 nop16
8 nop32
9
10 # Test ALU operations.
11 addu $2, $4
12 addu16 $2, $4
13 addu32 $2, $4
14 addu $12, $14
15 addu32 $12, $14
16 add.ps $f2, $f4
17 add32.ps $f2, $f4
18 addiusp 256
19 addiusp16 256
20
21 # Test jumps and branches.
22 jalr $4
23 jalr16 $4
24 jalr32 $4
25 jalr $24
26 jalr16 $24
27 jalr32 $24
28 jalr $31,$5
29 jalr16 $31,$5
30 jalr32 $31,$5
31 jalr $31,$25
32 jalr16 $31,$25
33 jalr32 $31,$25
34 jalr $30,$26
35 jalr32 $30,$26
36 b bar
37 b16 bar
38 b32 bar
39 beqz $7, bar
40 beqz16 $7, bar
41 beqz32 $7, bar
42 beqz $27, bar
43 beqz32 $27, bar
44
45 # Test branch delay slots.
46 .set noreorder
47 bltzal $2, bar
48 addu $16, $17
49 bltzal $2, bar
50 addu16 $16, $17
51 bltzal $2, bar
52 addu32 $16, $17
53 bltzals $2, bar
54 addu $16, $17
55 bltzals $2, bar
56 addu16 $16, $17
57 bltzals $2, bar
58 addu32 $16, $17
59 bltzal $2, bar
60 add.ps $f2, $f4
61 bltzal $2, bar
62 add32.ps $f2, $f4
63 bltzals $2, bar
64 add.ps $f2, $f4
65 bltzals $2, bar
66 add32.ps $f2, $f4
67 bltzal $2, bar
68 addiusp 256
69 bltzal $2, bar
70 addiusp16 256
71 bltzals $2, bar
72 addiusp 256
73 bltzals $2, bar
74 addiusp16 256
75 .set reorder
76
77 # Test macro delay slots.
78 .set noreorder
79 bltzall $2, bar
80 addu $16, $17
81 bltzall $2, bar
82 addu16 $16, $17
83 bltzall $2, bar
84 addu32 $16, $17
85 bltzall $2, bar
86 add.ps $f2, $f4
87 bltzall $2, bar
88 add32.ps $f2, $f4
89 bltzall $2, bar
90 addiusp 256
91 bltzall $2, bar
92 addiusp16 256
93 .set reorder
94
95 # Test shift instructions to complement 64-bit tests.
96 sll $2, $3, 5
97 sll16 $2, $3, 5
98 sll32 $2, $3, 5
99 sll $2, $3, 13
100 sll32 $2, $3, 13
101 sll $10, $11, 5
102 sll32 $10, $11, 5
103
104 # Test 64-bit instructions.
105 dsll $2, $3, 5
106 dsll32 $2, $3, 5 # No way to force 32-bit DSLL.
107 dsll3232 $2, $3, 5
108 dsll $2, $3, 13
109 dsll32 $2, $3, 13 # No way to force 32-bit DSLL.
110 dsll3232 $2, $3, 13
111 dsll $10, $11, 5
112 dsll32 $10, $11, 5 # No way to force 32-bit DSLL.
113 dsll3232 $10, $11, 5
114
115 # Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
116 .align 2
117 .space 8
This page took 0.038569 seconds and 4 git commands to generate.