aboutsummaryrefslogtreecommitdiff
path: root/tests/tcg/tricore/c/testdev_assert.h
blob: ccd14f5025407210bc0e09641a6f00956b7d4fb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*
 * 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");
    }
}