linux-user/host/aarch64: Populate host_signal.h
[qemu/ar7.git] / tests / tcg / arm / semicall.h
blobad8ac51310bb74edd0b525f2dcf74f0924412398
1 /*
2 * Semihosting Tests - ARM Helper
4 * Copyright (c) 2019
5 * Written by Alex Bennée <alex.bennee@linaro.org>
7 * SPDX-License-Identifier: GPL-3.0-or-later
8 */
10 uintptr_t __semi_call(uintptr_t type, uintptr_t arg0)
12 register uintptr_t t asm("r0") = type;
13 register uintptr_t a0 asm("r1") = arg0;
14 #ifdef __thumb__
15 # define SVC "svc 0xab"
16 #else
17 # define SVC "svc 0x123456"
18 #endif
19 asm(SVC : "=r" (t)
20 : "r" (t), "r" (a0));
21 return t;