From 983cab07c39a7bed288e9e953d95ffe990783825 Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Sat, 16 Mar 2019 14:07:07 +0100 Subject: 32-bit rotate finished --- test/monniaux/rotate/rotate.c | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 test/monniaux/rotate/rotate.c (limited to 'test/monniaux/rotate') 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 + +unsigned rotate(unsigned x) { + return (x << 4) | (x >> (32-4)); +} + +int main() { + unsigned x = 0x12345678U; + printf("%X %X\n", x, rotate(x)); +} -- cgit