From: Carrot Wei <carrot@google.com>
To: Ramana Radhakrishnan <ramana.gcc@googlemail.com>
Cc: Richard Earnshaw <rearnsha@arm.com>,
Paul Brook <paul@codesourcery.com>,
Nick Clifton <nickc@redhat.com>,
gcc-patches@gcc.gnu.org, ramana.radhakrishnan@arm.com
Subject: Re: [PATCH: ARM] PR 45335 Use ldrd and strd to access two consecutive words
Date: Fri, 14 Jan 2011 09:25:00 -0000 [thread overview]
Message-ID: <AANLkTi=qH6Svg9fjCyDX1ctYHNd2N4=ax6nn2bZo8R-p@mail.gmail.com> (raw)
In-Reply-To: <AANLkTimMD0tzDsLuXQZwJPaS7V=r6=_d2p-1iXuy=P9d@mail.gmail.com>
On Thu, Jan 13, 2011 at 6:25 PM, Ramana Radhakrishnan
<ramana.gcc@googlemail.com> wrote:
> On Thu, Jan 13, 2011 at 9:27 AM, Carrot Wei <carrot@google.com> wrote:
>> One question about the attribute length. It looks the attribute
>> expression is not very powerful according to
>> http://gcc.gnu.org/onlinedocs/gccint/Expressions.html#Expressions,
>> then how can I express following expressions:
>>
>> if (fix_cm3_ldrd && (operands[2] == operands[0]))
>
>
> Can't you express this as ?
>
> (set_attr "length"
> (and (ne (symbol_ref ("fix_cm3_ldrd") (const_int 0))
> (eq (match_dup 2) (match_dup 0))) (const_int <length of insns>)
>
According to http://gcc.gnu.org/onlinedocs/gccint/Insn-Lengths.html#Insn-Lengths,
(match_dup n) can only be used with a label_ref operand.
>
> It's too early in the day and I haven't yet had my coffee but you
> probably get the picture.
>
> If you can't get separate constraints as Richard says or the logic as
> I mention above becomes too complicated which I suspect it might, it
> would be worth factoring out the logic into a common C function
> parameterised on counting vs emiting. Then you could just call the
> same function with and without the "emit/count" flag from the place
> where you set the length attribute and the place where you want to
> emit the assembler.
>
> Then the logic is in one place and more maintainable than having 2
> implementatons of the same logic.
>
This is a good idea!
thanks
Carrot
next prev parent reply other threads:[~2011-01-14 9:18 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-22 6:49 Carrot Wei
2010-08-24 13:55 ` Carrot Wei
2010-08-24 14:14 ` Ramana Radhakrishnan
2010-08-25 10:02 ` Carrot Wei
2010-09-01 15:25 ` Richard Earnshaw
2010-09-04 13:15 ` Carrot Wei
2010-09-13 14:54 ` Carrot Wei
2010-09-19 9:10 ` [PING][PATCH: " Carrot Wei
2010-09-25 19:25 ` Carrot Wei
2010-10-05 11:53 ` Carrot Wei
2010-10-12 9:00 ` Carrot Wei
2010-10-12 15:37 ` Ian Lance Taylor
2010-10-13 11:28 ` [PATCH: " Paul Brook
2010-10-16 14:36 ` Carrot Wei
2010-10-24 16:59 ` Carrot Wei
2010-10-31 17:55 ` Carrot Wei
2010-11-23 0:23 ` Carrot Wei
2010-11-30 0:01 ` Carrot Wei
2010-12-14 22:58 ` Carrot Wei
2011-01-04 8:57 ` Carrot Wei
2011-01-11 14:43 ` Nick Clifton
2011-01-11 14:51 ` Richard Earnshaw
2011-01-11 15:10 ` Nathan Froyd
2011-01-12 6:34 ` Ian Lance Taylor
2011-01-12 10:29 ` Richard Guenther
2011-01-12 14:01 ` Diego Novillo
2011-01-12 21:56 ` Mike Stump
2011-01-12 13:49 ` Paul Brook
2011-01-12 15:20 ` Richard Earnshaw
2011-01-13 10:45 ` Carrot Wei
2011-01-13 11:12 ` Richard Earnshaw
2011-01-13 11:15 ` Ramana Radhakrishnan
2011-01-14 9:25 ` Carrot Wei [this message]
2011-01-14 10:17 ` Richard Earnshaw
2011-01-18 15:46 ` Carrot Wei
2011-01-27 5:42 ` Jie Zhang
2011-01-27 10:43 ` Carrot Wei
2011-01-28 9:29 ` Jie Zhang
2011-01-28 11:19 ` Carrot Wei
2011-01-28 12:16 ` Jie Zhang
2011-03-15 9:19 ` Carrot Wei
2011-03-24 0:25 ` Mike Stump
2011-03-29 10:18 ` Carrot Wei
2011-01-13 17:19 ` Mike Stump
2011-06-07 9:44 Nick Clifton
2011-06-14 2:22 ` Ramana Radhakrishnan
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='AANLkTi=qH6Svg9fjCyDX1ctYHNd2N4=ax6nn2bZo8R-p@mail.gmail.com' \
--to=carrot@google.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=nickc@redhat.com \
--cc=paul@codesourcery.com \
--cc=ramana.gcc@googlemail.com \
--cc=ramana.radhakrishnan@arm.com \
--cc=rearnsha@arm.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).