diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-05-13 11:57:45 +0200 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-05-13 11:57:45 +0200 |
commit | 3db72104ad5664ed320253a342e1b26ad2f7da28 (patch) | |
tree | 7d1424c3b66d6b89a090f389ec5de4f73f0a9f3b /test/monniaux/dm_random.c | |
parent | b1b7a68222ada09b8dfaf9a5dbe2306b5fc44684 (diff) | |
download | compcert-kvx-3db72104ad5664ed320253a342e1b26ad2f7da28.tar.gz compcert-kvx-3db72104ad5664ed320253a342e1b26ad2f7da28.zip |
new example + moved random number generator to common files
Diffstat (limited to 'test/monniaux/dm_random.c')
-rw-r--r-- | test/monniaux/dm_random.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/monniaux/dm_random.c b/test/monniaux/dm_random.c new file mode 100644 index 00000000..6643b79f --- /dev/null +++ b/test/monniaux/dm_random.c @@ -0,0 +1,7 @@ +#include <stdint.h> + +static uint32_t dm_random_uint32(void) { + static uint32_t current=UINT32_C(0xDEADBEEF); + current = ((uint64_t) current << 6) % UINT32_C(4294967291); + return current; +} |