From: Richard Sandiford <rdsandiford@googlemail.com>
To: "Moore\, Catherine" <Catherine_Moore@mentor.com>
Cc: "gcc-patches\@gcc.gnu.org" <gcc-patches@gcc.gnu.org>, "Rozycki\,
Maciej" <Maciej_Rozycki@mentor.com>
Subject: Re: FW: [PATCH] [MIPS] microMIPS gcc support
Date: Mon, 04 Mar 2013 20:54:00 -0000 [thread overview]
Message-ID: <871ubukhs7.fsf@talisman.default> (raw)
In-Reply-To: <FD3DCEAC5B03E9408544A1E416F11242987BD21E@NA-MBX-01.mgc.mentorg.com> (Catherine Moore's message of "Mon, 4 Mar 2013 19:43:32 +0000")
"Moore, Catherine" <Catherine_Moore@mentor.com> writes:
> Hi Richard,
> I've attached an example patch for the add pattern that tries to
> identify the short microMIPS variants. In your last review, you
> mentioned that you would like to see the register requirements modeled
> in the patterns. Do you have any comments on the approach that I'm
> taking? Thanks,
Looks good, thanks. I was a bit surprised that we want to hide this
completely from the register allocators (by adding "!" to all of
the micromips forms) but I can see that being too honest about the
alternatives might lead to poor decisions. That's definitely something
that could be retuned later if someone wants to.
A few bikesheddy comments:
- Please use "Y..." constraints for constants (as with "Yb", "Yh", etc.).
I was hoping to keep "Y..." for constants and "Z..." for memory stuff.
- You used a mixture of predicates and out-of-line functions to do
the matching. I think we should use the predicate approach across
the board, because it's hard to predict which ones will come in
useful in future.
- Predicates should always check the code though. E.g.:
(define_predicate "umips_addius5_imm"
(and (match_code "const_int")
(match_test "IN_RANGE (INTVAL (op), -8, 7)")))
- In general, please try to make the names of the predicates as generic
as possible. There's nothing really add-specific about the predicate
above. Or microMIPS-specific either really: some of these predicates
are probably going to be useful for MIPS16 too.
The existing MIPS16 functions follow the convention:
"n" if negated (optional)
+ "s" or "u" for signed vs. unsigned
+ "imm"
+ number of significant bits
+ "_"
+ multiplication factor or, er, "b" for "+1"...
It might be nice to have a similar convention for microMIPS.
The choices there are a bit more exotic, so please feel free to
diverge from the MIPS16 one above; we can switch MIPS16 over once
the microMIPS one is settled. In fact, a new convention that's
compact enough to be used in both predicate and constraint names
would be great. E.g. for the umips_addius5_imm predicate above,
a name like "Ys5" would be easier to remember than "Zo"/"Yo".
That said,I realise things like umips_addiur2_imm_p are a bit
hard to describe this way and might need to stay instruction-specific.
- We already have a "ks" constraint for the stack pointer.
- I like the choice of "u" for M16_REGS. Kind of lucky that that letter's
still free. :-) As you've probably noticed though, we're running desparately
short of contraint letters, so if you also need names for other less
frequently-used classes, it might be better to use "k..." for those.
Thanks,
Richard
next prev parent reply other threads:[~2013-03-04 20:54 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <FD3DCEAC5B03E9408544A1E416F1124211F9CC2E@NA-MBX-04.mgc.mentorg.com>
2012-07-19 18:51 ` Moore, Catherine
2012-07-20 0:46 ` Richard Sandiford
2013-01-22 20:23 ` Moore, Catherine
2013-01-22 20:27 ` Moore, Catherine
2013-01-23 20:05 ` Richard Sandiford
2013-01-26 3:52 ` Maciej W. Rozycki
2013-01-26 10:17 ` Richard Sandiford
2013-01-27 13:58 ` Maciej W. Rozycki
2013-01-28 10:14 ` Richard Sandiford
2013-02-12 19:00 ` Moore, Catherine
2013-02-13 11:43 ` Richard Sandiford
2013-02-19 16:31 ` Moore, Catherine
2013-02-19 18:25 ` Richard Sandiford
2013-02-19 22:27 ` Maciej W. Rozycki
2013-02-21 2:28 ` Moore, Catherine
2013-02-21 21:20 ` Richard Sandiford
2013-02-24 23:52 ` Moore, Catherine
2013-02-25 9:41 ` Richard Sandiford
2013-02-25 13:55 ` Moore, Catherine
2013-03-04 19:43 ` Moore, Catherine
2013-03-04 20:54 ` Richard Sandiford [this message]
2013-03-04 22:47 ` Moore, Catherine
2013-03-05 21:06 ` Richard Sandiford
2013-03-13 20:30 ` Moore, Catherine
2013-03-14 20:55 ` Richard Sandiford
2013-03-15 18:00 ` Moore, Catherine
2013-03-19 19:26 ` Richard Sandiford
2013-03-19 21:23 ` Moore, Catherine
2013-03-19 21:23 ` Richard Sandiford
2013-03-20 20:15 ` Moore, Catherine
2013-03-20 21:48 ` Richard Sandiford
2013-03-20 22:02 ` Moore, Catherine
2013-03-21 8:05 ` Richard Sandiford
2013-03-21 23:04 ` Moore, Catherine
2013-03-22 0:05 ` Richard Sandiford
2013-03-22 18:31 ` Moore, Catherine
2013-03-23 9:07 ` Richard Sandiford
2013-04-12 18:38 ` Many warnings in MIPS port (Was: [PATCH] [MIPS] microMIPS gcc support) David Daney
2013-04-12 20:35 ` Maciej W. Rozycki
2013-04-12 22:08 ` Moore, Catherine
2013-04-13 6:36 ` David Daney
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=871ubukhs7.fsf@talisman.default \
--to=rdsandiford@googlemail.com \
--cc=Catherine_Moore@mentor.com \
--cc=Maciej_Rozycki@mentor.com \
--cc=gcc-patches@gcc.gnu.org \
/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).