diff options
author | davem69 <davem69> | 2001-06-05 23:54:00 +0000 |
---|---|---|
committer | davem69 <davem69> | 2001-06-05 23:54:00 +0000 |
commit | 775355a88a0927e2e3a855036c26950397a61d7b (patch) | |
tree | 21cb0c4eb6e3829ccfb3099933cfd80921516ef0 /src/mesa/sparc/sparc_matrix.h | |
parent | 0fab0702b03a0036e20cd823ad31bdc361f8fc1b (diff) | |
download | external_mesa3d-775355a88a0927e2e3a855036c26950397a61d7b.zip external_mesa3d-775355a88a0927e2e3a855036c26950397a61d7b.tar.gz external_mesa3d-775355a88a0927e2e3a855036c26950397a61d7b.tar.bz2 |
Sparc optimized GLAPI dispatch table.
Diffstat (limited to 'src/mesa/sparc/sparc_matrix.h')
-rw-r--r-- | src/mesa/sparc/sparc_matrix.h | 194 |
1 files changed, 40 insertions, 154 deletions
diff --git a/src/mesa/sparc/sparc_matrix.h b/src/mesa/sparc/sparc_matrix.h index 4b452fd..85beef9 100644 --- a/src/mesa/sparc/sparc_matrix.h +++ b/src/mesa/sparc/sparc_matrix.h @@ -1,4 +1,34 @@ -/* $Id: sparc_matrix.h,v 1.1 2001/05/23 14:27:03 brianp Exp $ */ +/* $Id: sparc_matrix.h,v 1.2 2001/06/05 23:54:01 davem69 Exp $ */ + +#ifndef _SPARC_MATRIX_H +#define _SPARC_MATRIX_H + +#ifdef __sparc_v9__ +#define LDPTR ldx +#define MAT_M 0x00 +#define MAT_INV 0x08 +#define V4F_DATA 0x00 +#define V4F_START 0x08 +#define V4F_COUNT 0x10 +#define V4F_STRIDE 0x14 +#define V4F_SIZE 0x18 +#define V4F_FLAGS 0x1c +#else +#define LDPTR ld +#define MAT_M 0x00 +#define MAT_INV 0x04 +#define V4F_DATA 0x00 +#define V4F_START 0x04 +#define V4F_COUNT 0x08 +#define V4F_STRIDE 0x0c +#define V4F_SIZE 0x10 +#define V4F_FLAGS 0x14 +#endif + +#define VEC_SIZE_1 1 +#define VEC_SIZE_2 3 +#define VEC_SIZE_3 7 +#define VEC_SIZE_4 15 #define M0 %f16 #define M1 %f17 @@ -17,158 +47,6 @@ #define M14 %f30 #define M15 %f31 -/* Seems to work, disable if unaligned traps begin to appear... -DaveM */ -#define USE_LD_DOUBLE - -#ifndef USE_LD_DOUBLE - -#define LDMATRIX_0_1_2_3_12_13_14_15(BASE) \ - ld [BASE + ( 0 * 0x4)], M0; \ - ld [BASE + ( 1 * 0x4)], M1; \ - ld [BASE + ( 2 * 0x4)], M2; \ - ld [BASE + ( 3 * 0x4)], M3; \ - ld [BASE + (12 * 0x4)], M12; \ - ld [BASE + (13 * 0x4)], M13; \ - ld [BASE + (14 * 0x4)], M14; \ - ld [BASE + (15 * 0x4)], M15 - -#define LDMATRIX_0_1_12_13(BASE) \ - ld [BASE + ( 0 * 0x4)], M0; \ - ld [BASE + ( 1 * 0x4)], M1; \ - ld [BASE + (12 * 0x4)], M12; \ - ld [BASE + (13 * 0x4)], M13 - -#define LDMATRIX_0_12_13(BASE) \ - ld [BASE + ( 0 * 0x4)], M0; \ - ld [BASE + (12 * 0x4)], M12; \ - ld [BASE + (13 * 0x4)], M13 - -#define LDMATRIX_0_1_2_12_13_14(BASE) \ - ld [BASE + ( 0 * 0x4)], M0; \ - ld [BASE + ( 1 * 0x4)], M1; \ - ld [BASE + ( 2 * 0x4)], M2; \ - ld [BASE + (12 * 0x4)], M12; \ - ld [BASE + (13 * 0x4)], M13; \ - ld [BASE + (14 * 0x4)], M14 - -#define LDMATRIX_0_12_13_14(BASE) \ - ld [BASE + ( 0 * 0x4)], M0; \ - ld [BASE + (12 * 0x4)], M12; \ - ld [BASE + (13 * 0x4)], M13; \ - ld [BASE + (14 * 0x4)], M14 - -#define LDMATRIX_0_14(BASE) \ - ld [BASE + ( 0 * 0x4)], M0; \ - ld [BASE + (14 * 0x4)], M14 - -#define LDMATRIX_0_1_2_3_4_5_6_7_12_13_14_15(BASE) \ - ld [BASE + ( 0 * 0x4)], M0; \ - ld [BASE + ( 1 * 0x4)], M1; \ - ld [BASE + ( 2 * 0x4)], M2; \ - ld [BASE + ( 3 * 0x4)], M3; \ - ld [BASE + ( 4 * 0x4)], M4; \ - ld [BASE + ( 5 * 0x4)], M5; \ - ld [BASE + ( 6 * 0x4)], M6; \ - ld [BASE + ( 7 * 0x4)], M7; \ - ld [BASE + (12 * 0x4)], M12; \ - ld [BASE + (13 * 0x4)], M13; \ - ld [BASE + (14 * 0x4)], M14; \ - ld [BASE + (15 * 0x4)], M15 - -#define LDMATRIX_0_1_4_5_12_13(BASE) \ - ld [BASE + ( 0 * 0x4)], M0; \ - ld [BASE + ( 1 * 0x4)], M1; \ - ld [BASE + ( 4 * 0x4)], M4; \ - ld [BASE + ( 5 * 0x4)], M5; \ - ld [BASE + (12 * 0x4)], M12; \ - ld [BASE + (13 * 0x4)], M13 - -#define LDMATRIX_0_5_12_13(BASE) \ - ld [BASE + ( 0 * 0x4)], M0; \ - ld [BASE + ( 5 * 0x4)], M5; \ - ld [BASE + (12 * 0x4)], M12; \ - ld [BASE + (13 * 0x4)], M13 - -#define LDMATRIX_0_1_2_3_4_5_6_12_13_14(BASE) \ - ld [BASE + ( 0 * 0x4)], M0; \ - ld [BASE + ( 1 * 0x4)], M1; \ - ld [BASE + ( 2 * 0x4)], M2; \ - ld [BASE + ( 3 * 0x4)], M3; \ - ld [BASE + ( 4 * 0x4)], M4; \ - ld [BASE + ( 5 * 0x4)], M5; \ - ld [BASE + ( 6 * 0x4)], M6; \ - ld [BASE + (12 * 0x4)], M12; \ - ld [BASE + (13 * 0x4)], M13; \ - ld [BASE + (14 * 0x4)], M14 - -#define LDMATRIX_0_5_12_13_14(BASE) \ - ld [BASE + ( 0 * 0x4)], M0; \ - ld [BASE + ( 5 * 0x4)], M5; \ - ld [BASE + (12 * 0x4)], M12; \ - ld [BASE + (13 * 0x4)], M13; \ - ld [BASE + (14 * 0x4)], M14 - -#define LDMATRIX_0_5_14(BASE) \ - ld [BASE + ( 0 * 0x4)], M0; \ - ld [BASE + ( 5 * 0x4)], M5; \ - ld [BASE + (14 * 0x4)], M14 - -#define LDMATRIX_0_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15(BASE) \ - ld [BASE + ( 0 * 0x4)], M0; \ - ld [BASE + ( 1 * 0x4)], M1; \ - ld [BASE + ( 2 * 0x4)], M2; \ - ld [BASE + ( 3 * 0x4)], M3; \ - ld [BASE + ( 4 * 0x4)], M4; \ - ld [BASE + ( 5 * 0x4)], M5; \ - ld [BASE + ( 6 * 0x4)], M6; \ - ld [BASE + ( 7 * 0x4)], M7; \ - ld [BASE + ( 8 * 0x4)], M8; \ - ld [BASE + ( 9 * 0x4)], M9; \ - ld [BASE + (10 * 0x4)], M10; \ - ld [BASE + (11 * 0x4)], M11; \ - ld [BASE + (12 * 0x4)], M12; \ - ld [BASE + (13 * 0x4)], M13; \ - ld [BASE + (14 * 0x4)], M14; \ - ld [BASE + (15 * 0x4)], M15 - -#define LDMATRIX_0_5_12_13(BASE) \ - ld [BASE + ( 0 * 0x4)], M0; \ - ld [BASE + ( 5 * 0x4)], M5; \ - ld [BASE + (12 * 0x4)], M12; \ - ld [BASE + (13 * 0x4)], M13 - -#define LDMATRIX_0_1_2_4_5_6_8_9_10_12_13_14(BASE) \ - ld [BASE + ( 0 * 0x4)], M0; \ - ld [BASE + ( 1 * 0x4)], M1; \ - ld [BASE + ( 2 * 0x4)], M2; \ - ld [BASE + ( 4 * 0x4)], M4; \ - ld [BASE + ( 5 * 0x4)], M5; \ - ld [BASE + ( 6 * 0x4)], M6; \ - ld [BASE + ( 8 * 0x4)], M8; \ - ld [BASE + ( 9 * 0x4)], M9; \ - ld [BASE + (10 * 0x4)], M10; \ - ld [BASE + (12 * 0x4)], M12; \ - ld [BASE + (13 * 0x4)], M13; \ - ld [BASE + (14 * 0x4)], M14 - -#define LDMATRIX_0_5_10_12_13_14(BASE) \ - ld [BASE + ( 0 * 0x4)], M0; \ - ld [BASE + ( 5 * 0x4)], M5; \ - ld [BASE + (10 * 0x4)], M10; \ - ld [BASE + (12 * 0x4)], M12; \ - ld [BASE + (13 * 0x4)], M13; \ - ld [BASE + (14 * 0x4)], M14 - -#define LDMATRIX_0_5_8_9_10_14(BASE) \ - ld [BASE + ( 0 * 0x4)], M0; \ - ld [BASE + ( 5 * 0x4)], M5; \ - ld [BASE + ( 8 * 0x4)], M8; \ - ld [BASE + ( 9 * 0x4)], M9; \ - ld [BASE + (10 * 0x4)], M10; \ - ld [BASE + (14 * 0x4)], M14 - -#else /* !(USE_LD_DOUBLE) */ - #define LDMATRIX_0_1_2_3_12_13_14_15(BASE) \ ldd [BASE + ( 0 * 0x4)], M0; \ ldd [BASE + ( 2 * 0x4)], M2; \ @@ -250,6 +128,14 @@ ld [BASE + ( 5 * 0x4)], M5; \ ldd [BASE + (12 * 0x4)], M12 +#define LDMATRIX_0_1_2_4_5_6_8_9_10(BASE) \ + ldd [BASE + ( 0 * 0x4)], M0; \ + ld [BASE + ( 2 * 0x4)], M2; \ + ldd [BASE + ( 4 * 0x4)], M4; \ + ld [BASE + ( 6 * 0x4)], M6; \ + ldd [BASE + ( 8 * 0x4)], M8; \ + ld [BASE + (10 * 0x4)], M10 + #define LDMATRIX_0_1_2_4_5_6_8_9_10_12_13_14(BASE) \ ldd [BASE + ( 0 * 0x4)], M0; \ ld [BASE + ( 2 * 0x4)], M2; \ @@ -274,4 +160,4 @@ ld [BASE + (10 * 0x4)], M10; \ ld [BASE + (14 * 0x4)], M14 -#endif /* USE_LD_DOUBLE */ +#endif /* !(_SPARC_MATRIX_H) */ |