1// 2// r_varsa.s 3// 4 5#include "qasm.h" 6#include "d_ifacea.h" 7 8#if id386 9 10 .data 11 12//------------------------------------------------------- 13// ASM-only variables 14//------------------------------------------------------- 15.globl float_1, float_particle_z_clip, float_point5 16.globl float_minus_1, float_0 17float_0: .single 0.0 18float_1: .single 1.0 19float_minus_1: .single -1.0 20float_particle_z_clip: .single PARTICLE_Z_CLIP 21float_point5: .single 0.5 22 23.globl fp_16, fp_64k, fp_1m, fp_64kx64k 24.globl fp_1m_minus_1 25.globl fp_8 26fp_1m: .single 1048576.0 27fp_1m_minus_1: .single 1048575.0 28fp_64k: .single 65536.0 29fp_8: .single 8.0 30fp_16: .single 16.0 31fp_64kx64k: .long 0x4f000000 // (float)0x8000*0x10000 32 33 34.globl FloatZero, Float2ToThe31nd, FloatMinus2ToThe31nd 35FloatZero: .long 0 36Float2ToThe31nd: .long 0x4f000000 37FloatMinus2ToThe31nd: .long 0xcf000000 38 39.globl C(r_bmodelactive) 40C(r_bmodelactive): .long 0 41 42//------------------------------------------------------- 43// global refresh variables 44//------------------------------------------------------- 45 46// FIXME: put all refresh variables into one contiguous block. Make into one 47// big structure, like cl or sv? 48 49 .align 4 50.globl C(d_sdivzstepu) 51.globl C(d_tdivzstepu) 52.globl C(d_zistepu) 53.globl C(d_sdivzstepv) 54.globl C(d_tdivzstepv) 55.globl C(d_zistepv) 56.globl C(d_sdivzorigin) 57.globl C(d_tdivzorigin) 58.globl C(d_ziorigin) 59C(d_sdivzstepu): .single 0 60C(d_tdivzstepu): .single 0 61C(d_zistepu): .single 0 62C(d_sdivzstepv): .single 0 63C(d_tdivzstepv): .single 0 64C(d_zistepv): .single 0 65C(d_sdivzorigin): .single 0 66C(d_tdivzorigin): .single 0 67C(d_ziorigin): .single 0 68 69.globl C(sadjust) 70.globl C(tadjust) 71.globl C(bbextents) 72.globl C(bbextentt) 73C(sadjust): .long 0 74C(tadjust): .long 0 75C(bbextents): .long 0 76C(bbextentt): .long 0 77 78.globl C(cacheblock) 79.globl C(d_viewbuffer) 80.globl C(cachewidth) 81.globl C(d_pzbuffer) 82.globl C(d_zrowbytes) 83.globl C(d_zwidth) 84C(cacheblock): .long 0 85C(cachewidth): .long 0 86C(d_viewbuffer): .long 0 87C(d_pzbuffer): .long 0 88C(d_zrowbytes): .long 0 89C(d_zwidth): .long 0 90 91 92//------------------------------------------------------- 93// ASM-only variables 94//------------------------------------------------------- 95.globl izi 96izi: .long 0 97 98.globl pbase, s, t, sfracf, tfracf, snext, tnext 99.globl spancountminus1, zi16stepu, sdivz16stepu, tdivz16stepu 100.globl zi8stepu, sdivz8stepu, tdivz8stepu, pz 101s: .long 0 102t: .long 0 103snext: .long 0 104tnext: .long 0 105sfracf: .long 0 106tfracf: .long 0 107pbase: .long 0 108zi8stepu: .long 0 109sdivz8stepu: .long 0 110tdivz8stepu: .long 0 111zi16stepu: .long 0 112sdivz16stepu: .long 0 113tdivz16stepu: .long 0 114spancountminus1: .long 0 115pz: .long 0 116 117.globl izistep 118izistep: .long 0 119 120//------------------------------------------------------- 121// local variables for d_draw16.s 122//------------------------------------------------------- 123 124.globl reciprocal_table_16, entryvec_table_16 125// 1/2, 1/3, 1/4, 1/5, 1/6, 1/7, 1/8, 1/9, 1/10, 1/11, 1/12, 1/13, 126// 1/14, and 1/15 in 0.32 form 127reciprocal_table_16: .long 0x40000000, 0x2aaaaaaa, 0x20000000 128 .long 0x19999999, 0x15555555, 0x12492492 129 .long 0x10000000, 0xe38e38e, 0xccccccc, 0xba2e8ba 130 .long 0xaaaaaaa, 0x9d89d89, 0x9249249, 0x8888888 131 132#ifndef NeXT 133 .extern Entry2_16 134 .extern Entry3_16 135 .extern Entry4_16 136 .extern Entry5_16 137 .extern Entry6_16 138 .extern Entry7_16 139 .extern Entry8_16 140 .extern Entry9_16 141 .extern Entry10_16 142 .extern Entry11_16 143 .extern Entry12_16 144 .extern Entry13_16 145 .extern Entry14_16 146 .extern Entry15_16 147 .extern Entry16_16 148#endif 149 150entryvec_table_16: .long 0, Entry2_16, Entry3_16, Entry4_16 151 .long Entry5_16, Entry6_16, Entry7_16, Entry8_16 152 .long Entry9_16, Entry10_16, Entry11_16, Entry12_16 153 .long Entry13_16, Entry14_16, Entry15_16, Entry16_16 154 155//------------------------------------------------------- 156// local variables for d_parta.s 157//------------------------------------------------------- 158.globl DP_Count, DP_u, DP_v, DP_32768, DP_Color, DP_Pix, DP_EntryTable 159DP_Count: .long 0 160DP_u: .long 0 161DP_v: .long 0 162DP_32768: .single 32768.0 163DP_Color: .long 0 164DP_Pix: .long 0 165 166 167#if 0 168 .extern DP_1x1 169 .extern DP_2x2 170 .extern DP_3x3 171 .extern DP_4x4 172 173DP_EntryTable: .long DP_1x1, DP_2x2, DP_3x3, DP_4x4 174#endif 175 176// 177// advancetable is 8 bytes, but points to the middle of that range so negative 178// offsets will work 179// 180.globl advancetable, sstep, tstep, pspantemp, counttemp, jumptemp 181advancetable: .long 0, 0 182sstep: .long 0 183tstep: .long 0 184 185pspantemp: .long 0 186counttemp: .long 0 187jumptemp: .long 0 188 189// 1/2, 1/3, 1/4, 1/5, 1/6, and 1/7 in 0.32 form 190.globl reciprocal_table, entryvec_table 191reciprocal_table: .long 0x40000000, 0x2aaaaaaa, 0x20000000 192 .long 0x19999999, 0x15555555, 0x12492492 193 194#if 0 195 .extern Entry2_8 196 .extern Entry3_8 197 .extern Entry4_8 198 .extern Entry5_8 199 .extern Entry6_8 200 .extern Entry7_8 201 .extern Entry8_8 202 203entryvec_table: .long 0, Entry2_8, Entry3_8, Entry4_8 204 .long Entry5_8, Entry6_8, Entry7_8, Entry8_8 205#endif 206 207#ifndef NeXT 208 .extern Spr8Entry2_8 209 .extern Spr8Entry3_8 210 .extern Spr8Entry4_8 211 .extern Spr8Entry5_8 212 .extern Spr8Entry6_8 213 .extern Spr8Entry7_8 214 .extern Spr8Entry8_8 215#endif 216 217.globl spr8entryvec_table 218spr8entryvec_table: .long 0, Spr8Entry2_8, Spr8Entry3_8, Spr8Entry4_8 219 .long Spr8Entry5_8, Spr8Entry6_8, Spr8Entry7_8, Spr8Entry8_8 220 221#endif // id386 222 223 224