summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/avremu/test-suite/shift.c
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-10-14 22:25:31 +0000
committerKarl Berry <karl@freefriends.org>2014-10-14 22:25:31 +0000
commit0db489324b44568fc4fdd9d194ce6d17203fae88 (patch)
treed14c24184a6da8bdbbb2886ac268350ce77fe1e5 /Master/texmf-dist/source/latex/avremu/test-suite/shift.c
parent0f77752d377a5492ac8d36d73cb08ef7098dee64 (diff)
avremu (14oct14)
git-svn-id: svn://tug.org/texlive/trunk@35373 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/avremu/test-suite/shift.c')
-rw-r--r--Master/texmf-dist/source/latex/avremu/test-suite/shift.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/avremu/test-suite/shift.c b/Master/texmf-dist/source/latex/avremu/test-suite/shift.c
new file mode 100644
index 00000000000..fe64b4ca208
--- /dev/null
+++ b/Master/texmf-dist/source/latex/avremu/test-suite/shift.c
@@ -0,0 +1,26 @@
+#include <avr/io.h>
+
+volatile char foo[30];
+
+int main() {
+ foo[0] = 5;
+ foo[1] = 42;
+ foo[2] = foo[1] >> foo[0];
+ foo[3] = foo[1] << (foo[0]>>2);
+
+
+ asm volatile ("break");
+}
+
+/*
+ check-name: Shift Operations
+ check-start:
+ \avr@instr@stepn{1000}
+
+ \avr@test@MEM{96}{00000101} % 5
+ \avr@test@MEM{97}{00101010} % 42
+ \avr@test@MEM{98}{00000001} % 0
+ \avr@test@MEM{99}{01010100} % 42
+
+ check-end:
+*/