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-06-03 21:05:00 +00:00
|
|
|
|
2022-06-04 21:34:17 +00:00
|
|
|
#define RABBITIZER_DEF_INSTR_ID(prefix, name, ...) \
|
2022-06-05 23:15:25 +00:00
|
|
|
RABBITIZER_INSTR_ID_##prefix##_##name
|
2022-06-03 21:05:00 +00:00
|
|
|
|
2022-06-04 21:34:17 +00:00
|
|
|
#define RABBITIZER_DEF_INSTR_ID_ALTNAME(prefix, name, altname, ...) \
|
2022-06-05 23:15:25 +00:00
|
|
|
RABBITIZER_INSTR_ID_##prefix##_##name
|
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-07 07:16:09 +00:00
|
|
|
RABBITIZER_DEF_INSTR_ID(cpu, MAX, ),
|
2022-06-04 21:40:16 +00:00
|
|
|
|
2022-06-05 16:25:57 +00:00
|
|
|
#include "instructions/instr_id/RabbitizerInstrId_rsp.inc"
|
2022-06-07 07:16:09 +00:00
|
|
|
RABBITIZER_DEF_INSTR_ID(rsp, MAX, ),
|
2022-06-05 16:25:57 +00:00
|
|
|
|
2022-06-07 07:16:09 +00:00
|
|
|
RABBITIZER_DEF_INSTR_ID(ALL, MAX, ) = RABBITIZER_DEF_INSTR_ID(rsp, 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-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
|