Adopt VAX asm code to modern gas requirements (prefix all registers with %)
This commit is contained in:
parent
eb466727eb
commit
9dc43bddfe
8 changed files with 701 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: distinfo,v 1.30 2010/02/13 09:43:40 asau Exp $
|
||||
$NetBSD: distinfo,v 1.31 2010/05/18 05:02:34 martin Exp $
|
||||
|
||||
SHA1 (gmp-5.0.1.tar.bz2) = 6340edc7ceb95f9015a758c7c0d196eb0f441d49
|
||||
RMD160 (gmp-5.0.1.tar.bz2) = 3e89ebf5294639e1c926b92d9786bbdd0c8fa587
|
||||
|
@ -6,3 +6,10 @@ Size (gmp-5.0.1.tar.bz2) = 2006109 bytes
|
|||
SHA1 (patch-aa) = a53db34c8ecf38d6556a59a0fa7382456c30fab6
|
||||
SHA1 (patch-ab) = e768eca25c117871041d12a618e38d9d252f25e5
|
||||
SHA1 (patch-ac) = 9c7e6817632596bfd6c86a30e3b2d7f78fccd5ff
|
||||
SHA1 (patch-ad) = 732a9bb11c6bcd20f8147d6792dac2c8a129053f
|
||||
SHA1 (patch-ae) = 578180d5f762d93841e14b3f1ae23738e62b49bf
|
||||
SHA1 (patch-af) = 9abbed8afff6b44b5ab1a9f04ded8a4874aea62c
|
||||
SHA1 (patch-ag) = ac75d9dc02fad79b46594797bed947b7fec8fed0
|
||||
SHA1 (patch-ah) = 4d52c7b2ed3c66cea4ad5b485ed92a6d9550ab3c
|
||||
SHA1 (patch-ai) = a6f965879d27d2b151612c672f647d0e961c0993
|
||||
SHA1 (patch-aj) = 39690d83743559d4385a1ac868445013acbbe784
|
||||
|
|
57
devel/gmp/patches/patch-ad
Normal file
57
devel/gmp/patches/patch-ad
Normal file
|
@ -0,0 +1,57 @@
|
|||
--- mpn/vax/add_n.s.orig 2010-02-06 13:43:14.000000000 +0100
|
||||
+++ mpn/vax/add_n.s 2010-05-17 22:55:26.000000000 +0200
|
||||
@@ -30,30 +30,30 @@
|
||||
.globl ___gmpn_add_n
|
||||
___gmpn_add_n:
|
||||
.word 0x0
|
||||
- movl 16(ap),r0
|
||||
- movl 12(ap),r1
|
||||
- movl 8(ap),r2
|
||||
- movl 4(ap),r3
|
||||
- mnegl r0,r5
|
||||
- addl2 $3,r0
|
||||
- ashl $-2,r0,r0 # unroll loop count
|
||||
- bicl2 $-4,r5 # mask out low 2 bits
|
||||
- movaq (r5)[r5],r5 # 9x
|
||||
- jmp Loop(r5)
|
||||
+ movl 16(%ap),%r0
|
||||
+ movl 12(%ap),%r1
|
||||
+ movl 8(%ap),%r2
|
||||
+ movl 4(%ap),%r3
|
||||
+ mnegl %r0,%r5
|
||||
+ addl2 $3,%r0
|
||||
+ ashl $-2,%r0,%r0 # unroll loop count
|
||||
+ bicl2 $-4,%r5 # mask out low 2 bits
|
||||
+ movaq (%r5)[%r5],%r5 # 9x
|
||||
+ jmp Loop(%r5)
|
||||
|
||||
-Loop: movl (r2)+,r4
|
||||
- adwc (r1)+,r4
|
||||
- movl r4,(r3)+
|
||||
- movl (r2)+,r4
|
||||
- adwc (r1)+,r4
|
||||
- movl r4,(r3)+
|
||||
- movl (r2)+,r4
|
||||
- adwc (r1)+,r4
|
||||
- movl r4,(r3)+
|
||||
- movl (r2)+,r4
|
||||
- adwc (r1)+,r4
|
||||
- movl r4,(r3)+
|
||||
- sobgtr r0,Loop
|
||||
+Loop: movl (%r2)+,%r4
|
||||
+ adwc (%r1)+,%r4
|
||||
+ movl %r4,(%r3)+
|
||||
+ movl (%r2)+,%r4
|
||||
+ adwc (%r1)+,%r4
|
||||
+ movl %r4,(%r3)+
|
||||
+ movl (%r2)+,%r4
|
||||
+ adwc (%r1)+,%r4
|
||||
+ movl %r4,(%r3)+
|
||||
+ movl (%r2)+,%r4
|
||||
+ adwc (%r1)+,%r4
|
||||
+ movl %r4,(%r3)+
|
||||
+ sobgtr %r0,Loop
|
||||
|
||||
- adwc r0,r0
|
||||
+ adwc %r0,%r0
|
||||
ret
|
166
devel/gmp/patches/patch-ae
Normal file
166
devel/gmp/patches/patch-ae
Normal file
|
@ -0,0 +1,166 @@
|
|||
--- mpn/vax/addmul_1.s.orig 2010-02-06 13:43:14.000000000 +0100
|
||||
+++ mpn/vax/addmul_1.s 2010-05-17 23:22:38.000000000 +0200
|
||||
@@ -30,95 +30,95 @@
|
||||
.globl ___gmpn_addmul_1
|
||||
___gmpn_addmul_1:
|
||||
.word 0xfc0
|
||||
- movl 12(ap),r4
|
||||
- movl 8(ap),r8
|
||||
- movl 4(ap),r9
|
||||
- movl 16(ap),r6
|
||||
+ movl 12(%ap),%r4
|
||||
+ movl 8(%ap),%r8
|
||||
+ movl 4(%ap),%r9
|
||||
+ movl 16(%ap),%r6
|
||||
jlss s2_big
|
||||
|
||||
- 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
|
||||
+Loop1: movl (%r8)+,%r1
|
||||
jlss L1n0
|
||||
- emul r1,r6,$0,r2
|
||||
- addl2 r11,r2
|
||||
- adwc $0,r3
|
||||
- addl2 r2,(r9)+
|
||||
- adwc $0,r3
|
||||
-L1: movl (r8)+,r1
|
||||
+ emul %r1,%r6,$0,%r2
|
||||
+ addl2 %r11,%r2
|
||||
+ adwc $0,%r3
|
||||
+ addl2 %r2,(%r9)+
|
||||
+ adwc $0,%r3
|
||||
+L1: movl (%r8)+,%r1
|
||||
jlss L1n1
|
||||
-L1p1: emul r1,r6,$0,r10
|
||||
- addl2 r3,r10
|
||||
- adwc $0,r11
|
||||
- addl2 r10,(r9)+
|
||||
- adwc $0,r11
|
||||
+L1p1: emul %r1,%r6,$0,%r10
|
||||
+ addl2 %r3,%r10
|
||||
+ adwc $0,%r11
|
||||
+ addl2 %r10,(%r9)+
|
||||
+ adwc $0,%r11
|
||||
|
||||
- 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
|
||||
- addl2 r2,(r9)+
|
||||
- adwc $0,r3
|
||||
- movl (r8)+,r1
|
||||
+L1n0: emul %r1,%r6,$0,%r2
|
||||
+ addl2 %r11,%r2
|
||||
+ adwc %r6,%r3
|
||||
+ addl2 %r2,(%r9)+
|
||||
+ adwc $0,%r3
|
||||
+ movl (%r8)+,%r1
|
||||
jgeq L1p1
|
||||
-L1n1: emul r1,r6,$0,r10
|
||||
- addl2 r3,r10
|
||||
- adwc r6,r11
|
||||
- addl2 r10,(r9)+
|
||||
- adwc $0,r11
|
||||
+L1n1: emul %r1,%r6,$0,%r10
|
||||
+ addl2 %r3,%r10
|
||||
+ adwc %r6,%r11
|
||||
+ addl2 %r10,(%r9)+
|
||||
+ adwc $0,%r11
|
||||
|
||||
- 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
|
||||
+s2_big: clrl %r3
|
||||
+ incl %r4
|
||||
+ ashl $-1,%r4,%r7
|
||||
+ jlbc %r4,L2
|
||||
+ clrl %r11
|
||||
|
||||
# Loop for S2_LIMB >= 0x80000000
|
||||
-Loop2: movl (r8)+,r1
|
||||
+Loop2: movl (%r8)+,%r1
|
||||
jlss L2n0
|
||||
- emul r1,r6,$0,r2
|
||||
- addl2 r11,r2
|
||||
- adwc r1,r3
|
||||
- addl2 r2,(r9)+
|
||||
- adwc $0,r3
|
||||
-L2: movl (r8)+,r1
|
||||
+ emul %r1,%r6,$0,%r2
|
||||
+ addl2 %r11,%r2
|
||||
+ adwc %r1,%r3
|
||||
+ addl2 %r2,(%r9)+
|
||||
+ adwc $0,%r3
|
||||
+L2: movl (%r8)+,%r1
|
||||
jlss L2n1
|
||||
-L2p1: emul r1,r6,$0,r10
|
||||
- addl2 r3,r10
|
||||
- adwc r1,r11
|
||||
- addl2 r10,(r9)+
|
||||
- adwc $0,r11
|
||||
+L2p1: emul %r1,%r6,$0,%r10
|
||||
+ addl2 %r3,%r10
|
||||
+ adwc %r1,%r11
|
||||
+ addl2 %r10,(%r9)+
|
||||
+ adwc $0,%r11
|
||||
|
||||
- sobgtr r7,Loop2
|
||||
- movl r11,r0
|
||||
+ sobgtr %r7,Loop2
|
||||
+ movl %r11,%r0
|
||||
ret
|
||||
|
||||
-L2n0: emul r1,r6,$0,r2
|
||||
- addl2 r11,r2
|
||||
- adwc r6,r3
|
||||
- addl2 r2,(r9)+
|
||||
- adwc r1,r3
|
||||
- movl (r8)+,r1
|
||||
+L2n0: emul %r1,%r6,$0,%r2
|
||||
+ addl2 %r11,%r2
|
||||
+ adwc %r6,%r3
|
||||
+ addl2 %r2,(%r9)+
|
||||
+ adwc %r1,%r3
|
||||
+ movl (%r8)+,%r1
|
||||
jgeq L2p1
|
||||
-L2n1: emul r1,r6,$0,r10
|
||||
- addl2 r3,r10
|
||||
- adwc r6,r11
|
||||
- addl2 r10,(r9)+
|
||||
- adwc r1,r11
|
||||
+L2n1: emul %r1,%r6,$0,%r10
|
||||
+ addl2 %r3,%r10
|
||||
+ adwc %r6,%r11
|
||||
+ addl2 %r10,(%r9)+
|
||||
+ adwc %r1,%r11
|
||||
|
||||
- sobgtr r7,Loop2
|
||||
- movl r11,r0
|
||||
+ sobgtr %r7,Loop2
|
||||
+ movl %r11,%r0
|
||||
ret
|
47
devel/gmp/patches/patch-af
Normal file
47
devel/gmp/patches/patch-af
Normal file
|
@ -0,0 +1,47 @@
|
|||
--- mpn/vax/lshift.s.orig 2010-02-06 13:43:14.000000000 +0100
|
||||
+++ mpn/vax/lshift.s 2010-05-17 23:08:42.000000000 +0200
|
||||
@@ -31,26 +31,26 @@
|
||||
.globl ___gmpn_lshift
|
||||
___gmpn_lshift:
|
||||
.word 0x1c0
|
||||
- movl 4(ap),r7
|
||||
- movl 8(ap),r6
|
||||
- movl 12(ap),r1
|
||||
- movl 16(ap),r8
|
||||
+ movl 4(%ap),%r7
|
||||
+ movl 8(%ap),%r6
|
||||
+ movl 12(%ap),%r1
|
||||
+ movl 16(%ap),%r8
|
||||
|
||||
- moval (r6)[r1],r6
|
||||
- moval (r7)[r1],r7
|
||||
- clrl r3
|
||||
- movl -(r6),r2
|
||||
- ashq r8,r2,r4
|
||||
- movl r5,r0
|
||||
- movl r2,r3
|
||||
- decl r1
|
||||
+ moval (%r6)[%r1],%r6
|
||||
+ moval (%r7)[%r1],%r7
|
||||
+ clrl %r3
|
||||
+ movl -(%r6),%r2
|
||||
+ ashq %r8,%r2,%r4
|
||||
+ movl %r5,%r0
|
||||
+ movl %r2,%r3
|
||||
+ decl %r1
|
||||
jeql Lend
|
||||
|
||||
-Loop: movl -(r6),r2
|
||||
- ashq r8,r2,r4
|
||||
- movl r5,-(r7)
|
||||
- movl r2,r3
|
||||
- sobgtr r1,Loop
|
||||
+Loop: movl -(%r6),%r2
|
||||
+ ashq %r8,%r2,%r4
|
||||
+ movl %r5,-(%r7)
|
||||
+ movl %r2,%r3
|
||||
+ sobgtr %r1,Loop
|
||||
|
||||
-Lend: movl r4,-4(r7)
|
||||
+Lend: movl %r4,-4(%r7)
|
||||
ret
|
157
devel/gmp/patches/patch-ag
Normal file
157
devel/gmp/patches/patch-ag
Normal file
|
@ -0,0 +1,157 @@
|
|||
--- mpn/vax/mul_1.s.orig 2010-02-06 13:43:14.000000000 +0100
|
||||
+++ mpn/vax/mul_1.s 2010-05-17 23:13:37.000000000 +0200
|
||||
@@ -30,92 +30,92 @@
|
||||
.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
|
||||
+ movl 12(%ap),%r4
|
||||
+ movl 8(%ap),%r8
|
||||
+ movl 4(%ap),%r9
|
||||
+ movl 16(%ap),%r6
|
||||
jlss s2_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
|
||||
+Loop1: movl (%r8)+,%r1
|
||||
jlss L1n0
|
||||
- emul r1,r6,$0,r2
|
||||
- addl2 r11,r2
|
||||
- adwc $0,r3
|
||||
- movl r2,(r9)+
|
||||
-L1: movl (r8)+,r1
|
||||
+ 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)+
|
||||
+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
|
||||
+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)+
|
||||
+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
|
||||
+s2_big: clrl %r3
|
||||
+ incl %r4
|
||||
+ ashl $-1,%r4,%r7
|
||||
+ jlbc %r4,L2
|
||||
+ clrl %r11
|
||||
|
||||
# Loop for S2_LIMB >= 0x80000000
|
||||
-Loop2: movl (r8)+,r1
|
||||
+Loop2: movl (%r8)+,%r1
|
||||
jlss L2n0
|
||||
- emul r1,r6,$0,r2
|
||||
- addl2 r11,r2
|
||||
- adwc r1,r3
|
||||
- movl r2,(r9)+
|
||||
-L2: movl (r8)+,r1
|
||||
+ 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)+
|
||||
+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
|
||||
+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)+
|
||||
+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
|
43
devel/gmp/patches/patch-ah
Normal file
43
devel/gmp/patches/patch-ah
Normal file
|
@ -0,0 +1,43 @@
|
|||
--- mpn/vax/rshift.s.orig 2010-02-06 13:43:14.000000000 +0100
|
||||
+++ mpn/vax/rshift.s 2010-05-17 23:15:00.000000000 +0200
|
||||
@@ -31,24 +31,24 @@
|
||||
.globl ___gmpn_rshift
|
||||
___gmpn_rshift:
|
||||
.word 0x1c0
|
||||
- movl 4(ap),r7
|
||||
- movl 8(ap),r6
|
||||
- movl 12(ap),r1
|
||||
- movl 16(ap),r8
|
||||
+ movl 4(%ap),%r7
|
||||
+ movl 8(%ap),%r6
|
||||
+ movl 12(%ap),%r1
|
||||
+ movl 16(%ap),%r8
|
||||
|
||||
- movl (r6)+,r2
|
||||
- subl3 r8,$32,r8
|
||||
- ashl r8,r2,r0
|
||||
- decl r1
|
||||
+ movl (%r6)+,%r2
|
||||
+ subl3 %r8,$32,%r8
|
||||
+ ashl %r8,%r2,%r0
|
||||
+ decl %r1
|
||||
jeql Lend
|
||||
|
||||
-Loop: movl (r6)+,r3
|
||||
- ashq r8,r2,r4
|
||||
- movl r5,(r7)+
|
||||
- movl r3,r2
|
||||
- sobgtr r1,Loop
|
||||
+Loop: movl (%r6)+,%r3
|
||||
+ ashq %r8,%r2,%r4
|
||||
+ movl %r5,(%r7)+
|
||||
+ movl %r3,%r2
|
||||
+ sobgtr %r1,Loop
|
||||
|
||||
-Lend: clrl r3
|
||||
- ashq r8,r2,r4
|
||||
- movl r5,(r7)
|
||||
+Lend: clrl %r3
|
||||
+ ashq %r8,%r2,%r4
|
||||
+ movl %r5,(%r7)
|
||||
ret
|
57
devel/gmp/patches/patch-ai
Normal file
57
devel/gmp/patches/patch-ai
Normal file
|
@ -0,0 +1,57 @@
|
|||
--- mpn/vax/sub_n.s.orig 2010-02-06 13:43:14.000000000 +0100
|
||||
+++ mpn/vax/sub_n.s 2010-05-17 23:16:33.000000000 +0200
|
||||
@@ -30,30 +30,30 @@
|
||||
.globl ___gmpn_sub_n
|
||||
___gmpn_sub_n:
|
||||
.word 0x0
|
||||
- movl 16(ap),r0
|
||||
- movl 12(ap),r1
|
||||
- movl 8(ap),r2
|
||||
- movl 4(ap),r3
|
||||
- mnegl r0,r5
|
||||
- addl2 $3,r0
|
||||
- ashl $-2,r0,r0 # unroll loop count
|
||||
- bicl2 $-4,r5 # mask out low 2 bits
|
||||
- movaq (r5)[r5],r5 # 9x
|
||||
- jmp Loop(r5)
|
||||
+ movl 16(%ap),%r0
|
||||
+ movl 12(%ap),%r1
|
||||
+ movl 8(%ap),%r2
|
||||
+ movl 4(%ap),%r3
|
||||
+ mnegl %r0,%r5
|
||||
+ addl2 $3,%r0
|
||||
+ ashl $-2,%r0,%r0 # unroll loop count
|
||||
+ bicl2 $-4,%r5 # mask out low 2 bits
|
||||
+ movaq (%r5)[%r5],%r5 # 9x
|
||||
+ jmp Loop(%r5)
|
||||
|
||||
-Loop: movl (r2)+,r4
|
||||
- sbwc (r1)+,r4
|
||||
- movl r4,(r3)+
|
||||
- movl (r2)+,r4
|
||||
- sbwc (r1)+,r4
|
||||
- movl r4,(r3)+
|
||||
- movl (r2)+,r4
|
||||
- sbwc (r1)+,r4
|
||||
- movl r4,(r3)+
|
||||
- movl (r2)+,r4
|
||||
- sbwc (r1)+,r4
|
||||
- movl r4,(r3)+
|
||||
- sobgtr r0,Loop
|
||||
+Loop: movl (%r2)+,%r4
|
||||
+ sbwc (%r1)+,%r4
|
||||
+ movl %r4,(%r3)+
|
||||
+ movl (%r2)+,%r4
|
||||
+ sbwc (%r1)+,%r4
|
||||
+ movl %r4,(%r3)+
|
||||
+ movl (%r2)+,%r4
|
||||
+ sbwc (%r1)+,%r4
|
||||
+ movl %r4,(%r3)+
|
||||
+ movl (%r2)+,%r4
|
||||
+ sbwc (%r1)+,%r4
|
||||
+ movl %r4,(%r3)+
|
||||
+ sobgtr %r0,Loop
|
||||
|
||||
- adwc r0,r0
|
||||
+ adwc %r0,%r0
|
||||
ret
|
166
devel/gmp/patches/patch-aj
Normal file
166
devel/gmp/patches/patch-aj
Normal file
|
@ -0,0 +1,166 @@
|
|||
--- mpn/vax/submul_1.s.orig 2010-02-06 13:43:14.000000000 +0100
|
||||
+++ mpn/vax/submul_1.s 2010-05-17 23:19:59.000000000 +0200
|
||||
@@ -30,95 +30,95 @@
|
||||
.globl ___gmpn_submul_1
|
||||
___gmpn_submul_1:
|
||||
.word 0xfc0
|
||||
- movl 12(ap),r4
|
||||
- movl 8(ap),r8
|
||||
- movl 4(ap),r9
|
||||
- movl 16(ap),r6
|
||||
+ movl 12(%ap),%r4
|
||||
+ movl 8(%ap),%r8
|
||||
+ movl 4(%ap),%r9
|
||||
+ movl 16(%ap),%r6
|
||||
jlss s2_big
|
||||
|
||||
- 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
|
||||
+Loop1: movl (%r8)+,%r1
|
||||
jlss L1n0
|
||||
- emul r1,r6,$0,r2
|
||||
- addl2 r11,r2
|
||||
- adwc $0,r3
|
||||
- subl2 r2,(r9)+
|
||||
- adwc $0,r3
|
||||
-L1: movl (r8)+,r1
|
||||
+ emul %r1,%r6,$0,%r2
|
||||
+ addl2 %r11,%r2
|
||||
+ adwc $0,%r3
|
||||
+ subl2 %r2,(%r9)+
|
||||
+ adwc $0,%r3
|
||||
+L1: movl (%r8)+,%r1
|
||||
jlss L1n1
|
||||
-L1p1: emul r1,r6,$0,r10
|
||||
- addl2 r3,r10
|
||||
- adwc $0,r11
|
||||
- subl2 r10,(r9)+
|
||||
- adwc $0,r11
|
||||
+L1p1: emul %r1,%r6,$0,%r10
|
||||
+ addl2 %r3,%r10
|
||||
+ adwc $0,%r11
|
||||
+ subl2 %r10,(%r9)+
|
||||
+ adwc $0,%r11
|
||||
|
||||
- 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
|
||||
- subl2 r2,(r9)+
|
||||
- adwc $0,r3
|
||||
- movl (r8)+,r1
|
||||
+L1n0: emul %r1,%r6,$0,%r2
|
||||
+ addl2 %r11,%r2
|
||||
+ adwc %r6,%r3
|
||||
+ subl2 %r2,(%r9)+
|
||||
+ adwc $0,%r3
|
||||
+ movl (%r8)+,%r1
|
||||
jgeq L1p1
|
||||
-L1n1: emul r1,r6,$0,r10
|
||||
- addl2 r3,r10
|
||||
- adwc r6,r11
|
||||
- subl2 r10,(r9)+
|
||||
- adwc $0,r11
|
||||
+L1n1: emul %r1,%r6,$0,%r10
|
||||
+ addl2 %r3,%r10
|
||||
+ adwc %r6,%r11
|
||||
+ subl2 %r10,(%r9)+
|
||||
+ adwc $0,%r11
|
||||
|
||||
- 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
|
||||
+s2_big: clrl %r3
|
||||
+ incl %r4
|
||||
+ ashl $-1,%r4,%r7
|
||||
+ jlbc %r4,L2
|
||||
+ clrl %r11
|
||||
|
||||
# Loop for S2_LIMB >= 0x80000000
|
||||
-Loop2: movl (r8)+,r1
|
||||
+Loop2: movl (%r8)+,%r1
|
||||
jlss L2n0
|
||||
- emul r1,r6,$0,r2
|
||||
- addl2 r11,r2
|
||||
- adwc r1,r3
|
||||
- subl2 r2,(r9)+
|
||||
- adwc $0,r3
|
||||
-L2: movl (r8)+,r1
|
||||
+ emul %r1,%r6,$0,%r2
|
||||
+ addl2 %r11,%r2
|
||||
+ adwc %r1,%r3
|
||||
+ subl2 %r2,(%r9)+
|
||||
+ adwc $0,%r3
|
||||
+L2: movl (%r8)+,%r1
|
||||
jlss L2n1
|
||||
-L2p1: emul r1,r6,$0,r10
|
||||
- addl2 r3,r10
|
||||
- adwc r1,r11
|
||||
- subl2 r10,(r9)+
|
||||
- adwc $0,r11
|
||||
+L2p1: emul %r1,%r6,$0,%r10
|
||||
+ addl2 %r3,%r10
|
||||
+ adwc %r1,%r11
|
||||
+ subl2 %r10,(%r9)+
|
||||
+ adwc $0,%r11
|
||||
|
||||
- sobgtr r7,Loop2
|
||||
- movl r11,r0
|
||||
+ sobgtr %r7,Loop2
|
||||
+ movl %r11,%r0
|
||||
ret
|
||||
|
||||
-L2n0: emul r1,r6,$0,r2
|
||||
- addl2 r11,r2
|
||||
- adwc r6,r3
|
||||
- subl2 r2,(r9)+
|
||||
- adwc r1,r3
|
||||
- movl (r8)+,r1
|
||||
+L2n0: emul %r1,%r6,$0,%r2
|
||||
+ addl2 %r11,%r2
|
||||
+ adwc %r6,%r3
|
||||
+ subl2 %r2,(%r9)+
|
||||
+ adwc %r1,%r3
|
||||
+ movl (%r8)+,%r1
|
||||
jgeq L2p1
|
||||
-L2n1: emul r1,r6,$0,r10
|
||||
- addl2 r3,r10
|
||||
- adwc r6,r11
|
||||
- subl2 r10,(r9)+
|
||||
- adwc r1,r11
|
||||
+L2n1: emul %r1,%r6,$0,%r10
|
||||
+ addl2 %r3,%r10
|
||||
+ adwc %r6,%r11
|
||||
+ subl2 %r10,(%r9)+
|
||||
+ adwc %r1,%r11
|
||||
|
||||
- sobgtr r7,Loop2
|
||||
- movl r11,r0
|
||||
+ sobgtr %r7,Loop2
|
||||
+ movl %r11,%r0
|
||||
ret
|
Loading…
Reference in a new issue