1 /* $XFree86: xc/lib/GL/mesa/src/drv/r200/r200_vtxtmp_x86.S,v 1.2 2002/11/07 18:31:59 tsi 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 )
335 /* \todo: change the "and $7, %eax" to something like "target & 4 ? target & 5 : target & 3)" */
337 MultiTexCoord2fv st0/st1
339 GLOBL( _x86_MultiTexCoord2fv )
346 movl %edx, 0xdeadbeef(%eax)
347 movl %ecx, 0xdeadbeef(%eax)
349 GLOBL( _x86_MultiTexCoord2fv_end )
355 GLOBL( _x86_MultiTexCoord2fv_2 )
359 movl 0(,%eax,4), %edx
365 GLOBL( _x86_MultiTexCoord2fv_2_end )
368 MultiTexCoord2f st0/st1
370 GLOBL( _x86_MultiTexCoord2f )
376 movl %edx, 0xdeadbeef(%eax)
377 movl %ecx, 0xdeadbeef(%eax)
379 GLOBL( _x86_MultiTexCoord2f_end )
384 GLOBL( _x86_MultiTexCoord2f_2 )
387 movl 12(%esp,1), %ecx
389 movl 0(,%eax,4), %eax
393 GLOBL( _x86_MultiTexCoord2f_2_end )
395 #if defined(USE_SSE_ASM)
397 * This can be used as a template for either Color3fv (when the color
398 * target is also a 3f) or Normal3fv.
401 GLOBL( _sse_Attribute3fv )
408 GLOBL( _sse_Attribute3fv_end )
411 * This can be used as a template for either Color3f (when the color
412 * target is also a 3f) or Normal3f.
415 GLOBL( _sse_Attribute3f )
416 movlps 4(%esp), %xmm0
421 GLOBL( _sse_Attribute3f_end )
425 * Generic handler for 2 float vector format data. This can be used for
426 * TexCoord2fv and possibly other functions.
429 GLOBL( _sse_Attribute2fv )
434 GLOBL( _sse_Attribute2fv_end )
438 * Generic handler for 2 float format data. This can be used for
439 * TexCoord2f and possibly other functions.
442 GLOBL( _sse_Attribute2f )
443 movlps 4(%esp), %xmm0
446 GLOBL( _sse_Attribute2f_end )
449 MultiTexCoord2fv st0/st1
451 GLOBL( _sse_MultiTexCoord2fv )
456 movlps %xmm0, 0xdeadbeef(,%eax,8)
458 GLOBL( _sse_MultiTexCoord2fv_end )
463 GLOBL( _sse_MultiTexCoord2fv_2 )
467 movl 0(,%eax,4), %edx
471 GLOBL( _sse_MultiTexCoord2fv_2_end )
474 MultiTexCoord2f st0/st1
476 GLOBL( _sse_MultiTexCoord2f )
479 movlps 8(%esp), %xmm0
480 movlps %xmm0, 0xdeadbeef(,%eax,8)
482 GLOBL( _sse_MultiTexCoord2f_end )
487 GLOBL( _sse_MultiTexCoord2f_2 )
489 movlps 8(%esp), %xmm0
491 movl 0(,%eax,4), %eax
494 GLOBL( _sse_MultiTexCoord2f_2_end )