1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
|
#include <u.h>
#include <libc.h>
#include <bio.h>
#include <mach.h>
#include "arm.h"
void unimp(ulong);
void Ifcmp(ulong);
void Ifdiv(ulong);
void Ifmul(ulong);
void Ifadd(ulong);
void Ifsub(ulong);
void Ifmov(ulong);
void Icvtd(ulong);
void Icvtw(ulong);
void Icvts(ulong);
void Ifabs(ulong);
void Ifneg(ulong);
Inst cop1[] = {
{ Ifadd, "add.f", Ifloat },
{ Ifsub, "sub.f", Ifloat },
{ Ifmul, "mul.f", Ifloat },
{ Ifdiv, "div.f", Ifloat },
{ unimp, "", },
{ Ifabs, "abs.f", Ifloat },
{ Ifmov, "mov.f", Ifloat },
{ Ifneg, "neg.f", Ifloat },
{ unimp, "", },
{ unimp, "", },
{ unimp, "", },
{ unimp, "", },
{ unimp, "", },
{ unimp, "", },
{ unimp, "", },
{ unimp, "", },
{ unimp, "", },
{ unimp, "", },
{ unimp, "", },
{ unimp, "", },
{ unimp, "", },
{ unimp, "", },
{ unimp, "", },
{ unimp, "", },
{ unimp, "", },
{ unimp, "", },
{ unimp, "", },
{ unimp, "", },
{ unimp, "", },
{ unimp, "", },
{ unimp, "", },
{ unimp, "", },
{ Icvts, "cvt.s", Ifloat },
{ Icvtd, "cvt.d", Ifloat },
{ unimp, "", },
{ unimp, "", },
{ Icvtw, "cvt.w", Ifloat },
{ unimp, "", },
{ unimp, "", },
{ unimp, "", },
{ unimp, "", },
{ unimp, "", },
{ unimp, "", },
{ unimp, "", },
{ unimp, "", },
{ unimp, "", },
{ unimp, "", },
{ unimp, "", },
{ Ifcmp, "c.f", Ifloat },
{ Ifcmp, "c.un", Ifloat },
{ Ifcmp, "c.eq", Ifloat },
{ Ifcmp, "c.ueq", Ifloat },
{ Ifcmp, "c.olt", Ifloat },
{ Ifcmp, "c.ult", Ifloat },
{ Ifcmp, "c.ole", Ifloat },
{ Ifcmp, "c.ule", Ifloat },
{ Ifcmp, "c,sf", Ifloat },
{ Ifcmp, "c.ngle",Ifloat },
{ Ifcmp, "c.seq", Ifloat },
{ Ifcmp, "c.ngl", Ifloat },
{ Ifcmp, "c.lt", Ifloat },
{ Ifcmp, "c.nge", Ifloat },
{ Ifcmp, "c.le", Ifloat },
{ Ifcmp, "c.ngt", Ifloat },
{ 0 }
};
void
unimp(ulong inst)
{
print("op %d\n", inst&0x3f);
Bprint(bioout, "Unimplemented floating point Trap IR %.8lux\n", inst);
longjmp(errjmp, 0);
}
void
inval(ulong inst)
{
Bprint(bioout, "Invalid Operation Exception IR %.8lux\n", inst);
longjmp(errjmp, 0);
}
void
ifmt(int r)
{
Bprint(bioout, "Invalid Floating Data Format f%d pc 0x%lux\n", r, reg.r[15]);
longjmp(errjmp, 0);
}
void
floatop(int dst, int s1, int s2)
{
}
void
doubop(int dst, int s1, int s2)
{
}
void
Iswc1(ulong inst)
{
}
void
Ifsub(ulong ir)
{
}
void
Ifmov(ulong ir)
{
}
void
Ifabs(ulong ir)
{
}
void
Ifneg(ulong ir)
{
}
void
Icvtd(ulong ir)
{
}
void
Icvts(ulong ir)
{
}
void
Icvtw(ulong ir)
{
}
void
Ifadd(ulong ir)
{
}
void
Ifmul(ulong ir)
{
}
void
Ifdiv(ulong ir)
{
}
void
Ilwc1(ulong inst)
{
}
void
Ibcfbct(ulong inst)
{
}
void
Imtct(ulong ir)
{
}
void
Imfcf(ulong ir)
{
}
void
Icop1(ulong ir)
{
}
void
Ifcmp(ulong ir)
{
}
|