semicall.h (400B)
1/* 2 * Semihosting Tests - AArch64 helper 3 * 4 * Copyright (c) 2019 5 * Written by Alex Bennée <alex.bennee@linaro.org> 6 * 7 * SPDX-License-Identifier: GPL-3.0-or-later 8 */ 9 10uintptr_t __semi_call(uintptr_t type, uintptr_t arg0) 11{ 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; 18}