return -x - y;
}
+int sub4(int x) {
+ return 6 - ~x;
+}
+
int cmp1(int x, int y) {
return -x == -y;
}
return -x != 3;
}
+int and1(int a, int b) {
+ return (a|b)&a;
+}
+
+int and2(int a, int b) {
+ return (a|b) & ~(a&b);
+}
+
+int add1(int x) {
+ return x + ~x;
+}
+
int main(void)
{
#define TU(func,x,expect) \
TB(sub1, 23, 17, -691);
TB(sub2, 42, 17, 59);
TB(sub3, 42, 17, -59);
+ TU(sub4, 42, 49);
TB(cmp1, 42, 17, 0);
TB(cmp2, 42, 17, 1);
TB(cmp3, 42, 17, 0);
TT(cmp8, 42, 17, -4, 1);
TU(cmp9, -3, 1);
TU(cmp10, -3, 0);
+ TB(and1, 42, 17, 42);
+ TB(and2, 42, 17, 42^17);
+ TU(add1, -3, -1);
}