sysy-data/quick_test/asm/6.s

61 lines
848 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:
sd s0,-16(sp)
lla t0,A
addi t2,t0,0
li a0,4
li t0,11
mv s0,sp
addi sp,sp,-32
sd ra,-8(s0)
sd s1,-24(s0)
sw t0,0(t2)
sd t2,-32(s0)
call thrd_create
ld t2,-32(s0)
mv t1,a0
addi t0,t1,0
slli t1,t0,2
lla t0,A
add s1,t0,t1
lw t0,0(s1)
slliw t1,t0,1
sw t1,0(s1)
sd t2,-32(s0)
call thrd_join
ld t2,-32(s0)
li a0,8
mv a1,t2
call putarray
addiw a0,zero,0
ld s1,-24(s0)
mv sp,s0
ld ra,-8(s0)
ld s0,-16(s0)
ret
.size main, .-main
.ident "compiler: (visionfive2) 0.1.0"
.section .note.GNU-stack,"",@progbits