]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
microblaze.c (microblaze_expand_block_move): Treat size and alignment as unsigned.
authorJeff Law <law@redhat.com>
Mon, 15 Apr 2019 21:19:21 +0000 (15:19 -0600)
committerJeff Law <law@gcc.gnu.org>
Mon, 15 Apr 2019 21:19:21 +0000 (15:19 -0600)
* config/microblaze/microblaze.c (microblaze_expand_block_move): Treat
size and alignment as unsigned.

From-SVN: r270373

gcc/ChangeLog
gcc/config/microblaze/microblaze.c

index 2872bd37feeeea41904d43f3b2e82350dbd09289..018d006c47d44a13d85adcb18ce2c493b57cbf16 100644 (file)
@@ -1,3 +1,8 @@
+2019-04-15  Jeff Law  <law@redhat.com>
+
+       * config/microblaze/microblaze.c (microblaze_expand_block_move): Treat
+       size and alignment as unsigned.
 2019-04-15  Richard Biener  <rguenther@suse.de>
 
        PR debug/90074
index 70910fd1ddec4b23da9ceb5b5a764b5145fd9fe1..55c1becf97573b55d4ff410861dc84a983f19003 100644 (file)
@@ -1258,8 +1258,8 @@ microblaze_expand_block_move (rtx dest, rtx src, rtx length, rtx align_rtx)
 
   if (GET_CODE (length) == CONST_INT)
     {
-      HOST_WIDE_INT bytes = INTVAL (length);
-      int align = INTVAL (align_rtx);
+      unsigned HOST_WIDE_INT bytes = UINTVAL (length);
+      unsigned int align = UINTVAL (align_rtx);
 
       if (align > UNITS_PER_WORD)
        {
@@ -1267,7 +1267,7 @@ microblaze_expand_block_move (rtx dest, rtx src, rtx length, rtx align_rtx)
        }
       else if (align < UNITS_PER_WORD)
        {
-         if (INTVAL (length) <= MAX_MOVE_BYTES)
+         if (UINTVAL (length) <= MAX_MOVE_BYTES)
            {
              move_by_pieces (dest, src, bytes, align, RETURN_BEGIN);
              return true;
@@ -1276,14 +1276,14 @@ microblaze_expand_block_move (rtx dest, rtx src, rtx length, rtx align_rtx)
            return false;
        }
 
-      if (INTVAL (length) <= 2 * MAX_MOVE_BYTES)
+      if (UINTVAL (length) <= 2 * MAX_MOVE_BYTES)
        {
-         microblaze_block_move_straight (dest, src, INTVAL (length));
+         microblaze_block_move_straight (dest, src, UINTVAL (length));
          return true;
        }
       else if (optimize)
        {
-         microblaze_block_move_loop (dest, src, INTVAL (length));
+         microblaze_block_move_loop (dest, src, UINTVAL (length));
          return true;
        }
     }