prime/asm/Runtime/s_tan.s

48 lines
1.8 KiB
ArmAsm
Raw Normal View History

2022-04-02 09:50:35 +00:00
.include "macros.inc"
.section .sdata2
.global lbl_805AF208
lbl_805AF208:
2022-07-14 05:48:03 +00:00
# ROM: 0x3FBAA8
.4byte 0
.4byte 0
.section .text, "ax"
2022-04-02 09:50:35 +00:00
.global tan
tan:
/* 80394BB4 00391B14 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 80394BB8 00391B18 7C 08 02 A6 */ mflr r0
/* 80394BBC 00391B1C 3C 60 3F E9 */ lis r3, 0x3FE921FB@ha
/* 80394BC0 00391B20 D8 21 00 08 */ stfd f1, 8(r1)
/* 80394BC4 00391B24 90 01 00 24 */ stw r0, 0x24(r1)
/* 80394BC8 00391B28 38 03 21 FB */ addi r0, r3, 0x3FE921FB@l
/* 80394BCC 00391B2C 80 61 00 08 */ lwz r3, 8(r1)
/* 80394BD0 00391B30 54 63 00 7E */ clrlwi r3, r3, 1
/* 80394BD4 00391B34 7C 03 00 00 */ cmpw r3, r0
/* 80394BD8 00391B38 41 81 00 14 */ bgt lbl_80394BEC
/* 80394BDC 00391B3C C8 42 D4 E8 */ lfd f2, lbl_805AF208@sda21(r2)
/* 80394BE0 00391B40 38 60 00 01 */ li r3, 1
/* 80394BE4 00391B44 4B FF F3 D1 */ bl __kernel_tan
/* 80394BE8 00391B48 48 00 00 34 */ b lbl_80394C1C
lbl_80394BEC:
/* 80394BEC 00391B4C 3C 00 7F F0 */ lis r0, 0x7ff0
/* 80394BF0 00391B50 7C 03 00 00 */ cmpw r3, r0
/* 80394BF4 00391B54 41 80 00 0C */ blt lbl_80394C00
/* 80394BF8 00391B58 FC 21 08 28 */ fsub f1, f1, f1
/* 80394BFC 00391B5C 48 00 00 20 */ b lbl_80394C1C
lbl_80394C00:
/* 80394C00 00391B60 38 61 00 10 */ addi r3, r1, 0x10
/* 80394C04 00391B64 4B FF E0 29 */ bl __ieee754_rem_pio2
/* 80394C08 00391B68 54 60 0F BC */ rlwinm r0, r3, 1, 0x1e, 0x1e
/* 80394C0C 00391B6C C8 21 00 10 */ lfd f1, 0x10(r1)
/* 80394C10 00391B70 C8 41 00 18 */ lfd f2, 0x18(r1)
/* 80394C14 00391B74 20 60 00 01 */ subfic r3, r0, 1
/* 80394C18 00391B78 4B FF F3 9D */ bl __kernel_tan
lbl_80394C1C:
/* 80394C1C 00391B7C 80 01 00 24 */ lwz r0, 0x24(r1)
/* 80394C20 00391B80 7C 08 03 A6 */ mtlr r0
/* 80394C24 00391B84 38 21 00 20 */ addi r1, r1, 0x20
2022-07-14 05:48:03 +00:00
/* 80394C28 00391B88 4E 80 00 20 */ blr