diff options
author | Catherine Moore <clm@codesourcery.com> | 2014-01-08 17:26:05 -0500 |
---|---|---|
committer | Catherine Moore <clm@gcc.gnu.org> | 2014-01-08 17:26:05 -0500 |
commit | 9f9d82aa236437d25dc059a763e8fdd9bcd66e7f (patch) | |
tree | 058234ac244be17065c849a54c6651380eb896f0 /gcc | |
parent | 3e17f4298dabdeae8ed7aa902067638fbbe695a3 (diff) | |
download | gcc-9f9d82aa236437d25dc059a763e8fdd9bcd66e7f.zip gcc-9f9d82aa236437d25dc059a763e8fdd9bcd66e7f.tar.gz gcc-9f9d82aa236437d25dc059a763e8fdd9bcd66e7f.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/mips/mips.h | 4 | ||||
-rw-r--r-- | gcc/config/mips/mips.md | 7 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/mips/umips-branch-3.c | 10 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/mips/umips-branch-4.c | 12 |
6 files changed, 41 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2826bca..8bd7ef3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +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 diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index acbf6a3..bc9d301 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -2529,7 +2529,9 @@ typedef struct mips_args { : 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". */ diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md index 813413ee..fb47a89 100644 --- a/gcc/config/mips/mips.md +++ b/gcc/config/mips/mips.md @@ -6161,7 +6161,12 @@ (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")]) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 484d6fc..d1b72ec 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +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, diff --git a/gcc/testsuite/gcc.target/mips/umips-branch-3.c b/gcc/testsuite/gcc.target/mips/umips-branch-3.c new file mode 100644 index 0000000..8717362 --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/umips-branch-3.c @@ -0,0 +1,10 @@ +/* { dg-options "(-mmicromips)" } */ +/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */ + +void MICROMIPS +foo (void) +{ + return; +} + +/* { dg-final { scan-assembler "\tjrc\t\\\$31\n" } } */ diff --git a/gcc/testsuite/gcc.target/mips/umips-branch-4.c b/gcc/testsuite/gcc.target/mips/umips-branch-4.c new file mode 100644 index 0000000..b346d11 --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/umips-branch-4.c @@ -0,0 +1,12 @@ +/* { dg-options "(-mmicromips)" } */ + +void foo (void); + +int MICROMIPS +a (void) +{ + foo (); + return 0; +} + +/* { dg-final { scan-assembler "\tjals\tfoo\n\tnop" } } */ |