prime/asm/Runtime/s_modf.s

76 lines
3.4 KiB
ArmAsm
Raw Permalink Normal View History

2022-04-02 09:50:35 +00:00
.include "macros.inc"
2022-07-14 05:48:03 +00:00
.section .text, "ax"
2022-04-02 09:50:35 +00:00
.global modf
modf:
/* 8039485C 003917BC 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 80394860 003917C0 D8 21 00 08 */ stfd f1, 8(r1)
/* 80394864 003917C4 80 A1 00 08 */ lwz r5, 8(r1)
/* 80394868 003917C8 80 C1 00 0C */ lwz r6, 0xc(r1)
/* 8039486C 003917CC 54 A4 65 7E */ rlwinm r4, r5, 0xc, 0x15, 0x1f
/* 80394870 003917D0 38 E4 FC 01 */ addi r7, r4, -1023
/* 80394874 003917D4 2C 07 00 14 */ cmpwi r7, 0x14
/* 80394878 003917D8 40 80 00 70 */ bge lbl_803948E8
/* 8039487C 003917DC 2C 07 00 00 */ cmpwi r7, 0
/* 80394880 003917E0 40 80 00 18 */ bge lbl_80394898
/* 80394884 003917E4 54 A4 00 00 */ rlwinm r4, r5, 0, 0, 0
/* 80394888 003917E8 38 00 00 00 */ li r0, 0
/* 8039488C 003917EC 90 83 00 00 */ stw r4, 0(r3)
/* 80394890 003917F0 90 03 00 04 */ stw r0, 4(r3)
/* 80394894 003917F4 48 00 00 BC */ b lbl_80394950
lbl_80394898:
/* 80394898 003917F8 3C 80 00 10 */ lis r4, 0x000FFFFF@ha
/* 8039489C 003917FC 38 04 FF FF */ addi r0, r4, 0x000FFFFF@l
/* 803948A0 00391800 7C 04 3E 30 */ sraw r4, r0, r7
/* 803948A4 00391804 7C A0 20 38 */ and r0, r5, r4
/* 803948A8 00391808 7C C0 03 79 */ or. r0, r6, r0
/* 803948AC 0039180C 40 82 00 20 */ bne lbl_803948CC
/* 803948B0 00391810 54 A4 00 00 */ rlwinm r4, r5, 0, 0, 0
/* 803948B4 00391814 38 00 00 00 */ li r0, 0
/* 803948B8 00391818 90 81 00 08 */ stw r4, 8(r1)
/* 803948BC 0039181C 90 01 00 0C */ stw r0, 0xc(r1)
/* 803948C0 00391820 D8 23 00 00 */ stfd f1, 0(r3)
/* 803948C4 00391824 C8 21 00 08 */ lfd f1, 8(r1)
/* 803948C8 00391828 48 00 00 88 */ b lbl_80394950
lbl_803948CC:
/* 803948CC 0039182C 7C A4 20 78 */ andc r4, r5, r4
/* 803948D0 00391830 38 00 00 00 */ li r0, 0
/* 803948D4 00391834 90 83 00 00 */ stw r4, 0(r3)
/* 803948D8 00391838 90 03 00 04 */ stw r0, 4(r3)
/* 803948DC 0039183C C8 03 00 00 */ lfd f0, 0(r3)
/* 803948E0 00391840 FC 21 00 28 */ fsub f1, f1, f0
/* 803948E4 00391844 48 00 00 6C */ b lbl_80394950
lbl_803948E8:
/* 803948E8 00391848 2C 07 00 33 */ cmpwi r7, 0x33
/* 803948EC 0039184C 40 81 00 20 */ ble lbl_8039490C
/* 803948F0 00391850 54 A4 00 00 */ rlwinm r4, r5, 0, 0, 0
/* 803948F4 00391854 38 00 00 00 */ li r0, 0
/* 803948F8 00391858 90 81 00 08 */ stw r4, 8(r1)
/* 803948FC 0039185C 90 01 00 0C */ stw r0, 0xc(r1)
/* 80394900 00391860 D8 23 00 00 */ stfd f1, 0(r3)
/* 80394904 00391864 C8 21 00 08 */ lfd f1, 8(r1)
/* 80394908 00391868 48 00 00 48 */ b lbl_80394950
lbl_8039490C:
/* 8039490C 0039186C 38 07 FF EC */ addi r0, r7, -20
/* 80394910 00391870 38 80 FF FF */ li r4, -1
/* 80394914 00391874 7C 84 04 30 */ srw r4, r4, r0
/* 80394918 00391878 7C C0 20 39 */ and. r0, r6, r4
/* 8039491C 0039187C 40 82 00 20 */ bne lbl_8039493C
/* 80394920 00391880 54 A4 00 00 */ rlwinm r4, r5, 0, 0, 0
/* 80394924 00391884 38 00 00 00 */ li r0, 0
/* 80394928 00391888 90 81 00 08 */ stw r4, 8(r1)
/* 8039492C 0039188C 90 01 00 0C */ stw r0, 0xc(r1)
/* 80394930 00391890 D8 23 00 00 */ stfd f1, 0(r3)
/* 80394934 00391894 C8 21 00 08 */ lfd f1, 8(r1)
/* 80394938 00391898 48 00 00 18 */ b lbl_80394950
lbl_8039493C:
/* 8039493C 0039189C 90 A3 00 00 */ stw r5, 0(r3)
/* 80394940 003918A0 7C C0 20 78 */ andc r0, r6, r4
/* 80394944 003918A4 90 03 00 04 */ stw r0, 4(r3)
/* 80394948 003918A8 C8 03 00 00 */ lfd f0, 0(r3)
/* 8039494C 003918AC FC 21 00 28 */ fsub f1, f1, f0
lbl_80394950:
/* 80394950 003918B0 38 21 00 10 */ addi r1, r1, 0x10
2022-07-14 05:48:03 +00:00
/* 80394954 003918B4 4E 80 00 20 */ blr