OSDN Git Service

* simplify-rtx.c (simplify_subreg): Fix offset calculation
authorm.hayes <m.hayes@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 11 Jun 2001 09:30:50 +0000 (09:30 +0000)
committerm.hayes <m.hayes@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 11 Jun 2001 09:30:50 +0000 (09:30 +0000)
for complex values within a CONCAT.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43177 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/simplify-rtx.c

index 0e11252..0e2f527 100644 (file)
@@ -1,3 +1,8 @@
+2001-06-11  Michael Hayes  <m.hayes@elec.canterbury.ac.nz>
+
+       * simplify-rtx.c (simplify_subreg): Fix offset calculation
+       for complex values within a CONCAT.
+
 2001-06-11  Joseph S. Myers  <jsm28@cam.ac.uk>
 
        * doc/install.texi: Update details of what components are included
index 39c3015..3450f7b 100644 (file)
@@ -2423,11 +2423,11 @@ simplify_subreg (outermode, op, innermode, byte)
      of real and imaginary part.  */
   if (GET_CODE (op) == CONCAT)
     {
-      int is_realpart = byte < GET_MODE_UNIT_SIZE (innermode) / 2;
+      int is_realpart = byte < GET_MODE_UNIT_SIZE (innermode);
       rtx part = is_realpart ? XEXP (op, 0) : XEXP (op, 1);
       unsigned int final_offset;
 
-      final_offset = byte % (GET_MODE_UNIT_SIZE (innermode) / 2);
+      final_offset = byte % (GET_MODE_UNIT_SIZE (innermode));
       return simplify_subreg (outermode, part, GET_MODE (part), final_offset);
     }