forked from AbleOS/holey-bytes
1571938e9f
Signed-off-by: Jakub Doka <jakub.doka2@gmail.com>
48 lines
1 KiB
Plaintext
48 lines
1 KiB
Plaintext
main:
|
|
ADDI64 r254, r254, -24d
|
|
ST r31, r254, 0a, 24h
|
|
LI32 r32, 1148846080w
|
|
CP r2, r32
|
|
JAL r31, r0, :sin
|
|
CP r33, r1
|
|
FMUL32 r32, r33, r32
|
|
FTI32 r32, r32, 1b
|
|
CP r1, r32
|
|
LD r31, r254, 0a, 24h
|
|
ADDI64 r254, r254, 24d
|
|
JALA r0, r31, 0a
|
|
sin:
|
|
CP r13, r2
|
|
LI32 r14, 1124073472w
|
|
LI32 r15, 1078530011w
|
|
FMUL32 r14, r13, r14
|
|
FDIV32 r14, r14, r15
|
|
FTI32 r14, r14, 1b
|
|
ANDI r15, r14, 255d
|
|
MULI64 r15, r15, 4d
|
|
LRA r16, r0, :sin_table
|
|
LI32 r17, 1086918619w
|
|
ITF32 r18, r14
|
|
ADDI64 r14, r14, 64d
|
|
ADD64 r15, r16, r15
|
|
LI32 r19, 1132462080w
|
|
FMUL32 r17, r18, r17
|
|
ANDI r14, r14, 255d
|
|
LI32 r18, 1056964608w
|
|
LD r15, r15, 0a, 4h
|
|
FDIV32 r17, r17, r19
|
|
MULI64 r14, r14, 4d
|
|
FMUL32 r18, r15, r18
|
|
FSUB32 r13, r13, r17
|
|
ADD64 r14, r16, r14
|
|
FMUL32 r16, r13, r18
|
|
LD r14, r14, 0a, 4h
|
|
FSUB32 r14, r14, r16
|
|
FMUL32 r13, r14, r13
|
|
FADD32 r13, r15, r13
|
|
CP r1, r13
|
|
JALA r0, r31, 0a
|
|
code size: 1311
|
|
ret: 826
|
|
status: Ok(())
|