2022-06-07 02:19:42 +00:00
|
|
|
/* SPDX-FileCopyrightText: © 2022 Decompollaborate */
|
|
|
|
/* SPDX-License-Identifier: MIT */
|
|
|
|
|
2022-06-08 06:17:35 +00:00
|
|
|
#ifndef RABBITIZER_INSTRUCTION_RSP_H
|
|
|
|
#define RABBITIZER_INSTRUCTION_RSP_H
|
2022-06-07 02:19:42 +00:00
|
|
|
#pragma once
|
|
|
|
|
2022-06-08 04:30:58 +00:00
|
|
|
#include "RabbitizerInstruction.h"
|
2022-06-07 02:19:42 +00:00
|
|
|
|
|
|
|
|
2022-06-07 06:28:10 +00:00
|
|
|
#define RAB_INSTR_RSP_GET_VS(self) ((self)->rd)
|
|
|
|
#define RAB_INSTR_RSP_GET_VT(self) ((self)->rt)
|
|
|
|
#define RAB_INSTR_RSP_GET_VD(self) ((self)->sa)
|
|
|
|
|
|
|
|
#define RAB_INSTR_RSP_GET_ELEMENT_HIGH(self) ((((self)->rs)) & 0xF)
|
2022-06-07 02:19:42 +00:00
|
|
|
#define RAB_INSTR_RSP_GET_ELEMENT_LOW(self) ((((self)->sa) >> 1) & 0xF)
|
|
|
|
#define RAB_INSTR_RSP_GET_OFFSET_VECTOR_RAW(self) (RAB_INSTR_GET_IMMEDIATE(self) & 0x7F)
|
|
|
|
|
|
|
|
|
2022-06-08 04:30:58 +00:00
|
|
|
void RabbitizerInstructionRsp_init(RabbitizerInstruction *self, uint32_t word);
|
|
|
|
void RabbitizerInstructionRsp_destroy(RabbitizerInstruction *self);
|
2022-06-07 02:19:42 +00:00
|
|
|
|
|
|
|
|
2022-06-08 04:30:58 +00:00
|
|
|
void RabbitizerInstructionRsp_processUniqueId_Normal(RabbitizerInstruction *self);
|
|
|
|
void RabbitizerInstructionRsp_processUniqueId_Special(RabbitizerInstruction *self);
|
|
|
|
void RabbitizerInstructionRsp_processUniqueId_Regimm(RabbitizerInstruction *self);
|
2022-06-07 02:42:22 +00:00
|
|
|
|
2022-06-08 04:30:58 +00:00
|
|
|
void RabbitizerInstructionRsp_processUniqueId(RabbitizerInstruction *self);
|
2022-06-07 02:19:42 +00:00
|
|
|
|
|
|
|
|
2022-06-08 04:30:58 +00:00
|
|
|
uint16_t RabbitizerInstructionRsp_GetOffsetVector(const RabbitizerInstruction *self);
|
2022-06-07 02:19:42 +00:00
|
|
|
|
2022-06-08 04:30:58 +00:00
|
|
|
uint8_t RabbitizerInstructionRsp_processVectorElement(const RabbitizerInstruction *self, uint8_t element);
|
2022-06-07 02:19:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
#endif
|