aboutsummaryrefslogtreecommitdiffhomepage
path: root/problems/04-Mul-7/02.vsm
blob: 5e1b22fd7378f6ef44a5479f5ceca4085a8c9f1c (plain)
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
imm i"3" $s1v2
imm f"8388608" $s4v
# 0x4b000000
# 0b01001011000000000000000000000000
#    eeeeeeee
imm f"7.0" $s8v

# 8x
llsl $lm0v $aluf $lr0v
llsl $lm8v $ls0v $lr8v
llsl $lm16v $ls0v $lr16v
llsl $lm24v $ls0v $lr24v
# 8x - x
lsub $lr0v $lm0v $ln0v
lsub $lr8v $lm8v $ln8v
lsub $lr16v $lm16v $ln16v
lsub $lr24v $lm24v $ln24v


ior $lm0v $ls4 $nowrite
ior $lm8v $ls4 $nowrite; fvadd $aluf -$ls4 $lr0v
ior $lm16v $ls4 $nowrite; fvadd $aluf -$ls4 $lr8v
ior $lm24v $ls4 $nowrite; fvadd $aluf -$ls4 $lr16v
fvadd $aluf -$ls4 $lr24v

fvmul $lr0v $ls8 $nowrite
fvmul $lr8v $ls8 $nowrite; fftoi $mauf $ln0v
fvmul $lr16v $ls8 $nowrite; fftoi $mauf $ln8v
fvmul $lr24v $ls8 $nowrite; fftoi $mauf $ln16v
fftoi $mauf $ln24v






# 0b01000011010000000000000000000000

imm i"0b01000011010000000000000000000000" $s4v
imm f"7.0" $s8v
imm i"0" $r12v

fvpassa $s4v $m0v2
nop
nop
dvfma $lm0v $ls8 -$lr12 $nowrite
dftoi $mauf $ln0v




imm i"0b01000011010000000000000000000000" $s4
imm f"7.0" $s8v
imm i"0" $r12v

# d getf $m0n0c0b0m0p0 8

fvpassa $s4 $m0v2
nop
nop


d getf $m0n0c0b0m0p0 8
d getd $lm0n0c0b0m0p0 4


dvadd $lm0v -$ls4 $lm0v

d getf $m0n0c0b0m0p0 8
d getd $ls4n0c0b0m0p0 1
d getd $lm0n0c0b0m0p0 4
quit

nop
dvfmau $lm0v $ls8 -$lr12 $nowrite
dvfmad $lm0v $ls8 $mauf $nowrite
dftoi $mauf $ln0v



imm i"0b01000011010000000000000000000000" $s4/1000
imm i"0b01000000000111000000000000000000" $s6/1000
imm i"0b01000011011011000000000000000000" $r12/1000

# d getf $m0n0c0b0m0p0 8

# d getd $ls4n0c0b0m0p0 1
# d getd $ls6n0c0b0m0p0 1
# d getd $lr12n0c0b0m0p0 1
# quit

fvpassa $s4 $m0v2
nop/2

# d getf $m0n0c0b0m0p0 8
# d getd $lm0n0c0b0m0p0 4
#
# dvadd $lm0v -$ls4 $lm0v
#
# d getf $m0n0c0b0m0p0 8
# d getd $lm0n0c0b0m0p0 4
# quit

dvfmau $lm0v $ls6 -$lr12 $nowrite
dvfmad $lm0v $ls6 $mauf $nowrite
dftoi $mauf $ln0v



imm i"3" $s1v2
llsl; fvpassa
lsub; fvpassa
llsl; dvfmau
lsub; dvfmad
dftoi; dvfmau
dvfmad
dftoi


###########################################

imm f"8388608" $s0v
imm f"7.0" $r0v
imm f"58720256" $s4v

ior $lm0v $ls0 $nowrite
fvfma $aluf $lr0 -$ls4 $nowrite
fftoi $mauf $ln0v

ior $lm8v $ls0 $nowrite
fvfma $aluf $lr0 -$ls4 $nowrite
fftoi $mauf $ln8v

ior $lm16v $ls0 $nowrite
fvfma $aluf $lr0 -$ls4 $nowrite
fftoi $mauf $ln16v

ior $lm24v $ls0 $nowrite
fvfma $aluf $lr0 -$ls4 $nowrite
fftoi $mauf $ln24v

###########################################

imm f"8388608" $t
imm f"7.0" $r0v
imm f"58720256" $s4v

ior $lm0v $t $nowrite
ior $lm8v $t $nowrite; fvfma $aluf $lr0 -$ls4 $nowrite
fftoi $mauf $ln0v; fvfma $aluf $lr0 -$ls4 $nowrite
fftoi $mauf $ln8v

ior $lm16v $t $nowrite
ior $lm24v $t $nowrite; fvfma $aluf $lr0 -$ls4 $nowrite
fftoi $mauf $ln16v; fvfma $aluf $lr0 -$ls4 $nowrite
fftoi $mauf $ln24v

###########################################

# TODO: 7 lines の内訳考える