pkgsrc/devel/ffcall/patches/patch-ah
tnn 77a0443568 Merge sparc and sparc64 avcall patches, taken from clisp-2.43.
Needed for clisp-2.44 now that it doesn't ship bundled avcall.
Hinted by uwe@
Bump PKGREVISION.
XXX untested
2008-03-03 21:41:30 +00:00

254 lines
3.3 KiB
Text

$NetBSD: patch-ah,v 1.1 2008/03/03 21:41:30 tnn Exp $
--- avcall/avcall-sparc.S.orig 1999-11-26 21:02:01.000000000 +0100
+++ avcall/avcall-sparc.S
@@ -16,16 +16,11 @@ C(__builtin_avcall:)
cmp %o7, 16
bne L3
sra %g3, 2, %l0
- ld [%i0+4], %g3
- andcc %g3, 8, %g0
- bne L87
- cmp %l0, 6
ld [%i0+8], %g3
st %g3, [%l2-4]
L3:
cmp %l0, 6
-L87:
- ble,a L88
+ ble,a L66
ld [%i0+12], %g3
add %l0, -6, %l0
add %i0, 40, %l1
@@ -37,9 +32,9 @@ L7:
bne L7
add %o7, 4, %o7
ld [%i0+12], %g3
-L88:
+L66:
cmp %g3, 16
- bne,a L89
+ bne,a L67
ld [%i0], %g3
ld [%i0+4], %g3
andcc %g3, 16, %g0
@@ -75,7 +70,7 @@ L88:
ld [%i0+60], %o5
L9:
ld [%i0], %g3
-L89:
+L67:
ld [%i0+40], %o0
ld [%i0+44], %o1
ld [%i0+48], %o2
@@ -83,31 +78,31 @@ L89:
ld [%i0+56], %o4
call %g3, 0
ld [%i0+60], %o5
- mov %o0, %l2
nop
ld [%i0+12], %g3
cmp %g3, 1
be L11
+ mov %o0, %l2
cmp %g3, 0
- be L84
+ be L63
cmp %g3, 2
- be L85
+ be L64
cmp %g3, 3
- be L85
+ be L64
cmp %g3, 4
- be L85
+ be L64
cmp %g3, 5
- be L86
+ be L65
cmp %g3, 6
- be L86
+ be L65
cmp %g3, 7
- be L84
+ be L63
cmp %g3, 8
- be L84
+ be L63
cmp %g3, 9
- be L84
+ be L63
cmp %g3, 10
- be,a L90
+ be,a L68
ld [%i0+8], %g3
ld [%i0+12], %o7
add %o7, -11, %g3
@@ -137,105 +132,38 @@ L34:
b L11
std %f0, [%g3]
L38:
- be L84
+ be L63
cmp %o7, 16
bne L11
nop
ld [%i0+4], %g3
- andcc %g3, 8, %g0
- be L43
andcc %g3, 1, %g0
+ be L43
+ andcc %g3, 2, %g0
ld [%i0+16], %g3
cmp %g3, 1
bne L44
cmp %g3, 2
ld [%i0+8], %o7
- ldub [%sp-1], %g3
+ ldub [%l2], %g3
b L11
stb %g3, [%o7]
L44:
bne L46
cmp %g3, 4
ld [%i0+8], %o7
- lduh [%sp-2], %g3
+ lduh [%l2], %g3
b L11
sth %g3, [%o7]
L46:
bne L48
cmp %g3, 8
ld [%i0+8], %o7
- ld [%sp-4], %g3
+ ld [%l2], %g3
b L11
st %g3, [%o7]
L48:
bne L50
- andcc %g3, 3, %g0
- ld [%sp-8], %g3
- ld [%i0+8], %o7
- st %g3, [%o7]
- ld [%i0+8], %l0
- ld [%sp-4], %g3
- b L11
- st %g3, [%l0+4]
-L50:
- be L52
- sub %sp, %g3, %o7
- ld [%i0+8], %i0
- cmp %g3, 4
- bleu L53
- mov %g3, %l0
- and %o7, -4, %o7
-L53:
- cmp %g3, 0
- be L11
- nop
-L56:
- ldub [%o7], %g3
- addcc %l0, -1, %l0
- stb %g3, [%i0]
- add %o7, 1, %o7
- bne L56
- add %i0, 1, %i0
- b,a L11
-L52:
- cmp %o7, %sp
- bgeu L11
- ld [%i0+8], %i0
-L61:
- ld [%o7], %g3
- add %o7, 4, %o7
- st %g3, [%i0]
- cmp %o7, %sp
- blu L61
- add %i0, 4, %i0
- b,a L11
-L43:
- be L64
- andcc %g3, 2, %g0
- ld [%i0+16], %g3
- cmp %g3, 1
- bne L65
- cmp %g3, 2
- ld [%i0+8], %o7
- ldub [%l2], %g3
- b L11
- stb %g3, [%o7]
-L65:
- bne L67
- cmp %g3, 4
- ld [%i0+8], %o7
- lduh [%l2], %g3
- b L11
- sth %g3, [%o7]
-L67:
- bne L69
- cmp %g3, 8
- ld [%i0+8], %o7
- ld [%l2], %g3
- b L11
- st %g3, [%o7]
-L69:
- bne L71
add %g3, 3, %g3
ld [%l2], %g3
ld [%i0+8], %o7
@@ -244,43 +172,43 @@ L69:
ld [%l2+4], %g3
b L11
st %g3, [%l0+4]
-L71:
+L50:
srl %g3, 2, %l1
addcc %l1, -1, %l1
bneg L11
sll %l1, 2, %l0
-L75:
+L54:
ld [%l0+%l2], %o7
addcc %l1, -1, %l1
ld [%i0+8], %g3
st %o7, [%g3+%l0]
- bpos L75
+ bpos L54
add %l0, -4, %l0
b,a L11
-L64:
+L43:
be L11
nop
ld [%i0+16], %g3
cmp %g3, 1
- bne L79
+ bne L58
cmp %g3, 2
-L85:
+L64:
ld [%i0+8], %g3
b L11
stb %l2, [%g3]
-L79:
- bne L81
+L58:
+ bne L60
cmp %g3, 4
-L86:
+L65:
ld [%i0+8], %g3
b L11
sth %l2, [%g3]
-L81:
+L60:
bne L11
nop
-L84:
+L63:
ld [%i0+8], %g3
-L90:
+L68:
st %l2, [%g3]
L11:
ret