diff options
author | dj <dj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-05-30 22:53:48 +0000 |
---|---|---|
committer | dj <dj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-05-30 22:53:48 +0000 |
commit | 7b4716cfa350bcc85a680c7c81f7caadee3899a7 (patch) | |
tree | ca97d5b499f73302ca53b0ea23f70f72b8e171ed | |
parent | b3a92c5378f73d3e8f8800104deaab4ffcae7496 (diff) | |
download | ppe42-gcc-7b4716cfa350bcc85a680c7c81f7caadee3899a7.tar.gz ppe42-gcc-7b4716cfa350bcc85a680c7c81f7caadee3899a7.zip |
* config/m32c/m32c.c (m32c_expand_insv): Check that the value
we're inserting is a singlt-bit constant.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114250 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/m32c/m32c.c | 8 |
2 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ed782e16ee6..04a83735875 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2006-05-30 Naveen.H.S <naveenh@kpitcummins.com> + DJ Delorie <dj@redhat.com> + + * config/m32c/m32c.c (m32c_expand_insv): Check that the value + we're inserting is a singlt-bit constant. + 2006-05-30 Roger Sayle <roger@eyesopen.com> * simplify-rtx.c (simplify_binary_operation_1) <LSHIFTRT>: Cast diff --git a/gcc/config/m32c/m32c.c b/gcc/config/m32c/m32c.c index 186f666d0fb..6fddc4b2760 100644 --- a/gcc/config/m32c/m32c.c +++ b/gcc/config/m32c/m32c.c @@ -3435,6 +3435,14 @@ m32c_expand_insv (rtx *operands) if (INTVAL (operands[1]) != 1) return 1; + /* Our insv opcode (bset, bclr) can only insert a one-bit constant. */ + if (GET_CODE (operands[3]) != CONST_INT) + return 1; + if (INTVAL (operands[3]) != 0 + && INTVAL (operands[3]) != 1 + && INTVAL (operands[3]) != -1) + return 1; + mask = 1 << INTVAL (operands[2]); op0 = operands[0]; |