Lines Matching refs:code

28  * Arch-specific code for manipulating GL API entrypoints (dispatch stubs).
100 GLubyte * const code = (GLubyte *) u_execmem_alloc(DISPATCH_FUNCTION_SIZE);
103 if ( code != NULL ) {
104 (void) memcpy(code, template_func, DISPATCH_FUNCTION_SIZE);
105 fill_in_entrypoint_offset( (_glapi_proc) code, functionOffset );
108 return (_glapi_proc) code;
119 GLubyte * const code = (GLubyte *) entrypoint;
122 *((unsigned int *)(code + 8)) = 4 * offset;
124 *((unsigned int *)(code + 11)) = 4 * offset;
125 *((unsigned int *)(code + 22)) = 4 * offset;
127 *((unsigned int *)(code + 7)) = 4 * offset;
195 unsigned int *code = &__glapi_sparc_tls_stub;
199 unsigned int *code = &__glapi_sparc_pthread_stub;
206 code[0] = template[0] | (dispatch >> 10);
207 code[1] = template[1];
208 __glapi_sparc_icache_flush(&code[0]);
209 code[2] = template[2] | (dispatch & 0x3ff);
210 code[3] = template[3];
211 __glapi_sparc_icache_flush(&code[2]);
212 code[4] = template[4];
213 code[5] = template[5];
214 __glapi_sparc_icache_flush(&code[4]);
215 code[6] = template[6];
216 __glapi_sparc_icache_flush(&code[6]);
219 code[0] = template[0] | (dispatch >> (32 + 10));
220 code[1] = template[1] | ((dispatch & 0xffffffff) >> 10);
221 __glapi_sparc_icache_flush(&code[0]);
222 code[2] = template[2] | ((dispatch >> 32) & 0x3ff);
223 code[3] = template[3];
224 __glapi_sparc_icache_flush(&code[2]);
225 code[4] = template[4];
226 code[5] = template[5];
227 __glapi_sparc_icache_flush(&code[4]);
228 code[6] = template[6] | (dispatch & 0x3ff);
231 code[0] = template[0] | (dispatch >> 10);
232 code[1] = template[1];
233 __glapi_sparc_icache_flush(&code[0]);
234 code[2] = template[2] | (dispatch & 0x3ff);
237 code[idx + 0] = template[idx + 0];
238 __glapi_sparc_icache_flush(&code[idx - 1]);
239 code[idx + 1] = template[idx + 1];
240 code[idx + 2] = template[idx + 2];
241 __glapi_sparc_icache_flush(&code[idx + 1]);
242 code[idx + 3] = template[idx + 3];
243 code[idx + 4] = template[idx + 4];
244 __glapi_sparc_icache_flush(&code[idx + 3]);
245 code[idx + 5] = template[idx + 5];
246 code[idx + 6] = template[idx + 6];
247 __glapi_sparc_icache_flush(&code[idx + 5]);
248 code[idx + 7] = template[idx + 7];
249 code[idx + 8] = template[idx + 8] |
250 (((call_dest - ((unsigned long) &code[idx + 8]))
252 __glapi_sparc_icache_flush(&code[idx + 7]);
253 code[idx + 9] = template[idx + 9];
254 code[idx + 10] = template[idx + 10];
255 __glapi_sparc_icache_flush(&code[idx + 9]);
256 code[idx + 11] = template[idx + 11];
257 code[idx + 12] = template[idx + 12];
258 __glapi_sparc_icache_flush(&code[idx + 11]);
259 code[idx + 13] = template[idx + 13];
260 __glapi_sparc_icache_flush(&code[idx + 13]);
283 unsigned int *code = (unsigned int *) u_execmem_alloc(sizeof(template));
284 if (code) {
285 code[0] = template[0] | (functionOffset & 0x3fffff);
286 code[1] = template[1];
287 __glapi_sparc_icache_flush(&code[0]);
288 code[2] = template[2] |
289 (((call_dest - ((unsigned long) &code[2]))
291 code[3] = template[3];
292 __glapi_sparc_icache_flush(&code[2]);
294 return (_glapi_proc) code;
302 unsigned int *code = (unsigned int *) entrypoint;
304 code[0] &= ~0x3fffff;
305 code[0] |= (offset * sizeof(void *)) & 0x3fffff;
306 __glapi_sparc_icache_flush(&code[0]);