OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [binutils-2.20.1/] [gas/] [testsuite/] [gas/] [mips/] [mips16.s] - Blame information for rev 205

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 205 julius
# Test the mips16 instruction set.
2
 
3
        .set    mips16
4
 
5
        .macro  ldst op, reg, base
6
        \op     \reg,0(\base)
7
        \op     \reg,1(\base)
8
        \op     \reg,2(\base)
9
        \op     \reg,3(\base)
10
        \op     \reg,4(\base)
11
        \op     \reg,8(\base)
12
        \op     \reg,16(\base)
13
        \op     \reg,32(\base)
14
        \op     \reg,64(\base)
15
        \op     \reg,128(\base)
16
        \op     \reg,256(\base)
17
        \op     \reg,512(\base)
18
        \op     \reg,1024(\base)
19
        \op     \reg,2048(\base)
20
        \op     \reg,-1(\base)
21
        \op     \reg,-2(\base)
22
        \op     \reg,-3(\base)
23
        \op     \reg,-4(\base)
24
        \op     \reg,-8(\base)
25
        \op     \reg,-16(\base)
26
        \op     \reg,-32(\base)
27
        \op     \reg,-64(\base)
28
        \op     \reg,-128(\base)
29
        \op     \reg,-256(\base)
30
        \op     \reg,-512(\base)
31
        \op     \reg,-1024(\base)
32
        \op     \reg,-2048(\base)
33
        .endm
34
 
35
        .p2align 3
36
data1:
37
        .word   0
38
insns1:
39
        ldst    ld, $2, $3
40
        ld      $2,data1
41
        ld      $2,data2
42
        ld      $2,bar
43
        ld      $2,quux
44
        ldst    ld, $2, $sp
45
        ldst    lwu, $2, $3
46
        ldst    lw, $2, $3
47
        lw      $2,data1
48
        lw      $2,data2
49
        lw      $2,bar
50
        lw      $2,quux
51
        ldst    lw, $2, $sp
52
        ldst    lh, $2, $3
53
        ldst    lhu, $2, $3
54
        ldst    lb, $2, $3
55
        ldst    lbu, $2, $3
56
        ldst    sd, $2, $3
57
        ldst    sd, $2, $sp
58
        ldst    sd, $31, $sp
59
        ldst    sw, $2, $3
60
        ldst    sw, $2, $sp
61
        ldst    sw, $31, $sp
62
        ldst    sh, $2, $3
63
        ldst    sb, $2, $3
64
 
65
        li      $2,0
66
        li      $2,1
67
        li      $2,256
68
 
69
        move    $2,$30
70
        move    $20,$2
71
 
72
        daddu   $2,$3,0
73
        daddu   $2,$3,1
74
        daddu   $2,$3,-1
75
        daddu   $2,$3,16
76
        daddu   $2,$3,-16
77
        daddu   $2,$3,$4
78
        daddu   $2,0
79
        daddu   $2,1
80
        daddu   $2,-1
81
        daddu   $2,32
82
        daddu   $2,-32
83
        daddu   $2,128
84
        daddu   $2,-128
85
        dla     $2,data1
86
        dla     $2,data2
87
        dla     $2,bar
88
        dla     $2,quux
89
        daddu   $sp,0
90
        daddu   $sp,1
91
        daddu   $sp,-1
92
        daddu   $sp,256
93
        daddu   $sp,-256
94
        daddu   $2,$sp,0
95
        daddu   $2,$sp,1
96
        daddu   $2,$sp,-1
97
        daddu   $2,$sp,32
98
        daddu   $2,$sp,-32
99
        daddu   $2,$sp,128
100
        daddu   $2,$sp,-128
101
 
102
        addu    $2,$3,0
103
        addu    $2,$3,1
104
        addu    $2,$3,-1
105
        addu    $2,$3,16
106
        addu    $2,$3,-16
107
        addu    $2,$3,$4
108
        addu    $2,0
109
        addu    $2,1
110
        addu    $2,-1
111
        addu    $2,32
112
        addu    $2,-32
113
        addu    $2,128
114
        addu    $2,-128
115
        la      $2,data1
116
        la      $2,data2
117
        la      $2,bar
118
        la      $2,quux
119
        addu    $sp,0
120
        addu    $sp,1
121
        addu    $sp,-1
122
        addu    $sp,256
123
        addu    $sp,-256
124
        addu    $2,$sp,0
125
        addu    $2,$sp,1
126
        addu    $2,$sp,-1
127
        addu    $2,$sp,32
128
        addu    $2,$sp,-32
129
        addu    $2,$sp,128
130
        addu    $2,$sp,-128
131
 
132
data2:
133
        .word   0
134
insns2:
135
        dsubu   $2,$3,$4
136
        subu    $2,$3,$4
137
        neg     $2,$3
138
 
139
        and     $2,$3
140
        or      $2,$3
141
        xor     $2,$3
142
        not     $2,$3
143
 
144
        slt     $2,0
145
        slt     $2,1
146
        slt     $2,-1
147
        slt     $2,255
148
        slt     $2,256
149
        slt     $2,$3
150
        sltu    $2,0
151
        sltu    $2,1
152
        sltu    $2,-1
153
        sltu    $2,255
154
        sltu    $2,256
155
        sltu    $2,$3
156
        cmp     $2,0
157
        cmp     $2,1
158
        cmp     $2,255
159
        cmp     $2,256
160
        cmp     $2,$3
161
 
162
        dsll    $2,$3,0
163
        dsll    $2,$3,1
164
        dsll    $2,$3,8
165
        dsll    $2,$3,9
166
        dsll    $2,$3,63
167
        dsll    $2,$3
168
        dsrl    $2,0
169
        dsrl    $2,1
170
        dsrl    $2,8
171
        dsrl    $2,9
172
        dsrl    $2,63
173
        dsrl    $2,$3
174
        dsra    $2,0
175
        dsra    $2,1
176
        dsra    $2,8
177
        dsra    $2,9
178
        dsra    $2,63
179
        dsra    $2,$3
180
 
181
        mflo    $2
182
        mfhi    $3
183
 
184
        sll     $2,$3,0
185
        sll     $2,$3,1
186
        sll     $2,$3,8
187
        sll     $2,$3,9
188
        sll     $2,$3,31
189
        sll     $2,$3
190
        srl     $2,$3,0
191
        srl     $2,$3,1
192
        srl     $2,$3,8
193
        srl     $2,$3,9
194
        srl     $2,$3,31
195
        srl     $2,$3
196
        sra     $2,$3,0
197
        sra     $2,$3,1
198
        sra     $2,$3,8
199
        sra     $2,$3,9
200
        sra     $2,$3,31
201
        sra     $2,$3
202
 
203
        dmult   $2,$3
204
        dmultu  $2,$3
205
        ddiv    $2,$3
206
        ddivu   $2,$3
207
 
208
        mult    $2,$3
209
        multu   $2,$3
210
        div     $2,$3
211
        divu    $2,$3
212
 
213
        jr      $2
214
        jr      $31
215
        jalr    $31,$2
216
 
217
        beqz    $2,insns1
218
        beqz    $2,insns2
219
        beqz    $2,bar
220
        beqz    $2,quux
221
        bnez    $2,insns1
222
        bnez    $2,insns2
223
        bnez    $2,bar
224
        bnez    $2,quux
225
        bteqz   insns1
226
        bteqz   insns2
227
        bteqz   bar
228
        bteqz   quux
229
        btnez   insns1
230
        btnez   insns2
231
        btnez   bar
232
        btnez   quux
233
        b       insns1
234
        b       insns2
235
        b       bar
236
        b       quux
237
 
238
        break   0
239
        break   1
240
        break   63
241
 
242
        jal     extern
243
 
244
        entry
245
        entry   $4
246
        entry   $4-$6,$16
247
        entry   $16-$17,$31
248
        entry   $31
249
        exit
250
        exit    $16
251
        exit    $16-$17,$31
252
        exit    $31
253
 
254
        .p2align 3
255
bar:
256
 
257
        .skip   200
258
quux:

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.