sysy-data/functional_c/asm/84_long_array2.s

140 lines
2.0 KiB
ArmAsm
Raw Permalink Normal View History

2024-06-14 13:34:46 +08:00
.text
.attribute 4, 16
.attribute 5, "rv64i2p0_m2p0_a2p0_f2p0_d2p0_c2p0"
.file "84_long_array2.sy"
.globl f1
.p2align 1
.type f1,@function
f1:
lui a1, %hi(a)
addi a1, a1, %lo(a)
lui a2, 1
addiw a2, a2, -96
sw a2, 20(a1)
lui a2, 4
addiw a3, a2, -384
add a3, a3, a1
li a4, 3
sw a4, 0(a3)
addiw a2, a2, -4
add a2, a2, a1
li a4, 7
sw a4, 0(a2)
lui a2, 2
addiw a2, a2, 672
add a1, a1, a2
lw a1, 0(a1)
addiw a1, a1, 9
sw a1, 28(a0)
lw a0, 0(a3)
ret
.Lfunc_end0:
.size f1, .Lfunc_end0-f1
.globl main
.p2align 1
.type main,@function
main:
addi sp, sp, -16
sd ra, 8(sp)
lui a0, %hi(a)
addi a0, a0, %lo(a)
lui a1, 1
addiw a1, a1, -96
sw a1, 20(a0)
lui a1, 4
addiw a2, a1, -384
add a2, a2, a0
li a3, 3
sw a3, 0(a2)
addiw a1, a1, -4
add a0, a0, a1
li a1, 7
sw a1, 0(a0)
li a0, 3
call putint
li a0, 10
call putch
li a0, 0
ld ra, 8(sp)
addi sp, sp, 16
ret
.Lfunc_end1:
.size main, .Lfunc_end1-main
.type a,@object
.bss
.globl a
.p2align 2
a:
.zero 16384
.size a, 16384
.type _sysy_start,@object
.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