[Patch] Bfin: Ensure rotrsi and rotlsi don't accept non-const INTVALS
Henderson, Stuart
Stuart.Henderson@analog.com
Thu Mar 31 09:39:00 GMT 2011
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~
-------------- next part --------------
A non-text attachment was scrubbed...
Name: upstream.patch
Type: application/octet-stream
Size: 1025 bytes
Desc: upstream.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110331/68f4dd82/attachment.obj>
More information about the Gcc-patches
mailing list