aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/mips/div-3.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/mips/div-3.c')
-rw-r--r--gcc/testsuite/gcc.target/mips/div-3.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/mips/div-3.c b/gcc/testsuite/gcc.target/mips/div-3.c
new file mode 100644
index 00000000000..684b6a8e441
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/div-3.c
@@ -0,0 +1,12 @@
+/* { dg-options "-O -mgp64 (-mips16)" } */
+/* { dg-final { scan-assembler "\tddiv\t" } } */
+/* { dg-final { scan-assembler-not "\tmflo\t" } } */
+/* { dg-final { scan-assembler "\tmfhi\t" } } */
+
+typedef int DI __attribute__((mode(DI)));
+
+MIPS16 DI
+f (DI x, DI y)
+{
+ return x % y;
+}