aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2014-04-02 18:53:06 +0000
committerUlrich Weigand <uweigand@gcc.gnu.org>2014-04-02 18:53:06 +0000
commitc65961930607ee226cfdf7a3700db5d34b138a0b (patch)
treeef099481635fa3610fb078b7f4d8046fdbaeb3d2 /gcc/config
parent84c2f4b068c5d221aea57334b38cdb78069b7dcf (diff)
downloadgcc-c65961930607ee226cfdf7a3700db5d34b138a0b.zip
gcc-c65961930607ee226cfdf7a3700db5d34b138a0b.tar.gz
gcc-c65961930607ee226cfdf7a3700db5d34b138a0b.tar.bz2
spu.md ("insv"): Fail if bitoffset+bitsize lies outside the target mode.
* config/spu/spu.md ("insv"): Fail if bitoffset+bitsize lies outside the target mode. From-SVN: r209028
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/spu/spu.md8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/config/spu/spu.md b/gcc/config/spu/spu.md
index 228b228..3ac4bfc 100644
--- a/gcc/config/spu/spu.md
+++ b/gcc/config/spu/spu.md
@@ -2851,7 +2851,13 @@
(match_operand:SI 2 "const_int_operand" ""))
(match_operand 3 "nonmemory_operand" ""))]
""
- { spu_expand_insv(operands); DONE; })
+ {
+ if (INTVAL (operands[1]) + INTVAL (operands[2])
+ > GET_MODE_BITSIZE (GET_MODE (operands[0])))
+ FAIL;
+ spu_expand_insv(operands);
+ DONE;
+ })
;; Simplify a number of patterns that get generated by extv, extzv,
;; insv, and loads.