aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/umod-3.c
blob: 609ab5207128830b936596c579f98afe7c6a7de5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* { dg-do compile } */
/* { dg-options "-O2 -mtune=atom" } */

extern void exit (int);

unsigned char cx = 7;

int
main ()
{
  unsigned char cy;
  unsigned char cz = 1;
  asm ("" : "+q" (cz));

  cy = cx / 6; if (cy != cz) exit (1);
  cy = cx % 6; if (cy != cz) exit (1);

  exit(0);
}

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