aboutsummaryrefslogtreecommitdiff
path: root/ops/bs/gen_bs.sh
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2023-06-24 20:48:32 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2023-06-24 22:10:50 +0300
commit422b6c976e28445d2a6e14586fa416b0f16c093f (patch)
treea6bf3364cec45ed0c5d48e346a76a98fe9d0094a /ops/bs/gen_bs.sh
downloadcopyjit-422b6c976e28445d2a6e14586fa416b0f16c093f.tar.gz
copyjit-422b6c976e28445d2a6e14586fa416b0f16c093f.zip
initial commit
Diffstat (limited to 'ops/bs/gen_bs.sh')
-rwxr-xr-xops/bs/gen_bs.sh39
1 files changed, 39 insertions, 0 deletions
diff --git a/ops/bs/gen_bs.sh b/ops/bs/gen_bs.sh
new file mode 100755
index 0000000..4429d20
--- /dev/null
+++ b/ops/bs/gen_bs.sh
@@ -0,0 +1,39 @@
+# barrel shift right register o
+for i in $(seq 0 63); do
+ opname=bso"$i"
+ filename="$opname".c
+ echo -e "#include \"../common.h\"\n" \
+ "DEFINE_OP($opname) {" \
+ "NEXT_OP(sp, a, x, y, o >> $i);" \
+ "}" > "$filename"
+done
+
+# barrel shift right register x
+for i in $(seq 0 63); do
+ opname=bsx"$i"
+ filename="$opname".c
+ echo -e "#include \"../common.h\"\n" \
+ "DEFINE_OP($opname) {" \
+ "NEXT_OP(sp, a, x >> $i, y, o);" \
+ "}" > "$filename"
+done
+
+# shift right register y
+for i in $(seq 0 63); do
+ opname=bsy"$i"
+ filename="$opname".c
+ echo -e "#include \"../common.h\"\n" \
+ "DEFINE_OP($opname) {" \
+ "NEXT_OP(sp, a, x, y >> $i, o);" \
+ "}" > "$filename"
+done
+
+# shift right register a
+for i in $(seq 0 63); do
+ opname=bsa"$i"
+ filename="$opname".c
+ echo -e "#include \"../common.h\"\n" \
+ "DEFINE_OP($opname) {" \
+ "NEXT_OP(sp, a >> $i, x, y, o);" \
+ "}" > "$filename"
+done