This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [Patch] Bfin: Ensure rotrsi and rotlsi don't accept non-const INTVALS


Seems reasonable to me, thanks!  Patch updated.

Stu

2011-03-29  Stuart Henderson  <stuart.henderson@analog.com>

    From Bernd Schmidt
    * config/bfin/bfin.md (rotrsi, rotlsi): Don't take INTVAL of anything
    that's not CONST_INT.

-----Original Message-----
From: Richard Henderson [mailto:rth@redhat.com]
Sent: 30 March 2011 18:26
To: Henderson, Stuart
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [Patch] Bfin: Ensure rotrsi and rotlsi don't accept non-const INTVALS

On 03/29/2011 08:49 AM, Henderson, Stuart wrote:
>                    (match_operand:SI 2 "immediate_operand" "")))]
>    ""
>  {
> -  if (INTVAL (operands[2]) != 16)
> +  if (GET_CODE (operands[2]) != CONST_INT || INTVAL (operands[2]) != 16)
>      FAIL;

Perhaps use const_int_operand instead of immediate_operand.


r~

Attachment: upstream.patch
Description: upstream.patch


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]