sysy-data/quick_test/asm/7.s

69 lines
937 B
ArmAsm
Raw Permalink Normal View History

2024-08-19 10:53:00 +08:00
.file "test.c"
.option pic
.attribute arch, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.attribute unaligned_access, 0
.attribute stack_align, 16
.data
.align 3
.globl A
.type A, @object
.size A, 36
A:
.word 0x1
.word 0x1
.word 0x4
.word 0x5
.word 0x1
.word 0x4
.zero 12
.text
.align 3
.globl main
.type main, @function
main:
.Lmain_exit:
li a0,4
sd s0,-16(sp)
mv s0,sp
sd ra,-8(s0)
addi sp,sp,-32
sd s1,-32(s0)
call thrd_create
mv t0,a0
addi t1,t0,0
slli t0,t1,2
lla t1,A
add t2,t1,t0
lw t0,0(t2)
slliw t1,t0,1
sw t1,0(t2)
call thrd_join
li a0,8
lla t0,A
addi s1,t0,0
mv a1,s1
call putarray
li a0,4
call thrd_create
mv t1,a0
addi t0,t1,0
slli t1,t0,2
lla t0,A
add t2,t0,t1
lw t0,0(t2)
slliw t1,t0,1
sw t1,0(t2)
call thrd_join
mv a1,s1
li a0,8
call putarray
addiw a0,zero,0
mv sp,s0
ld s1,-32(s0)
ld ra,-8(s0)
ld s0,-16(s0)
ret
.size main, .-main
.ident "compiler: (visionfive2) 0.1.0"
.section .note.GNU-stack,"",@progbits