modsi3.S (modsi3): Fix case with 0x80000000 as dividend.
authorEdgar E. Iglesias <edgar.iglesias@gmail.com>
Tue, 19 Feb 2013 23:00:50 +0000 (23:00 +0000)
committerMichael Eager <eager@gcc.gnu.org>
Tue, 19 Feb 2013 23:00:50 +0000 (23:00 +0000)
* config/microblaze/modsi3.S (modsi3): Fix case with 0x80000000
as dividend.

From-SVN: r196156

libgcc/ChangeLog
libgcc/config/microblaze/modsi3.S

index d4bc8109e7daeb3ec9cc176f9ff567f888c67b3c..6032f6f1a6a628a1b59bdf4d174e18dfc9e49945 100644 (file)
@@ -1,3 +1,7 @@
+2012-02-19  Edgar E. Iglesias  <edgar.iglesias@gmail.com>
+       * config/microblaze/modsi3.S (modsi3): Fix case with 0x80000000 
+       as dividend.
+
 2013-02-16  Alan Modra  <amodra@gmail.com>
 
        PR target/55431
index ed28acf8f63efdb5a55c08b02a65f0429a9f7ecc..93d0c30b688e26abe2beacfe797972fbb08423f6 100644 (file)
@@ -55,6 +55,8 @@ $LaR5_Pos:
 $LaR6_Pos:
        ADDIK   r3,r0,0      # Clear mod
        ADDIK   r30,r0,0     # clear div
+       BLTId   r5,$LaDIV2   # If r5 is still negative (0x80000000), skip
+                            # the first bit search.
        ADDIK   r29,r0,32    # Initialize the loop count
    # First part try to find the first '1' in the r5
 $LaDIV1: