1 /* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_vtxtmp_x86.S,v 1.1 2002/10/30 12:51:58 alanh Exp $ */
2 /**************************************************************************
4 Copyright 2002 Tungsten Graphics Inc., Cedar Park, Texas.
8 Permission is hereby granted, free of charge, to any person obtaining a
9 copy of this software and associated documentation files (the "Software"),
10 to deal in the Software without restriction, including without limitation
11 on the rights to use, copy, modify, merge, publish, distribute, sub
12 license, and/or sell copies of the Software, and to permit persons to whom
13 the Software is furnished to do so, subject to the following conditions:
15 The above copyright notice and this permission notice (including the next
16 paragraph) shall be included in all copies or substantial portions of the
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
22 ATI, TUNGSTEN GRAPHICS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
23 DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24 OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
25 USE OR OTHER DEALINGS IN THE SOFTWARE.
27 **************************************************************************/
37 vertex 3f vertex size 4
40 GLOBL ( _x86_Vertex3f_4 )
59 GLOBL ( _x86_Vertex3f_4_end )
62 vertex 3f vertex size 6
64 GLOBL ( _x86_Vertex3f_6 )
88 GLOBL ( _x86_Vertex3f_6_end )
90 vertex 3f generic size
92 GLOBL ( _x86_Vertex3f )
106 movsl %ds:(%esi), %es:(%edi)
117 GLOBL ( _x86_Vertex3f_end )
120 Vertex 3fv vertex size 6
122 GLOBL ( _x86_Vertex3fv_6 )
146 GLOBL ( _x86_Vertex3fv_6_end )
149 Vertex 3fv vertex size 8
151 GLOBL ( _x86_Vertex3fv_8 )
179 GLOBL ( _x86_Vertex3fv_8_end )
182 Vertex 3fv generic vertex size
184 GLOBL ( _x86_Vertex3fv )
188 movl (0x1010101), %edi
199 movsl %ds:(%esi), %es:(%edi)
200 movl %edi, (0x1010101)
201 movl (0x2020202), %eax
205 movl %eax, (0x2020202)
209 GLOBL ( _x86_Vertex3fv_end )
213 * Generic handler for 2 float format data. This can be used for
214 * TexCoord2f and possibly other functions.
217 GLOBL ( _x86_Attribute2f )
224 GLOBL ( _x86_Attribute2f_end )
228 * Generic handler for 2 float vector format data. This can be used for
229 * TexCoord2fv and possibly other functions.
232 GLOBL( _x86_Attribute2fv)
233 movl 4(%esp), %eax /* load 'v' off stack */
234 movl (%eax), %ecx /* load v[0] */
235 movl 4(%eax), %eax /* load v[1] */
236 movl %ecx, 0 /* store v[0] to current vertex */
237 movl %eax, 4 /* store v[1] to current vertex */
239 GLOBL ( _x86_Attribute2fv_end )
243 * Generic handler for 3 float format data. This can be used for
244 * Normal3f, Color3f (when the color target is also float), or
248 GLOBL ( _x86_Attribute3f )
256 GLOBL ( _x86_Attribute3f_end )
259 * Generic handler for 3 float vector format data. This can be used for
260 * Normal3f, Color3f (when the color target is also float), or
264 GLOBL( _x86_Attribute3fv)
265 movl 4(%esp), %eax /* load 'v' off stack */
266 movl (%eax), %ecx /* load v[0] */
267 movl 4(%eax), %edx /* load v[1] */
268 movl 8(%eax), %eax /* load v[2] */
269 movl %ecx, 0 /* store v[0] to current vertex */
270 movl %edx, 4 /* store v[1] to current vertex */
271 movl %eax, 8 /* store v[2] to current vertex */
273 GLOBL ( _x86_Attribute3fv_end )
279 GLOBL ( _x86_Color4ubv_ub )
281 movl $0x12345678, %edx
285 GLOBL ( _x86_Color4ubv_ub_end )
290 GLOBL ( _x86_Color4ubv_4f )
299 movl (%edx,%eax,4),%eax
300 movl (%edx,%ecx,4),%ecx
301 movl %eax, (0xdeadbeaf)
302 movl %ecx, (0xdeadbeaf)
308 movl (%edx,%eax,4), %eax
309 movl (%edx,%ecx,4), %ecx
310 movl %eax, (0xdeadbeaf)
311 movl %ecx, (0xdeadbeaf)
314 GLOBL ( _x86_Color4ubv_4f_end )
320 GLOBL( _x86_Color4ub_ub )
332 GLOBL( _x86_Color4ub_ub_end )
336 MultiTexCoord2fv st0/st1
338 GLOBL( _x86_MultiTexCoord2fv )
345 movl %edx, 0xdeadbeef(%eax)
346 movl %ecx, 0xdeadbeef(%eax)
348 GLOBL( _x86_MultiTexCoord2fv_end )
354 GLOBL( _x86_MultiTexCoord2fv_2 )
358 movl 0(,%eax,4), %edx
364 GLOBL( _x86_MultiTexCoord2fv_2_end )
367 MultiTexCoord2f st0/st1
369 GLOBL( _x86_MultiTexCoord2f )
375 movl %edx, 0xdeadbeef(%eax)
376 movl %ecx, 0xdeadbeef(%eax)
378 GLOBL( _x86_MultiTexCoord2f_end )
383 GLOBL( _x86_MultiTexCoord2f_2 )
386 movl 12(%esp,1), %ecx
388 movl 0(,%eax,4), %eax
392 GLOBL( _x86_MultiTexCoord2f_2_end )
394 #if defined(USE_SSE_ASM)
396 * This can be used as a template for either Color3fv (when the color
397 * target is also a 3f) or Normal3fv.
400 GLOBL( _sse_Attribute3fv )
407 GLOBL( _sse_Attribute3fv_end )
410 * This can be used as a template for either Color3f (when the color
411 * target is also a 3f) or Normal3f.
414 GLOBL( _sse_Attribute3f )
415 movlps 4(%esp), %xmm0
420 GLOBL( _sse_Attribute3f_end )
424 * Generic handler for 2 float vector format data. This can be used for
425 * TexCoord2fv and possibly other functions.
428 GLOBL( _sse_Attribute2fv )
433 GLOBL( _sse_Attribute2fv_end )
437 * Generic handler for 2 float format data. This can be used for
438 * TexCoord2f and possibly other functions.
441 GLOBL( _sse_Attribute2f )
442 movlps 4(%esp), %xmm0
445 GLOBL( _sse_Attribute2f_end )
448 MultiTexCoord2fv st0/st1
450 GLOBL( _sse_MultiTexCoord2fv )
455 movlps %xmm0, 0xdeadbeef(,%eax,8)
457 GLOBL( _sse_MultiTexCoord2fv_end )
462 GLOBL( _sse_MultiTexCoord2fv_2 )
466 movl 0(,%eax,4), %edx
470 GLOBL( _sse_MultiTexCoord2fv_2_end )
473 MultiTexCoord2f st0/st1
475 GLOBL( _sse_MultiTexCoord2f )
478 movlps 8(%esp), %xmm0
479 movlps %xmm0, 0xdeadbeef(,%eax,8)
481 GLOBL( _sse_MultiTexCoord2f_end )
486 GLOBL( _sse_MultiTexCoord2f_2 )
488 movlps 8(%esp), %xmm0
490 movl 0(,%eax,4), %eax
493 GLOBL( _sse_MultiTexCoord2f_2_end )