1/* Testsuite assembly helpers for OpenRISC.
2
3   Copyright (C) 2017-2023 Free Software Foundation, Inc.
4
5   This program is free software; you can redistribute it and/or modify
6   it under the terms of the GNU General Public License as published by
7   the Free Software Foundation; either version 3 of the License, or
8   (at your option) any later version.
9
10   This program is distributed in the hope that it will be useful,
11   but WITHOUT ANY WARRANTY; without even the implied warranty of
12   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13   GNU General Public License for more details.
14
15   You should have received a copy of the GNU General Public License
16   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
17
18#ifndef OR1K_ASM_H
19#define OR1K_ASM_H
20
21#define OR1K_INST(...) __VA_ARGS__
22
23#if defined(__OR1K_NODELAY__)
24#define OR1K_DELAYED(a, b) a; b
25#define OR1K_DELAYED_NOP(a) a
26.nodelay
27#elif defined(__OR1K_DELAY__)
28#define OR1K_DELAYED(a, b) b; a
29#define OR1K_DELAYED_NOP(a) a; l.nop
30#elif defined(__OR1K_DELAY_COMPAT__)
31#define OR1K_DELAYED(a, b) a; b; l.nop
32#define OR1K_DELAYED_NOP(a) a; l.nop
33#else
34#error One of __OR1K_NODELAY__, __OR1K_DELAY__, or __OR1K_DELAY_COMPAT__ must be defined
35#endif
36
37#endif /* OR1K_ASM_H */
38