sm64

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

guNormalize.s (615B)


      1 .set noreorder // don't insert nops after branches
      2 
      3 #include "macros.inc"
      4 
      5 
      6 .section .text, "ax"
      7 
      8 #ifdef VERSION_CN
      9 
     10 glabel guNormalize
     11     lwc1  $f4, ($a0)
     12     lwc1  $f6, ($a1)
     13     lwc1  $f8, ($a2)
     14     mul.s $f10, $f4, $f4
     15     li    $t0, 0x3F800000 # 1.000000
     16     mul.s $f16, $f6, $f6
     17     add.s $f18, $f10, $f16
     18     mul.s $f16, $f8, $f8
     19     add.s $f10, $f16, $f18
     20     mtc1  $t0, $f18
     21     sqrt.s $f16, $f10
     22     div.s $f10, $f18, $f16
     23     mul.s $f16, $f4, $f10
     24     nop
     25     mul.s $f18, $f6, $f10
     26     nop
     27     mul.s $f4, $f8, $f10
     28     swc1  $f16, ($a0)
     29     swc1  $f18, ($a1)
     30     jr    $ra
     31      swc1  $f4, ($a2)
     32 
     33 #endif