aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndrew Chambers <[email protected]>2021-10-10 15:10:47 +1300
committerAndrew Chambers <[email protected]>2021-10-10 15:10:47 +1300
commit54da6cf3b5a2ee14705857bb988af67378d4be2c (patch)
tree9448e6599416f62cd5d1d207795858af34bfc8a2 /test
parent0c15252bb0ca5a1f2f38ad2bd33c025d79590716 (diff)
Implement shift instructions.
Diffstat (limited to 'test')
-rw-r--r--test/test.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/test.sh b/test/test.sh
index f908e4a..ecc4624 100644
--- a/test/test.sh
+++ b/test/test.sh
@@ -30,6 +30,22 @@ t () {
echo -n "."
}
+for op in sal sar shl shr
+do
+t "${op} \$3, %rax"
+t "${op} %cl, %rax"
+t "${op} \$3, %eax"
+t "${op} %cl, %eax"
+t "${op} \$3, %ax"
+t "${op} %cl, %ax"
+t "${op}w \$3, (%rax)"
+t "${op}w %cl, (%rax)"
+t "${op}l \$3, (%rax)"
+t "${op}l %cl, (%rax)"
+t "${op}q \$3, (%rax)"
+t "${op}q %cl, (%rax)"
+done
+
t "div %rax"
t "divq (%rax)"
t "divq (%rip)"