2022-06-03 17:46:51 +00:00
|
|
|
/* SPDX-FileCopyrightText: © 2022 Decompollaborate */
|
|
|
|
/* SPDX-License-Identifier: MIT */
|
|
|
|
|
|
|
|
#ifndef RABBITIZER_INSTRID_H
|
|
|
|
#define RABBITIZER_INSTRID_H
|
|
|
|
#pragma once
|
|
|
|
|
2022-07-09 23:19:53 +00:00
|
|
|
#include "common/Utils.h"
|
|
|
|
|
2022-06-03 21:05:00 +00:00
|
|
|
|
2022-08-23 13:32:24 +00:00
|
|
|
#define RABBITIZER_DEF_INSTR_ID(prefix, caseBits, name, ...) \
|
|
|
|
RABBITIZER_INSTR_ID_##prefix##_##name,
|
2022-06-03 21:05:00 +00:00
|
|
|
|
2022-08-23 13:32:24 +00:00
|
|
|
#define RABBITIZER_DEF_INSTR_ID_ALTNAME(prefix, caseBits, name, altname, ...) \
|
|
|
|
RABBITIZER_DEF_INSTR_ID(prefix, caseBits, name, __VA_ARGS__)
|
2022-06-03 21:05:00 +00:00
|
|
|
|
2022-06-04 21:40:16 +00:00
|
|
|
typedef enum RabbitizerInstrId {
|
2022-06-05 16:25:57 +00:00
|
|
|
#include "instructions/instr_id/RabbitizerInstrId_cpu.inc"
|
2022-06-04 21:40:16 +00:00
|
|
|
|
2022-06-05 16:25:57 +00:00
|
|
|
#include "instructions/instr_id/RabbitizerInstrId_rsp.inc"
|
|
|
|
|
2022-08-27 16:22:48 +00:00
|
|
|
#include "instructions/instr_id/RabbitizerInstrId_r5900.inc"
|
|
|
|
|
|
|
|
RABBITIZER_INSTR_ID_ALL_MAX = RABBITIZER_DEF_INSTR_ID(r5900, , MAX, )
|
2022-06-04 21:40:16 +00:00
|
|
|
} RabbitizerInstrId;
|
2022-06-03 17:46:51 +00:00
|
|
|
|
2022-06-04 21:34:17 +00:00
|
|
|
#undef RABBITIZER_DEF_INSTR_ID
|
|
|
|
#undef RABBITIZER_DEF_INSTR_ID_ALTNAME
|
|
|
|
|
2022-06-03 21:33:10 +00:00
|
|
|
|
|
|
|
extern const char *RabbitizerInstrId_Names[];
|
|
|
|
|
2022-06-05 16:25:57 +00:00
|
|
|
|
2022-07-09 23:19:53 +00:00
|
|
|
CONST NODISCARD RETURNS_NON_NULL
|
2022-06-05 17:19:45 +00:00
|
|
|
const char *RabbitizerInstrId_getOpcodeName(RabbitizerInstrId uniqueId);
|
2022-06-05 16:25:57 +00:00
|
|
|
|
2022-06-03 17:46:51 +00:00
|
|
|
#endif
|