Super Mario 64s source code (from a leak on 4chan so be careful)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
755 B

6 years ago
  1. .set noat # allow manual use of $at
  2. .set noreorder # don't insert nops after branches
  3. .set gp=64
  4. .include "macros.inc"
  5. .section .text, "ax"
  6. glabel osInvalICache
  7. blez $a1, .L80323728
  8. nop
  9. li $t3, 16384
  10. sltu $at, $a1, $t3
  11. beqz $at, .L80323730
  12. nop
  13. move $t0, $a0
  14. addu $t1, $a0, $a1
  15. sltu $at, $t0, $t1
  16. beqz $at, .L80323728
  17. nop
  18. andi $t2, $t0, 0x1f
  19. addiu $t1, $t1, -0x20
  20. subu $t0, $t0, $t2
  21. .L80323718:
  22. cache 0x10, ($t0)
  23. sltu $at, $t0, $t1
  24. bnez $at, .L80323718
  25. addiu $t0, $t0, 0x20
  26. .L80323728:
  27. jr $ra
  28. nop
  29. .L80323730:
  30. li $t0, K0BASE
  31. addu $t1, $t0, $t3
  32. addiu $t1, $t1, -0x20
  33. .L8032373C:
  34. cache 0, ($t0)
  35. sltu $at, $t0, $t1
  36. bnez $at, .L8032373C
  37. addiu $t0, $t0, 0x20
  38. jr $ra
  39. nop