sysy-data/functional_c/asm/88_many_params2.s

266 lines
3.8 KiB
ArmAsm

.text
.attribute 4, 16
.attribute 5, "rv64i2p0_m2p0_a2p0_f2p0_d2p0_c2p0"
.file "88_many_params2.sy"
.globl func
.p2align 1
.type func,@function
func:
addi sp, sp, -80
sd ra, 72(sp)
sd s0, 64(sp)
sd s1, 56(sp)
sd s2, 48(sp)
sd s3, 40(sp)
sd s4, 32(sp)
sd s5, 24(sp)
sd s6, 16(sp)
sd s7, 8(sp)
sd s8, 0(sp)
ld t0, 80(sp)
li s1, 236
mul a0, a0, s1
add s0, a1, a0
lw a0, 0(s0)
mv s1, a7
mv s4, a6
mv s2, a5
mv s3, a4
mv s5, a3
mv s6, a2
sext.w s7, t0
call putint
lw a0, 4(s0)
call putint
lw a0, 8(s0)
call putint
lw a0, 12(s0)
call putint
lw a0, 16(s0)
call putint
lw a0, 20(s0)
call putint
lw a0, 24(s0)
call putint
lw a0, 28(s0)
call putint
lw a0, 32(s0)
call putint
lw a0, 36(s0)
call putint
li a0, 10
li s8, 10
call putch
slli a0, s6, 2
add a0, a0, s5
lw a0, 0(a0)
call putint
li a0, 10
call putch
li a0, 9
blt a0, s7, .LBB0_3
slli a0, s7, 2
add a0, a0, s4
addi a1, s7, 1
lui a2, 31
addiw a6, a2, 1899
lui a3, 576660
addiw a3, a3, 1989
lui a4, 1
addiw a4, a4, -372
.LBB0_2:
mulw a5, s1, a6
mul s0, a5, a3
srli s0, s0, 32
addw s0, s0, a5
srliw a2, s0, 31
sraiw s0, s0, 11
addw a2, a2, s0
mulw a2, a2, a4
subw a2, a5, a2
sw a2, 0(a0)
addiw s1, s1, 7
sext.w a2, a1
addi a0, a0, 4
addi a1, a1, 1
bne a2, s8, .LBB0_2
.LBB0_3:
addw a0, s2, s3
ld ra, 72(sp)
ld s0, 64(sp)
ld s1, 56(sp)
ld s2, 48(sp)
ld s3, 40(sp)
ld s4, 32(sp)
ld s5, 24(sp)
ld s6, 16(sp)
ld s7, 8(sp)
ld s8, 0(sp)
addi sp, sp, 80
ret
.Lfunc_end0:
.size func, .Lfunc_end0-func
.globl main
.p2align 1
.type main,@function
main:
addi sp, sp, -2032
sd ra, 2024(sp)
sd s0, 2016(sp)
sd s1, 2008(sp)
sd s2, 2000(sp)
sd s3, 1992(sp)
lui a0, 7
addiw a0, a0, -1792
sub sp, sp, a0
lui s3, 1
addiw a0, s3, 464
lui a1, 3
addiw a1, a1, 236
add s0, sp, a1
add s1, s0, a0
lui a0, 4
addiw a2, a0, -36
lui a0, 3
addiw a0, a0, 236
add a0, a0, sp
li a1, 0
call memset@plt
lui a0, 3
addiw a2, a0, 220
addi a0, sp, 16
addi s2, sp, 16
li a1, 0
call memset@plt
li a0, 6
sw a0, 0(s1)
li a0, 7
sw a0, 8(s1)
li a0, 4
sw a0, 12(s1)
li a0, 9
sw a0, 24(s1)
li a1, 11
sw a1, 40(s1)
addi a6, sp, 1432
li a1, 1
sw a1, 1436(sp)
li a1, 2
sw a1, 1440(sp)
li a1, 3
sw a1, 1444(sp)
sw a0, 1468(sp)
addiw a0, s3, 460
add a3, s0, a0
li a0, 6
addi a1, sp, 16
li a2, 7
li a4, 3
sd zero, 0(sp)
li a5, 0
li a7, 0
call func
bltz a0, .LBB1_3
slliw a1, a0, 1
addw a0, a0, a1
slli a0, a0, 32
srli s1, a0, 32
srli a0, a0, 30
add a0, a0, s2
addi s0, a0, 1416
.LBB1_2:
lw a0, 0(s0)
call putint
li a0, 32
call putch
sext.w a0, s1
addi s1, s1, -1
addi s0, s0, -4
bgtz a0, .LBB1_2
.LBB1_3:
li a0, 10
call putch
li a0, 0
lui a1, 7
addiw a1, a1, -1792
add sp, sp, a1
ld ra, 2024(sp)
ld s0, 2016(sp)
ld s1, 2008(sp)
ld s2, 2000(sp)
ld s3, 1992(sp)
addi sp, sp, 2032
ret
.Lfunc_end1:
.size main, .Lfunc_end1-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