| 1 |
/* { dg-options "(-mips16) -mgp64" } */ |
| 2 |
/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */ |
| 3 |
|
| 4 |
typedef int int32_t; |
| 5 |
typedef unsigned int uint32_t; |
| 6 |
typedef long long int64_t; |
| 7 |
typedef unsigned long long uint64_t; |
| 8 |
|
| 9 |
MIPS16 int32_t f1 (int32_t x, int32_t y) { return x / y + x % y; } |
| 10 |
MIPS16 uint32_t f2 (uint32_t x, uint32_t y) { return x / y + x % y; } |
| 11 |
MIPS16 int64_t f3 (int64_t x, int64_t y) { return x / y + x % y; } |
| 12 |
MIPS16 uint64_t f4 (uint64_t x, uint64_t y) { return x / y + x % y; } |
| 13 |
|
| 14 |
/* { dg-final { scan-assembler-times "\tdiv\t" 1 } } */ |
| 15 |
/* { dg-final { scan-assembler-times "\tdivu\t" 1 } } */ |
| 16 |
/* { dg-final { scan-assembler-times "\tddiv\t" 1 } } */ |
| 17 |
/* { dg-final { scan-assembler-times "\tddivu\t" 1 } } */ |