diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-03-16 14:07:07 +0100 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-03-16 14:07:07 +0100 |
commit | 983cab07c39a7bed288e9e953d95ffe990783825 (patch) | |
tree | 6f797df094b2b0299ddd4b83af5ce3395829800b /test/monniaux/rotate | |
parent | 29d5c75e65a7fddf88bbd8c1946e700eed09dd23 (diff) | |
download | compcert-kvx-983cab07c39a7bed288e9e953d95ffe990783825.tar.gz compcert-kvx-983cab07c39a7bed288e9e953d95ffe990783825.zip |
32-bit rotate finished
Diffstat (limited to 'test/monniaux/rotate')
-rw-r--r-- | test/monniaux/rotate/rotate.c | 10 |
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)); +} |