sm64

A Super Mario 64 decompilation
Log | Files | Refs | README | LICENSE

guMtxF2L.s (791B)


      1 .set noat
      2 .set noreorder // don't insert nops after branches
      3 
      4 #include "macros.inc"
      5 
      6 
      7 .section .text, "ax"
      8 
      9 #ifdef VERSION_CN
     10 
     11 .balign 32
     12 
     13 glabel guMtxF2L
     14     li    $at, 0x47800000 // 65536.000000
     15     mtc1  $at, $f0
     16     lui   $t9, 0xffff
     17     addiu $t8, $a1, 0x20
     18 .L80306C70:
     19     lwc1  $f4, ($a0)
     20     mul.s $f6, $f4, $f0
     21     trunc.w.s $f8, $f6
     22     lwc1  $f10, 4($a0)
     23     mul.s $f16, $f10, $f0
     24     trunc.w.s $f18, $f16
     25     mfc1  $t0, $f8
     26     mfc1  $t1, $f18
     27     and   $t2, $t0, $t9
     28     srl   $t3, $t1, 0x10
     29     or    $t4, $t2, $t3
     30     sw    $t4, ($a1)
     31     sll   $t5, $t0, 0x10
     32     andi  $t6, $t1, 0xffff
     33     or    $t7, $t5, $t6
     34     sw    $t7, 0x20($a1)
     35     addiu $a1, $a1, 4
     36     bne   $a1, $t8, .L80306C70
     37      addiu $a0, $a0, 8
     38     jr    $ra
     39      nop
     40 
     41     nop
     42     nop
     43     nop
     44     nop
     45 
     46 #endif