From 661793beb35b7023d5f1c671cc95ea35e955fd6c Mon Sep 17 00:00:00 2001 From: cmirnov Date: Wed, 14 Oct 2015 20:19:02 +0300 Subject: [PATCH 1/4] Create conditional --- conditional | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 conditional diff --git a/conditional b/conditional new file mode 100644 index 0000000..3169197 --- /dev/null +++ b/conditional @@ -0,0 +1,6 @@ +int conditional(int x, inty, int z){ + x = !!x; + x = (x << 31) >> 31; + printf("%d", (x & y) | ( (~x) & z)); + return 2; +} From da8394ff6a9526b4040a4d1340cc518f42ddef7f Mon Sep 17 00:00:00 2001 From: cmirnov Date: Fri, 23 Oct 2015 11:15:10 +0300 Subject: [PATCH 2/4] Update conditional --- conditional | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conditional b/conditional index 3169197..5d2da1f 100644 --- a/conditional +++ b/conditional @@ -1,5 +1,5 @@ int conditional(int x, inty, int z){ - x = !!x; + x = !!x; x = (x << 31) >> 31; printf("%d", (x & y) | ( (~x) & z)); return 2; From f43d22ed4b82d862f011e9d495d30e034a231b7d Mon Sep 17 00:00:00 2001 From: cmirnov Date: Fri, 23 Oct 2015 11:28:34 +0300 Subject: [PATCH 3/4] Update conditional --- conditional | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conditional b/conditional index 5d2da1f..9473f8b 100644 --- a/conditional +++ b/conditional @@ -1,6 +1,6 @@ int conditional(int x, inty, int z){ x = !!x; x = (x << 31) >> 31; - printf("%d", (x & y) | ( (~x) & z)); - return 2; + int res = (x & y) | ( (~x) & z); + return res; } From 34c51510916f1aaed6a58cfc9a695631e628e105 Mon Sep 17 00:00:00 2001 From: cmirnov Date: Tue, 27 Oct 2015 15:41:04 +0300 Subject: [PATCH 4/4] Update conditional --- conditional | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conditional b/conditional index 9473f8b..1590076 100644 --- a/conditional +++ b/conditional @@ -1,4 +1,4 @@ -int conditional(int x, inty, int z){ +int conditional(int x, int y, int z){ x = !!x; x = (x << 31) >> 31; int res = (x & y) | ( (~x) & z);