davem69 | 775355a | 2001-06-05 23:54:00 +0000 | [diff] [blame^] | 1 | /* $Id: sparc_matrix.h,v 1.2 2001/06/05 23:54:01 davem69 Exp $ */ |
| 2 | |
| 3 | #ifndef _SPARC_MATRIX_H |
| 4 | #define _SPARC_MATRIX_H |
| 5 | |
| 6 | #ifdef __sparc_v9__ |
| 7 | #define LDPTR ldx |
| 8 | #define MAT_M 0x00 |
| 9 | #define MAT_INV 0x08 |
| 10 | #define V4F_DATA 0x00 |
| 11 | #define V4F_START 0x08 |
| 12 | #define V4F_COUNT 0x10 |
| 13 | #define V4F_STRIDE 0x14 |
| 14 | #define V4F_SIZE 0x18 |
| 15 | #define V4F_FLAGS 0x1c |
| 16 | #else |
| 17 | #define LDPTR ld |
| 18 | #define MAT_M 0x00 |
| 19 | #define MAT_INV 0x04 |
| 20 | #define V4F_DATA 0x00 |
| 21 | #define V4F_START 0x04 |
| 22 | #define V4F_COUNT 0x08 |
| 23 | #define V4F_STRIDE 0x0c |
| 24 | #define V4F_SIZE 0x10 |
| 25 | #define V4F_FLAGS 0x14 |
| 26 | #endif |
| 27 | |
| 28 | #define VEC_SIZE_1 1 |
| 29 | #define VEC_SIZE_2 3 |
| 30 | #define VEC_SIZE_3 7 |
| 31 | #define VEC_SIZE_4 15 |
Brian Paul | 7943b34 | 2001-05-23 14:27:03 +0000 | [diff] [blame] | 32 | |
| 33 | #define M0 %f16 |
| 34 | #define M1 %f17 |
| 35 | #define M2 %f18 |
| 36 | #define M3 %f19 |
| 37 | #define M4 %f20 |
| 38 | #define M5 %f21 |
| 39 | #define M6 %f22 |
| 40 | #define M7 %f23 |
| 41 | #define M8 %f24 |
| 42 | #define M9 %f25 |
| 43 | #define M10 %f26 |
| 44 | #define M11 %f27 |
| 45 | #define M12 %f28 |
| 46 | #define M13 %f29 |
| 47 | #define M14 %f30 |
| 48 | #define M15 %f31 |
| 49 | |
Brian Paul | 7943b34 | 2001-05-23 14:27:03 +0000 | [diff] [blame] | 50 | #define LDMATRIX_0_1_2_3_12_13_14_15(BASE) \ |
| 51 | ldd [BASE + ( 0 * 0x4)], M0; \ |
| 52 | ldd [BASE + ( 2 * 0x4)], M2; \ |
| 53 | ldd [BASE + (12 * 0x4)], M12; \ |
| 54 | ldd [BASE + (14 * 0x4)], M14 |
| 55 | |
| 56 | #define LDMATRIX_0_1_12_13(BASE) \ |
| 57 | ldd [BASE + ( 0 * 0x4)], M0; \ |
| 58 | ldd [BASE + (12 * 0x4)], M12 |
| 59 | |
| 60 | #define LDMATRIX_0_12_13(BASE) \ |
| 61 | ld [BASE + ( 0 * 0x4)], M0; \ |
| 62 | ldd [BASE + (12 * 0x4)], M12 |
| 63 | |
| 64 | #define LDMATRIX_0_1_2_12_13_14(BASE) \ |
| 65 | ldd [BASE + ( 0 * 0x4)], M0; \ |
| 66 | ld [BASE + ( 2 * 0x4)], M2; \ |
| 67 | ldd [BASE + (12 * 0x4)], M12; \ |
| 68 | ld [BASE + (14 * 0x4)], M14 |
| 69 | |
| 70 | #define LDMATRIX_0_12_13_14(BASE) \ |
| 71 | ld [BASE + ( 0 * 0x4)], M0; \ |
| 72 | ldd [BASE + (12 * 0x4)], M12; \ |
| 73 | ld [BASE + (14 * 0x4)], M14 |
| 74 | |
| 75 | #define LDMATRIX_0_14(BASE) \ |
| 76 | ld [BASE + ( 0 * 0x4)], M0; \ |
| 77 | ld [BASE + (14 * 0x4)], M14 |
| 78 | |
| 79 | #define LDMATRIX_0_1_2_3_4_5_6_7_12_13_14_15(BASE) \ |
| 80 | ldd [BASE + ( 0 * 0x4)], M0; \ |
| 81 | ldd [BASE + ( 2 * 0x4)], M2; \ |
| 82 | ldd [BASE + ( 4 * 0x4)], M4; \ |
| 83 | ldd [BASE + ( 6 * 0x4)], M6; \ |
| 84 | ldd [BASE + (12 * 0x4)], M12; \ |
| 85 | ldd [BASE + (14 * 0x4)], M14 |
| 86 | |
| 87 | #define LDMATRIX_0_5_12_13(BASE) \ |
| 88 | ld [BASE + ( 0 * 0x4)], M0; \ |
| 89 | ld [BASE + ( 5 * 0x4)], M5; \ |
| 90 | ldd [BASE + (12 * 0x4)], M12 |
| 91 | |
| 92 | #define LDMATRIX_0_1_2_3_4_5_6_12_13_14(BASE) \ |
| 93 | ldd [BASE + ( 0 * 0x4)], M0; \ |
| 94 | ldd [BASE + ( 2 * 0x4)], M2; \ |
| 95 | ldd [BASE + ( 4 * 0x4)], M4; \ |
| 96 | ld [BASE + ( 6 * 0x4)], M6; \ |
| 97 | ldd [BASE + (12 * 0x4)], M12; \ |
| 98 | ld [BASE + (14 * 0x4)], M14 |
| 99 | |
| 100 | #define LDMATRIX_0_5_12_13_14(BASE) \ |
| 101 | ld [BASE + ( 0 * 0x4)], M0; \ |
| 102 | ld [BASE + ( 5 * 0x4)], M5; \ |
| 103 | ldd [BASE + (12 * 0x4)], M12; \ |
| 104 | ld [BASE + (14 * 0x4)], M14 |
| 105 | |
| 106 | #define LDMATRIX_0_5_14(BASE) \ |
| 107 | ld [BASE + ( 0 * 0x4)], M0; \ |
| 108 | ld [BASE + ( 5 * 0x4)], M5; \ |
| 109 | ld [BASE + (14 * 0x4)], M14 |
| 110 | |
| 111 | #define LDMATRIX_0_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15(BASE) \ |
| 112 | ldd [BASE + ( 0 * 0x4)], M0; \ |
| 113 | ldd [BASE + ( 2 * 0x4)], M2; \ |
| 114 | ldd [BASE + ( 4 * 0x4)], M4; \ |
| 115 | ldd [BASE + ( 6 * 0x4)], M6; \ |
| 116 | ldd [BASE + ( 8 * 0x4)], M8; \ |
| 117 | ldd [BASE + (10 * 0x4)], M10; \ |
| 118 | ldd [BASE + (12 * 0x4)], M12; \ |
| 119 | ldd [BASE + (14 * 0x4)], M14 |
| 120 | |
| 121 | #define LDMATRIX_0_1_4_5_12_13(BASE) \ |
| 122 | ldd [BASE + ( 0 * 0x4)], M0; \ |
| 123 | ldd [BASE + ( 4 * 0x4)], M4; \ |
| 124 | ldd [BASE + (12 * 0x4)], M12 |
| 125 | |
| 126 | #define LDMATRIX_0_5_12_13(BASE) \ |
| 127 | ld [BASE + ( 0 * 0x4)], M0; \ |
| 128 | ld [BASE + ( 5 * 0x4)], M5; \ |
| 129 | ldd [BASE + (12 * 0x4)], M12 |
| 130 | |
davem69 | 775355a | 2001-06-05 23:54:00 +0000 | [diff] [blame^] | 131 | #define LDMATRIX_0_1_2_4_5_6_8_9_10(BASE) \ |
| 132 | ldd [BASE + ( 0 * 0x4)], M0; \ |
| 133 | ld [BASE + ( 2 * 0x4)], M2; \ |
| 134 | ldd [BASE + ( 4 * 0x4)], M4; \ |
| 135 | ld [BASE + ( 6 * 0x4)], M6; \ |
| 136 | ldd [BASE + ( 8 * 0x4)], M8; \ |
| 137 | ld [BASE + (10 * 0x4)], M10 |
| 138 | |
Brian Paul | 7943b34 | 2001-05-23 14:27:03 +0000 | [diff] [blame] | 139 | #define LDMATRIX_0_1_2_4_5_6_8_9_10_12_13_14(BASE) \ |
| 140 | ldd [BASE + ( 0 * 0x4)], M0; \ |
| 141 | ld [BASE + ( 2 * 0x4)], M2; \ |
| 142 | ldd [BASE + ( 4 * 0x4)], M4; \ |
| 143 | ld [BASE + ( 6 * 0x4)], M6; \ |
| 144 | ldd [BASE + ( 8 * 0x4)], M8; \ |
| 145 | ld [BASE + (10 * 0x4)], M10; \ |
| 146 | ldd [BASE + (12 * 0x4)], M12; \ |
| 147 | ld [BASE + (14 * 0x4)], M14 |
| 148 | |
| 149 | #define LDMATRIX_0_5_10_12_13_14(BASE) \ |
| 150 | ld [BASE + ( 0 * 0x4)], M0; \ |
| 151 | ld [BASE + ( 5 * 0x4)], M5; \ |
| 152 | ld [BASE + (10 * 0x4)], M10; \ |
| 153 | ldd [BASE + (12 * 0x4)], M12; \ |
| 154 | ld [BASE + (14 * 0x4)], M14 |
| 155 | |
| 156 | #define LDMATRIX_0_5_8_9_10_14(BASE) \ |
| 157 | ld [BASE + ( 0 * 0x4)], M0; \ |
| 158 | ld [BASE + ( 5 * 0x4)], M5; \ |
| 159 | ldd [BASE + ( 8 * 0x4)], M8; \ |
| 160 | ld [BASE + (10 * 0x4)], M10; \ |
| 161 | ld [BASE + (14 * 0x4)], M14 |
| 162 | |
davem69 | 775355a | 2001-06-05 23:54:00 +0000 | [diff] [blame^] | 163 | #endif /* !(_SPARC_MATRIX_H) */ |