sysy-data/final_performance_c/asm/recursive_call_1.s

374 lines
5.7 KiB
ArmAsm

.file "recursive_call_1.sy"
.option pic
.attribute arch, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.attribute unaligned_access, 0
.attribute stack_align, 16
.text
.align 1
.globl myabs
.type myabs, @function
myabs:
fmv.w.x fa5,zero
fgt.s a5,fa0,fa5
bne a5,zero,.L1
flt.s a5,fa0,fa5
bne a5,zero,.L8
.L1:
ret
.L8:
fneg.s fa0,fa0
ret
.size myabs, .-myabs
.align 1
.globl func
.type func, @function
func:
blt a0,zero,.L19
addi sp,sp,-64
fsd fs0,40(sp)
sd ra,56(sp)
sd s0,48(sp)
fsd fs1,32(sp)
fsd fs2,24(sp)
fsd fs3,16(sp)
fsd fs4,8(sp)
fmv.s fs0,fa0
beq a0,zero,.L11
li a5,1
beq a0,a5,.L12
li a5,2
beq a0,a5,.L13
li a5,3
beq a0,a5,.L24
addiw s0,a0,-5
mv a0,s0
call func
fadd.s fs1,fs0,fa0
mv a0,s0
fmv.s fa0,fs1
call func
fsub.s fs1,fs1,fa0
mv a0,s0
fadd.s fs1,fs1,fs0
fmv.s fa0,fs1
call func
fadd.s fs2,fa0,fs1
mv a0,s0
fmv.s fa0,fs2
call func
fsub.s fs2,fs2,fa0
mv a0,s0
fsub.s fs1,fs1,fs2
fadd.s fs1,fs1,fs0
fmv.s fa0,fs1
call func
fadd.s fs2,fs1,fa0
mv a0,s0
fmv.s fa0,fs2
call func
fsub.s fs2,fs2,fa0
mv a0,s0
fadd.s fs2,fs2,fs1
fmv.s fa0,fs2
call func
fadd.s fs3,fa0,fs2
mv a0,s0
fmv.s fa0,fs3
call func
fsub.s fs3,fs3,fa0
mv a0,s0
fsub.s fs2,fs2,fs3
fsub.s fs1,fs1,fs2
fadd.s fs1,fs1,fs0
fmv.s fa0,fs1
call func
fadd.s fs2,fa0,fs1
mv a0,s0
fmv.s fa0,fs2
call func
fsub.s fs2,fs2,fa0
mv a0,s0
fadd.s fs2,fs2,fs1
fmv.s fa0,fs2
call func
fadd.s fs3,fa0,fs2
mv a0,s0
fmv.s fa0,fs3
call func
fsub.s fs3,fs3,fa0
mv a0,s0
fsub.s fs2,fs2,fs3
fadd.s fs2,fs2,fs1
fmv.s fa0,fs2
call func
fadd.s fs3,fa0,fs2
mv a0,s0
fmv.s fa0,fs3
call func
fsub.s fs3,fs3,fa0
mv a0,s0
fadd.s fs3,fs3,fs2
fmv.s fa0,fs3
call func
fadd.s fs4,fa0,fs3
mv a0,s0
fmv.s fa0,fs4
call func
fsub.s fs4,fs4,fa0
mv a0,s0
fsub.s fs3,fs3,fs4
fsub.s fs2,fs2,fs3
fsub.s fs1,fs1,fs2
fadd.s fs0,fs1,fs0
fmv.s fa0,fs0
call func
fadd.s fs1,fs0,fa0
mv a0,s0
fmv.s fa0,fs1
call func
fsub.s fs1,fs1,fa0
mv a0,s0
fadd.s fs1,fs1,fs0
fmv.s fa0,fs1
call func
fadd.s fs2,fs1,fa0
mv a0,s0
fmv.s fa0,fs2
call func
fsub.s fs2,fs2,fa0
mv a0,s0
fsub.s fs1,fs1,fs2
fadd.s fs1,fs1,fs0
fmv.s fa0,fs1
call func
fadd.s fs2,fs1,fa0
mv a0,s0
fmv.s fa0,fs2
call func
fsub.s fs2,fs2,fa0
mv a0,s0
fadd.s fs2,fs2,fs1
fmv.s fa0,fs2
call func
fadd.s fs3,fs2,fa0
mv a0,s0
fmv.s fa0,fs3
call func
fsub.s fs3,fs3,fa0
mv a0,s0
fsub.s fs2,fs2,fs3
fsub.s fs1,fs1,fs2
fadd.s fs1,fs1,fs0
fmv.s fa0,fs1
call func
fadd.s fs2,fs1,fa0
mv a0,s0
fmv.s fa0,fs2
call func
fsub.s fs2,fs2,fa0
mv a0,s0
fadd.s fs2,fs2,fs1
fmv.s fa0,fs2
call func
fadd.s fs3,fs2,fa0
mv a0,s0
fmv.s fa0,fs3
call func
fsub.s fs3,fs3,fa0
mv a0,s0
fsub.s fs2,fs2,fs3
fadd.s fs2,fs2,fs1
fmv.s fa0,fs2
call func
fadd.s fs3,fs2,fa0
mv a0,s0
fmv.s fa0,fs3
call func
fsub.s fs3,fs3,fa0
mv a0,s0
fadd.s fs3,fs3,fs2
fmv.s fa0,fs3
call func
fadd.s fs4,fs3,fa0
mv a0,s0
fmv.s fa0,fs4
call func
fsub.s fs4,fs4,fa0
fsub.s fs3,fs3,fs4
fsub.s fs2,fs2,fs3
.L16:
fsub.s fs1,fs1,fs2
.L17:
fsub.s fa0,fs0,fs1
j .L9
.L11:
fmv.w.x fa5,zero
fadd.s fa0,fa0,fa5
.L9:
ld ra,56(sp)
ld s0,48(sp)
fld fs0,40(sp)
fld fs1,32(sp)
fld fs2,24(sp)
fld fs3,16(sp)
fld fs4,8(sp)
addi sp,sp,64
jr ra
.L19:
fmv.w.x fa0,zero
ret
.L12:
fmv.w.x fs1,zero
fadd.s fa5,fa0,fs1
fadd.s fs0,fa5,fa0
fadd.s fs1,fs0,fs1
fsub.s fa0,fs0,fs1
j .L9
.L13:
fmv.w.x fs2,zero
fadd.s fa5,fa0,fs2
fadd.s fa5,fa5,fa0
fadd.s fa4,fa5,fs2
fsub.s fa5,fa5,fa4
fadd.s fs0,fa5,fa0
fadd.s fs1,fs0,fs2
fadd.s fs1,fs1,fs0
fadd.s fs2,fs1,fs2
fsub.s fs1,fs1,fs2
j .L17
.L24:
fmv.w.x fa5,zero
fadd.s fa4,fa0,fa5
fadd.s fa4,fa4,fa0
fadd.s fa3,fa4,fa5
fsub.s fa4,fa4,fa3
fadd.s fa4,fa4,fa0
fadd.s fa3,fa4,fa5
fadd.s fa3,fa3,fa4
fadd.s fa2,fa3,fa5
fsub.s fa3,fa3,fa2
fsub.s fa4,fa4,fa3
fadd.s fs0,fa4,fa0
fadd.s fs1,fs0,fa5
fadd.s fs1,fs1,fs0
fadd.s fa4,fs1,fa5
fsub.s fs1,fs1,fa4
fadd.s fs1,fs1,fs0
fadd.s fs2,fs1,fa5
fadd.s fs2,fs2,fs1
fadd.s fs3,fs2,fa5
fsub.s fs2,fs2,fs3
j .L16
.size func, .-func
.section .text.startup,"ax",@progbits
.align 1
.globl main
.type main, @function
main:
addi sp,sp,-48
li a0,25
sd ra,40(sp)
sd s0,32(sp)
sd s1,24(sp)
fsd fs0,8(sp)
fsd fs1,0(sp)
call _sysy_starttime@plt
call getint@plt
blt a0,zero,.L26
addiw s1,a0,-1
li a5,-1
beq s1,a5,.L29
flw fs1,.LC0,a5
fmv.s fa0,fs1
addiw s0,a0,-2
mv a0,s0
call func
fadd.s fs0,fa0,fs1
mv a0,s0
fmv.s fa0,fs0
call func
fsub.s fs0,fs0,fa0
.L27:
fadd.s fs0,fs0,fs1
mv a0,s1
fmv.s fa0,fs0
call func
fsub.s fs0,fs0,fa0
fmv.w.x fa5,zero
feq.s a5,fs0,fa5
bne a5,zero,.L26
.L28:
li a0,35
call _sysy_stoptime@plt
ld ra,40(sp)
ld s0,32(sp)
ld s1,24(sp)
fld fs0,8(sp)
fld fs1,0(sp)
li a0,0
addi sp,sp,48
jr ra
.L29:
fmv.w.x fs0,zero
flw fs1,.LC0,a5
j .L27
.L26:
li a0,112
call putch@plt
j .L28
.size main, .-main
.globl _sysy_idx
.globl _sysy_us
.globl _sysy_s
.globl _sysy_m
.globl _sysy_h
.globl _sysy_l2
.globl _sysy_l1
.globl _sysy_end
.globl _sysy_start
.section .rodata.cst4,"aM",@progbits,4
.align 2
.LC0:
.word 1065361605
.bss
.align 3
.type _sysy_idx, @object
.size _sysy_idx, 4
_sysy_idx:
.zero 4
.zero 4
.type _sysy_us, @object
.size _sysy_us, 4096
_sysy_us:
.zero 4096
.type _sysy_s, @object
.size _sysy_s, 4096
_sysy_s:
.zero 4096
.type _sysy_m, @object
.size _sysy_m, 4096
_sysy_m:
.zero 4096
.type _sysy_h, @object
.size _sysy_h, 4096
_sysy_h:
.zero 4096
.type _sysy_l2, @object
.size _sysy_l2, 4096
_sysy_l2:
.zero 4096
.type _sysy_l1, @object
.size _sysy_l1, 4096
_sysy_l1:
.zero 4096
.type _sysy_end, @object
.size _sysy_end, 16
_sysy_end:
.zero 16
.type _sysy_start, @object
.size _sysy_start, 16
_sysy_start:
.zero 16
.ident "GCC: (Debian 12.2.0-13) 12.2.0"
.section .note.GNU-stack,"",@progbits