mirror of
https://github.com/Decompollaborate/rabbitizer.git
synced 2025-01-01 08:59:40 +00:00
46 lines
980 B
C
46 lines
980 B
C
|
/* SPDX-FileCopyrightText: © 2022 Decompollaborate */
|
||
|
/* SPDX-License-Identifier: MIT */
|
||
|
|
||
|
#ifndef RABBITIZER_INSTRDESCRIPTOR_H
|
||
|
#define RABBITIZER_INSTRDESCRIPTOR_H
|
||
|
#pragma once
|
||
|
|
||
|
#include <stdbool.h>
|
||
|
|
||
|
#include "RabbitizerRegisterType.h"
|
||
|
#include "RabbitizerInstrId.h"
|
||
|
|
||
|
typedef enum RabbitizerInstrType {
|
||
|
RABBITIZER_INSTR_TYPE_UNKNOWN,
|
||
|
RABBITIZER_INSTR_TYPE_J,
|
||
|
RABBITIZER_INSTR_TYPE_I,
|
||
|
RABBITIZER_INSTR_TYPE_R,
|
||
|
RABBITIZER_INSTR_TYPE_REGIMM,
|
||
|
RABBITIZER_INSTR_TYPE_MAX,
|
||
|
} RabbitizerInstrType;
|
||
|
|
||
|
typedef struct RabbitizerInstrDescriptor {
|
||
|
RabbitizerRegisterType operands[4];
|
||
|
RabbitizerInstrType instrType;
|
||
|
|
||
|
bool isBranch;
|
||
|
bool isBranchLikely;
|
||
|
bool isJump;
|
||
|
bool isTrap;
|
||
|
|
||
|
bool isFloat;
|
||
|
bool isDouble;
|
||
|
|
||
|
bool isUnsigned;
|
||
|
|
||
|
bool modifiesRt;
|
||
|
bool modifiesRd;
|
||
|
|
||
|
int mipsVersion;
|
||
|
// bool isRsp;
|
||
|
} RabbitizerInstrDescriptor;
|
||
|
|
||
|
RabbitizerInstrDescriptor rabbitizer_InstructionDescriptors[RABBITIZER_INSTR_ID_MAX];
|
||
|
|
||
|
#endif
|