* src/regression/ptrarg.c: added, fails due to bug #1430967
[fw/sdcc] / src / regression / gpsim_assert.h
1 /*------------------------------------------------------------------------------
2
3   gpsim_assert.h - assertion macros generating gpsim breakpoints
4
5   Copyright (c) 2006 Borut Razem
6
7   This program is free software; you can redistribute it and/or modify it
8   under the terms of the GNU General Public License as published by the
9   Free Software Foundation; either version 2, or (at your option) any
10   later version.
11
12   This program is distributed in the hope that it will be useful,
13   but WITHOUT ANY WARRANTY; without even the implied warranty of
14   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15   GNU General Public License for more details.
16
17   You should have received a copy of the GNU General Public License
18   along with this program; if not, write to the Free Software
19   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
20   USA.
21
22 ------------------------------------------------------------------------------*/
23
24
25 #ifndef __PIC_ASSERT_H
26 #define __PIC_ASSERT_H
27
28 #define MANGLE(e) _##e
29 #define STRINGIFY(e) #e
30
31 #define ASSERT(e) \
32   __asm \
33   nop \
34   __endasm; \
35   __asm \
36   .direct "a", STRINGIFY(e) \
37   __endasm;
38
39 #define PASSED() \
40   __asm \
41   nop \
42   __endasm; \
43   __asm \
44   .direct "a", "\"PASSED\"" \
45   __endasm;
46
47 #define FAILED() \
48   __asm \
49   nop \
50   __endasm; \
51   __asm \
52   .direct "a", "\"FAILED\"" \
53   __endasm;
54
55 #endif