Files
qemu/tests/tcg/tricore/c/testdev_assert.h
Bastian Koppelmann 0e45f7beca tests/tcg/tricore: Add first C program
this allows us to exercise the startup code used by GCC to call main().

Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Message-Id: <20230526061946.54514-4-kbastian@mail.uni-paderborn.de>
2023-06-07 18:20:42 +02:00

19 lines
375 B
C

/*
* Copyright (C) 2023 Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
*
* This code is licensed under the GPL version 2 or later. See the
* COPYING file in the top-level directory.
*/
int *testdev = (int *)0xf0000000;
#define FAIL 1
static inline void testdev_assert(int condition)
{
if (!condition) {
*testdev = FAIL;
asm("debug");
}
}