25 lines
401 B
Plaintext
25 lines
401 B
Plaintext
.section .data
|
|
|
|
.p2align 3
|
|
stack_at_first_entry:
|
|
.8byte 0
|
|
|
|
.section .text
|
|
|
|
.global menu
|
|
.extern _menu
|
|
|
|
menu:
|
|
.option norelax
|
|
lla t0, stack_at_first_entry
|
|
ld t1, (t0)
|
|
beqz t1, 1f
|
|
mv sp, t1
|
|
j 2f
|
|
1: sd sp, (t0)
|
|
2: mv fp, zero
|
|
mv ra, zero
|
|
j _menu
|
|
|
|
.section .note.GNU-stack,"",%progbits
|