aboutsummaryrefslogtreecommitdiff
path: root/ops/sl/gen_sl.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/sl/gen_sl.sh
downloadcopyjit-422b6c976e28445d2a6e14586fa416b0f16c093f.tar.gz
copyjit-422b6c976e28445d2a6e14586fa416b0f16c093f.zip
initial commit
Diffstat (limited to 'ops/sl/gen_sl.sh')
-rwxr-xr-xops/sl/gen_sl.sh41
1 files changed, 41 insertions, 0 deletions
diff --git a/ops/sl/gen_sl.sh b/ops/sl/gen_sl.sh
new file mode 100755
index 0000000..120c956
--- /dev/null
+++ b/ops/sl/gen_sl.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+# shift left register o
+for i in $(seq 0 63); do
+ opname=slo"$i"
+ filename="$opname".c
+ echo "#include \"../common.h\"\n" \
+ "DEFINE_OP($opname) {" \
+ "NEXT_OP(sp, a, x, y, o << $i);" \
+ "}" > "$filename"
+done
+
+# shift left register x
+for i in $(seq 0 63); do
+ opname=slx"$i"
+ filename="$opname".c
+ echo "#include \"../common.h\"\n" \
+ "DEFINE_OP($opname) {" \
+ "NEXT_OP(sp, a, x << $i, y, o);" \
+ "}" > "$filename"
+done
+
+# shift left register y
+for i in $(seq 0 63); do
+ opname=sly"$i"
+ filename="$opname".c
+ echo "#include \"../common.h\"\n" \
+ "DEFINE_OP($opname) {" \
+ "NEXT_OP(sp, a, x, y << $i, o);" \
+ "}" > "$filename"
+done
+
+# shift left register a
+for i in $(seq 0 63); do
+ opname=sla"$i"
+ filename="$opname".c
+ echo "#include \"../common.h\"\n" \
+ "DEFINE_OP($opname) {" \
+ "NEXT_OP(sp, a >> $i, x, y, o);" \
+ "}" > "$filename"
+done