1 // license:BSD-3-Clause 2 // copyright-holders:Ville Linde, Ryan Holtz 3 #ifndef MAME_CPU_RSP_RSPDEFS_H 4 #define MAME_CPU_RSP_RSPDEFS_H 5 6 /*************************************************************************** 7 HELPER MACROS 8 ***************************************************************************/ 9 10 #define REG_LO 32 11 #define REG_HI 33 12 13 #define RSREG ((op >> 21) & 31) 14 #define RTREG ((op >> 16) & 31) 15 #define RDREG ((op >> 11) & 31) 16 #define SHIFT ((op >> 6) & 31) 17 18 #define FRREG ((op >> 21) & 31) 19 #define FTREG ((op >> 16) & 31) 20 #define FSREG ((op >> 11) & 31) 21 #define FDREG ((op >> 6) & 31) 22 23 #define IS_SINGLE(o) (((o) & (1 << 21)) == 0) 24 #define IS_DOUBLE(o) (((o) & (1 << 21)) != 0) 25 #define IS_FLOAT(o) (((o) & (1 << 23)) == 0) 26 #define IS_INTEGRAL(o) (((o) & (1 << 23)) != 0) 27 28 #define SIMMVAL ((int16_t)op) 29 #define UIMMVAL ((uint16_t)op) 30 #define LIMMVAL (op & 0x03ffffff) 31 32 #endif // MAME_CPU_RSP_RSPDEFS_H 33