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