mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-29 21:14:27 +01:00
baremetal: allow arbitrary exit status with the magic string
test-baremetal: fix missing setting x0 return value Examples were just returning on ret without setting x0, which led to failures... those were not noticed because of how broken the testing system was ;-)
This commit is contained in:
@@ -3,43 +3,45 @@
|
||||
.global main
|
||||
main:
|
||||
/* 1.5 + 2.5 == 4.0 */
|
||||
fmov d0, #1.5
|
||||
fmov d0, 1.5
|
||||
/* test-gdb-d0 */
|
||||
fmov d1, #2.5
|
||||
fmov d1, 2.5
|
||||
/* test-gdb-d1 */
|
||||
fadd d2, d0, d1
|
||||
/* test-gdb-d2 */
|
||||
fmov d3, #4.0
|
||||
fmov d3, 4.0
|
||||
fcmp d2, d3
|
||||
beq 1f
|
||||
bl lkmc_assert_fail
|
||||
1:
|
||||
|
||||
/* Now in 32-bit. */
|
||||
fmov s0, #1.5
|
||||
fmov s0, 1.5
|
||||
/* test-gdb-s0 */
|
||||
fmov s1, #2.5
|
||||
fmov s1, 2.5
|
||||
/* test-gdb-s1 */
|
||||
fadd s2, s0, s1
|
||||
/* test-gdb-s2 */
|
||||
fadd s2, s0, s1
|
||||
fmov s3, #4.0
|
||||
fmov s3, 4.0
|
||||
fcmp s2, s3
|
||||
beq 1f
|
||||
bl lkmc_assert_fail
|
||||
1:
|
||||
|
||||
/* Higher registers. */
|
||||
fmov d28, #1.5
|
||||
fmov d28, 1.5
|
||||
/* test-gdb-d28 */
|
||||
fmov d29, #2.5
|
||||
fmov d29, 2.5
|
||||
/* test-gdb-d29 */
|
||||
fadd d30, d28, d29
|
||||
/* test-gdb-d30 */
|
||||
fmov d31, #4.0
|
||||
fmov d31, 4.0
|
||||
/* test-gdb-d31 */
|
||||
fcmp d30, d31
|
||||
beq 1f
|
||||
bl lkmc_assert_fail
|
||||
1:
|
||||
|
||||
mov x0, 0
|
||||
ret
|
||||
|
||||
Reference in New Issue
Block a user