80 lines
1.1 KiB
ArmAsm
80 lines
1.1 KiB
ArmAsm
.file "test.c"
|
|
.option pic
|
|
.attribute arch, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
|
|
.attribute unaligned_access, 0
|
|
.attribute stack_align, 16
|
|
.bss
|
|
.align 3
|
|
.globl A
|
|
.type A, @object
|
|
.size A, 36
|
|
A:
|
|
.zero 36
|
|
.bss
|
|
.align 3
|
|
.globl B
|
|
.type B, @object
|
|
.size B, 36
|
|
B:
|
|
.zero 36
|
|
.text
|
|
.align 3
|
|
.globl main
|
|
.type main, @function
|
|
main:
|
|
.Lmain_entry:
|
|
sd s0,-16(sp)
|
|
lla t0,A
|
|
addi t1,t0,0
|
|
mv a0,t1
|
|
mv s0,sp
|
|
addi sp,sp,-32
|
|
sd ra,-8(s0)
|
|
sd s1,-32(s0)
|
|
call getarray
|
|
li a0,4
|
|
call thrd_create
|
|
mv t0,a0
|
|
slliw t1,t0,3
|
|
li t0,5
|
|
div t2,t1,t0
|
|
addiw t0,t1,8
|
|
li t1,5
|
|
div s1,t0,t1
|
|
mv t0,t2
|
|
j .Lmain_cond0
|
|
.Lmain_cond0:
|
|
slt t1,t0,s1
|
|
bge t0,s1,.Lmain_exit
|
|
j .Lmain_body1
|
|
.Lmain_body1:
|
|
addiw a0,t0,1
|
|
addi t1,a0,0
|
|
slli t0,t1,2
|
|
lla t1,A
|
|
add t2,t1,t0
|
|
addi t0,a0,0
|
|
slli a1,t0,2
|
|
lla t0,B
|
|
add t1,t0,a1
|
|
lw t0,0(t2)
|
|
sw t0,0(t1)
|
|
mv t0,a0
|
|
j .Lmain_cond0
|
|
.Lmain_exit:
|
|
call thrd_join
|
|
lla t0,B
|
|
li a0,8
|
|
addi t1,t0,0
|
|
mv a1,t1
|
|
call putarray
|
|
addiw a0,zero,0
|
|
ld s1,-32(s0)
|
|
ld ra,-8(s0)
|
|
mv sp,s0
|
|
ld s0,-16(s0)
|
|
ret
|
|
.size main, .-main
|
|
.ident "compiler: (visionfive2) 0.1.0"
|
|
.section .note.GNU-stack,"",@progbits
|