prime/asm/Runtime/s_ldexp.s

170 lines
6.7 KiB
ArmAsm
Raw Normal View History

.include "macros.inc"
.section .text, "ax"
.global ldexp
ldexp:
/* 80394698 003915F8 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 8039469C 003915FC 7C 08 02 A6 */ mflr r0
/* 803946A0 00391600 D8 21 00 10 */ stfd f1, 0x10(r1)
/* 803946A4 00391604 80 A1 00 10 */ lwz r5, 0x10(r1)
/* 803946A8 00391608 90 01 00 24 */ stw r0, 0x24(r1)
/* 803946AC 0039160C 3C 00 7F F0 */ lis r0, 0x7ff0
/* 803946B0 00391610 54 A4 00 56 */ rlwinm r4, r5, 0, 1, 0xb
/* 803946B4 00391614 7C 04 00 00 */ cmpw r4, r0
/* 803946B8 00391618 D8 21 00 08 */ stfd f1, 8(r1)
/* 803946BC 0039161C 41 82 00 14 */ beq lbl_803946D0
/* 803946C0 00391620 40 80 00 58 */ bge lbl_80394718
/* 803946C4 00391624 2C 04 00 00 */ cmpwi r4, 0
/* 803946C8 00391628 41 82 00 2C */ beq lbl_803946F4
/* 803946CC 0039162C 48 00 00 4C */ b lbl_80394718
lbl_803946D0:
/* 803946D0 00391630 54 A0 03 3F */ clrlwi. r0, r5, 0xc
/* 803946D4 00391634 40 82 00 10 */ bne lbl_803946E4
/* 803946D8 00391638 80 01 00 14 */ lwz r0, 0x14(r1)
/* 803946DC 0039163C 2C 00 00 00 */ cmpwi r0, 0
/* 803946E0 00391640 41 82 00 0C */ beq lbl_803946EC
lbl_803946E4:
/* 803946E4 00391644 38 00 00 01 */ li r0, 1
/* 803946E8 00391648 48 00 00 34 */ b lbl_8039471C
lbl_803946EC:
/* 803946EC 0039164C 38 00 00 02 */ li r0, 2
/* 803946F0 00391650 48 00 00 2C */ b lbl_8039471C
lbl_803946F4:
/* 803946F4 00391654 54 A0 03 3F */ clrlwi. r0, r5, 0xc
/* 803946F8 00391658 40 82 00 10 */ bne lbl_80394708
/* 803946FC 0039165C 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80394700 00391660 2C 00 00 00 */ cmpwi r0, 0
/* 80394704 00391664 41 82 00 0C */ beq lbl_80394710
lbl_80394708:
/* 80394708 00391668 38 00 00 05 */ li r0, 5
/* 8039470C 0039166C 48 00 00 10 */ b lbl_8039471C
lbl_80394710:
/* 80394710 00391670 38 00 00 03 */ li r0, 3
/* 80394714 00391674 48 00 00 08 */ b lbl_8039471C
lbl_80394718:
/* 80394718 00391678 38 00 00 04 */ li r0, 4
lbl_8039471C:
/* 8039471C 0039167C 2C 00 00 02 */ cmpwi r0, 2
/* 80394720 00391680 40 81 01 2C */ ble lbl_8039484C
/* 80394724 00391684 C8 02 D4 B8 */ lfd f0, lbl_805AF1D8@sda21(r2)
/* 80394728 00391688 FC 00 08 00 */ fcmpu cr0, f0, f1
/* 8039472C 0039168C 40 82 00 08 */ bne lbl_80394734
/* 80394730 00391690 48 00 01 1C */ b lbl_8039484C
lbl_80394734:
/* 80394734 00391694 80 A1 00 08 */ lwz r5, 8(r1)
/* 80394738 00391698 80 C1 00 0C */ lwz r6, 0xc(r1)
/* 8039473C 0039169C 54 A4 65 7F */ rlwinm. r4, r5, 0xc, 0x15, 0x1f
/* 80394740 003916A0 40 82 00 4C */ bne lbl_8039478C
/* 80394744 003916A4 54 A0 00 7E */ clrlwi r0, r5, 1
/* 80394748 003916A8 7C C0 03 79 */ or. r0, r6, r0
/* 8039474C 003916AC 40 82 00 08 */ bne lbl_80394754
/* 80394750 003916B0 48 00 00 FC */ b lbl_8039484C
lbl_80394754:
/* 80394754 003916B4 C8 21 00 08 */ lfd f1, 8(r1)
/* 80394758 003916B8 3C 80 FF FF */ lis r4, 0xFFFF3CB0@ha
/* 8039475C 003916BC C8 02 D4 C0 */ lfd f0, lbl_805AF1E0@sda21(r2)
/* 80394760 003916C0 38 04 3C B0 */ addi r0, r4, 0xFFFF3CB0@l
/* 80394764 003916C4 7C 03 00 00 */ cmpw r3, r0
/* 80394768 003916C8 FC 21 00 32 */ fmul f1, f1, f0
/* 8039476C 003916CC D8 21 00 08 */ stfd f1, 8(r1)
/* 80394770 003916D0 80 A1 00 08 */ lwz r5, 8(r1)
/* 80394774 003916D4 54 A4 65 7E */ rlwinm r4, r5, 0xc, 0x15, 0x1f
/* 80394778 003916D8 38 84 FF CA */ addi r4, r4, -54
/* 8039477C 003916DC 40 80 00 10 */ bge lbl_8039478C
/* 80394780 003916E0 C8 02 D4 C8 */ lfd f0, lbl_805AF1E8@sda21(r2)
/* 80394784 003916E4 FC 20 00 72 */ fmul f1, f0, f1
/* 80394788 003916E8 48 00 00 C4 */ b lbl_8039484C
lbl_8039478C:
/* 8039478C 003916EC 2C 04 07 FF */ cmpwi r4, 0x7ff
/* 80394790 003916F0 40 82 00 10 */ bne lbl_803947A0
/* 80394794 003916F4 C8 01 00 08 */ lfd f0, 8(r1)
/* 80394798 003916F8 FC 20 00 2A */ fadd f1, f0, f0
/* 8039479C 003916FC 48 00 00 B0 */ b lbl_8039484C
lbl_803947A0:
/* 803947A0 00391700 7C 84 1A 14 */ add r4, r4, r3
/* 803947A4 00391704 2C 04 07 FE */ cmpwi r4, 0x7fe
/* 803947A8 00391708 40 81 00 1C */ ble lbl_803947C4
/* 803947AC 0039170C C8 22 D4 D0 */ lfd f1, lbl_805AF1F0@sda21(r2)
/* 803947B0 00391710 C8 41 00 08 */ lfd f2, 8(r1)
/* 803947B4 00391714 4B FF FC 15 */ bl copysign
/* 803947B8 00391718 C8 02 D4 D0 */ lfd f0, lbl_805AF1F0@sda21(r2)
/* 803947BC 0039171C FC 20 00 72 */ fmul f1, f0, f1
/* 803947C0 00391720 48 00 00 8C */ b lbl_8039484C
lbl_803947C4:
/* 803947C4 00391724 2C 04 00 00 */ cmpwi r4, 0
/* 803947C8 00391728 40 81 00 1C */ ble lbl_803947E4
/* 803947CC 0039172C 54 A3 03 00 */ rlwinm r3, r5, 0, 0xc, 0
/* 803947D0 00391730 54 80 A0 16 */ slwi r0, r4, 0x14
/* 803947D4 00391734 7C 60 03 78 */ or r0, r3, r0
/* 803947D8 00391738 90 01 00 08 */ stw r0, 8(r1)
/* 803947DC 0039173C C8 21 00 08 */ lfd f1, 8(r1)
/* 803947E0 00391740 48 00 00 6C */ b lbl_8039484C
lbl_803947E4:
/* 803947E4 00391744 2C 04 FF CA */ cmpwi r4, -54
/* 803947E8 00391748 41 81 00 44 */ bgt lbl_8039482C
/* 803947EC 0039174C 3C 80 00 01 */ lis r4, 0x0000C350@ha
/* 803947F0 00391750 38 04 C3 50 */ addi r0, r4, 0x0000C350@l
/* 803947F4 00391754 7C 03 00 00 */ cmpw r3, r0
/* 803947F8 00391758 40 81 00 1C */ ble lbl_80394814
/* 803947FC 0039175C C8 22 D4 D0 */ lfd f1, lbl_805AF1F0@sda21(r2)
/* 80394800 00391760 C8 41 00 08 */ lfd f2, 8(r1)
/* 80394804 00391764 4B FF FB C5 */ bl copysign
/* 80394808 00391768 C8 02 D4 D0 */ lfd f0, lbl_805AF1F0@sda21(r2)
/* 8039480C 0039176C FC 20 00 72 */ fmul f1, f0, f1
/* 80394810 00391770 48 00 00 3C */ b lbl_8039484C
lbl_80394814:
/* 80394814 00391774 C8 22 D4 C8 */ lfd f1, lbl_805AF1E8@sda21(r2)
/* 80394818 00391778 C8 41 00 08 */ lfd f2, 8(r1)
/* 8039481C 0039177C 4B FF FB AD */ bl copysign
/* 80394820 00391780 C8 02 D4 C8 */ lfd f0, lbl_805AF1E8@sda21(r2)
/* 80394824 00391784 FC 20 00 72 */ fmul f1, f0, f1
/* 80394828 00391788 48 00 00 24 */ b lbl_8039484C
lbl_8039482C:
/* 8039482C 0039178C 38 04 00 36 */ addi r0, r4, 0x36
/* 80394830 00391790 54 A3 03 00 */ rlwinm r3, r5, 0, 0xc, 0
/* 80394834 00391794 54 00 A0 16 */ slwi r0, r0, 0x14
/* 80394838 00391798 C8 22 D4 D8 */ lfd f1, lbl_805AF1F8@sda21(r2)
/* 8039483C 0039179C 7C 60 03 78 */ or r0, r3, r0
/* 80394840 003917A0 90 01 00 08 */ stw r0, 8(r1)
/* 80394844 003917A4 C8 01 00 08 */ lfd f0, 8(r1)
/* 80394848 003917A8 FC 21 00 32 */ fmul f1, f1, f0
lbl_8039484C:
/* 8039484C 003917AC 80 01 00 24 */ lwz r0, 0x24(r1)
/* 80394850 003917B0 7C 08 03 A6 */ mtlr r0
/* 80394854 003917B4 38 21 00 20 */ addi r1, r1, 0x20
/* 80394858 003917B8 4E 80 00 20 */ blr
.section .sdata2, "a"
.balign 8
.global lbl_805AF1D8
lbl_805AF1D8:
# ROM: 0x3FBA78
.4byte 0
.4byte 0
.global lbl_805AF1E0
lbl_805AF1E0:
# ROM: 0x3FBA80
.4byte 0x43500000
.4byte 0
.global lbl_805AF1E8
lbl_805AF1E8:
# ROM: 0x3FBA88
.4byte 0x01A56E1F
.4byte 0xC2F8F359
.global lbl_805AF1F0
lbl_805AF1F0:
# ROM: 0x3FBA90
.4byte 0x7E37E43C
.4byte 0x8800759C
.global lbl_805AF1F8
lbl_805AF1F8:
# ROM: 0x3FBA98
.4byte 0x3C900000
.4byte 0