This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: new port: Moxie
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Paolo Bonzini <paolo dot bonzini at gmail dot com>
- Cc: Richard Henderson <rth at redhat dot com>, Anthony Green <green at moxielogic dot com>, gcc-patches at gcc dot gnu dot org, Ian Lance Taylor <iant at google dot com>
- Date: Fri, 5 Jun 2009 00:04:23 +0200
- Subject: Re: PATCH: new port: Moxie
- References: <20090420050932.aaa2c6acbe2fcbd4897bea2c255aade5.7f96bd7fa6.wbe@email03.secureserver.net> <m3y6ten469.fsf@google.com> <1242010454.6842.24.camel@localhost.localdomain> <1242011433.6842.27.camel@localhost.localdomain> <4A265EF9.7050902@moxielogic.com> <4A270B93.1080808@redhat.com> <4A27C7FE.4050308@moxielogic.com> <4A27EE1F.5060409@redhat.com> <4A27F41D.7070006@gmail.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Jun 04, 2009 at 06:19:41PM +0200, Paolo Bonzini wrote:
>>> +(define_predicate "moxie_add_operand"
>>> + (match_code "const_int,reg")
>>> +{
>>> + if ((GET_CODE (op) == CONST_INT
>>> + && INTVAL (op) >= -255
>>> + && INTVAL (op) <= 255)
>>> + || (REG_P (op)))
>>> + return 1;
>>> + else
>>> + return 0;
>>> +})
>>
>> This actually returns false for all registers. You want
>
> No, he just has an extra pair of parentheses around REG_P. I do prefer
> your version though, or
>
> (ior (match_code "reg")
> (and (match_code "const_int")
> (match_test "INTVAL (op) >= -255 && INTVAL (op) <= 255)))
(match_test "IN_RANGE (ival, -255, 255)")
?
Jakub