summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/asm-flag-4.c
blob: b84b7dfdb1c4b347c593c6fbebbaef769f4efd1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* Test some of the valid @cc<cc> asm flag outputs.  */
/* { dg-do compile } */
/* { dg-options "-O" } */

#define DO(C) \
void f##C(int *y) { char x; asm("" : "=@cc"#C(x)); if (!x) *y = 0; }

DO(b)
DO(l)
DO(z)
DO(be)
DO(ge)
DO(le)

/* { dg-final { scan-assembler "jc" } } */
/* { dg-final { scan-assembler "jl" } } */
/* { dg-final { scan-assembler "je" } } */
/* { dg-final { scan-assembler "jna" } } */
/* { dg-final { scan-assembler "jge" } } */
/* { dg-final { scan-assembler "jle" } } */