From: Nick Clifton <nickc@redhat.com>
To: law@redhat.com, aoliva@redhat.com, rth@redhat.com
Cc: gcc-patches@gcc.gnu.org
Subject: RFA: MN10300: Add LIW and SETLB support
Date: Fri, 05 Nov 2010 09:56:00 -0000 [thread overview]
Message-ID: <m3oca4hzbd.fsf@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3051 bytes --]
Hi Guys,
Here is the next MN10300 patch. This one adds support for the Long
Instruction Word instructions and the SETLB and Lcc instructions.
The new instructions are not enabled by default. I am not exactly
sure why this is, but I do remember that it was at the request of
Mitsubishi when the work was being done. So I have also created a new
set of multilibs with the instructions enabled.
Tested without regressions, both with and without the new instructions
enabled, using an mn10300-elf toolchain.
OK to apply ?
Cheers
Nick
gcc/ChangeLog
2010-11-05 Nick Clifton <nickc@redhat.com>
* config/mn10300/mn10300.c (liw_op_names): New array.
(mn10300_print_operand): Handle 'W' operand.
(mn10300_encode_section_info): Call default_encode_section_info
after mn10300 specific processing.
(extract_bundle): New function: Extracts the components
of a LIW instruction.
(liw_op_uses_only_regs): New function.
(check_liw_constraints): New function.
(liw_candidate): New function. Determines in the given insn is
a suitable candidate for conversion into an LIW instruction.
(mn10300_bundle_liw): New function. Converts pairs of insns
into single LIW instructions.
(mn10300_bundle_lcc): New function. Combines a MOV and an LCC
instruction into a single LIW instruction.
(mn10300_insert_setlb_lcc): New function. Replaces a JUMP with
an LCC instruction.
(mn10300_scan_for_setlb_lcc): New function. Look for small loops
that can use the SETLB/LCC instruction pair.
(scan_for_redundant_compares): New function. Eliminates unnecessary
compare instructions.
(mn10300_reorg): New function. Run MN10300 specific optimizations.
(TARGET_MACHINE_DEPENDENT_REORG): Define.
* config/mn10300/mn10300.opt (mliw): New command line option.
Enables the generation of LIW instructions.
(msetlb): New command line option. Enables the generation of SETLB
LCC instructions.
* config/mn10300/t-mn10300 (MULTILIB_OPTIONS): Add mliw|msetlb.
(MULTILIB_DIRNAMES): Add liw.
* config/mn10300/mn10300.h (TARGET_CPP_CPU_BUILTINS): Add __LIW__ and
__SETLB__.
* config/mn10300/constraints.md (O): New constraint.
* config/mn10300/mn10300.md (UNSPEC_LIW_1, UNSPEC_LIW_2,
UNSPEC_LCC, UNSPEC_SETLB): New constants.
(liw_bundling): New automaton.
(liw): New attribute.
(liw_op): New attribute.
(movsi_internal): Add liw and liw_op attributes.
(am33_addsi3, am33_subsi3, am33_andsi3, am33_iorsi3, am33_xorsi3,
cmpsi, am33_ashlsi3, am33_lshrsi3, am33_ashrsi3): Likewise.
(udivmodsi4): Remove unnecessary expander.
(am33_subsi3): Separate alternatives involving immediates.
(am33_andis3, am33_iorsi3, am33_xorsi3, am33_ashlsi3,
am33_lshrsi3, am33_ashrsi3): Likewise.
(cbranchsi4_post_reload): Remove anonymity.
(cbranchsf4_post_reload): Likewise.
(loop_integer_conditional_branch): New pattern.
(loop_floating_conditional_branch): New pattern.
(setlb): New pattern.
(lcc): New pattern.
(liw_1): New pattern.
(liw_lcc): New pattern.
(* doc/invoke.texi: Document new command line options -mliw and
-msetlb.
[-- Attachment #2: am33.liw.patch.bz2 --]
[-- Type: application/x-bzip2, Size: 8467 bytes --]
next reply other threads:[~2010-11-05 9:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-05 9:56 Nick Clifton [this message]
2010-11-05 22:14 ` Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3oca4hzbd.fsf@redhat.com \
--to=nickc@redhat.com \
--cc=aoliva@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=law@redhat.com \
--cc=rth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).