aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux/rotate/rotate.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/monniaux/rotate/rotate.c')
-rw-r--r--test/monniaux/rotate/rotate.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/monniaux/rotate/rotate.c b/test/monniaux/rotate/rotate.c
new file mode 100644
index 00000000..96f20c49
--- /dev/null
+++ b/test/monniaux/rotate/rotate.c
@@ -0,0 +1,10 @@
+#include <stdio.h>
+
+unsigned rotate(unsigned x) {
+ return (x << 4) | (x >> (32-4));
+}
+
+int main() {
+ unsigned x = 0x12345678U;
+ printf("%X %X\n", x, rotate(x));
+}