summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/udivmod-7.c
blob: 14a065f68e71b257e80035ae6d111a8503179c22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* { dg-do compile } */
/* { dg-options "-O2 -m8bit-idiv" } */
/* { dg-require-effective-target lp64 } */

extern void abort (void);

void
test (unsigned long long x, unsigned long long y,
      unsigned long long q, unsigned long long r)
{
  if ((x / y) != q || (x % y) != r)
    abort ();
}

/* { dg-final { scan-assembler-times "divb" 1 } } */
/* { dg-final { scan-assembler-times "divq" 1 } } */