meson: Warn when TCI is selected but TCG backend is available
[qemu/ar7.git] / tests / tcg / arm / semihosting.c
blob33faac9916e11b88c91c1b42b776c26c38b1e164
1 /*
2 * linux-user semihosting checks
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 #include <stdint.h>
11 #include "semicall.h"
13 int main(int argc, char *argv[argc])
15 #if defined(__arm__)
16 uintptr_t exit_code = 0x20026;
17 #else
18 uintptr_t exit_block[2] = {0x20026, 0};
19 uintptr_t exit_code = (uintptr_t) &exit_block;
20 #endif
22 __semi_call(SYS_WRITE0, (uintptr_t) "Hello World");
23 __semi_call(SYS_REPORTEXC, exit_code);
24 /* if we get here we failed */
25 return -1;