summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/divmod-4a.c
blob: 572b3df3c1e1b57b6b70fbcb0dc3c416a38b5095 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* { dg-do compile } */
/* { dg-options "-Os -m8bit-idiv" } */

extern void abort (void);

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

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