summaryrefslogtreecommitdiffstats
path: root/src/mesa/x86/3dnow_xform4.S
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2001-10-22 01:21:16 +0000
committerBrian Paul <[email protected]>2001-10-22 01:21:16 +0000
commit45d21ca58755098e8fd47e1083c68e244c4f903c (patch)
tree87def99e8717cac416e72ef42ea05451ded05cf5 /src/mesa/x86/3dnow_xform4.S
parent52d4c6ebb52a40a707ea12058c07875b71c7f4e7 (diff)
applied Andrew Lewycky's patches
Diffstat (limited to 'src/mesa/x86/3dnow_xform4.S')
-rw-r--r--src/mesa/x86/3dnow_xform4.S101
1 files changed, 35 insertions, 66 deletions
diff --git a/src/mesa/x86/3dnow_xform4.S b/src/mesa/x86/3dnow_xform4.S
index 06d7c6950a2..0336b708bc8 100644
--- a/src/mesa/x86/3dnow_xform4.S
+++ b/src/mesa/x86/3dnow_xform4.S
@@ -1,4 +1,4 @@
-/* $Id: 3dnow_xform4.S,v 1.1 2001/03/29 06:46:16 gareth Exp $ */
+/* $Id: 3dnow_xform4.S,v 1.2 2001/10/22 01:21:16 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -59,17 +59,17 @@ GLNAME( _mesa_3dnow_transform_points4_general ):
PREFETCHW ( REGIND(EDX) )
- MOVQ ( REGIND(EAX), MM0 ) /* x1 | x0 */
- MOVQ ( REGOFF(8, EAX), MM4 ) /* x3 | x2 */
-
- ADD_L ( EDI, EAX ) /* next vertex */
-
ALIGNTEXT16
LLBL( G3TPGR_1 ):
PREFETCHW ( REGOFF(32, EDX) ) /* prefetch 2 vertices ahead */
- PREFETCH ( REGIND(EAX) )
+ MOVQ ( REGIND(EAX), MM0 ) /* x1 | x0 */
+ MOVQ ( REGOFF(8, EAX), MM4 ) /* x3 | x2 */
+
+ ADD_L ( EDI, EAX ) /* next vertex */
+ PREFETCH ( REGIND(EAX) )
+
MOVQ ( MM0, MM2 ) /* x1 | x0 */
MOVQ ( MM4, MM6 ) /* x3 | x2 */
@@ -110,10 +110,6 @@ LLBL( G3TPGR_1 ):
MOVQ ( MM6, REGOFF(-16, EDX) )
MOVQ ( MM7, REGOFF(-8, EDX) )
- MOVQ ( REGIND(EAX), MM0 ) /* x1 | x0 */
-
- MOVQ ( REGOFF(8, EAX), MM4 ) /* x3 | x2 */
- ADD_L ( EDI, EAX ) /* next vertex */
DEC_L ( ESI ) /* decrement vertex counter */
JNZ ( LLBL( G3TPGR_1 ) ) /* cnt > 0 ? -> process next vertex */
@@ -165,16 +161,16 @@ GLNAME( _mesa_3dnow_transform_points4_perspective ):
MOVQ ( REGOFF(32, ECX), MM2 ) /* m21 | m20 */
PXOR ( MM7, MM7 ) /* 0 | 0 */
+ALIGNTEXT16
+LLBL( G3TPPR_1 ):
+
+ PREFETCHW ( REGOFF(32, EDX) ) /* prefetch 2 vertices ahead */
+
MOVQ ( REGIND(EAX), MM4 ) /* x1 | x0 */
MOVQ ( REGOFF(8, EAX), MM5 ) /* x3 | x2 */
MOVD ( REGOFF(8, EAX), MM3 ) /* | x2 */
ADD_L ( EDI, EAX ) /* next vertex */
-
-ALIGNTEXT16
-LLBL( G3TPPR_1 ):
-
- PREFETCHW ( REGOFF(32, EDX) ) /* prefetch 2 vertices ahead */
PREFETCH ( REGOFF(32, EAX) ) /* hopefully stride is zero */
MOVQ ( MM5, MM6 ) /* x3 | x2 */
@@ -193,12 +189,6 @@ LLBL( G3TPPR_1 ):
MOVQ ( MM5, REGOFF(-16, EDX) ) /* write r0, r1 */
MOVQ ( MM6, REGOFF(-8, EDX) ) /* write r2, r3 */
- MOVQ ( REGIND(EAX), MM4 ) /* x1 | x0 */
-
- MOVQ ( REGOFF(8, EAX), MM5 ) /* x3 | x2 */
- MOVD ( REGOFF(8, EAX), MM3 ) /* | x2 */
-
- ADD_L ( EDI, EAX ) /* next vertex */
DEC_L ( ESI ) /* decrement vertex counter */
JNZ ( LLBL( G3TPPR_1 ) ) /* cnt > 0 ? -> process next vertex */
@@ -244,15 +234,15 @@ GLNAME( _mesa_3dnow_transform_points4_3d ):
MOVD ( REGOFF(40, ECX), MM7 ) /* | m10 */
PUNPCKLDQ ( REGOFF(56, ECX), MM7 ) /* m14 | m10 */
- MOVQ ( REGIND(EAX), MM2 ) /* x1 | x0 */
- MOVQ ( REGOFF(8, EAX), MM3 ) /* x3 | x2 */
-
ALIGNTEXT16
LLBL( G3TP3R_1 ):
PREFETCHW ( REGOFF(32, EDX) ) /* prefetch 2 vertices ahead */
PREFETCH ( REGOFF(32, EAX) ) /* hopefully array is tightly packed */
+ MOVQ ( REGIND(EAX), MM2 ) /* x1 | x0 */
+ MOVQ ( REGOFF(8, EAX), MM3 ) /* x3 | x2 */
+
MOVQ ( MM2, MM0 ) /* x1 | x0 */
MOVQ ( MM3, MM4 ) /* x3 | x2 */
@@ -289,9 +279,6 @@ LLBL( G3TP3R_1 ):
MOVQ ( MM4, REGOFF(-16, EDX) ) /* write r0, r1 */
MOVQ ( MM5, REGOFF(-8, EDX) ) /* write r2, r3 */
- MOVQ ( REGIND(EAX), MM2 ) /* x1 | x0 */
- MOVQ ( REGOFF(8, EAX), MM3 ) /* x3 | x2 */
-
DEC_L ( ESI ) /* decrement vertex counter */
JNZ ( LLBL( G3TP3R_1 ) ) /* cnt > 0 ? -> process next vertex */
@@ -337,16 +324,16 @@ GLNAME( _mesa_3dnow_transform_points4_3d_no_rot ):
MOVQ ( REGOFF(48, ECX), MM1 ) /* m31 | m30 */
+ALIGNTEXT16
+LLBL( G3TP3NRR_1 ):
+
+ PREFETCHW ( REGOFF(32, EDX) ) /* prefetch 2 vertices ahead */
+
MOVQ ( REGIND(EAX), MM4 ) /* x1 | x0 */
MOVQ ( REGOFF(8, EAX), MM5 ) /* x3 | x2 */
MOVD ( REGOFF(12, EAX), MM7 ) /* | x3 */
ADD_L ( EDI, EAX ) /* next vertex */
-
-ALIGNTEXT16
-LLBL( G3TP3NRR_1 ):
-
- PREFETCHW ( REGOFF(32, EDX) ) /* prefetch 2 vertices ahead */
PREFETCH ( REGOFF(32, EAX) ) /* hopefully stride is zero */
MOVQ ( MM5, MM6 ) /* x3 | x2 */
@@ -364,12 +351,6 @@ LLBL( G3TP3NRR_1 ):
MOVQ ( MM4, REGOFF(-16, EDX) ) /* write r0, r1 */
MOVQ ( MM5, REGOFF(-8, EDX) ) /* write r2, r3 */
- MOVQ ( REGIND(EAX), MM4 ) /* x1 | x0 */
- MOVQ ( REGOFF(8, EAX), MM5 ) /* x3 | x2 */
-
- MOVD ( REGOFF(12, EAX), MM7 ) /* | x3 */
- ADD_L ( EDI, EAX ) /* next vertex */
-
DEC_L ( ESI ) /* decrement vertex counter */
JNZ ( LLBL( G3TP3NRR_1 ) ) /* cnt > 0 ? -> process next vertex */
@@ -416,15 +397,15 @@ GLNAME( _mesa_3dnow_transform_points4_2d ):
MOVQ ( REGOFF(48, ECX), MM2 ) /* m31 | m30 */
- MOVQ ( REGIND(EAX), MM3 ) /* x1 | x0 */
- MOVQ ( REGOFF(8, EAX), MM5 ) /* x3 | x2 */
-
- ADD_L ( EDI, EAX ) /* next vertex */
-
ALIGNTEXT16
LLBL( G3TP2R_1 ):
PREFETCHW ( REGOFF(32, EDX) ) /* prefetch 2 vertices ahead */
+
+ MOVQ ( REGIND(EAX), MM3 ) /* x1 | x0 */
+ MOVQ ( REGOFF(8, EAX), MM5 ) /* x3 | x2 */
+
+ ADD_L ( EDI, EAX ) /* next vertex */
PREFETCH ( REGIND(EAX) )
MOVQ ( MM3, MM4 ) /* x1 | x0 */
@@ -443,10 +424,6 @@ LLBL( G3TP2R_1 ):
MOVQ ( MM5, REGOFF(-8, EDX) ) /* write r2, r3 */
MOVQ ( MM3, REGOFF(-16, EDX) ) /* write r0, r1 */
- MOVQ ( REGIND(EAX), MM3 ) /* x1 | x0 */
-
- MOVQ ( REGOFF(8, EAX), MM5 ) /* x3 | x2 */
- ADD_L ( EDI, EAX ) /* next vertex */
DEC_L ( ESI ) /* decrement vertex counter */
JNZ ( LLBL( G3TP2R_1 ) ) /* cnt > 0 ? -> process next vertex */
@@ -491,15 +468,15 @@ GLNAME( _mesa_3dnow_transform_points4_2d_no_rot ):
MOVQ ( REGOFF(48, ECX), MM1 ) /* m31 | m30 */
- MOVQ ( REGIND(EAX), MM4 ) /* x1 | x0 */
- MOVQ ( REGOFF(8, EAX), MM5 ) /* x3 | x2 */
-
- ADD_L ( EDI, EAX ) /* next vertex */
-
ALIGNTEXT16
LLBL( G3TP2NRR_2 ):
PREFETCHW ( REGOFF(32, EDX) ) /* prefetch 2 vertices ahead */
+
+ MOVQ ( REGIND(EAX), MM4 ) /* x1 | x0 */
+ MOVQ ( REGOFF(8, EAX), MM5 ) /* x3 | x2 */
+
+ ADD_L ( EDI, EAX ) /* next vertex */
PREFETCH ( REGIND(EAX) )
PFMUL ( MM0, MM4 ) /* x1*m11 | x0*m00 */
@@ -514,10 +491,6 @@ LLBL( G3TP2NRR_2 ):
MOVQ ( MM6, REGOFF(-16, EDX) ) /* write r0, r1 */
MOVQ ( MM5, REGOFF(-8, EDX) ) /* write r2, r3 */
- MOVQ ( REGIND(EAX), MM4 ) /* x1 | x0 */
- MOVQ ( REGOFF(8, EAX), MM5 ) /* x3 | x2 */
-
- ADD_L ( EDI, EAX ) /* next vertex */
DEC_L ( ESI ) /* decrement vertex counter */
JNZ ( LLBL( G3TP2NRR_2 ) ) /* cnt > 0 ? -> process next vertex */
@@ -557,25 +530,21 @@ GLNAME( _mesa_3dnow_transform_points4_identity ):
TEST_L ( ESI, ESI )
JZ ( LLBL( G3TPIR_2 ) )
- MOVQ ( REGIND(EAX), MM0 ) /* x1 | x0 */
- MOVQ ( REGOFF(8, EAX), MM1 ) /* x3 | x2 */
-
- ADD_L ( EDI, EAX ) /* next vertex */
-
ALIGNTEXT16
LLBL( G3TPIR_1 ):
PREFETCHW ( REGOFF(32, EDX) ) /* prefetch 2 vertices ahead */
+
+ MOVQ ( REGIND(EAX), MM0 ) /* x1 | x0 */
+ MOVQ ( REGOFF(8, EAX), MM1 ) /* x3 | x2 */
+
+ ADD_L ( EDI, EAX ) /* next vertex */
PREFETCH ( REGIND(EAX) )
ADD_L ( CONST(16), EDX ) /* next r */
MOVQ ( MM0, REGOFF(-16, EDX) ) /* r1 | r0 */
MOVQ ( MM1, REGOFF(-8, EDX) ) /* r3 | r2 */
- MOVQ ( REGIND(EAX), MM0 ) /* x1 | x0 */
-
- MOVQ ( REGOFF(8, EAX), MM1 ) /* x3 | x2 */
- ADD_L ( EDI, EAX ) /* next vertex */
DEC_L ( ESI ) /* decrement vertex counter */
JNZ ( LLBL( G3TPIR_1 ) ) /* cnt > 0 ? -> process next vertex */