aboutsummaryrefslogtreecommitdiffhomepage
path: root/problems/13-Mod-3/08.vsm
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-09-10 19:24:31 +0900
committernsfisis <nsfisis@gmail.com>2024-09-10 19:24:31 +0900
commitd1d6718f4fcdf3ac36403295d0cccde086fba0a3 (patch)
treee68e2eb01a14394db175afb4619f618665b30216 /problems/13-Mod-3/08.vsm
parent2dc06ea29e2900b444b85432ee67d5e2629f6e47 (diff)
downloadmncore-challenge-d1d6718f4fcdf3ac36403295d0cccde086fba0a3.tar.gz
mncore-challenge-d1d6718f4fcdf3ac36403295d0cccde086fba0a3.tar.zst
mncore-challenge-d1d6718f4fcdf3ac36403295d0cccde086fba0a3.zip
19-Inversion
Diffstat (limited to 'problems/13-Mod-3/08.vsm')
-rw-r--r--problems/13-Mod-3/08.vsm30
1 files changed, 30 insertions, 0 deletions
diff --git a/problems/13-Mod-3/08.vsm b/problems/13-Mod-3/08.vsm
new file mode 100644
index 0000000..04838b2
--- /dev/null
+++ b/problems/13-Mod-3/08.vsm
@@ -0,0 +1,30 @@
+imm f"8388608" $r0v
+imm f"0.3333333333333333333333" $r4v
+
+ior $lm0v $lr0 $nowrite
+ior $lm8v $lr0 $nowrite; fvadd $aluf -$lr0 $ls0v
+ior $lm16v $lr0 $nowrite; fvadd $aluf -$lr0 $ls8v
+ior $lm24v $lr0 $nowrite; fvadd $aluf -$lr0 $ls16v
+fvadd $aluf -$lr0 $ls24v
+
+fvmul $ls0v $lr4 $nowrite
+fvmul $ls8v $lr4 $nowrite; fftoi $mauf $ls32v
+fvmul $ls16v $lr4 $nowrite; fftoi $mauf $ls40v
+fvmul $ls24v $lr4 $nowrite; fftoi $mauf $ls48v
+fftoi $mauf $ls56v
+
+ipackbit $ls32v $lr8 $nowrite
+iadd $ls32v $aluf $nowrite
+isub $lm0v $aluf $ln0v
+
+ipackbit $ls40v $lr8 $nowrite
+iadd $ls40v $aluf $nowrite
+isub $lm8v $aluf $ln8v
+
+ipackbit $ls48v $lr8 $nowrite
+iadd $ls48v $aluf $nowrite
+isub $lm16v $aluf $ln16v
+
+ipackbit $ls56v $lr8 $nowrite
+iadd $ls56v $aluf $nowrite
+isub $lm24v $aluf $ln24v