From: Pompapathi V Gadad <pompapathi@gmail.com>
To: Rask Ingemann Lambertsen <rask@sygehus.dk>
Cc: "Gadad, Pompapathi V" <Pompapathi.V.Gadad@nsc.com>,
gcc-patches@gcc.gnu.org
Subject: Re: Re: [Patch] New: CR16 port
Date: Fri, 13 Jul 2007 09:22:00 -0000 [thread overview]
Message-ID: <4697387B.20908@gmail.com> (raw)
In-Reply-To: <20070711233258.GX5690@sygehus.dk>
Hello Rask,
First of all, I sincerely thank you for taking time to review the patch.
Second, I am extremely sorry for delayed response.
Rask Ingemann Lambertsen wrote:
> Don't include the ChangeLog entry in the patch, post it separately. The
> only exception is if you've already committed the patch. Then it is ok to
> include the ChangeLog entry as part of the patch.
I will remember this now on.
>
>> +;; Negation Instructions
>> +; move 0,r sub x,r. More efficient than xor -1,x add 1,x
> You can probably leave this out as the middle end will generate "op0 = 0
> - op1" if there's no negm2 pattern.
The above pattern in md file is redundant then. I will remove this.
>
>> +(define_insn "mov<mode>_regs"
>> + [(set (match_operand:ALLMT 0 "register_operand" "=r, r")
>> + (match_operand:ALLMT 1 "nonmemory_operand" "r, <iF>"))]
>> + ""
>> + "mov<tIsa>\t%1, %0"
>> + [(set_attr "length" "2,<lImmArith>")]
>> +)
>> +
>> +; Memory => Reg
>> +(define_insn "mov<mode>_load"
>> + [(set (match_operand:ALLMT 0 "register_operand" "=r")
>> + (match_operand:ALLMT 1 "memory_operand" "m"))]
>> + ""
>> + "load<tIsa>\t%1, %0"
>> + [(set_attr "length" "<lImmArith>")]
>> +)
>> +
>> +(define_insn "mov<mode>_store_reg"
>> + [(set (match_operand:ALLMT 0 "store_operand" "=m")
>> + (match_operand:ALLMT 1 "register_operand" "r"))]
>> + ""
>> + "stor<tIsa>\t%1, %0"
>> + [(set_attr "length" "<lImmArith>")]
>> +)
>> +
>> +(define_insn "mov<mode>_store_imm4"
>> + [(set (match_operand:SHORT 0 "store_operand" "=m")
>> + (match_operand:SHORT 1 "u4bits_operand" "<LL>"))]
>> + ""
>> + "stor<tIsaShort>\t%1, %0"
>> + [(set_attr "length" "<lImmShort>")]
>> +)
>
> These would normally be one pattern with five alternatives. A reg->reg
> copy can turn into a reg->mem copy during reload, for example.
>
Well, I started with suggestion you had: Having 5 alternatives in a
single pattern.
It turns out that some of the pattern generated pass through predicate
test but won't find
an appropriate alternative. For example, in CR16 ISA, immediate memory
store instruction
does not have 32-bit store operation variant. Therefore, I had to break
up the single pattern into
multiple patterns. The store immediate pattern have "SHORT" (stands for
QI and HI) macro
expansion while others have ALLMT (stands for QI, HI, SI, SF)
Thanks,
Pompa
next prev parent reply other threads:[~2007-07-13 8:43 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-10 7:11 Gadad, Pompapathi V
2007-07-11 23:41 ` Rask Ingemann Lambertsen
2007-07-13 9:22 ` Pompapathi V Gadad [this message]
2007-07-13 15:23 ` Rask Ingemann Lambertsen
2007-07-14 4:00 ` Pompapathi V Gadad
2007-07-16 9:14 ` Pompapathi V Gadad
2007-07-16 12:25 ` 'Rask Ingemann Lambertsen'
2007-07-16 13:01 ` Pompapathi V Gadad
2007-07-16 13:08 ` Pompapathi V Gadad
2007-07-20 9:48 ` Pompapathi V Gadad
2007-07-21 14:33 ` 'Rask Ingemann Lambertsen'
2007-07-25 9:40 ` Pompapathi V Gadad
2007-07-30 8:33 ` 'Rask Ingemann Lambertsen'
2007-07-30 9:14 ` Pompapathi V Gadad
2007-08-03 13:03 ` 'Rask Ingemann Lambertsen'
2007-08-06 4:44 ` Pompapathi V Gadad
2007-08-06 10:43 ` 'Rask Ingemann Lambertsen'
2007-08-06 10:49 ` Pompapathi V Gadad
2007-07-21 12:20 ` 'Rask Ingemann Lambertsen'
2007-07-13 15:56 ` Rask Ingemann Lambertsen
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=4697387B.20908@gmail.com \
--to=pompapathi@gmail.com \
--cc=Pompapathi.V.Gadad@nsc.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=rask@sygehus.dk \
/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).