Debian Codegraph @

gcc/testsuite/gcc.target/mips/div-delay.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-march=mips1 -fno-delayed-branch" } */
3 /* { dg-final { scan-assembler "\tbne\t.*\tnop" } } */
4
5 /* Ensure that mips1 does not put anything in the delay slot of the bne
6 instruction when checking for divide by zero. mips2+ systems use teq
7 instead of bne and teq has no delay slot. */
8
9 NOCOMPRESSION int
10 foo (int a, int b)
11 {
12 return a / b;
13 }