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, ...) \
|
|
|
|
RABBITIZER_INSTR_##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, ...) \
|
|
|
|
RABBITIZER_INSTR_##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-04 21:34:17 +00:00
|
|
|
RABBITIZER_DEF_INSTR_ID(CPU_ID, 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-04 21:40:16 +00:00
|
|
|
RABBITIZER_DEF_INSTR_ID(RSP_ID, MAX),
|
2022-06-05 16:25:57 +00:00
|
|
|
|
|
|
|
RABBITIZER_DEF_INSTR_ID(ID, MAX) = RABBITIZER_DEF_INSTR_ID(RSP_ID, 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 03:23:06 +00:00
|
|
|
extern const RabbitizerInstrId RabbitizerInstrId_NotEmitedByCompilers[];
|
2022-06-03 21:33:10 +00:00
|
|
|
|
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
|