diff options
author | Maciej W. Rozycki <macro@imgtec.com> | 2016-11-16 21:42:31 +0000 |
---|---|---|
committer | Maciej W. Rozycki <macro@gcc.gnu.org> | 2016-11-16 21:42:31 +0000 |
commit | 576b0863ee8451e2aecb69c28f552dd5bb31691a (patch) | |
tree | 0e19a777abe4c6399ae1b81b4c1139369c827370 /gcc | |
parent | a3be783adf3615d77da725cd3f51072cfbdcdee8 (diff) | |
download | gcc-576b0863ee8451e2aecb69c28f552dd5bb31691a.zip gcc-576b0863ee8451e2aecb69c28f552dd5bb31691a.tar.gz gcc-576b0863ee8451e2aecb69c28f552dd5bb31691a.tar.bz2 |
MIPS16/GCC: Emit explicit JRC from `casesi_internal_mips16_<mode>' insn
gcc/
* config/mips/mips.md (casesi_internal_mips16_<mode>):
Explicitly switch between JR and JRC for the table jump. Adjust
instruction count.
From-SVN: r242517
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/mips/mips.md | 10 |
2 files changed, 14 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 17b79e5..9b04621 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2016-11-16 Maciej W. Rozycki <macro@imgtec.com> + * config/mips/mips.md (casesi_internal_mips16_<mode>): + Explicitly switch between JR and JRC for the table jump. Adjust + instruction count. + +2016-11-16 Maciej W. Rozycki <macro@imgtec.com> + * config/mips/mips.md (casesi_internal_mips16_<mode>): Set `insn_count' to 11 rather than 16. diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md index 13852ef..076cde6 100644 --- a/gcc/config/mips/mips.md +++ b/gcc/config/mips/mips.md @@ -6442,9 +6442,15 @@ output_asm_insn ("<d>addu\t%4, %4, %5", operands); - return "j\t%4"; + if (GENERATE_MIPS16E) + return "jrc\t%4"; + else + return "jr\t%4"; } - [(set_attr "insn_count" "11")]) + [(set (attr "insn_count") + (if_then_else (match_test "GENERATE_MIPS16E") + (const_string "10") + (const_string "11")))]) ;; For TARGET_USE_GOT, we save the gp in the jmp_buf as well. ;; While it is possible to either pull it off the stack (in the |