aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux/nand
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-03-16 17:06:16 +0100
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-03-16 17:06:16 +0100
commit8155320553564674b7481b325c33845439b46b95 (patch)
tree29584e2fb6475e6938e9507893332a9e0ab3a7e8 /test/monniaux/nand
parent33648f1fbee9442190bb85fae1192b7b119daf81 (diff)
downloadcompcert-kvx-8155320553564674b7481b325c33845439b46b95.tar.gz
compcert-kvx-8155320553564674b7481b325c33845439b46b95.zip
nand is implemented
Diffstat (limited to 'test/monniaux/nand')
-rw-r--r--test/monniaux/nand/nand.c11
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));
+}