Files
linux-kernel-module-cheat/baremetal/arch/aarch64/add.S
Ciro Santilli 六四事件 法轮功 26b890f42f Factor common userland and baremetal C functions
This allows add.c to run unmodified on both!

For that to work, use int main on baremetal, and pass the return value to
the final exit.
2018-11-15 20:07:47 +00:00

13 lines
186 B
ArmAsm

.global main
main:
/* 1 + 2 == 3 */
mov x0, #1
/* test-gdb-op1 */
add x1, x0, #2
/* test-gdb-result */
cmp x1, #3
beq 1f
bl common_assert_fail
1:
ret