Skip to content

Commit 9edb9c2

Browse files
committed
tests/tcg: fix semihosting SYS_EXIT for aarch64 in boot.S
We don't expect to hit exceptions in our testing so currently all the vectors report an un-expected exception and then attempt to exit. However for aarch64 we should always use the extended information block as we do in _exit. Rather than duplicate the code on the error handler just branch to the _exit handler with a failing status code. Signed-off-by: Alex Bennée <[email protected]> Reviewed-by: Richard Henderson <[email protected]> Message-Id: <[email protected]>
1 parent c302660 commit 9edb9c2

File tree

1 file changed

+2
-3
lines changed
  • tests/tcg/aarch64/system

1 file changed

+2
-3
lines changed

tests/tcg/aarch64/system/boot.S

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,8 @@ lower_a32_serror:
7373
mov x0, SYS_WRITE0
7474
adr x1, .error
7575
semihosting_call
76-
mov x0, SYS_EXIT
77-
mov x1, 1
78-
semihosting_call
76+
mov x0, 1 /* EXIT_FAILURE */
77+
bl _exit
7978
/* never returns */
8079

8180
.section .rodata

0 commit comments

Comments
 (0)