sysy-data/functional_c/asm/63_big_int_mul.s

246 lines
3.4 KiB
ArmAsm

.file "63_big_int_mul.sy"
.option pic
.attribute arch, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.attribute unaligned_access, 0
.attribute stack_align, 16
.text
.section .text.startup,"ax",@progbits
.align 1
.globl main
.type main, @function
main:
addi sp,sp,-592
lla a5,.LANCHOR0
sd s3,552(sp)
sd s4,544(sp)
ld s3,24(a5)
ld s4,16(a5)
sd s5,536(sp)
sd s6,528(sp)
ld s5,8(a5)
ld s6,0(a5)
ld t0,72(a5)
ld t6,80(a5)
ld t5,88(a5)
ld t4,104(a5)
ld t3,112(a5)
ld t1,120(a5)
ld a6,136(a5)
ld t2,64(a5)
ld a7,128(a5)
ld a3,144(a5)
ld a4,152(a5)
sd ra,584(sp)
sd s0,576(sp)
ld ra,40(a5)
ld s0,56(a5)
sd s1,568(sp)
sd s2,560(sp)
ld s1,48(a5)
ld s2,32(a5)
ld a5,96(a5)
sd s6,0(sp)
sd s5,8(sp)
sd s4,16(sp)
sd s3,24(sp)
sd s2,32(sp)
li a2,160
sd t0,72(sp)
sd t6,80(sp)
sd t5,88(sp)
sd t4,104(sp)
sd t3,112(sp)
sd t1,120(sp)
sd a6,136(sp)
sd t0,232(sp)
sd t6,264(sp)
sd t5,272(sp)
sd t4,288(sp)
sd t3,296(sp)
sd t1,304(sp)
sd ra,40(sp)
sd t2,64(sp)
sd a5,96(sp)
sd a7,128(sp)
sd a3,144(sp)
sd a4,152(sp)
sd ra,200(sp)
sd t2,224(sp)
sd a5,280(sp)
sd a7,312(sp)
sd s1,48(sp)
sd s0,56(sp)
li a1,0
addi a0,sp,368
sd s6,160(sp)
sd s5,168(sp)
sd s4,176(sp)
sd s3,184(sp)
sd s2,192(sp)
sd s1,208(sp)
sd s0,216(sp)
sd a6,320(sp)
sd a3,328(sp)
sd a4,336(sp)
call memset@plt
addi t5,sp,340
addi t4,sp,524
li t3,39
addi a6,sp,160
addi t0,sp,236
li a0,9
li t1,10
li t6,19
.L5:
lw a1,0(t5)
mv a3,t0
mv a4,t4
j .L4
.L17:
divw a2,a2,t1
lw a7,-4(a4)
sw a5,0(a4)
addi a4,a4,-4
addw a5,a2,a7
sw a5,0(a4)
addi a5,a3,-4
beq a6,a3,.L16
.L8:
mv a3,a5
.L4:
lw a5,0(a3)
lw a2,0(a4)
mulw a5,a5,a1
addw a2,a5,a2
mv a5,a2
bgt a2,a0,.L17
sw a2,0(a4)
addi a5,a3,-4
addi a4,a4,-4
bne a6,a3,.L8
.L16:
addiw t3,t3,-1
addi t5,t5,-4
addi t4,t4,-4
bne t3,t6,.L5
lw a0,368(sp)
bne a0,zero,.L18
.L6:
addi s0,sp,372
addi s1,sp,528
.L7:
lw a0,0(s0)
addi s0,s0,4
call putint@plt
bne s1,s0,.L7
ld ra,584(sp)
ld s0,576(sp)
ld s1,568(sp)
ld s2,560(sp)
ld s3,552(sp)
ld s4,544(sp)
ld s5,536(sp)
ld s6,528(sp)
li a0,0
addi sp,sp,592
jr ra
.L18:
call putint@plt
j .L6
.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
.align 3
.set .LANCHOR0,. + 0
.LC0:
.word 1
.word 2
.word 3
.word 4
.word 5
.word 6
.word 7
.word 8
.word 9
.word 0
.word 1
.word 2
.word 3
.word 4
.word 5
.word 6
.word 7
.word 8
.word 9
.word 0
.LC1:
.word 2
.word 3
.word 4
.word 2
.word 5
.word 7
.word 9
.word 9
.word 0
.word 1
.word 9
.word 8
.word 7
.word 6
.word 4
.word 3
.word 2
.word 1
.word 2
.word 2
.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