aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/powerpc/bool.c
blob: f007db4b5bd4f945ed6bcd1c39ce1ad18de57419 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* { dg-do compile { target { powerpc*-*-* } } } */
/* { dg-options "-O2" } */
/* { dg-final { scan-assembler "eqv" } } */
/* { dg-final { scan-assembler "nand" } } */
/* { dg-final { scan-assembler "nor" } } */

#ifndef TYPE
#define TYPE unsigned long
#endif

TYPE op1 (TYPE a, TYPE b) { return ~(a ^ b); }	/* eqv */
TYPE op2 (TYPE a, TYPE b) { return ~(a & b); }	/* nand */
TYPE op3 (TYPE a, TYPE b) { return ~(a | b); }	/* nor */