Commit 9f9d82aa by Catherine Moore Committed by Catherine Moore

umips-branch-3.c: New test.

2014-01-08  Catherine Moore  <clm@codesourcery.com>

	gcc/testsuite/
	* gcc.target/mips/umips-branch-3.c: New test.
	* gcc.target/mips/umips-branch-4.c: New test.

	gcc/
	* config/mips/mips.md (simple_return): Attempt to use JRC for microMIPS.
	* config/mips/mips.h (MIPS_CALL): Attempt to use JALS for microMIPS.

From-SVN: r206447
parent 3e17f429
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> 2014-01-08 Richard Sandiford <rdsandiford@googlemail.com>
PR rtl-optimization/59137 PR rtl-optimization/59137
......
...@@ -2529,7 +2529,9 @@ typedef struct mips_args { ...@@ -2529,7 +2529,9 @@ typedef struct mips_args {
: TARGET_MICROMIPS && !TARGET_INTERLINK_COMPRESSED \ : TARGET_MICROMIPS && !TARGET_INTERLINK_COMPRESSED \
? "%*" INSN "r%!\t%" #TARGET_OPNO "%/" \ ? "%*" INSN "r%!\t%" #TARGET_OPNO "%/" \
: "%*" 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 /* Similar to MIPS_CALL, but this is for MICROMIPS "j" to generate
"jrc" when nop is in the delay slot of "jr". */ "jrc" when nop is in the delay slot of "jr". */
......
...@@ -6161,7 +6161,12 @@ ...@@ -6161,7 +6161,12 @@
(define_insn "*<optab>" (define_insn "*<optab>"
[(any_return)] [(any_return)]
"" ""
"%*j\t$31%/" {
if (TARGET_MICROMIPS)
return "%*jr%:\t$31";
else
return "%*j\t$31%/";
}
[(set_attr "type" "jump") [(set_attr "type" "jump")
(set_attr "mode" "none")]) (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> 2014-01-08 Richard Sandiford <rdsandiford@googlemail.com>
* gcc.dg/tree-ssa/reassoc-32.c, gcc.dg/tree-ssa/reassoc-33.c, * gcc.dg/tree-ssa/reassoc-32.c, gcc.dg/tree-ssa/reassoc-33.c,
......
/* { dg-options "(-mmicromips)" } */
/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
void MICROMIPS
foo (void)
{
return;
}
/* { dg-final { scan-assembler "\tjrc\t\\\$31\n" } } */
/* { dg-options "(-mmicromips)" } */
void foo (void);
int MICROMIPS
a (void)
{
foo ();
return 0;
}
/* { dg-final { scan-assembler "\tjals\tfoo\n\tnop" } } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment