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

extern void abort (void);
extern void exit (int);

unsigned char cx = 7;

int
main ()
{
  unsigned char cy;
  
  cy = cx / 6; if (cy != 1) abort ();
  cy = cx % 6; if (cy != 1) abort ();

  exit(0);
}

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