cache_flush.S 376 B

123456789101112131415161718192021222324
  1. move $t2, $a0
  2. addu $t3, $a0, $a1
  3. srl $t2, $t2, 5
  4. sll $t2, $t2, 5
  5. addu $t3, $t3, 0x1f
  6. srl $t3, $t3, 5
  7. sll $t3, $t3, 5
  8. move $t0, $t2
  9. subu $t1, $t3, $t2
  10. 1:
  11. cache 1, 0($t0)
  12. addiu $t0, $t0, 0x1
  13. addiu $t1, $t1, 0xffff
  14. bne $t1, $zero, 1b
  15. sync
  16. move $t0, $t2
  17. subu $t1, $t3, $t2
  18. 2:
  19. cache 0, 0($t0)
  20. addiu $t0, $t0, 0x1
  21. addiu $t1, $t1, 0xffff
  22. bne $t1, $zero, 2b
  23. sync