diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-03-16 17:06:16 +0100 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-03-16 17:06:16 +0100 |
commit | 8155320553564674b7481b325c33845439b46b95 (patch) | |
tree | 29584e2fb6475e6938e9507893332a9e0ab3a7e8 /test/monniaux/nand | |
parent | 33648f1fbee9442190bb85fae1192b7b119daf81 (diff) | |
download | compcert-kvx-8155320553564674b7481b325c33845439b46b95.tar.gz compcert-kvx-8155320553564674b7481b325c33845439b46b95.zip |
nand is implemented
Diffstat (limited to 'test/monniaux/nand')
-rw-r--r-- | test/monniaux/nand/nand.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/monniaux/nand/nand.c b/test/monniaux/nand/nand.c index 002c2368..bcd30396 100644 --- a/test/monniaux/nand/nand.c +++ b/test/monniaux/nand/nand.c @@ -1,3 +1,14 @@ +#include <stdio.h> + unsigned not(unsigned x) { return ~x; } + +unsigned nand(unsigned x, unsigned y) { + return ~(x & y); +} + +int main() { + unsigned x = 0xF4, y = 0x33; + printf("%X\n", nand(x, y)); +} |