$NetBSD: patch-ag,v 1.3 2010/05/28 13:50:26 martin Exp $ --- mpn/vax/mul_1.s.orig 2010-02-06 13:43:14.000000000 +0100 +++ mpn/vax/mul_1.s 2010-05-25 00:27:32.000000000 +0200 @@ -27,95 +27,95 @@ .text .align 1 -.globl ___gmpn_mul_1 -___gmpn_mul_1: +.globl __gmpn_mul_1 +__gmpn_mul_1: .word 0xfc0 - movl 12(ap),r4 - movl 8(ap),r8 - movl 4(ap),r9 - movl 16(ap),r6 - jlss s2_big + movl 12(%ap),%r4 + movl 8(%ap),%r8 + movl 4(%ap),%r9 + movl 16(%ap),%r6 + jlss .Ls2_big # One might want to combine the addl2 and the store below, but that # is actually just slower according to my timing tests. (VAX 3600) - clrl r3 - incl r4 - ashl $-1,r4,r7 - jlbc r4,L1 - clrl r11 + clrl %r3 + incl %r4 + ashl $-1,%r4,%r7 + jlbc %r4,.L1 + clrl %r11 # Loop for S2_LIMB < 0x80000000 -Loop1: movl (r8)+,r1 - jlss L1n0 - emul r1,r6,$0,r2 - addl2 r11,r2 - adwc $0,r3 - movl r2,(r9)+ -L1: movl (r8)+,r1 - jlss L1n1 -L1p1: emul r1,r6,$0,r10 - addl2 r3,r10 - adwc $0,r11 - movl r10,(r9)+ +.Loop1: movl (%r8)+,%r1 + jlss .L1n0 + emul %r1,%r6,$0,%r2 + addl2 %r11,%r2 + adwc $0,%r3 + movl %r2,(%r9)+ +.L1: movl (%r8)+,%r1 + jlss .L1n1 +.L1p1: emul %r1,%r6,$0,%r10 + addl2 %r3,%r10 + adwc $0,%r11 + movl %r10,(%r9)+ - sobgtr r7,Loop1 - movl r11,r0 + sobgtr %r7,.Loop1 + movl %r11,%r0 ret -L1n0: emul r1,r6,$0,r2 - addl2 r11,r2 - adwc r6,r3 - movl r2,(r9)+ - movl (r8)+,r1 - jgeq L1p1 -L1n1: emul r1,r6,$0,r10 - addl2 r3,r10 - adwc r6,r11 - movl r10,(r9)+ +.L1n0: emul %r1,%r6,$0,%r2 + addl2 %r11,%r2 + adwc %r6,%r3 + movl %r2,(%r9)+ + movl (%r8)+,%r1 + jgeq .L1p1 +.L1n1: emul %r1,%r6,$0,%r10 + addl2 %r3,%r10 + adwc %r6,%r11 + movl %r10,(%r9)+ - sobgtr r7,Loop1 - movl r11,r0 + sobgtr %r7,.Loop1 + movl %r11,%r0 ret -s2_big: clrl r3 - incl r4 - ashl $-1,r4,r7 - jlbc r4,L2 - clrl r11 +.Ls2_big: clrl %r3 + incl %r4 + ashl $-1,%r4,%r7 + jlbc %r4,.L2 + clrl %r11 # Loop for S2_LIMB >= 0x80000000 -Loop2: movl (r8)+,r1 - jlss L2n0 - emul r1,r6,$0,r2 - addl2 r11,r2 - adwc r1,r3 - movl r2,(r9)+ -L2: movl (r8)+,r1 - jlss L2n1 -L2p1: emul r1,r6,$0,r10 - addl2 r3,r10 - adwc r1,r11 - movl r10,(r9)+ +.Loop2: movl (%r8)+,%r1 + jlss .L2n0 + emul %r1,%r6,$0,%r2 + addl2 %r11,%r2 + adwc %r1,%r3 + movl %r2,(%r9)+ +.L2: movl (%r8)+,%r1 + jlss .L2n1 +.L2p1: emul %r1,%r6,$0,%r10 + addl2 %r3,%r10 + adwc %r1,%r11 + movl %r10,(%r9)+ - sobgtr r7,Loop2 - movl r11,r0 + sobgtr %r7,.Loop2 + movl %r11,%r0 ret -L2n0: emul r1,r6,$0,r2 - addl2 r1,r3 - addl2 r11,r2 - adwc r6,r3 - movl r2,(r9)+ - movl (r8)+,r1 - jgeq L2p1 -L2n1: emul r1,r6,$0,r10 - addl2 r1,r11 - addl2 r3,r10 - adwc r6,r11 - movl r10,(r9)+ +.L2n0: emul %r1,%r6,$0,%r2 + addl2 %r1,%r3 + addl2 %r11,%r2 + adwc %r6,%r3 + movl %r2,(%r9)+ + movl (%r8)+,%r1 + jgeq .L2p1 +.L2n1: emul %r1,%r6,$0,%r10 + addl2 %r1,%r11 + addl2 %r3,%r10 + adwc %r6,%r11 + movl %r10,(%r9)+ - sobgtr r7,Loop2 - movl r11,r0 + sobgtr %r7,.Loop2 + movl %r11,%r0 ret