gcc/testsuite/gcc.target/mips/mult-16.c
raw| 1 | /* This test requires widening_mul */ |
| 2 | /* { dg-options "-mgp32 (-mips16) -fexpensive-optimizations" } */ |
| 3 | /* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */ |
| 4 | /* { dg-final { scan-assembler "\tmult\t" } } */ |
| 5 | /* { dg-final { scan-assembler-not "\tmflo\t" } } */ |
| 6 | /* { dg-final { scan-assembler "\tmfhi\t" } } */ |
| 7 | |
| 8 | typedef int DI __attribute__((mode(DI))); |
| 9 | typedef int SI __attribute__((mode(SI))); |
| 10 | |
| 11 | MIPS16 SI |
| 12 | f (SI x, SI y) |
| 13 | { |
| 14 | return ((DI) x * y) >> 32; |
| 15 | } |