guScale.s (1125B)
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 guScale 14 li $at, 0x47800000 // 65536.000000 15 mtc1 $at, $f4 16 mtc1 $a1, $f6 17 mul.s $f8, $f6, $f4 18 trunc.w.s $f10, $f8 19 mfc1 $t1, $f10 20 srl $t2, $t1, 0x10 21 sll $t0, $t2, 0x10 22 sw $t0, ($a0) 23 sll $t2, $t1, 0x10 24 sw $t2, 0x20($a0) 25 mtc1 $a2, $f6 26 mul.s $f8, $f6, $f4 27 trunc.w.s $f10, $f8 28 mfc1 $t1, $f10 29 srl $t0, $t1, 0x10 30 sw $t0, 8($a0) 31 andi $t2, $t1, 0xffff 32 sw $t2, 0x28($a0) 33 mtc1 $a3, $f6 34 mul.s $f8, $f6, $f4 35 trunc.w.s $f10, $f8 36 mfc1 $t1, $f10 37 srl $t2, $t1, 0x10 38 sll $t0, $t2, 0x10 39 sw $t0, 0x14($a0) 40 sll $t2, $t1, 0x10 41 sw $t2, 0x34($a0) 42 li $t0, 1 43 sw $t0, 0x1c($a0) 44 sw $zero, 4($a0) 45 sw $zero, 0xc($a0) 46 sw $zero, 0x10($a0) 47 sw $zero, 0x18($a0) 48 sw $zero, 0x24($a0) 49 sw $zero, 0x2c($a0) 50 sw $zero, 0x30($a0) 51 sw $zero, 0x38($a0) 52 jr $ra 53 sw $zero, 0x3c($a0) 54 55 #endif