+2014-01-08 Catherine Moore <clm@codesourcery.com>
+
+ * config/mips/mips.md (simple_return): Attempt to use JRC for microMIPS.
+ * config/mips/mips.h (MIPS_CALL): Attempt to use JALS for microMIPS.
+
2014-01-08 Richard Sandiford <rdsandiford@googlemail.com>
PR rtl-optimization/59137
: TARGET_MICROMIPS && !TARGET_INTERLINK_COMPRESSED \
? "%*" INSN "r%!\t%" #TARGET_OPNO "%/" \
: "%*" INSN "r\t%" #TARGET_OPNO "%/") \
- : MIPS_ABSOLUTE_JUMP ("%*" INSN "\t%" #TARGET_OPNO "%/"))
+ : TARGET_MICROMIPS && !TARGET_INTERLINK_COMPRESSED \
+ ? MIPS_ABSOLUTE_JUMP ("%*" INSN "%!\t%" #TARGET_OPNO "%/") \
+ : MIPS_ABSOLUTE_JUMP ("%*" INSN "\t%" #TARGET_OPNO "%/")) \
/* Similar to MIPS_CALL, but this is for MICROMIPS "j" to generate
"jrc" when nop is in the delay slot of "jr". */
(define_insn "*<optab>"
[(any_return)]
""
- "%*j\t$31%/"
+ {
+ if (TARGET_MICROMIPS)
+ return "%*jr%:\t$31";
+ else
+ return "%*j\t$31%/";
+ }
[(set_attr "type" "jump")
(set_attr "mode" "none")])
+2014-01-08 Catherine Moore <clm@codesourcery.com>
+
+ * gcc.target/mips/umips-branch-3.c: New test.
+ * gcc.target/mips/umips-branch-4.c: New test.
+
2014-01-08 Richard Sandiford <rdsandiford@googlemail.com>
* gcc.dg/tree-ssa/reassoc-32.c, gcc.dg/tree-ssa/reassoc-33.c,
--- /dev/null
+/* { dg-options "(-mmicromips)" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+
+void MICROMIPS
+foo (void)
+{
+ return;
+}
+
+/* { dg-final { scan-assembler "\tjrc\t\\\$31\n" } } */
--- /dev/null
+/* { dg-options "(-mmicromips)" } */
+
+void foo (void);
+
+int MICROMIPS
+a (void)
+{
+ foo ();
+ return 0;
+}
+
+/* { dg-final { scan-assembler "\tjals\tfoo\n\tnop" } } */