]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
s390.c (s390_expand_insv): Only accept insertions within mode size.
authorAndreas Krebbel <Andreas.Krebbel@de.ibm.com>
Mon, 8 Apr 2013 07:49:33 +0000 (07:49 +0000)
committerAndreas Krebbel <krebbel@gcc.gnu.org>
Mon, 8 Apr 2013 07:49:33 +0000 (07:49 +0000)
2013-04-08  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

* config/s390/s390.c (s390_expand_insv): Only accept insertions
within mode size.

From-SVN: r197566

gcc/ChangeLog
gcc/config/s390/s390.c

index d3f40dd1da37e521aabb67499f2ff1ec7af13f60..bb7076c0dd3f70a3a9fd5971af6d455d3966c3d3 100644 (file)
@@ -1,3 +1,8 @@
+2013-04-08  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+       * config/s390/s390.c (s390_expand_insv): Only accept insertions
+       within mode size.
+
 2013-04-08  Marek Polacek  <polacek@redhat.com>
 
        PR rtl-optimization/48182
index 663cc545b8cfe59ce3030e3d353820a9ccfe2efc..1578363245754b8dfe8b84cfec7b197b411aa44c 100644 (file)
@@ -4647,6 +4647,9 @@ s390_expand_insv (rtx dest, rtx op1, rtx op2, rtx src)
   int smode_bsize, mode_bsize;
   rtx op, clobber;
 
+  if (bitsize + bitpos > GET_MODE_SIZE (mode))
+    return false;
+
   /* Generate INSERT IMMEDIATE (IILL et al).  */
   /* (set (ze (reg)) (const_int)).  */
   if (TARGET_ZARCH