2 * Copyright (C) 2024 Mikulas Patocka
4 * This file is part of Ajla.
6 * Ajla is free software: you can redistribute it and/or modify it under the
7 * terms of the GNU General Public License as published by the Free Software
8 * Foundation, either version 3 of the License, or (at your option) any later
11 * Ajla is distributed in the hope that it will be useful, but WITHOUT ANY
12 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13 * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along with
16 * Ajla. If not, see <https://www.gnu.org/licenses/>.
20 #define START_BLOCK(declarations)
26 #define DEFINE_LABEL(lbl, code)
28 #ifndef DEFINE_OPCODE_START_LBL
29 #define DEFINE_OPCODE_START_LBL(opcode, lbl)
31 #ifndef DEFINE_OPCODE_END
32 #define DEFINE_OPCODE_END(opcode)
36 #define DEFINE_OPCODE(opcode, lbl, code) \
37 DEFINE_OPCODE_START_LBL(opcode, lbl) \
39 DEFINE_OPCODE_END(opcode)
41 #define DEFINE_OPCODE(opcode, lbl, code) \
42 DEFINE_OPCODE_START_LBL(opcode, lbl) \
43 DEFINE_OPCODE_END(opcode)
47 #define DEFINE_OPCODE_START(opcode) DEFINE_OPCODE_START_LBL(opcode, opcode##0)
48 #include "ipret-1.inc"
54 #define DEFINE_OPCODE_START(opcode) DEFINE_OPCODE_START_LBL(opcode, opcode##1)
55 #include "ipret-1.inc"
60 #define DEFINE_OPCODE_START(opcode) DEFINE_OPCODE_START_LBL(opcode, opcode##2)
61 #include "ipret-1.inc"
69 #undef DEFINE_OPCODE_START_LBL
70 #undef DEFINE_OPCODE_START
71 #undef DEFINE_OPCODE_END