Lines Matching full:off
103 pg_addiu(u32 **buf, unsigned int reg1, unsigned int reg2, unsigned int off) in pg_addiu() argument
108 if (off > 0x7fff) { in pg_addiu()
109 uasm_i_lui(buf, T9, uasm_rel_hi(off)); in pg_addiu()
110 uasm_i_addiu(buf, T9, T9, uasm_rel_lo(off)); in pg_addiu()
112 uasm_i_addiu(buf, T9, ZERO, off); in pg_addiu()
115 if (off > 0x7fff) { in pg_addiu()
116 uasm_i_lui(buf, T9, uasm_rel_hi(off)); in pg_addiu()
117 uasm_i_addiu(buf, T9, T9, uasm_rel_lo(off)); in pg_addiu()
120 UASM_i_ADDIU(buf, reg1, reg2, off); in pg_addiu()
233 static void build_clear_store(u32 **buf, int off) in build_clear_store() argument
236 uasm_i_sd(buf, ZERO, off, A0); in build_clear_store()
238 uasm_i_sw(buf, ZERO, off, A0); in build_clear_store()
242 static inline void build_clear_pref(u32 **buf, int off) in build_clear_pref() argument
244 if (off & cache_line_mask()) in build_clear_pref()
248 _uasm_i_pref(buf, pref_dst_mode, pref_bias_clear_store + off, in build_clear_pref()
252 uasm_i_cache(buf, Create_Dirty_Excl_SD, off, A0); in build_clear_pref()
266 uasm_i_cache(buf, Create_Dirty_Excl_D, off, A0); in build_clear_pref()
278 int off; in build_clear_page() local
302 off = PAGE_SIZE - pref_bias_clear_store; in build_clear_page()
303 if (off > 0xffff || !pref_bias_clear_store) in build_clear_page()
304 pg_addiu(&buf, A2, A0, off); in build_clear_page()
306 uasm_i_ori(&buf, A2, A0, off); in build_clear_page()
311 off = cache_line_size ? min(8, pref_bias_clear_store / cache_line_size) in build_clear_page()
313 while (off) { in build_clear_page()
314 build_clear_pref(&buf, -off); in build_clear_page()
315 off -= cache_line_size; in build_clear_page()
319 build_clear_pref(&buf, off); in build_clear_page()
320 build_clear_store(&buf, off); in build_clear_page()
321 off += clear_word_size; in build_clear_page()
322 } while (off < half_clear_loop_size); in build_clear_page()
323 pg_addiu(&buf, A0, A0, 2 * off); in build_clear_page()
324 off = -off; in build_clear_page()
326 build_clear_pref(&buf, off); in build_clear_page()
327 if (off == -clear_word_size) in build_clear_page()
329 build_clear_store(&buf, off); in build_clear_page()
330 off += clear_word_size; in build_clear_page()
331 } while (off < 0); in build_clear_page()
336 off = 0; in build_clear_page()
338 build_clear_store(&buf, off); in build_clear_page()
339 off += clear_word_size; in build_clear_page()
340 } while (off < half_clear_loop_size); in build_clear_page()
341 pg_addiu(&buf, A0, A0, 2 * off); in build_clear_page()
342 off = -off; in build_clear_page()
344 if (off == -clear_word_size) in build_clear_page()
347 build_clear_store(&buf, off); in build_clear_page()
348 off += clear_word_size; in build_clear_page()
349 } while (off < 0); in build_clear_page()
369 static void build_copy_load(u32 **buf, int reg, int off) in build_copy_load() argument
372 uasm_i_ld(buf, reg, off, A1); in build_copy_load()
374 uasm_i_lw(buf, reg, off, A1); in build_copy_load()
378 static void build_copy_store(u32 **buf, int reg, int off) in build_copy_store() argument
381 uasm_i_sd(buf, reg, off, A0); in build_copy_store()
383 uasm_i_sw(buf, reg, off, A0); in build_copy_store()
387 static inline void build_copy_load_pref(u32 **buf, int off) in build_copy_load_pref() argument
389 if (off & cache_line_mask()) in build_copy_load_pref()
393 _uasm_i_pref(buf, pref_src_mode, pref_bias_copy_load + off, A1); in build_copy_load_pref()
396 static inline void build_copy_store_pref(u32 **buf, int off) in build_copy_store_pref() argument
398 if (off & cache_line_mask()) in build_copy_store_pref()
402 _uasm_i_pref(buf, pref_dst_mode, pref_bias_copy_store + off, in build_copy_store_pref()
406 uasm_i_cache(buf, Create_Dirty_Excl_SD, off, A0); in build_copy_store_pref()
420 uasm_i_cache(buf, Create_Dirty_Excl_D, off, A0); in build_copy_store_pref()
427 int off; in build_copy_page() local
455 off = PAGE_SIZE - pref_bias_copy_load; in build_copy_page()
456 if (off > 0xffff || !pref_bias_copy_load) in build_copy_page()
457 pg_addiu(&buf, A2, A0, off); in build_copy_page()
459 uasm_i_ori(&buf, A2, A0, off); in build_copy_page()
464 off = cache_line_size ? min(8, pref_bias_copy_load / cache_line_size) * in build_copy_page()
466 while (off) { in build_copy_page()
467 build_copy_load_pref(&buf, -off); in build_copy_page()
468 off -= cache_line_size; in build_copy_page()
470 off = cache_line_size ? min(8, pref_bias_copy_store / cache_line_size) * in build_copy_page()
472 while (off) { in build_copy_page()
473 build_copy_store_pref(&buf, -off); in build_copy_page()
474 off -= cache_line_size; in build_copy_page()
478 build_copy_load_pref(&buf, off); in build_copy_page()
479 build_copy_load(&buf, T0, off); in build_copy_page()
480 build_copy_load_pref(&buf, off + copy_word_size); in build_copy_page()
481 build_copy_load(&buf, T1, off + copy_word_size); in build_copy_page()
482 build_copy_load_pref(&buf, off + 2 * copy_word_size); in build_copy_page()
483 build_copy_load(&buf, T2, off + 2 * copy_word_size); in build_copy_page()
484 build_copy_load_pref(&buf, off + 3 * copy_word_size); in build_copy_page()
485 build_copy_load(&buf, T3, off + 3 * copy_word_size); in build_copy_page()
486 build_copy_store_pref(&buf, off); in build_copy_page()
487 build_copy_store(&buf, T0, off); in build_copy_page()
488 build_copy_store_pref(&buf, off + copy_word_size); in build_copy_page()
489 build_copy_store(&buf, T1, off + copy_word_size); in build_copy_page()
490 build_copy_store_pref(&buf, off + 2 * copy_word_size); in build_copy_page()
491 build_copy_store(&buf, T2, off + 2 * copy_word_size); in build_copy_page()
492 build_copy_store_pref(&buf, off + 3 * copy_word_size); in build_copy_page()
493 build_copy_store(&buf, T3, off + 3 * copy_word_size); in build_copy_page()
494 off += 4 * copy_word_size; in build_copy_page()
495 } while (off < half_copy_loop_size); in build_copy_page()
496 pg_addiu(&buf, A1, A1, 2 * off); in build_copy_page()
497 pg_addiu(&buf, A0, A0, 2 * off); in build_copy_page()
498 off = -off; in build_copy_page()
500 build_copy_load_pref(&buf, off); in build_copy_page()
501 build_copy_load(&buf, T0, off); in build_copy_page()
502 build_copy_load_pref(&buf, off + copy_word_size); in build_copy_page()
503 build_copy_load(&buf, T1, off + copy_word_size); in build_copy_page()
504 build_copy_load_pref(&buf, off + 2 * copy_word_size); in build_copy_page()
505 build_copy_load(&buf, T2, off + 2 * copy_word_size); in build_copy_page()
506 build_copy_load_pref(&buf, off + 3 * copy_word_size); in build_copy_page()
507 build_copy_load(&buf, T3, off + 3 * copy_word_size); in build_copy_page()
508 build_copy_store_pref(&buf, off); in build_copy_page()
509 build_copy_store(&buf, T0, off); in build_copy_page()
510 build_copy_store_pref(&buf, off + copy_word_size); in build_copy_page()
511 build_copy_store(&buf, T1, off + copy_word_size); in build_copy_page()
512 build_copy_store_pref(&buf, off + 2 * copy_word_size); in build_copy_page()
513 build_copy_store(&buf, T2, off + 2 * copy_word_size); in build_copy_page()
514 build_copy_store_pref(&buf, off + 3 * copy_word_size); in build_copy_page()
515 if (off == -(4 * copy_word_size)) in build_copy_page()
517 build_copy_store(&buf, T3, off + 3 * copy_word_size); in build_copy_page()
518 off += 4 * copy_word_size; in build_copy_page()
519 } while (off < 0); in build_copy_page()
525 off = 0; in build_copy_page()
527 build_copy_load(&buf, T0, off); in build_copy_page()
528 build_copy_load(&buf, T1, off + copy_word_size); in build_copy_page()
529 build_copy_load(&buf, T2, off + 2 * copy_word_size); in build_copy_page()
530 build_copy_load(&buf, T3, off + 3 * copy_word_size); in build_copy_page()
531 build_copy_store_pref(&buf, off); in build_copy_page()
532 build_copy_store(&buf, T0, off); in build_copy_page()
533 build_copy_store_pref(&buf, off + copy_word_size); in build_copy_page()
534 build_copy_store(&buf, T1, off + copy_word_size); in build_copy_page()
535 build_copy_store_pref(&buf, off + 2 * copy_word_size); in build_copy_page()
536 build_copy_store(&buf, T2, off + 2 * copy_word_size); in build_copy_page()
537 build_copy_store_pref(&buf, off + 3 * copy_word_size); in build_copy_page()
538 build_copy_store(&buf, T3, off + 3 * copy_word_size); in build_copy_page()
539 off += 4 * copy_word_size; in build_copy_page()
540 } while (off < half_copy_loop_size); in build_copy_page()
541 pg_addiu(&buf, A1, A1, 2 * off); in build_copy_page()
542 pg_addiu(&buf, A0, A0, 2 * off); in build_copy_page()
543 off = -off; in build_copy_page()
545 build_copy_load(&buf, T0, off); in build_copy_page()
546 build_copy_load(&buf, T1, off + copy_word_size); in build_copy_page()
547 build_copy_load(&buf, T2, off + 2 * copy_word_size); in build_copy_page()
548 build_copy_load(&buf, T3, off + 3 * copy_word_size); in build_copy_page()
549 build_copy_store_pref(&buf, off); in build_copy_page()
550 build_copy_store(&buf, T0, off); in build_copy_page()
551 build_copy_store_pref(&buf, off + copy_word_size); in build_copy_page()
552 build_copy_store(&buf, T1, off + copy_word_size); in build_copy_page()
553 build_copy_store_pref(&buf, off + 2 * copy_word_size); in build_copy_page()
554 build_copy_store(&buf, T2, off + 2 * copy_word_size); in build_copy_page()
555 build_copy_store_pref(&buf, off + 3 * copy_word_size); in build_copy_page()
556 if (off == -(4 * copy_word_size)) in build_copy_page()
559 build_copy_store(&buf, T3, off + 3 * copy_word_size); in build_copy_page()
560 off += 4 * copy_word_size; in build_copy_page()
561 } while (off < 0); in build_copy_page()
567 off = 0; in build_copy_page()
569 build_copy_load(&buf, T0, off); in build_copy_page()
570 build_copy_load(&buf, T1, off + copy_word_size); in build_copy_page()
571 build_copy_load(&buf, T2, off + 2 * copy_word_size); in build_copy_page()
572 build_copy_load(&buf, T3, off + 3 * copy_word_size); in build_copy_page()
573 build_copy_store(&buf, T0, off); in build_copy_page()
574 build_copy_store(&buf, T1, off + copy_word_size); in build_copy_page()
575 build_copy_store(&buf, T2, off + 2 * copy_word_size); in build_copy_page()
576 build_copy_store(&buf, T3, off + 3 * copy_word_size); in build_copy_page()
577 off += 4 * copy_word_size; in build_copy_page()
578 } while (off < half_copy_loop_size); in build_copy_page()
579 pg_addiu(&buf, A1, A1, 2 * off); in build_copy_page()
580 pg_addiu(&buf, A0, A0, 2 * off); in build_copy_page()
581 off = -off; in build_copy_page()
583 build_copy_load(&buf, T0, off); in build_copy_page()
584 build_copy_load(&buf, T1, off + copy_word_size); in build_copy_page()
585 build_copy_load(&buf, T2, off + 2 * copy_word_size); in build_copy_page()
586 build_copy_load(&buf, T3, off + 3 * copy_word_size); in build_copy_page()
587 build_copy_store(&buf, T0, off); in build_copy_page()
588 build_copy_store(&buf, T1, off + copy_word_size); in build_copy_page()
589 build_copy_store(&buf, T2, off + 2 * copy_word_size); in build_copy_page()
590 if (off == -(4 * copy_word_size)) in build_copy_page()
593 build_copy_store(&buf, T3, off + 3 * copy_word_size); in build_copy_page()
594 off += 4 * copy_word_size; in build_copy_page()
595 } while (off < 0); in build_copy_page()