aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/387-ficom-1.c
blob: 325698854a94beb313dd1a856d0f071f182ca1fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/* { dg-do compile } */
/* { dg-require-effective-target ia32 } */
/* { dg-skip-if "" { *-*-* } { "-march=*" } { "-march=i386" } } */
/* { dg-options "-O2 -march=i386 -ffast-math -masm=att" } */

extern short s;

int test_f_s (short x)
{
  return (float)x > s;
}

int test_d_s (short x)
{
  return (double)x < s;
}

int test_ld_s (short x)
{
  return (long double)x == s;
}

extern int i;

int test_f_i (int x)
{
  return (float)i >= x;
}

int test_d_i (int x)
{
  return (double)i <= x;
}

int test_ld_i (int x)
{
  return (long double)i != x;
}

/* { dg-final { scan-assembler-times "ficomp\[s\t\]" 3 } } */
/* { dg-final { scan-assembler-times "ficompl" 3 } } */