1 #------------------------------------------------------------------------------
3 # Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
5 # SPDX-License-Identifier: BSD-2-Clause-Patent
7 #------------------------------------------------------------------------------
9 #include <AsmMacroIoLib.h>
12 Semihosting operation request mechanism
14 SVC 0x123456 in ARM state (for all architectures)
15 SVC 0xAB in Thumb state (excluding ARMv7-M)
16 BKPT 0xAB for ARMv7-M (Thumb-2 only)
19 R1 - block containing all other parametes
21 lr - must be saved as svc instruction will cause an svc exception and write
22 the svc lr register. That happens to be the one we are using, so we must
23 save it or we will not be able to return.
25 ASM_FUNC(GccSemihostCall)