1 /* Test various logical operations. */
3 TYPE
arg1 (TYPE p
, TYPE q
) { return p
& q
; } /* AND */
4 TYPE
arg2 (TYPE p
, TYPE q
) { return p
| q
; } /* OR */
5 TYPE
arg3 (TYPE p
, TYPE q
) { return p
^ q
; } /* XOR */
6 TYPE
arg4 (TYPE p
) { return ~ p
; } /* NOR */
7 TYPE
arg5 (TYPE p
, TYPE q
) { return ~(p
& q
); } /* NAND */
8 TYPE
arg6 (TYPE p
, TYPE q
) { return ~(p
| q
); } /* NOR */
9 TYPE
arg7 (TYPE p
, TYPE q
) { return ~(p
^ q
); } /* EQV */
10 TYPE
arg8 (TYPE p
, TYPE q
) { return (~p
) & q
; } /* ANDC */
11 TYPE
arg9 (TYPE p
, TYPE q
) { return (~p
) | q
; } /* ORC */
12 TYPE
arg10(TYPE p
, TYPE q
) { return (~p
) ^ q
; } /* EQV */
13 TYPE
arg11(TYPE p
, TYPE q
) { return p
& (~q
); } /* ANDC */
14 TYPE
arg12(TYPE p
, TYPE q
) { return p
| (~q
); } /* ORC */
15 TYPE
arg13(TYPE p
, TYPE q
) { return p
^ (~q
); } /* EQV */
17 void ptr1 (TYPE
*p
) { p
[0] = p
[1] & p
[2]; } /* AND */
18 void ptr2 (TYPE
*p
) { p
[0] = p
[1] | p
[2]; } /* OR */
19 void ptr3 (TYPE
*p
) { p
[0] = p
[1] ^ p
[2]; } /* XOR */
20 void ptr4 (TYPE
*p
) { p
[0] = ~p
[1]; } /* NOR */
21 void ptr5 (TYPE
*p
) { p
[0] = ~(p
[1] & p
[2]); } /* NAND */
22 void ptr6 (TYPE
*p
) { p
[0] = ~(p
[1] | p
[2]); } /* NOR */
23 void ptr7 (TYPE
*p
) { p
[0] = ~(p
[1] ^ p
[2]); } /* EQV */
24 void ptr8 (TYPE
*p
) { p
[0] = ~(p
[1]) & p
[2]; } /* ANDC */
25 void ptr9 (TYPE
*p
) { p
[0] = (~p
[1]) | p
[2]; } /* ORC */
26 void ptr10(TYPE
*p
) { p
[0] = (~p
[1]) ^ p
[2]; } /* EQV */
27 void ptr11(TYPE
*p
) { p
[0] = p
[1] & (~p
[2]); } /* ANDC */
28 void ptr12(TYPE
*p
) { p
[0] = p
[1] | (~p
[2]); } /* ORC */
29 void ptr13(TYPE
*p
) { p
[0] = p
[1] ^ (~p
[2]); } /* EQV */