4 Star 4 Fork 1

mathlib/RV-Libm

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
atand2.S 21.09 KB
一键复制 编辑 原始数据 按行查看 历史
life 提交于 2022-07-07 01:26 . function
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096
.section .rodata, "a", "progbits"
.align 4
.section .text, "ax", "progbits"
.align 4
.section .rodata
.align 4
$jmppoint:
.dword JMP$00
.dword JMP$00
.dword JMP$00
.dword JMP$00
.dword JMP$00
.dword JMP$01
.dword JMP$02
.dword JMP$04
.dword JMP$04
.dword JMP$04
.dword JMP$01
.dword JMP$05
.dword JMP$08
.dword JMP$06
.dword JMP$04
.dword JMP$01
.dword JMP$05
.dword JMP$07
.dword JMP$09
.dword JMP$04
.dword JMP$01
.dword JMP$05
.dword JMP$05
.dword JMP$05
.dword JMP$03
.align 4
$atan2data:
.dword 0x800fffffffffffff
.dword 0xbfd55555555538e3
.dword 0x3fc9999987d2ba8c
.dword 0xbfc2475d83cadf8c
.dword 0xbfd555555555489a
.dword 0x3fc99999982362b9
.dword 0xbfc2491d0d4e55c4
.dword 0x3fbc522fb6153f71
.dword 0x8000000000004502
.dword 0x4050000000000000
.dword 0x3ff921fb54442d18
.dword 0x3c91a62633145c07
.dword 0x400921fb54442d18
.dword 0x3ca1a62633145c07
.dword 0x46a0000000000000
.dword 0x0630000000000000
.dword 0x4190000004000000
.dword 0x4190000000000000
.dword 0xbfd5555555555554
.dword 0x3fc99999999990ab
.dword 0xbfc24924923e3b41
.dword 0x3fbc71c70f13bd13
.dword 0xbfb745ccd92c9b46
.dword 0x3fb3b04bc4ef78bd
.dword 0xbfb0f49d05b681ef
.dword 0x3faa6bc4fa48b1eb
.dword 0x3fc7420a40000000
.dword 0x3fc701c83bf3f980
.dword 0x3fc7420a40000000
.dword 0x3fc701c83bf3f980
.dword 0x3fc8423dc8000000
.dword 0x3fc7f97322bc3610
.dword 0x3fc94269c8000000
.dword 0x3fc8f061ab14e820
.dword 0x3fca429788000000
.dword 0x3fc9e6966dae59e0
.dword 0x3fcb42dcf8000000
.dword 0x3fcadc20228cd1d0
.dword 0x3fcc431348000000
.dword 0x3fcbd0d36ef692f0
.dword 0x3fcdc35db8000000
.dword 0x3fcd3e55d1aa48a0
.dword 0x3fcec38928000000
.dword 0x3fce30f128b31660
.dword 0x3fd06209b0000000
.dword 0x3fd009dee1541aa8
.dword 0x3fd14494e0000000
.dword 0x3fd0ddc441f266f8
.dword 0x3fd1c4d688000000
.dword 0x3fd1551535c070d0
.dword 0x3fd2c56b48000000
.dword 0x3fd24253ad45d908
.dword 0x3fd3c60090000000
.dword 0x3fd32d932007bf00
.dword 0x3fd4465500000000
.dword 0x3fd3a2763db59ed8
.dword 0x3fd546ecc0000000
.dword 0x3fd48a9709748420
.dword 0x3fd647a3c8000000
.dword 0x3fd570a930437688
.dword 0x3fd7485de0000000
.dword 0x3fd65483cfdeb618
.dword 0x3fd8491820000000
.dword 0x3fd736164c4bbeb8
.dword 0x3fd949d7c0000000
.dword 0x3fd81558551feeb0
.dword 0x3fda4aa100000000
.dword 0x3fd8f241ba35f728
.dword 0x3fdb4b80c8000000
.dword 0x3fd9ccd2958e0488
.dword 0x3fdc4c41d0000000
.dword 0x3fdaa4d43eeca6a8
.dword 0x3fddcdb728000000
.dword 0x3fdbe46e7819c168
.dword 0x3fdeceab58000000
.dword 0x3fdcb6526607a560
.dword 0x3fe06851d8000000
.dword 0x3fde52765dc587f8
.dword 0x3fe1291600000000
.dword 0x3fdf80d0c732cf48
.dword 0x3fe1d37e40000000
.dword 0x3fe0439b4c5ac094
.dword 0x3fe2d5c1e0000000
.dword 0x3fe106101537f0e8
.dword 0x3fe3d82e90000000
.dword 0x3fe1c3598a8241e0
.dword 0x3fe4596c10000000
.dword 0x3fe22008adfffdb8
.dword 0x3fe55c0460000000
.dword 0x3fe2d58af512e55c
.dword 0x3fe65ec0b0000000
.dword 0x3fe385eeb34a9208
.dword 0x3fe6e02b68000000
.dword 0x3fe3dc38e4161114
.dword 0x3fe8649328000000
.dword 0x3fe4d78cf23987f0
.dword 0x3fe926e2e8000000
.dword 0x3fe5510d15417c44
.dword 0x3fe9e94bb0000000
.dword 0x3fe5c7d7b64a3bf4
.dword 0x3feb6e49d8000000
.dword 0x3fe6ad65bbff71f0
.dword 0x3fec30dda0000000
.dword 0x3fe71c3ff59078f0
.dword 0x3fedb65180000000
.dword 0x3fe7f26c7370a5a8
.dword 0x3fef3c0170000000
.dword 0x3fe8becd8c12c93c
.dword 0x3ff0407e90000000
.dword 0x3fe961f896b35668
.dword 0x3ff144ac20000000
.dword 0x3fea5a2035510fc0
.dword 0x3ff1c6e0b8000000
.dword 0x3fead0888b591a90
.dword 0x3ff2cb7050000000
.dword 0x3febb28c2aa7d8f8
.dword 0x3ff3d04bc8000000
.dword 0x3fec870a7606fc0c
.dword 0x3ff452c950000000
.dword 0x3fecec77a3b2bb24
.dword 0x3ff5580658000000
.dword 0x3fedae56f3bc79b4
.dword 0x3ff65d79f8000000
.dword 0x3fee64d814f26418
.dword 0x3ff6e054b8000000
.dword 0x3feebc1e74b761f8
.dword 0x3ff7a4b728000000
.dword 0x3fef3a49c5129cfc
.dword 0x3ff92de430000000
.dword 0x3ff01357aa890fdc
.dword 0x3ffaef16e8000000
.dword 0x3ff08e671cc1628c
.dword 0x3ffaef16e8000000
.dword 0x3ff08e671cc1628c
.dword 0x3ffcc7acf8000000
.dword 0x3ff103b27302b5cc
.dword 0x3ffcc7acf8000000
.dword 0x3ff103b27302b5cc
.dword 0x3ffee5ce60000000
.dword 0x3ff17cd8caec7824
.dword 0x4000a52bd0000000
.dword 0x3ff1f6e12ff58bc8
.dword 0x4000a52bd0000000
.dword 0x3ff1f6e12ff58bc8
.dword 0x4001fb1968000000
.dword 0x3ff26f51147fc8bc
.dword 0x4001fb1968000000
.dword 0x3ff26f51147fc8bc
.dword 0x400397b1b0000000
.dword 0x3ff2ee23c48ee846
.dword 0x400397b1b0000000
.dword 0x3ff2ee23c48ee846
.dword 0x40057c3e48000000
.dword 0x3ff36dfde362c27f
.dword 0x40057c3e48000000
.dword 0x3ff36dfde362c27f
.dword 0x4007aa4058000000
.dword 0x3ff3eab9447ac738
.dword 0x4007aa4058000000
.dword 0x3ff3eab9447ac738
.dword 0x400a237e08000000
.dword 0x3ff461708810d364
.dword 0x400a237e08000000
.dword 0x3ff461708810d364
.dword 0x400a237e08000000
.dword 0x3ff461708810d364
.dword 0x400d317088000000
.dword 0x3ff4da6bd6f8b606
.dword 0x400d317088000000
.dword 0x3ff4da6bd6f8b606
.dword 0x400d317088000000
.dword 0x3ff4da6bd6f8b606
.dword 0x401090c7f8000000
.dword 0x3ff557848cacab17
.dword 0x401090c7f8000000
.dword 0x3ff557848cacab17
.dword 0x401323c1c8000000
.dword 0x3ff5d61adc2e9d8c
.dword 0x401323c1c8000000
.dword 0x3ff5d61adc2e9d8c
.dword 0x401323c1c8000000
.dword 0x3ff5d61adc2e9d8c
.dword 0x401323c1c8000000
.dword 0x3ff5d61adc2e9d8c
.dword 0x4016a5fde0000000
.dword 0x3ff655f58fbf0152
.dword 0x4016a5fde0000000
.dword 0x3ff655f58fbf0152
.dword 0x4016a5fde0000000
.dword 0x3ff655f58fbf0152
.dword 0x4016a5fde0000000
.dword 0x3ff655f58fbf0152
.dword 0x401b77e528000000
.dword 0x3ff6d1ad35e44610
.dword 0x401b77e528000000
.dword 0x3ff6d1ad35e44610
.dword 0x401b77e528000000
.dword 0x3ff6d1ad35e44610
.dword 0x401b77e528000000
.dword 0x3ff6d1ad35e44610
.dword 0x401b77e528000000
.dword 0x3ff6d1ad35e44610
.dword 0x4021827378000000
.dword 0x3ff750247200ce4c
.dword 0x4021827378000000
.dword 0x3ff750247200ce4c
.dword 0x4021827378000000
.dword 0x3ff750247200ce4c
.dword 0x4021827378000000
.dword 0x3ff750247200ce4c
.dword 0x4021827378000000
.dword 0x3ff750247200ce4c
.dword 0x4021827378000000
.dword 0x3ff750247200ce4c
.dword 0x402817da10000000
.dword 0x3ff7cebf056afcd8
.dword 0x402817da10000000
.dword 0x3ff7cebf056afcd8
.dword 0x402817da10000000
.dword 0x3ff7cebf056afcd8
.dword 0x402817da10000000
.dword 0x3ff7cebf056afcd8
.dword 0x402817da10000000
.dword 0x3ff7cebf056afcd8
.dword 0x402817da10000000
.dword 0x3ff7cebf056afcd8
.dword 0x402817da10000000
.dword 0x3ff7cebf056afcd8
.dword 0x402817da10000000
.dword 0x3ff7cebf056afcd8
.dword 0x402817da10000000
.dword 0x3ff7cebf056afcd8
.dword 0x4033303368000000
.dword 0x3ff84cb60b3aa272
.dword 0x4033303368000000
.dword 0x3ff84cb60b3aa272
.dword 0x4033303368000000
.dword 0x3ff84cb60b3aa272
.dword 0x4033303368000000
.dword 0x3ff84cb60b3aa272
.dword 0x4033303368000000
.dword 0x3ff84cb60b3aa272
.dword 0x4033303368000000
.dword 0x3ff84cb60b3aa272
.dword 0x4033303368000000
.dword 0x3ff84cb60b3aa272
.dword 0x4033303368000000
.dword 0x3ff84cb60b3aa272
.dword 0x4033303368000000
.dword 0x3ff84cb60b3aa272
.dword 0x4033303368000000
.dword 0x3ff84cb60b3aa272
.dword 0x4033303368000000
.dword 0x3ff84cb60b3aa272
.dword 0x4033303368000000
.dword 0x3ff84cb60b3aa272
.dword 0x4033303368000000
.dword 0x3ff84cb60b3aa272
.dword 0x4033303368000000
.dword 0x3ff84cb60b3aa272
.dword 0x4033303368000000
.dword 0x3ff84cb60b3aa272
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.dword 0x4047be3070000000
.dword 0x3ff8cbbcbb55513f
.section .text
.align 4
.globl _rv_atand2
_rv_atand2:
li t3,0x400921FB54442D18
fmv.d.x ft3,t3
fmul.d ft5,ft3,fa0
li t4,0x4066800000000000
fmv.d.x ft4,t4
fdiv.d fa0,ft5,ft4
fmul.d ft3,ft3,fa1
fdiv.d fa1,ft3,ft4
fmv.x.d a0,fa0
fmv.x.d t0,fa1
li t4,524288
sext.w t1,t4
li t6,262144
sext.w t4,t6
fmv.x.d t6,fa0
addi t1,t1,-1
li a1,2047
addi sp,sp,-224
sd s7,144(sp)
sd s8,152(sp)
sd s9,160(sp)
sd s10,168(sp)
sd s11,176(sp)
fsd fs7,184(sp)
fsd fs8,192(sp)
fsd fs9,200(sp)
fsd fs10,208(sp)
fsd fs11,216(sp)
slli a1,a1,0x34
addi t4,t4,-1538
srai a0,a0,0x2c
sd ra,0(sp)
srai t0,t0,0x2c
and a0,a0,t1
and t0,t0,t1
and a2,t6,a1
srli a7,t6,0x3f
li t3,-27392
add t3,a0,t3
li t5,-27392
add t5,t0,t5
sub t2,a0,t0
addi a3,a7,4
bgtu t3,t4,TYPH_1
li t3,0x1
j TYPH_2
TYPH_1: li t3,0x0
TYPH_2:
bgtu t5,t4,TYPH_3
li t4,0x1
j TYPH_4
TYPH_3: li t4,0x0
TYPH_4:
srai t2,t2,0x4
and t3,t3,t4
bnez t3,TZ13
.align 4
beqz a2,TZ2
sltu a2,a2,a1
.align 4
beqz a2,TZ1
.align 4
j TZ3
.align 4
TZ1:
li a4,-1
addi a7,a7,2
srli a4,a4,0xc
and t6,t6,a4
srli a5,t6,0x33
beqz t6,TYPH_5
mv a5,a5
j TYPH_6
TYPH_5: mv a5,a7
TYPH_6: nop
mv a3,a5
j TZ3
TZ2:
li a6,-1
li s7,0x6
srli a6,a6,0xc
and t6,t6,a6
beqz t6,TYPH_7
mv s7,s7
j TYPH_8
TYPH_7: li s7,0x8
TYPH_8:
add a3,a7,s7
TZ3:
fmv.x.d s8,fa1
and s10,s8,a1
srli s9,s8,0x3f
beqz s10,TZ5
sltu a1,s10,a1
addi ra,s9,4
beqz a1,TZ4
.align 4
j TZ6
.align 4
TZ4:
li s11,-1
addi s9,s9,2
srli s11,s11,0xc
and s8,s8,s11
srli t5,s8,0x33
beqz s8,TYPH_9
mv t5,t5
j TYPH_10
TYPH_9: mv t5,s9
TYPH_10:
mv ra,t5
j TZ6
TZ5:
li t4,-1
li t3,0x6
srli t4,t4,0xc
and s8,s8,t4
beqz s8,TYPH_11
mv t3,t3
j TYPH_12
TYPH_11: li t3,0x8
TYPH_12:
add ra,s9,t3
TZ6:
srai a2,a3,0x1
lui tp,%hi($jmppoint)
addi tp,tp,%lo($jmppoint)
srai a4,ra,0x1
slli a5,a2,0x2
add a2,a2,a5
add a2,a2,a4
li a5,0x18
bgtu a2,a5,TYPH_13
li a5,0x1
j TYPH_14
TYPH_13: li a5,0x0
TYPH_14:
beqz a5,JMP$09
slli a4,a2,0x3
add tp,a4,tp
ld tp,0(tp)
jalr tp
.align 4
JMP$00:
ld ra,0(sp)
ret
.align 4
JMP$01:
ld ra,0(sp)
fmv.d fa0,fa1
ret
.align 4
JMP$02:
li t6,0x1
slli t6,t6,63
li a7,17666
add t6,t6,a7
addi a1,sp,16
sd t6,16(sp)
ld ra,0(sp)
fld fa0,48(sp)
ret
.align 4
JMP$03:
li t0,1
slli t0,t0,63
li a7,17666
add t0,t0,a7
addi a1,sp,16
sd t0,16(sp)
ld ra,0(sp)
fld fa0,48(sp)
ret
.align 4
JMP$04:
lui t0,%hi($atan2data)
addi t0,t0,%lo($atan2data)
ld ra,0(sp)
fld fa7,80(t0)
andi a3,a3,0x1
beqz a3,TZ25
fneg.d fa0,fa7
.align 4
ret
.align 4
JMP$05:
lui t1,%hi($atan2data)
addi t1,t1,%lo($atan2data)
andi ra,ra,0x1
beqz ra,TZ7
ld ra,0(sp)
fld fa7,96(t1)
andi a3,a3,0x1
beqz a3,TZ25
fneg.d fa0,fa7
ret
.align 4
TZ7:
ld ra,0(sp)
li a7,0
fmv.d.x fa7,a7
andi a3,a3,0x1
beqz a3,TZ25
li a7,0
fmv.d.x fs11,a7
fneg.d fa0,fs11
ret
.align 4
JMP$06:
li t3,840
lui a3,%hi($atan2data)
addi a3,a3,%lo($atan2data)
ld ra,0(sp)
slt t2,t2,t3
bnez t2,JMP$09
fld ft10,80(a3)
fsgnj.d fa0,ft10,fa0
ret
.align 4
JMP$07:
li t4,-17200
lui t5,%hi($atan2data)
addi t5,t5,%lo($atan2data)
slt t2,t2,t4
beqz t2,JMP$09
.align 4
andi ra,ra,0x1
beqz ra,TZ24
ld ra,0(sp)
fld fa7,96(t5)
.align 4
andi a3,a3,0x1
beqz a3,TZ25
fneg.d fa0,fa7
.align 4
ret
.align 4
JMP$08:
addi t6,t2,419
li a7,1258
li a2,262144
sext.w a1,a2
lui a2,%hi($atan2data)
addi a2,a2,%lo($atan2data)
bgtu t6,a7,TYPH_15
li t6,0x1
j TYPH_16
TYPH_15: li t6,0x0
TYPH_16:
addi a1,a1,-256
beqz t6,TZ17
sub t0,t0,a1
sltz t0,t0
.align 4
beqz t0,TZ8
fld ft0,112(a2)
fmul.d fa1,fa1,ft0
fmul.d fa0,fa0,ft0
j TZ13
.align 4
TZ8:
lui a4,%hi($atan2data)
addi a4,a4,%lo($atan2data)
fld ft0,120(a4)
fmul.d fa1,fa1,ft0
fmul.d fa0,fa0,ft0
j TZ13
.align 4
JMP$09:
li a6,524288
sext.w a5,a6
fmv.x.d s7,fa0
li s8,0x5
addi a5,a5,-256
slli s8,s8,0x39
and a6,a0,a5
beqz a6,TZ9
add s7,s7,s8
fmv.d.x fa0,s7
li a7,65536
sext.w s7,a7
li a7,-24576
add s7,s7,a7
add a0,a0,s7
j TZ10
.align 4
TZ9:
lui tp,%hi($atan2data)
addi tp,tp,%lo($atan2data)
fmv.x.d s9,fa0
li s11,0x1b
li t3,4095
ld s10,0(tp)
slli s11,s11,0x35
lui t4,%hi($atan2data)
addi t4,t4,%lo($atan2data)
slli t3,t3,0x34
and s9,s9,s10
fld fs3,112(t4)
add s9,s9,s11
fmv.d.x fs1,s9
and s9,s9,t3
fmv.d.x fs2,s9
fsub.d fs1,fs1,fs2
fmul.d fa0,fs1,fs3
fmv.x.d ra,fs1
srai ra,ra,0x2c
and ra,ra,t1
li a7,27392
add a0,ra,a7
TZ10:
fmv.x.d t5,fa1
li a3,0x5
and a5,t0,a5
slli a3,a3,0x39
beqz a5,TZ11
add t5,t5,a3
fmv.d.x fa1,t5
li a7,65536
sext.w t5,a7
li a7,-24576
add t5,t5,a7
add t0,t0,t5
j TZ12
.align 4
TZ11:
lui tp,%hi($atan2data)
addi tp,tp,%lo($atan2data)
fmv.x.d a7,fa1
li a1,0x1b
li a2,4095
ld t6,0(tp)
slli a1,a1,0x35
lui a4,%hi($atan2data)
addi a4,a4,%lo($atan2data)
slli a2,a2,0x34
and t6,a7,t6
fld fs6,112(a4)
add a7,t6,a1
fmv.d.x fs4,a7
and a7,a7,a2
fmv.d.x fs5,a7
fsub.d fs4,fs4,fs5
fmul.d fa1,fs4,fs6
fmv.x.d t2,fs4
srai t2,t2,0x2c
and t1,t2,t1
li a7,27392
add t0,t1,a7
TZ12:
sub a0,a0,t0
srai t2,a0,0x4
TZ13:
li s8,1258
lui s10,%hi($atan2data)
addi s10,s10,%lo($atan2data)
fsgnj.d ft8,fa0,fa1
addi a6,t2,419
addi s7,t2,41
bgtu a6,s8,TYPH_17
li a6,0x1
j TYPH_18
TYPH_17: li a6,0x0
TYPH_18:
li a7,0x9f
bgtu s7,a7,TYPH_19
li t3,0x1
j TYPH_20
TYPH_19: li t3,0x0
TYPH_20:
beqz a6,TZ17
.align 4
beqz t3,TZ15
fld fa2,128(s10)
fmul.d fa2,fa2,fa1
add s7,s7,s7
addi t2,s10,208
fld fa3,136(s10)
addi t3,s10,808
fld fa6,56(s10)
fld fs7,40(s10)
fneg.d fa3,fa3
fmadd.d ft9,fa3,fa1,fa2
fneg.d fa3,fa3
slli a7,s7,0x3
add t2,a7,t2
fld fa4,0(t2)
fld fs3,8(t2)
fld fs8,48(s10)
fmadd.d ft10,ft8,fa4,fa1
fsub.d fa2,fa1,ft9
fld fs10,32(s10)
fld ft0,96(s10)
fld fs2,104(s10)
fneg.d fa4,fa4
fmadd.d ft8,fa4,ft9,ft8
fneg.d fa4,fa4
fneg.d fa4,fa4
fmadd.d fa2,fa4,fa2,ft8
fneg.d fa4,fa4
fdiv.d fa2,fa2,ft10,rtz
fmul.d ft11,fa2,fa2
fmadd.d fa6,fa6,ft11,fs8
fmadd.d fs7,fs7,ft11,fs10
fmul.d fs9,ft11,ft11
fmul.d ft11,fa2,ft11
fmadd.d fa6,fa6,fs9,fs7
fmadd.d fa2,ft11,fa6,fa2
li a7,0
fmv.d.x ft2,a7
flt.d a7,fa1,ft2
beqz a7,TZ14
fsub.d fs3,fs3,ft0
fsub.d fa2,fa2,fs2
TZ14:
ld ra,0(sp)
fadd.d fs3,fa2,fs3
fsgnj.d fa0,fs3,fa0
addi sp,sp,224
ld s7,-80(sp)
ld s8,-72(sp)
ld s9,-64(sp)
ld s10,-56(sp)
ld s11,-48(sp)
fld fs7,-40(sp)
fld fs8,-32(sp)
fld fs9,-24(sp)
fld fs10,-16(sp)
fld fs11,-8(sp)
ret
.align 4
TZ15:
li t4,-41
ld ra,0(sp)
slt t4,t2,t4
beqz t4,TZ16
fdiv.d fs6,fa0,fa1
fmul.d fs4,fs6,fs6
fld fa3,168(s10)
fld fa4,184(s10)
fld ft9,200(s10)
fld ft10,160(s10)
fld ft8,176(s10)
fld fs8,192(s10)
fld fs9,152(s10)
fld fs7,144(s10)
fmul.d fa5,fs4,fs4
fmadd.d fa4,fa4,fs4,ft8
fmadd.d fa3,fa3,fs4,ft10
fmadd.d ft9,ft9,fs4,fs8
fmul.d fs10,fa5,fa5
fmadd.d fs7,fs9,fs4,fs7
fmul.d fa3,fa3,fa5
fmul.d fs4,fs6,fs4
fmul.d ft9,ft9,fs10
fmadd.d fa3,fa4,fs10,fa3
fmadd.d fa3,ft9,fa5,fa3
fadd.d fa3,fs7,fa3
fmadd.d fa7,fs4,fa3,fs6
fmv.x.d a7,fa1
bltz a7,TZ21
.align 4
fmv.d fa0,fa7
addi sp,sp,224
ld s7,-80(sp)
ld s8,-72(sp)
ld s9,-64(sp)
ld s10,-56(sp)
ld s11,-48(sp)
fld fs7,-40(sp)
fld fs8,-32(sp)
fld fs9,-24(sp)
fld fs10,-16(sp)
fld fs11,-8(sp)
ret
.align 4
TZ16:
li ra,840
slt t2,t2,ra
ld ra,0(sp)
beqz t2,TZ18
fdiv.d fa1,fa1,fa0,rtz
fmul.d fa6,fa1,fa1
fld ft11,16(s10)
fld fs1,8(s10)
fld fs2,24(s10)
fld fs5,88(s10)
fld fs3,80(s10)
fsgnj.d fa2,fs5,fa0
fsgnj.d ft8,fs3,fa0
fmul.d ft0,fa6,fa6
fmadd.d fs1,ft11,fa6,fs1
fmul.d fa6,fa1,fa6
fsub.d fa1,fa1,fa2
fmadd.d ft0,fs2,ft0,fs1
fmadd.d ft0,fa6,ft0,fa1
fsub.d fa0,ft8,ft0
addi sp,sp,224
ld s7,-80(sp)
ld s8,-72(sp)
ld s9,-64(sp)
ld s10,-56(sp)
ld s11,-48(sp)
fld fs7,-40(sp)
fld fs8,-32(sp)
fld fs9,-24(sp)
fld fs10,-16(sp)
fld fs11,-8(sp)
ret
.align 4
TZ17:
li a5,840
slt a5,t2,a5
bnez a5,TZ19
TZ18:
lui a3,%hi($atan2data)
addi a3,a3,%lo($atan2data)
ld ra,0(sp)
fld ft10,80(a3)
fsgnj.d fa0,ft10,fa0
addi sp,sp,224
ld s7,-80(sp)
ld s8,-72(sp)
ld s9,-64(sp)
ld s10,-56(sp)
ld s11,-48(sp)
fld fs7,-40(sp)
fld fs8,-32(sp)
fld fs9,-24(sp)
fld fs10,-16(sp)
fld fs11,-8(sp)
ret
.align 4
TZ19:
li a7,0x0
fmv.d.x fs11,a7
flt.d a7,fa1,fs11
beqz a7,TYPH_21
li a7,0x4000000000000000
fmv.d.x fs8,a7
j TYPH_22
TYPH_21: fmv.d.x fs8,a7
TYPH_22:
li t6,-864
lui a1,%hi($atan2data)
addi a1,a1,%lo($atan2data)
ld ra,0(sp)
slt t6,t2,t6
fmv.x.d t5,fs8
beqz t6,TYPH_23
mv t5,t5
j TYPH_24
TYPH_23: mv t5,zero
TYPH_24:
beqz t5,TZ20
fld fs10,96(a1)
fsgnj.d fa0,fs10,fa0
addi sp,sp,224
ld s7,-80(sp)
ld s8,-72(sp)
ld s9,-64(sp)
ld s10,-56(sp)
ld s11,-48(sp)
fld fs7,-40(sp)
fld fs8,-32(sp)
fld fs9,-24(sp)
fld fs10,-16(sp)
fld fs11,-8(sp)
ret
.align 4
TZ20:
li a2,-16351
slt a2,t2,a2
bnez a2,TZ22
fdiv.d fa7,fa0,fa1,rtz
.align 4
li a7,0
fmv.d.x ft2,a7
flt.d a7,fa1,ft2
beqz a7,TZ25
TZ21:
lui a7,%hi($atan2data)
addi a7,a7,%lo($atan2data)
ld ra,0(sp)
fld fa4,104(a7)
fld fs9,96(a7)
fsgnj.d ft9,fa4,fa0
fsgnj.d fa5,fs9,fa0
fsub.d fa7,fa7,ft9
fadd.d fa0,fa7,fa5
addi sp,sp,224
ld s7,-80(sp)
ld s8,-72(sp)
ld s9,-64(sp)
ld s10,-56(sp)
ld s11,-48(sp)
fld fs7,-40(sp)
fld fs8,-32(sp)
fld fs9,-24(sp)
fld fs10,-16(sp)
fld fs11,-8(sp)
ret
.align 4
TZ22:
fmv.x.d t0,fa0
li a0,0x35
li t1,-17200
li a6,2047
slli a0,a0,0x34
slt t1,t2,t1
slli a6,a6,0x34
ld ra,0(sp)
bnez t1,TZ24
add t0,t0,a0
fmv.d.x fs7,t0
fdiv.d ft1,fs7,fa1,rtz
fmv.x.d s8,ft1
fmv.x.d s7,ft1
and a6,s8,a6
sub a0,a6,a0
blez a0,TZ23
lui tp,%hi($atan2data)
addi tp,tp,%lo($atan2data)
ld t3,0(tp)
and t3,s7,t3
or s7,t3,a0
fmv.d.x fa0,s7
addi sp,sp,224
ld s7,-80(sp)
ld s8,-72(sp)
ld s9,-64(sp)
ld s10,-56(sp)
ld s11,-48(sp)
fld fs7,-40(sp)
fld fs8,-32(sp)
fld fs9,-24(sp)
fld fs10,-16(sp)
fld fs11,-8(sp)
ret
.align 4
TZ23:
li s9,0x1
li t4,-1
addi a1,sp,16
slli s9,s9,0x34
sltu a6,a6,s9
bnez a6,TZ24
sd t4,16(sp)
fmv.x.d t0,ft1
ld a0,48(sp)
li t1,0x1
li t2,0x1b
slli t1,t1,0x3f
slli t2,t2,0x35
andi a0,a0,0x40
bnez a0,TZ24
li t3,-1
ld ra,0(sp)
and t0,t0,t1
srli t3,t3,0x1
add t0,t0,t2
fmv.d.x fa7,t0
fadd.d fa7,fa7,ft1
fmv.x.d t0,fa7
sub t0,t0,t2
and t3,t0,t3
fmv.d.x fa7,t0
beqz t3,TZ24
.align 4
fmv.d fa0,fa7
addi sp,sp,224
ld s7,-80(sp)
ld s8,-72(sp)
ld s9,-64(sp)
ld s10,-56(sp)
ld s11,-48(sp)
fld fs7,-40(sp)
fld fs8,-32(sp)
fld fs9,-24(sp)
fld fs10,-16(sp)
fld fs11,-8(sp)
ret
.align 4
TZ24:
li t4,1
addi a1,sp,16
slli t4,t4,63
addi t4,t4,1297
sd t4,16(sp)
fld fa7,48(sp)
TZ25:
ld ra,0(sp)
fmv.x.d a3,fa0
fmv.d fa0,fa7
fmv.x.d a2,fa0
beqz a2,leaf
j leaf_1
leaf: bgtz a3,leaf_1
li a2,0x8000000000000000
fmv.d.x fa0,a2
leaf_1: addi sp,sp,224
ld s7,-80(sp)
ld s8,-72(sp)
ld s9,-64(sp)
ld s10,-56(sp)
ld s11,-48(sp)
fld fs7,-40(sp)
fld fs8,-32(sp)
fld fs9,-24(sp)
fld fs10,-16(sp)
fld fs11,-8(sp)
ret
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mathlib/RV-Libm.git
git@gitee.com:mathlib/RV-Libm.git
mathlib
RV-Libm
RV-Libm
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385