Wrong syntax in mpn/vax
Paul_Koning at Dell.com
Paul_Koning at Dell.com
Fri Jul 13 19:32:50 CEST 2012
The assembly files for VAX need repair; the register syntax it uses isn't the right one for GNU as. It wants leading % on register names.
The attached patch cures this.
paul
diff -ur gmp-5.0.5-orig/mpn/vax/addmul_1.s gmp-5.0.5/mpn/vax/addmul_1.s
--- gmp-5.0.5-orig/mpn/vax/addmul_1.s 2012-05-06 07:19:50.000000000 -0400
+++ gmp-5.0.5/mpn/vax/addmul_1.s 2012-07-13 13:11:54.399211430 -0400
@@ -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
diff -ur gmp-5.0.5-orig/mpn/vax/add_n.s gmp-5.0.5/mpn/vax/add_n.s
--- gmp-5.0.5-orig/mpn/vax/add_n.s 2012-05-06 07:19:50.000000000 -0400
+++ gmp-5.0.5/mpn/vax/add_n.s 2012-07-13 13:16:11.180280545 -0400
@@ -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
diff -ur gmp-5.0.5-orig/mpn/vax/lshift.s gmp-5.0.5/mpn/vax/lshift.s
--- gmp-5.0.5-orig/mpn/vax/lshift.s 2012-05-06 07:19:50.000000000 -0400
+++ gmp-5.0.5/mpn/vax/lshift.s 2012-07-13 13:13:53.508153119 -0400
@@ -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
diff -ur gmp-5.0.5-orig/mpn/vax/mul_1.s gmp-5.0.5/mpn/vax/mul_1.s
--- gmp-5.0.5-orig/mpn/vax/mul_1.s 2012-05-06 07:19:50.000000000 -0400
+++ gmp-5.0.5/mpn/vax/mul_1.s 2012-07-13 13:17:44.924242523 -0400
@@ -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
diff -ur gmp-5.0.5-orig/mpn/vax/rshift.s gmp-5.0.5/mpn/vax/rshift.s
--- gmp-5.0.5-orig/mpn/vax/rshift.s 2012-05-06 07:19:50.000000000 -0400
+++ gmp-5.0.5/mpn/vax/rshift.s 2012-07-13 13:14:42.180168096 -0400
@@ -23,32 +23,32 @@
# sptr (sp + 8)
# size (sp + 12)
# cnt (sp + 16)
-# r0=retval r1=size r2,r3=itmp r4,r5=otmp call-used registers
-# r6=sptr r7=rptr r8=cnt r9 r10 r11 call-saved registers
+# %r0=retval %r1=size %r2,%r3=itmp %r4,%r5=otmp call-used registers
+# %r6=sptr %r7=rptr %r8=cnt %r9 %r10 %r11 call-saved registers
.text
.align 1
.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
diff -ur gmp-5.0.5-orig/mpn/vax/submul_1.s gmp-5.0.5/mpn/vax/submul_1.s
--- gmp-5.0.5-orig/mpn/vax/submul_1.s 2012-05-06 07:19:50.000000000 -0400
+++ gmp-5.0.5/mpn/vax/submul_1.s 2012-07-13 13:14:59.488192494 -0400
@@ -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
diff -ur gmp-5.0.5-orig/mpn/vax/sub_n.s gmp-5.0.5/mpn/vax/sub_n.s
--- gmp-5.0.5-orig/mpn/vax/sub_n.s 2012-05-06 07:19:50.000000000 -0400
+++ gmp-5.0.5/mpn/vax/sub_n.s 2012-07-13 13:15:21.253148939 -0400
@@ -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
More information about the gmp-bugs
mailing list