sysy-data/final_performance_c/asm/recursive_call_1.s

150 lines
2.2 KiB
ArmAsm
Raw Normal View History

2024-06-14 13:34:46 +08:00
.text
.attribute 4, 16
.attribute 5, "rv64i2p0_m2p0_a2p0_f2p0_d2p0_c2p0"
.file "recursive_call_1.sy"
.globl myabs
.p2align 1
.type myabs,@function
myabs:
fmv.w.x ft0, zero
flt.s a0, ft0, fa0
bnez a0, .LBB0_3
flt.s a0, fa0, ft0
beqz a0, .LBB0_3
fneg.s fa0, fa0
.LBB0_3:
ret
.Lfunc_end0:
.size myabs, .Lfunc_end0-myabs
.globl func
.p2align 1
.type func,@function
func:
addi sp, sp, -32
sd ra, 24(sp)
sd s0, 16(sp)
fsd fs0, 8(sp)
bltz a0, .LBB1_2
fmv.s fs0, fa0
addiw s0, a0, -1
mv a0, s0
call func
fadd.s fs0, fa0, fs0
fmv.s fa0, fs0
mv a0, s0
call func
fsub.s fa0, fs0, fa0
j .LBB1_3
.LBB1_2:
fmv.w.x fa0, zero
.LBB1_3:
ld ra, 24(sp)
ld s0, 16(sp)
fld fs0, 8(sp)
addi sp, sp, 32
ret
.Lfunc_end1:
.size func, .Lfunc_end1-func
.section .sdata,"aw",@progbits
.p2align 2
.LCPI2_0:
.word 0x3f8020c5
.text
.globl main
.p2align 1
.type main,@function
main:
addi sp, sp, -16
sd ra, 8(sp)
li a0, 25
call _sysy_starttime
call getint
lui a1, %hi(.LCPI2_0)
flw fa0, %lo(.LCPI2_0)(a1)
call func
fmv.w.x ft0, zero
feq.s a0, fa0, ft0
beqz a0, .LBB2_2
li a0, 112
call putch
.LBB2_2:
li a0, 35
call _sysy_stoptime
li a0, 0
ld ra, 8(sp)
addi sp, sp, 16
ret
.Lfunc_end2:
.size main, .Lfunc_end2-main
.type _sysy_start,@object
.bss
.globl _sysy_start
.p2align 3
_sysy_start:
.zero 16
.size _sysy_start, 16
.type _sysy_end,@object
.globl _sysy_end
.p2align 3
_sysy_end:
.zero 16
.size _sysy_end, 16
.type _sysy_l1,@object
.globl _sysy_l1
.p2align 2
_sysy_l1:
.zero 4096
.size _sysy_l1, 4096
.type _sysy_l2,@object
.globl _sysy_l2
.p2align 2
_sysy_l2:
.zero 4096
.size _sysy_l2, 4096
.type _sysy_h,@object
.globl _sysy_h
.p2align 2
_sysy_h:
.zero 4096
.size _sysy_h, 4096
.type _sysy_m,@object
.globl _sysy_m
.p2align 2
_sysy_m:
.zero 4096
.size _sysy_m, 4096
.type _sysy_s,@object
.globl _sysy_s
.p2align 2
_sysy_s:
.zero 4096
.size _sysy_s, 4096
.type _sysy_us,@object
.globl _sysy_us
.p2align 2
_sysy_us:
.zero 4096
.size _sysy_us, 4096
.type _sysy_idx,@object
.section .sbss,"aw",@nobits
.globl _sysy_idx
.p2align 2
_sysy_idx:
.word 0
.size _sysy_idx, 4
.ident "Debian clang version 14.0.6"
.section ".note.GNU-stack","",@progbits
.addrsig