diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/umod-3.c')
-rw-r--r-- | gcc/testsuite/gcc.target/i386/umod-3.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/umod-3.c b/gcc/testsuite/gcc.target/i386/umod-3.c new file mode 100644 index 000000000..7123bc9f2 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/umod-3.c @@ -0,0 +1,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" } } */ |