]> rtime.felk.cvut.cz Git - fpga/lx-cpu1/gcc-tumbl.git/blobdiff - libgcc/config/mbtumbl/modsi3.S
Cleanup pipeline a bit, change cond. branching to BRC/BRCI
[fpga/lx-cpu1/gcc-tumbl.git] / libgcc / config / mbtumbl / modsi3.S
index cbd61774cbf01dcf91fe262af8d219050ba4b196..15a7acb4f0fb60150c8d3700135bc3d6794f4714 100644 (file)
@@ -44,13 +44,13 @@ __modsi3:
        swi     r30,r1,8
        swi     r31,r1,12
 
-       BEQI    r6,$LaDiv_By_Zero       # Div_by_Zero   # Division Error
-       BEQI    r5,$LaResult_Is_Zero    # Result is Zero 
-       BGEId   r5,$LaR5_Pos 
+       BRCI    EQ,r6,$LaDiv_By_Zero       # Div_by_Zero   # Division Error
+       BRCI    EQ,r5,$LaResult_Is_Zero    # Result is Zero 
+       BRCID   GE,r5,$LaR5_Pos 
        ADD     r28,r5,r0               # Get the sign of the result [ Depends only on the first arg]
        RSUBI   r5,r5,0                 # Make r5 positive
 $LaR5_Pos:
-       BGEI    r6,$LaR6_Pos
+       BRCI    GE,r6,$LaR6_Pos
        RSUBI   r6,r6,0     # Make r6 positive
 $LaR6_Pos:
        ADDIK   r3,r0,0      # Clear mod
@@ -59,22 +59,22 @@ $LaR6_Pos:
    # First part try to find the first '1' in the r5
 $LaDIV1:
        ADD     r5,r5,r5         # left shift logical r5
-       BGEID   r5,$LaDIV1       #
+       BRCID   GE,r5,$LaDIV1       #
        ADDIK   r29,r29,-1
 $LaDIV2:
        ADD     r5,r5,r5         # left shift logical  r5 get the '1' into the Carry
        ADDC    r3,r3,r3         # Move that bit into the Mod register
        rSUB    r31,r6,r3        # Try to subtract (r30 a r6)
-       BLTi    r31,$LaMOD_TOO_SMALL
+       BRCI    LT,r31,$LaMOD_TOO_SMALL
        OR      r3,r0,r31       # Move the r31 to mod since the result was positive
        ADDIK   r30,r30,1
 $LaMOD_TOO_SMALL:
        ADDIK   r29,r29,-1
-       BEQi    r29,$LaLOOP_END
+       BRCI    EQ,r29,$LaLOOP_END
        ADD     r30,r30,r30         # Shift in the '1' into div
        BRI     $LaDIV2          # Div2
 $LaLOOP_END:
-       BGEI    r28,$LaRETURN_HERE
+       BRCI    GE,r28,$LaRETURN_HERE
        BRId    $LaRETURN_HERE
        rsubi   r3,r3,0 # Negate the result
 $LaDiv_By_Zero: