summaryrefslogtreecommitdiffstats
path: root/tests/tcg/arm/semihosting.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tcg/arm/semihosting.c')
-rw-r--r--tests/tcg/arm/semihosting.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/tests/tcg/arm/semihosting.c b/tests/tcg/arm/semihosting.c
index 09c89cb481..33faac9916 100644
--- a/tests/tcg/arm/semihosting.c
+++ b/tests/tcg/arm/semihosting.c
@@ -8,26 +8,7 @@
*/
#include <stdint.h>
-
-#define SYS_WRITE0 0x04
-#define SYS_REPORTEXC 0x18
-
-void __semi_call(uintptr_t type, uintptr_t arg0)
-{
-#if defined(__arm__)
- register uintptr_t t asm("r0") = type;
- register uintptr_t a0 asm("r1") = arg0;
- asm("svc 0xab"
- : /* no return */
- : "r" (t), "r" (a0));
-#else
- register uintptr_t t asm("x0") = type;
- register uintptr_t a0 asm("x1") = arg0;
- asm("hlt 0xf000"
- : /* no return */
- : "r" (t), "r" (a0));
-#endif
-}
+#include "semicall.h"
int main(int argc, char *argv[argc])
{