Add FreeRTOS heap4 intro card
This commit is contained in:
@@ -0,0 +1,95 @@
|
||||
.file "task05_malloc_first_fit.c"
|
||||
.option nopic
|
||||
.attribute arch, "rv32i2p1_zicsr2p0_zifencei2p0"
|
||||
.attribute unaligned_access, 0
|
||||
.attribute stack_align, 16
|
||||
.text
|
||||
.align 2
|
||||
.globl main
|
||||
.type main, @function
|
||||
main:
|
||||
lla a4,.LANCHOR0
|
||||
andi a5,a4,7
|
||||
beq a5,zero,.L2
|
||||
andi a4,a4,-8
|
||||
addi a4,a4,8
|
||||
.L2:
|
||||
mv a5,a4
|
||||
addi a3,a4,120
|
||||
sw a3,end_marker,a2
|
||||
sw zero,120(a4)
|
||||
sw zero,4(a3)
|
||||
sw a3,0(a4)
|
||||
li a2,120
|
||||
sw a2,4(a4)
|
||||
lla a2,start
|
||||
sw a4,0(a2)
|
||||
sw zero,4(a2)
|
||||
li a1,31
|
||||
j .L5
|
||||
.L6:
|
||||
mv a5,a4
|
||||
.L5:
|
||||
lw a4,4(a5)
|
||||
bgtu a4,a1,.L7
|
||||
lw a4,0(a5)
|
||||
mv a2,a5
|
||||
bne a4,a3,.L6
|
||||
li a5,0
|
||||
j .L4
|
||||
.L7:
|
||||
lw a4,0(a5)
|
||||
sw a4,0(a2)
|
||||
sw zero,0(a5)
|
||||
lw a4,4(a5)
|
||||
li a3,-2147483648
|
||||
or a4,a4,a3
|
||||
sw a4,4(a5)
|
||||
addi a5,a5,8
|
||||
.L4:
|
||||
snez a4,a5
|
||||
sw a4,g_allocation_ok,a3
|
||||
lw a5,-4(a5)
|
||||
slli a5,a5,1
|
||||
srli a5,a5,1
|
||||
sw a5,g_allocated_size,a4
|
||||
lw a5,start
|
||||
lw a5,4(a5)
|
||||
sw a5,g_remaining_free,a4
|
||||
li a0,0
|
||||
ret
|
||||
.size main, .-main
|
||||
.globl g_allocation_ok
|
||||
.globl g_remaining_free
|
||||
.globl g_allocated_size
|
||||
.bss
|
||||
.align 2
|
||||
.set .LANCHOR0,. + 0
|
||||
.type heap_area, @object
|
||||
.size heap_area, 136
|
||||
heap_area:
|
||||
.zero 136
|
||||
.section .sbss,"aw",@nobits
|
||||
.align 2
|
||||
.type g_allocation_ok, @object
|
||||
.size g_allocation_ok, 4
|
||||
g_allocation_ok:
|
||||
.zero 4
|
||||
.type g_remaining_free, @object
|
||||
.size g_remaining_free, 4
|
||||
g_remaining_free:
|
||||
.zero 4
|
||||
.type g_allocated_size, @object
|
||||
.size g_allocated_size, 4
|
||||
g_allocated_size:
|
||||
.zero 4
|
||||
.type end_marker, @object
|
||||
.size end_marker, 4
|
||||
end_marker:
|
||||
.zero 4
|
||||
.type start, @object
|
||||
.size start, 8
|
||||
start:
|
||||
.zero 8
|
||||
.ident "GCC: (15.2.0-23) 15.2.0"
|
||||
.section .note.GNU-stack,"",@progbits
|
||||
Reference in New Issue
Block a user