annotate mp3lib/decode_k7.s @ 988:c6f88600d409

Enable to avoid checking version of gcc. New tests of as
author nickols_k
date Mon, 04 Jun 2001 09:38:18 +0000
parents 3560d38486ab
children 970fbd433564
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
1 ///
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
2 /// Replacement of synth_1to1() with AMD's 3DNowEx(DSP)! SIMD operations support
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
3 ///
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
4 /// This code based 'decode_3dnow.s' by Syuuhei Kashiyama
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
5 /// <squash@mb.kcom.ne.jp>,only some types of changes have been made:
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
6 ///
779
a349510321ff slight improvements. k7 vs 3dnow already win 12 prcnts
nickols_k
parents: 763
diff changeset
7 /// - Added new opcode PFNACC
a349510321ff slight improvements. k7 vs 3dnow already win 12 prcnts
nickols_k
parents: 763
diff changeset
8 /// - decreased number of opcodes (as it was suggested by k7 manual)
763
b659160c629f improvements
nickols_k
parents: 736
diff changeset
9 /// (using memory reference as operand of instructions)
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
10 /// - change function name for support 3DNowEx! automatic detect
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
11 ///
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
12 /// note: because K7 processors are an aggresive out-of-order three-way
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
13 /// superscalar ones instruction order is not significand for them.
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
14 ///
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
15 /// Modified by Nick Kurshev <nickols_k@mail.ru>
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
16 ///
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
17 / synth_1to1_3dnow works the same way as the c version of
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
18 / synth_1to1. this assembler code based 'decode-i586.s'
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
19 / (by Stefan Bieschewski <stb@acm.org>), two types of changes
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
20 / have been made:
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
21 / - use {MMX,3DNow!} instruction for reduce cpu
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
22 / - remove unused(?) local symbols
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
23 /
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
24 / useful sources of information on optimizing 3DNow! code include:
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
25 / AMD 3DNow! Technology Manual (Publication #21928)
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
26 / English: http://www.amd.com/K6/k6docs/pdf/21928d.pdf
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
27 / (Japanese: http://www.amd.com/japan/K6/k6docs/j21928c.pdf)
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
28 / AMD-K6-2 Processor Code Optimization Application Note (Publication #21924)
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
29 / English: http://www.amd.com/K6/k6docs/pdf/21924b.pdf
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
30 /
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
31 / This code was tested only AMD-K6-2 processor Linux systems,
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
32 / please tell me:
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
33 / - whether this code works on other 3DNow! capable processors
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
34 / (ex.IDT-C6-2) or not
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
35 / - whether this code works on other OSes or not
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
36 /
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
37 / by KIMURA Takuhiro <kim@hannah.ipc.miyakyo-u.ac.jp> - until 31.Mar.1998
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
38 / <kim@comtec.co.jp> - after 1.Apr.1998
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
39
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
40 / Enhancments for q-word operation by Michael Hipp
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
41
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
42 .bss
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
43 .comm buffs,4352,4
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
44 .data
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
45 .align 4
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
46 bo:
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
47 .long 1
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
48 .text
779
a349510321ff slight improvements. k7 vs 3dnow already win 12 prcnts
nickols_k
parents: 763
diff changeset
49 /* int synth_1to1(real *bandPtr,int channel,unsigned char *out) */
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
50 .globl synth_1to1_3dnowex
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
51 synth_1to1_3dnowex:
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
52 subl $12,%esp
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
53 pushl %ebp
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
54 pushl %edi
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
55 pushl %esi
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
56 pushl %ebx
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
57
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
58 movl 32(%esp),%eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
59 movl 40(%esp),%esi
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
60 movl $0,%edi
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
61 movl bo,%ebp
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
62 cmpl %edi,36(%esp)
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
63 jne .L48
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
64 decl %ebp
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
65 andl $15,%ebp
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
66 movl %ebp,bo
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
67 movl $buffs,%ecx
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
68 jmp .L49
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
69 .L48:
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
70 addl $2,%esi
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
71 movl $buffs+2176,%ecx
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
72 .L49:
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
73 testl $1,%ebp
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
74 je .L50
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
75 movl %ecx,%ebx
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
76 movl %ebp,16(%esp)
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
77 pushl %eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
78 movl 20(%esp),%edx
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
79 leal (%ebx,%edx,4),%eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
80 pushl %eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
81 movl 24(%esp),%eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
82 incl %eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
83 andl $15,%eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
84 leal 1088(,%eax,4),%eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
85 addl %ebx,%eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
86 jmp .L74
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
87 .L50:
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
88 leal 1088(%ecx),%ebx
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
89 leal 1(%ebp),%edx
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
90 movl %edx,16(%esp)
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
91 pushl %eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
92 leal 1092(%ecx,%ebp,4),%eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
93 pushl %eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
94 leal (%ecx,%ebp,4),%eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
95 .L74:
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
96 pushl %eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
97 call dct64_3dnowex
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
98 movl 16(%esp),%edx
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
99 leal 0(,%edx,4),%edx
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
100 movl $decwin+64,%eax
779
a349510321ff slight improvements. k7 vs 3dnow already win 12 prcnts
nickols_k
parents: 763
diff changeset
101 movl %eax,%ecx
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
102 subl %edx,%ecx
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
103 movl $16,%ebp
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
104
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
105 .L55:
763
b659160c629f improvements
nickols_k
parents: 736
diff changeset
106
859
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
107 movq (%ecx),%mm0
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
108 pfmul (%ebx),%mm0
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
109
859
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
110 movq 8(%ecx),%mm1
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
111 pfmul 8(%ebx),%mm1
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
112 pfadd %mm1,%mm0
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
113
859
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
114 movq 16(%ebx),%mm2
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
115 pfmul 16(%ecx),%mm2
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
116 pfadd %mm2,%mm0
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
117
859
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
118 movq 24(%ecx),%mm3
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
119 pfmul 24(%ebx),%mm3
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
120 pfadd %mm3,%mm0
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
121
859
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
122 movq 32(%ebx),%mm4
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
123 pfmul 32(%ecx),%mm4
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
124 pfadd %mm4,%mm0
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
125
859
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
126 movq 40(%ecx),%mm5
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
127 pfmul 40(%ebx),%mm5
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
128 pfadd %mm5,%mm0
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
129
859
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
130 movq 48(%ebx),%mm6
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
131 pfmul 48(%ecx),%mm6
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
132 pfadd %mm6,%mm0
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
133
859
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
134 movq 56(%ecx),%mm7
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
135 pfmul 56(%ebx),%mm7
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
136 pfadd %mm7,%mm0
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
137
859
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
138 pfnacc %mm0, %mm0
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
139
859
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
140 pf2id %mm0,%mm0
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
141 movd %mm0,%eax
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
142
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
143 sar $16,%eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
144 movw %ax,(%esi)
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
145
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
146 addl $64,%ebx
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
147 subl $-128,%ecx
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
148 addl $4,%esi
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
149 decl %ebp
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
150 jnz .L55
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
151
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
152 / --- end of loop 1 ---
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
153
859
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
154 movd (%ecx),%mm0
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
155 pfmul (%ebx),%mm0
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
156
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
157 movd 8(%ebx),%mm1
763
b659160c629f improvements
nickols_k
parents: 736
diff changeset
158 pfmul 8(%ecx),%mm1
859
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
159 pfadd %mm1,%mm0
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
160
859
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
161 movd 16(%ebx),%mm2
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
162 pfmul 16(%ecx),%mm2
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
163 pfadd %mm2,%mm0
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
164
859
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
165 movd 24(%ebx),%mm3
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
166 pfmul 24(%ecx),%mm3
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
167 pfadd %mm3,%mm0
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
168
859
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
169 movd 32(%ebx),%mm4
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
170 pfmul 32(%ecx),%mm4
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
171 pfadd %mm4,%mm0
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
172
859
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
173 movd 40(%ebx),%mm5
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
174 pfmul 40(%ecx),%mm5
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
175 pfadd %mm5,%mm0
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
176
859
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
177 movd 48(%ebx),%mm6
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
178 pfmul 48(%ecx),%mm6
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
179 pfadd %mm6,%mm0
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
180
859
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
181 movd 56(%ebx),%mm7
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
182 pfmul 56(%ecx),%mm7
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
183 pfadd %mm7,%mm0
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
184
859
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
185 pf2id %mm0,%mm0
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
186 movd %mm0,%eax
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
187
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
188 sar $16,%eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
189
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
190 movw %ax,(%esi)
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
191
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
192 addl $-64,%ebx
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
193 addl $4,%esi
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
194 addl $256,%ecx
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
195 movl $15,%ebp
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
196
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
197 .L68:
779
a349510321ff slight improvements. k7 vs 3dnow already win 12 prcnts
nickols_k
parents: 763
diff changeset
198 pxor %mm0, %mm0
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
199
859
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
200 movq (%ecx),%mm1
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
201 pfmul (%ebx),%mm1
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
202 pfsub %mm1,%mm0
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
203
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
204 movq 8(%ecx),%mm2
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
205 pfmul 8(%ebx),%mm2
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
206 pfsub %mm2,%mm0
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
207
859
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
208 movq 16(%ecx),%mm3
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
209 pfmul 16(%ebx),%mm3
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
210 pfsub %mm3,%mm0
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
211
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
212 movq 24(%ecx),%mm4
763
b659160c629f improvements
nickols_k
parents: 736
diff changeset
213 pfmul 24(%ebx),%mm4
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
214 pfsub %mm4,%mm0
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
215
859
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
216 movq 32(%ecx),%mm5
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
217 pfmul 32(%ebx),%mm5
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
218 pfsub %mm5,%mm0
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
219
859
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
220 movq 40(%ecx),%mm6
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
221 pfmul 40(%ebx),%mm6
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
222 pfsub %mm6,%mm0
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
223
859
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
224 movq 48(%ecx),%mm7
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
225 pfmul 48(%ebx),%mm7
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
226 pfsub %mm7,%mm0
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
227
859
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
228 movq 56(%ecx),%mm1
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
229 pfmul 56(%ebx),%mm1
3560d38486ab Better insns scheduling
nickols_k
parents: 781
diff changeset
230 pfsub %mm1,%mm0
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
231
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
232 pfacc %mm0,%mm0
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
233
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
234 pf2id %mm0,%mm0
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
235 movd %mm0,%eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
236
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
237 sar $16,%eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
238
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
239 movw %ax,(%esi)
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
240
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
241 addl $-64,%ebx
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
242 subl $-128,%ecx
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
243 addl $4,%esi
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
244 decl %ebp
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
245 jnz .L68
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
246
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
247 / --- end of loop 2
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
248
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
249 femms
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
250
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
251 movl %edi,%eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
252 popl %ebx
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
253 popl %esi
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
254 popl %edi
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
255 popl %ebp
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
256 addl $12,%esp
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
257 ret