diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-09-03 19:17:17 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-09-03 19:17:17 +0900 |
| commit | 2136a93910cec73d4e648894b1dcab49db954c15 (patch) | |
| tree | b63b2de567bc681a29081691b5fe81ecacece1eb | |
| parent | f6baf93269d18e65518539a5b28de2e99a7c1d61 (diff) | |
| download | mncore-challenge-2136a93910cec73d4e648894b1dcab49db954c15.tar.gz mncore-challenge-2136a93910cec73d4e648894b1dcab49db954c15.tar.zst mncore-challenge-2136a93910cec73d4e648894b1dcab49db954c15.zip | |
13-Mod-3
| -rw-r--r-- | problems/13-Mod-3/01.vsm | 151 | ||||
| -rw-r--r-- | problems/13-Mod-3/02.vsm | 86 | ||||
| -rw-r--r-- | problems/13-Mod-3/03.vsm | 94 |
3 files changed, 331 insertions, 0 deletions
diff --git a/problems/13-Mod-3/01.vsm b/problems/13-Mod-3/01.vsm new file mode 100644 index 0000000..81ed8a3 --- /dev/null +++ b/problems/13-Mod-3/01.vsm @@ -0,0 +1,151 @@ +imm f"8388608" $r0/1000 +imm f"0.3333333333333333333333" $r4 +imm i"1" $r8/1000 + +# (32 / 4).times do |i| +# j = i * 4 +# puts "# itof" +# puts "ior $m#{j}v $r0 $nowrite" +# puts "fvadd $aluf -$r0 $nowrite" +# puts "# /3" +# puts "fvmul $mauf $r4 $nowrite" +# puts "# floor" +# puts "ffloor $mauf $nowrite" +# puts "# ftoi" +# puts "fftoi $aluf $s0v" +# puts "# x3" +# puts "nop" +# puts "ilsl $s0v $r8 $nowrite" +# puts "iadd $s0v $aluf $nowrite" +# puts "# %3" +# puts "isub $m#{j}v $aluf $n#{j}v" +# puts +# end + +# itof +ior $m0v $r0 $nowrite +fvadd $aluf -$r0 $nowrite +# /3 +fvmul $mauf $r4 $nowrite +# floor +ffloor $mauf $nowrite +# ftoi +fftoi $aluf $s0v +# x3 +nop +ilsl $s0v $r8 $nowrite +iadd $s0v $aluf $nowrite +# %3 +isub $m0v $aluf $n0v + +# itof +ior $m4v $r0 $nowrite +fvadd $aluf -$r0 $nowrite +# /3 +fvmul $mauf $r4 $nowrite +# floor +ffloor $mauf $nowrite +# ftoi +fftoi $aluf $s0v +# x3 +nop +ilsl $s0v $r8 $nowrite +iadd $s0v $aluf $nowrite +# %3 +isub $m4v $aluf $n4v + +# itof +ior $m8v $r0 $nowrite +fvadd $aluf -$r0 $nowrite +# /3 +fvmul $mauf $r4 $nowrite +# floor +ffloor $mauf $nowrite +# ftoi +fftoi $aluf $s0v +# x3 +nop +ilsl $s0v $r8 $nowrite +iadd $s0v $aluf $nowrite +# %3 +isub $m8v $aluf $n8v + +# itof +ior $m12v $r0 $nowrite +fvadd $aluf -$r0 $nowrite +# /3 +fvmul $mauf $r4 $nowrite +# floor +ffloor $mauf $nowrite +# ftoi +fftoi $aluf $s0v +# x3 +nop +ilsl $s0v $r8 $nowrite +iadd $s0v $aluf $nowrite +# %3 +isub $m12v $aluf $n12v + +# itof +ior $m16v $r0 $nowrite +fvadd $aluf -$r0 $nowrite +# /3 +fvmul $mauf $r4 $nowrite +# floor +ffloor $mauf $nowrite +# ftoi +fftoi $aluf $s0v +# x3 +nop +ilsl $s0v $r8 $nowrite +iadd $s0v $aluf $nowrite +# %3 +isub $m16v $aluf $n16v + +# itof +ior $m20v $r0 $nowrite +fvadd $aluf -$r0 $nowrite +# /3 +fvmul $mauf $r4 $nowrite +# floor +ffloor $mauf $nowrite +# ftoi +fftoi $aluf $s0v +# x3 +nop +ilsl $s0v $r8 $nowrite +iadd $s0v $aluf $nowrite +# %3 +isub $m20v $aluf $n20v + +# itof +ior $m24v $r0 $nowrite +fvadd $aluf -$r0 $nowrite +# /3 +fvmul $mauf $r4 $nowrite +# floor +ffloor $mauf $nowrite +# ftoi +fftoi $aluf $s0v +# x3 +nop +ilsl $s0v $r8 $nowrite +iadd $s0v $aluf $nowrite +# %3 +isub $m24v $aluf $n24v + +# itof +ior $m28v $r0 $nowrite +fvadd $aluf -$r0 $nowrite +# /3 +fvmul $mauf $r4 $nowrite +# floor +ffloor $mauf $nowrite +# ftoi +fftoi $aluf $s0v +# x3 +nop +ilsl $s0v $r8 $nowrite +iadd $s0v $aluf $nowrite +# %3 +isub $m28v $aluf $n28v diff --git a/problems/13-Mod-3/02.vsm b/problems/13-Mod-3/02.vsm new file mode 100644 index 0000000..c857942 --- /dev/null +++ b/problems/13-Mod-3/02.vsm @@ -0,0 +1,86 @@ +ipassa $m0v $s1v2 +ipassa $m4v $s9v2 +ipassa $m8v $s17v2 +ipassa $m12v $s25v2 +ipassa $m16v $s33v2 +ipassa $m20v $s41v2 +ipassa $m24v $s49v2 +ipassa $m28v $s57v2 + +imm i"1" $r1v +imm i"2" $r2v +imm i"0" $r3v +imm i"1" $r4v +imm i"2" $r5v +imm i"0" $r6v +imm i"1" $r7v +imm i"2" $r8v +imm i"0" $r9v +imm i"1" $r10v +imm i"2" $r11v +zero $r12v + +lpassa $lr[0,2,4,6] $lm256v +lpassa $lr[8,10,0,2] $lm264v +lpassa $lr[4,6,8,10] $lm272v +lpassa $lr[0,2,4,6] $lm280v +lpassa $lr[8,10,0,2] $lm288v +lpassa $lr[4,6,8,10] $lm296v +lpassa $lr[0,2,4,6] $lm304v +lpassa $lr[8,10,0,2] $lm312v +lpassa $lr[4,6,8,10] $lm320v +lpassa $lr[0,2,4,6] $lm328v +lpassa $lr[8,10,0,2] $lm336v +lpassa $lr[4,6,8,10] $lm344v +lpassa $lr[0,2,4,6] $lm352v +lpassa $lr[8,10,0,2] $lm360v +lpassa $lr[4,6,8,10] $lm368v +lpassa $lr[0,2,4,6] $lm376v +lpassa $lr[8,10,0,2] $lm384v +lpassa $lr[4,6,8,10] $lm392v +lpassa $lr[0,2,4,6] $lm400v +lpassa $lr[8,10,0,2] $lm408v +lpassa $lr[4,6,8,10] $lm416v +lpassa $lr[0,2,4,6] $lm424v +lpassa $lr[8,10,0,2] $lm432v +lpassa $lr[4,6,8,10] $lm440v +lpassa $lr[0,2,4,6] $lm448v +lpassa $lr[8,10,0,2] $lm456v +lpassa $lr[4,6,8,10] $lm464v +lpassa $lr[0,2,4,6] $lm472v +lpassa $lr[8,10,0,2] $lm480v +lpassa $lr[4,6,8,10] $lm488v +lpassa $lr[0,2,4,6] $lm496v +lpassa $lr[8,10,0,2] $lm504v + +ipassa $ls0v $t +nop +ipassa $mt256 $n0v + +ipassa $ls8v $t +nop +ipassa $mt256 $n4v + +ipassa $ls16v $t +nop +ipassa $mt256 $n8v + +ipassa $ls24v $t +nop +ipassa $mt256 $n12v + +ipassa $ls32v $t +nop +ipassa $mt256 $n16v + +ipassa $ls40v $t +nop +ipassa $mt256 $n20v + +ipassa $ls48v $t +nop +ipassa $mt256 $n24v + +ipassa $ls56v $t +nop +ipassa $mt256 $n28v diff --git a/problems/13-Mod-3/03.vsm b/problems/13-Mod-3/03.vsm new file mode 100644 index 0000000..571fd68 --- /dev/null +++ b/problems/13-Mod-3/03.vsm @@ -0,0 +1,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 |
