gitlab: Extract default build/test jobs templates
[qemu/ar7.git] / tests / tcg / aarch64 / semicall.h
blob8a3fce35c5f9c779b0e9d7417a20ea3b5193ba94
1 /*
2 * Semihosting Tests - AArch64 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("x0") = type;
13 register uintptr_t a0 asm("x1") = arg0;
14 asm("hlt 0xf000"
15 : "=r" (t)
16 : "r" (t), "r" (a0));
17 return t;