aboutsummaryrefslogtreecommitdiffhomepage
path: root/problems/13-Mod-3/03.vsm
blob: 571fd68aeb9d6c21071200c63bef649d58f981d3 (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
imm f"8388608" $r0/1000
imm f"0.3333333333333333333333" $r4
imm i"1" $r8/1000

# (32 / 4).times do |i|
#   j = i * 4
#   # itof
#   puts "ior $m#{j}v $r0 $nowrite"
#   puts "fvadd $aluf -$r0 $nowrite"
#   # /3
#   puts "fvmul $mauf $r4 $nowrite"
#   # floor
#   puts "ffloor $mauf $nowrite"
#   # ftoi
#   puts "fftoi $aluf $s0v"
#   # x3
#   puts "ilsl $aluf $r8 $nowrite"
#   puts "iadd $s0v $aluf $nowrite"
#   # %3
#   puts "isub $m#{j}v $aluf $n#{j}v"
#   puts
# end

ior $m0v $r0 $nowrite
fvadd $aluf -$r0 $nowrite
fvmul $mauf $r4 $nowrite
ffloor $mauf $nowrite
fftoi $aluf $s0v
ilsl $aluf $r8 $nowrite
iadd $s0v $aluf $nowrite
isub $m0v $aluf $n0v

ior $m4v $r0 $nowrite
fvadd $aluf -$r0 $nowrite
fvmul $mauf $r4 $nowrite
ffloor $mauf $nowrite
fftoi $aluf $s0v
ilsl $aluf $r8 $nowrite
iadd $s0v $aluf $nowrite
isub $m4v $aluf $n4v

ior $m8v $r0 $nowrite
fvadd $aluf -$r0 $nowrite
fvmul $mauf $r4 $nowrite
ffloor $mauf $nowrite
fftoi $aluf $s0v
ilsl $aluf $r8 $nowrite
iadd $s0v $aluf $nowrite
isub $m8v $aluf $n8v

ior $m12v $r0 $nowrite
fvadd $aluf -$r0 $nowrite
fvmul $mauf $r4 $nowrite
ffloor $mauf $nowrite
fftoi $aluf $s0v
ilsl $aluf $r8 $nowrite
iadd $s0v $aluf $nowrite
isub $m12v $aluf $n12v

ior $m16v $r0 $nowrite
fvadd $aluf -$r0 $nowrite
fvmul $mauf $r4 $nowrite
ffloor $mauf $nowrite
fftoi $aluf $s0v
ilsl $aluf $r8 $nowrite
iadd $s0v $aluf $nowrite
isub $m16v $aluf $n16v

ior $m20v $r0 $nowrite
fvadd $aluf -$r0 $nowrite
fvmul $mauf $r4 $nowrite
ffloor $mauf $nowrite
fftoi $aluf $s0v
ilsl $aluf $r8 $nowrite
iadd $s0v $aluf $nowrite
isub $m20v $aluf $n20v

ior $m24v $r0 $nowrite
fvadd $aluf -$r0 $nowrite
fvmul $mauf $r4 $nowrite
ffloor $mauf $nowrite
fftoi $aluf $s0v
ilsl $aluf $r8 $nowrite
iadd $s0v $aluf $nowrite
isub $m24v $aluf $n24v

ior $m28v $r0 $nowrite
fvadd $aluf -$r0 $nowrite
fvmul $mauf $r4 $nowrite
ffloor $mauf $nowrite
fftoi $aluf $s0v
ilsl $aluf $r8 $nowrite
iadd $s0v $aluf $nowrite
isub $m28v $aluf $n28v