diff options
Diffstat (limited to 'sysdeps/sparc/sparc32/sparcv8/addmul_1.S')
-rw-r--r-- | sysdeps/sparc/sparc32/sparcv8/addmul_1.S | 85 |
1 files changed, 40 insertions, 45 deletions
diff --git a/sysdeps/sparc/sparc32/sparcv8/addmul_1.S b/sysdeps/sparc/sparc32/sparcv8/addmul_1.S index fb9ea7cf0e..7b871b8e8b 100644 --- a/sysdeps/sparc/sparc32/sparcv8/addmul_1.S +++ b/sysdeps/sparc/sparc32/sparcv8/addmul_1.S @@ -27,54 +27,52 @@ ! size o2 ! s2_limb o3 -#include "sysdep.h" +#include <sysdep.h> -.text - .align 4 - .global C_SYMBOL_NAME(__mpn_addmul_1) -C_SYMBOL_NAME(__mpn_addmul_1): - orcc %g0,%g0,%g2 +ENTRY(__mpn_addmul_1) ld [%o1+0],%o4 ! 1 - sll %o2,4,%g1 - and %g1,(4-1)<<4,%g1 -#if PIC + orcc %g0,%g0,%g2 mov %o7,%g4 ! Save return address register - call 1f - add %o7,LL-1f,%g3 -1: mov %g4,%o7 ! Restore return address register -#else - sethi %hi(LL),%g3 - or %g3,%lo(LL),%g3 -#endif - jmp %g3+%g1 - nop -LL: -LL00: add %o0,-4,%o0 - b Loop00 /* 4, 8, 12, ... */ - add %o1,-4,%o1 - nop -LL01: b Loop01 /* 1, 5, 9, ... */ + and %g1,(4-1)<<4,%g1 +1: call 2f + add %o7,3f-1b,%g3 +2: jmp %g3+%g1 + mov %g4,%o7 ! Restore return address register + + .align 4 +3: +LOC(00): + add %o0,-4,%o0 + b LOC(loop00) /* 4, 8, 12, ... */ + add %o1,-4,%o1 nop +LOC(01): + b LOC(loop01) /* 1, 5, 9, ... */ + nop nop nop -LL10: add %o0,-12,%o0 /* 2, 6, 10, ... */ - b Loop10 - add %o1,4,%o1 +LOC(10): + add %o0,-12,%o0 /* 2, 6, 10, ... */ + b LOC(loop10) + add %o1,4,%o1 nop -LL11: add %o0,-8,%o0 /* 3, 7, 11, ... */ - b Loop11 - add %o1,-8,%o1 +LOC(11): + add %o0,-8,%o0 /* 3, 7, 11, ... */ + b LOC(loop11) + add %o1,-8,%o1 nop -1: addcc %g3,%g2,%g3 ! 1 +LOC(loop): + addcc %g3,%g2,%g3 ! 1 ld [%o1+4],%o4 ! 2 rd %y,%g2 ! 1 addx %g0,%g2,%g2 ld [%o0+0],%g1 ! 2 addcc %g1,%g3,%g3 st %g3,[%o0+0] ! 1 -Loop00: umul %o4,%o3,%g3 ! 2 +LOC(loop00): + umul %o4,%o3,%g3 ! 2 ld [%o0+4],%g1 ! 2 addxcc %g3,%g2,%g3 ! 2 ld [%o1+8],%o4 ! 3 @@ -83,7 +81,8 @@ Loop00: umul %o4,%o3,%g3 ! 2 nop addcc %g1,%g3,%g3 st %g3,[%o0+4] ! 2 -Loop11: umul %o4,%o3,%g3 ! 3 +LOC(loop11): + umul %o4,%o3,%g3 ! 3 addxcc %g3,%g2,%g3 ! 3 ld [%o1+12],%o4 ! 4 rd %y,%g2 ! 3 @@ -92,7 +91,8 @@ Loop11: umul %o4,%o3,%g3 ! 3 ld [%o0+8],%g1 ! 2 addcc %g1,%g3,%g3 st %g3,[%o0+8] ! 3 -Loop10: umul %o4,%o3,%g3 ! 4 +LOC(loop10): + umul %o4,%o3,%g3 ! 4 addxcc %g3,%g2,%g3 ! 4 ld [%o1+0],%o4 ! 1 rd %y,%g2 ! 4 @@ -102,9 +102,10 @@ Loop10: umul %o4,%o3,%g3 ! 4 st %g3,[%o0+12] ! 4 add %o0,16,%o0 addx %g0,%g2,%g2 -Loop01: addcc %o2,-4,%o2 - bg 1b - umul %o4,%o3,%g3 ! 1 +LOC(loop01): + addcc %o2,-4,%o2 + bg LOC(loop) + umul %o4,%o3,%g3 ! 1 addcc %g3,%g2,%g3 ! 4 rd %y,%g2 ! 4 @@ -112,13 +113,7 @@ Loop01: addcc %o2,-4,%o2 ld [%o0+0],%g1 ! 2 addcc %g1,%g3,%g3 st %g3,[%o0+0] ! 4 - addx %g0,%g2,%o0 - retl - nop - - -! umul, ld, addxcc, rd, st - -! umul, ld, addxcc, rd, ld, addcc, st, addx + addx %g0,%g2,%o0 +END(__mpn_addmul_1) |