You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
708 B
54 lines
708 B
.align 2
|
|
.section .data
|
|
a:
|
|
.word 3
|
|
b:
|
|
.word 5
|
|
.section .text
|
|
.global __aeabi_memclr4
|
|
__aeabi_memclr4:
|
|
.L1:
|
|
MV t5, a0
|
|
MV t6, a1
|
|
ADD t6, a0, t6
|
|
LI a0, 0
|
|
.L2:
|
|
SW zero, (t5)
|
|
ADDI t5, t5, 4
|
|
BLT t5, t6, .L2
|
|
RET
|
|
.global main
|
|
main:
|
|
.L3:
|
|
ADDI sp, sp, -104
|
|
SD fp, 32(sp)
|
|
ADDI fp, sp, 104
|
|
SD ra, -80(fp)
|
|
SD s2, -88(fp)
|
|
SD s3, -96(fp)
|
|
SD s4, -104(fp)
|
|
.L4:
|
|
LI t0, 5
|
|
SW t0, -56(fp)
|
|
LW s2, -56(fp)
|
|
LA t5, b
|
|
LW s3, (t5)
|
|
ADDW s4, s2, s3
|
|
SW s4, -64(fp)
|
|
SW s2, -16(fp)
|
|
SW s3, -24(fp)
|
|
SW s4, -32(fp)
|
|
J .L5
|
|
.L5:
|
|
LW s2, -64(fp)
|
|
SW s2, -48(fp)
|
|
LW a0, -48(fp)
|
|
LD s4, -104(fp)
|
|
LD s3, -96(fp)
|
|
LD s2, -88(fp)
|
|
LD ra, -80(fp)
|
|
LD fp, -72(fp)
|
|
ADDI sp, sp, 104
|
|
RET
|
|
|