prime/asm/Runtime/k_cos.s

129 lines
4.3 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 __kernel_cos
__kernel_cos:
/* 80392FCC 0038FF2C 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 80392FD0 0038FF30 3C 00 3E 40 */ lis r0, 0x3e40
/* 80392FD4 0038FF34 D8 21 00 08 */ stfd f1, 8(r1)
/* 80392FD8 0038FF38 80 61 00 08 */ lwz r3, 8(r1)
/* 80392FDC 0038FF3C 54 64 00 7E */ clrlwi r4, r3, 1
/* 80392FE0 0038FF40 7C 04 00 00 */ cmpw r4, r0
/* 80392FE4 0038FF44 40 80 00 20 */ bge lbl_80393004
/* 80392FE8 0038FF48 FC 00 08 1E */ fctiwz f0, f1
/* 80392FEC 0038FF4C D8 01 00 18 */ stfd f0, 0x18(r1)
/* 80392FF0 0038FF50 80 01 00 1C */ lwz r0, 0x1c(r1)
/* 80392FF4 0038FF54 2C 00 00 00 */ cmpwi r0, 0
/* 80392FF8 0038FF58 40 82 00 0C */ bne lbl_80393004
/* 80392FFC 0038FF5C C8 22 D3 78 */ lfd f1, lbl_805AF098@sda21(r2)
/* 80393000 0038FF60 48 00 00 B8 */ b lbl_803930B8
lbl_80393004:
/* 80393004 0038FF64 C8 C1 00 08 */ lfd f6, 8(r1)
/* 80393008 0038FF68 3C 60 3F D3 */ lis r3, 0x3FD33333@ha
/* 8039300C 0038FF6C 38 03 33 33 */ addi r0, r3, 0x3FD33333@l
/* 80393010 0038FF70 C8 A2 D3 A8 */ lfd f5, lbl_805AF0C8@sda21(r2)
/* 80393014 0038FF74 FC E6 01 B2 */ fmul f7, f6, f6
/* 80393018 0038FF78 C8 02 D3 A0 */ lfd f0, lbl_805AF0C0@sda21(r2)
/* 8039301C 0038FF7C C8 82 D3 98 */ lfd f4, lbl_805AF0B8@sda21(r2)
/* 80393020 0038FF80 7C 04 00 00 */ cmpw r4, r0
/* 80393024 0038FF84 C8 62 D3 90 */ lfd f3, lbl_805AF0B0@sda21(r2)
/* 80393028 0038FF88 C8 22 D3 88 */ lfd f1, lbl_805AF0A8@sda21(r2)
/* 8039302C 0038FF8C FC A5 01 FA */ fmadd f5, f5, f7, f0
/* 80393030 0038FF90 C8 02 D3 80 */ lfd f0, lbl_805AF0A0@sda21(r2)
/* 80393034 0038FF94 FC 87 21 7A */ fmadd f4, f7, f5, f4
/* 80393038 0038FF98 FC 67 19 3A */ fmadd f3, f7, f4, f3
/* 8039303C 0038FF9C FC 27 08 FA */ fmadd f1, f7, f3, f1
/* 80393040 0038FFA0 FC 07 00 7A */ fmadd f0, f7, f1, f0
/* 80393044 0038FFA4 FC 87 00 32 */ fmul f4, f7, f0
/* 80393048 0038FFA8 40 80 00 20 */ bge lbl_80393068
/* 8039304C 0038FFAC FC 06 00 B2 */ fmul f0, f6, f2
/* 80393050 0038FFB0 C8 22 D3 B0 */ lfd f1, lbl_805AF0D0@sda21(r2)
/* 80393054 0038FFB4 C8 42 D3 78 */ lfd f2, lbl_805AF098@sda21(r2)
/* 80393058 0038FFB8 FC 07 01 38 */ fmsub f0, f7, f4, f0
/* 8039305C 0038FFBC FC 01 01 F8 */ fmsub f0, f1, f7, f0
/* 80393060 0038FFC0 FC 22 00 28 */ fsub f1, f2, f0
/* 80393064 0038FFC4 48 00 00 54 */ b lbl_803930B8
lbl_80393068:
/* 80393068 0038FFC8 3C 00 3F E9 */ lis r0, 0x3fe9
/* 8039306C 0038FFCC 7C 04 00 00 */ cmpw r4, r0
/* 80393070 0038FFD0 40 81 00 10 */ ble lbl_80393080
/* 80393074 0038FFD4 C8 02 D3 B8 */ lfd f0, lbl_805AF0D8@sda21(r2)
/* 80393078 0038FFD8 D8 01 00 10 */ stfd f0, 0x10(r1)
/* 8039307C 0038FFDC 48 00 00 14 */ b lbl_80393090
lbl_80393080:
/* 80393080 0038FFE0 3C 64 FF E0 */ addis r3, r4, 0xffe0
/* 80393084 0038FFE4 38 00 00 00 */ li r0, 0
/* 80393088 0038FFE8 90 61 00 10 */ stw r3, 0x10(r1)
/* 8039308C 0038FFEC 90 01 00 14 */ stw r0, 0x14(r1)
lbl_80393090:
/* 80393090 0038FFF0 C8 01 00 08 */ lfd f0, 8(r1)
/* 80393094 0038FFF4 C8 61 00 10 */ lfd f3, 0x10(r1)
/* 80393098 0038FFF8 FC 00 00 B2 */ fmul f0, f0, f2
/* 8039309C 0038FFFC C8 22 D3 B0 */ lfd f1, lbl_805AF0D0@sda21(r2)
/* 803930A0 00390000 C8 42 D3 78 */ lfd f2, lbl_805AF098@sda21(r2)
/* 803930A4 00390004 FC 21 19 F8 */ fmsub f1, f1, f7, f3
/* 803930A8 00390008 FC 07 01 38 */ fmsub f0, f7, f4, f0
/* 803930AC 0039000C FC 42 18 28 */ fsub f2, f2, f3
/* 803930B0 00390010 FC 01 00 28 */ fsub f0, f1, f0
/* 803930B4 00390014 FC 22 00 28 */ fsub f1, f2, f0
lbl_803930B8:
/* 803930B8 00390018 38 21 00 20 */ addi r1, r1, 0x20
2022-07-14 05:48:03 +00:00
/* 803930BC 0039001C 4E 80 00 20 */ blr
2022-07-18 05:20:04 +00:00
.section .sdata2, "a"
.balign 8
2022-07-18 05:20:04 +00:00
.global lbl_805AF098
lbl_805AF098:
# ROM: 0x3FB938
.double 1.0
.global lbl_805AF0A0
lbl_805AF0A0:
# ROM: 0x3FB940
.4byte 0x3FA55555
.4byte 0x5555554C
.global lbl_805AF0A8
lbl_805AF0A8:
# ROM: 0x3FB948
.4byte 0xBF56C16C
.4byte 0x16C15177
.global lbl_805AF0B0
lbl_805AF0B0:
# ROM: 0x3FB950
.4byte 0x3EFA01A0
.4byte 0x19CB1590
.global lbl_805AF0B8
lbl_805AF0B8:
# ROM: 0x3FB958
.4byte 0xBE927E4F
.4byte 0x809C52AD
.global lbl_805AF0C0
lbl_805AF0C0:
# ROM: 0x3FB960
.4byte 0x3E21EE9E
.4byte 0xBDB4B1C4
.global lbl_805AF0C8
lbl_805AF0C8:
# ROM: 0x3FB968
.4byte 0xBDA8FAE9
.4byte 0xBE8838D4
.global lbl_805AF0D0
lbl_805AF0D0:
# ROM: 0x3FB970
.4byte 0x3FE00000
.4byte 0
.global lbl_805AF0D8
lbl_805AF0D8:
# ROM: 0x3FB978
.4byte 0x3FD20000
.4byte 0