modifiesF* and readsF

This commit is contained in:
angie 2022-12-20 00:42:27 -03:00
parent cf9bbc90e2
commit 5063702a07
17 changed files with 553 additions and 188 deletions

View File

@ -228,6 +228,7 @@ namespace rabbitizer {
bool isUnsigned() const;
bool modifiesRs() const;
bool modifiesRt() const;
bool modifiesRd() const;
@ -240,6 +241,14 @@ namespace rabbitizer {
bool modifiesHI() const;
bool modifiesLO() const;
bool modifiesFs() const;
bool modifiesFt() const;
bool modifiesFd() const;
bool readsFs() const;
bool readsFt() const;
bool readsFd() const;
bool notEmitedByCompilers() const;
bool canBeHi() const;

View File

@ -852,6 +852,9 @@ bool InstructionBase::isUnsigned() const {
return RabbitizerInstrDescriptor_isUnsigned(this->instr.descriptor);
}
bool InstructionBase::modifiesRs() const {
return RabbitizerInstrDescriptor_modifiesRs(this->instr.descriptor);
}
bool InstructionBase::modifiesRt() const {
return RabbitizerInstrDescriptor_modifiesRt(this->instr.descriptor);
}
@ -882,6 +885,26 @@ bool InstructionBase::modifiesLO() const {
return RabbitizerInstrDescriptor_modifiesLO(this->instr.descriptor);
}
bool InstructionBase::modifiesFs() const {
return RabbitizerInstrDescriptor_modifiesFs(this->instr.descriptor);
}
bool InstructionBase::modifiesFt() const {
return RabbitizerInstrDescriptor_modifiesFt(this->instr.descriptor);
}
bool InstructionBase::modifiesFd() const {
return RabbitizerInstrDescriptor_modifiesFd(this->instr.descriptor);
}
bool InstructionBase::readsFs() const {
return RabbitizerInstrDescriptor_readsFs(this->instr.descriptor);
}
bool InstructionBase::readsFt() const {
return RabbitizerInstrDescriptor_readsFt(this->instr.descriptor);
}
bool InstructionBase::readsFd() const {
return RabbitizerInstrDescriptor_readsFd(this->instr.descriptor);
}
bool InstructionBase::notEmitedByCompilers() const {
return RabbitizerInstrDescriptor_notEmitedByCompilers(this->instr.descriptor);
}

View File

@ -69,6 +69,10 @@ typedef struct RabbitizerInstrDescriptor {
*/
bool isUnsigned;
/**
* The instruction modifies the state of the MIPS `rs` register
*/
bool modifiesRs;
/**
* The instruction modifies the state of the MIPS `rt` register
*/
@ -96,6 +100,13 @@ typedef struct RabbitizerInstrDescriptor {
bool modifiesHI;
bool modifiesLO;
bool modifiesFs;
bool modifiesFt;
bool modifiesFd;
bool readsFs;
bool readsFt;
bool readsFd;
/**
* This instruction is not emited by a C compiler
*/
@ -183,6 +194,8 @@ bool RabbitizerInstrDescriptor_isDouble(const RabbitizerInstrDescriptor *self);
NODISCARD NON_NULL(1) PURE
bool RabbitizerInstrDescriptor_isUnsigned(const RabbitizerInstrDescriptor *self);
NODISCARD NON_NULL(1) PURE
bool RabbitizerInstrDescriptor_modifiesRs(const RabbitizerInstrDescriptor *self);
NODISCARD NON_NULL(1) PURE
bool RabbitizerInstrDescriptor_modifiesRt(const RabbitizerInstrDescriptor *self);
NODISCARD NON_NULL(1) PURE
@ -204,6 +217,20 @@ bool RabbitizerInstrDescriptor_modifiesHI(const RabbitizerInstrDescriptor *self)
NODISCARD NON_NULL(1) PURE
bool RabbitizerInstrDescriptor_modifiesLO(const RabbitizerInstrDescriptor *self);
NODISCARD NON_NULL(1) PURE
bool RabbitizerInstrDescriptor_modifiesFs(const RabbitizerInstrDescriptor *self);
NODISCARD NON_NULL(1) PURE
bool RabbitizerInstrDescriptor_modifiesFt(const RabbitizerInstrDescriptor *self);
NODISCARD NON_NULL(1) PURE
bool RabbitizerInstrDescriptor_modifiesFd(const RabbitizerInstrDescriptor *self);
NODISCARD NON_NULL(1) PURE
bool RabbitizerInstrDescriptor_readsFs(const RabbitizerInstrDescriptor *self);
NODISCARD NON_NULL(1) PURE
bool RabbitizerInstrDescriptor_readsFt(const RabbitizerInstrDescriptor *self);
NODISCARD NON_NULL(1) PURE
bool RabbitizerInstrDescriptor_readsFd(const RabbitizerInstrDescriptor *self);
NODISCARD NON_NULL(1) PURE
bool RabbitizerInstrDescriptor_notEmitedByCompilers(const RabbitizerInstrDescriptor *self);

View File

@ -7,28 +7,32 @@ RABBITIZER_DEF_INSTR_ID(
.operands={RAB_OPERAND_cpu_rt, RAB_OPERAND_cpu_fs},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true,
.modifiesRt=true
.modifiesRt=true,
.readsFs=true
) // Move Word From Floating-Point
RABBITIZER_DEF_INSTR_ID(
cpu, 0x01, dmfc1,
.operands={RAB_OPERAND_cpu_rt, RAB_OPERAND_cpu_fs},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true,
.modifiesRt=true
.modifiesRt=true,
.readsFs=true
) // Doubleword Move From Floating-Point
RABBITIZER_DEF_INSTR_ID(
cpu, 0x04, mtc1,
.operands={RAB_OPERAND_cpu_rt, RAB_OPERAND_cpu_fs},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true,
.readsRt=true
.readsRt=true,
.modifiesFs=true
) // Move Word to Floating-Point
RABBITIZER_DEF_INSTR_ID(
cpu, 0x05, dmtc1,
.operands={RAB_OPERAND_cpu_rt, RAB_OPERAND_cpu_fs},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true,
.readsRt=true
.readsRt=true,
.modifiesFs=true
) // Doubleword Move To Floating-Point
// OP rt, cop1cs

View File

@ -6,25 +6,37 @@ RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x00, add_d, add.d,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true,
.readsFt=true
) // Floating-Point Add
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x01, sub_d, sub.d,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true,
.readsFt=true
) // Floating-Point Sub
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x02, mul_d, mul.d,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true,
.readsFt=true
) // Floating-Point Multiply
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x03, div_d, div.d,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true,
.readsFt=true
) // Floating-Point Divide
// OP fd, fs
@ -32,75 +44,99 @@ RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x04, sqrt_d, sqrt.d,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true
) // Floating-Point Square Root
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x05, abs_d, abs.d,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true
) // Floating-Point Absolute Value
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x06, mov_d, mov.d,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true
) // Floating-Point Move
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x07, neg_d, neg.d,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true
) // Floating-Point Negate
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x08, round_l_d, round.l.d,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true
) // Floating-Point Round to Long Fixed-Point
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x09, trunc_l_d, trunc.l.d,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true
) // Floating-Point Truncate to Long Fixed-Point
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x0A, ceil_l_d, ceil.l.d,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true
) // Floating-Point Ceiling Convert to Long Fixed-Point
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x0B, floor_l_d, floor.l.d,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true
) // Floating-Point Floor Convert to Long Fixed-Point
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x0C, round_w_d, round.w.d,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true
) // Floating-Point Round to Word Fixed-Point
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x0D, trunc_w_d, trunc.w.d,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true
) // Floating-Point Truncate to Word Fixed-Point
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x0E, ceil_w_d, ceil.w.d,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true
) // Floating-Point Ceiling Convert to Word Fixed-Point
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x0F, floor_w_d, floor.w.d,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true
) // Floating-Point Floor Convert to Word Fixed-Point
// OP fd, fs
@ -109,21 +145,27 @@ RABBITIZER_DEF_INSTR_ID_ALTNAME(
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true,
.isDouble=true
.isDouble=true,
.modifiesFd=true,
.readsFs=true
)
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x24, cvt_w_d, cvt.w.d,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true,
.isDouble=true
.isDouble=true,
.modifiesFd=true,
.readsFs=true
)
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x25, cvt_l_d, cvt.l.d,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true,
.isDouble=true
.isDouble=true,
.modifiesFd=true,
.readsFs=true
)
// OP fs, ft
@ -131,96 +173,128 @@ RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x30, c_f_d, c.f.d,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.readsFs=true,
.readsFt=true
)
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x31, c_un_d, c.un.d,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.readsFs=true,
.readsFt=true
)
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x32, c_eq_d, c.eq.d,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.readsFs=true,
.readsFt=true
)
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x33, c_ueq_d, c.ueq.d,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.readsFs=true,
.readsFt=true
)
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x34, c_olt_d, c.olt.d,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.readsFs=true,
.readsFt=true
)
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x35, c_ult_d, c.ult.d,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.readsFs=true,
.readsFt=true
)
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x36, c_ole_d, c.ole.d,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.readsFs=true,
.readsFt=true
)
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x37, c_ule_d, c.ule.d,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.readsFs=true,
.readsFt=true
)
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x38, c_df_d, c.df.d,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.readsFs=true,
.readsFt=true
)
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x39, c_ngle_d, c.ngle.d,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.readsFs=true,
.readsFt=true
)
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x3A, c_deq_d, c.deq.d,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.readsFs=true,
.readsFt=true
)
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x3B, c_ngl_d, c.ngl.d,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.readsFs=true,
.readsFt=true
)
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x3C, c_lt_d, c.lt.d,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.readsFs=true,
.readsFt=true
)
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x3D, c_nge_d, c.nge.d,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.readsFs=true,
.readsFt=true
)
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x3E, c_le_d, c.le.d,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.readsFs=true,
.readsFt=true
)
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x3F, c_ngt_d, c.ngt.d,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.readsFs=true,
.readsFt=true
)

View File

@ -6,12 +6,16 @@ RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x20, cvt_s_l, cvt.s.l,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true
)
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x21, cvt_d_l, cvt.d.l,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true,
.isDouble=true
.isDouble=true,
.modifiesFd=true,
.readsFs=true
)

View File

@ -6,25 +6,37 @@ RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x00, add_s, add.s,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true,
.readsFt=true
) // Floating-Point Add
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x01, sub_s, sub.s,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true,
.readsFt=true
) // Floating-Point Sub
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x02, mul_s, mul.s,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true,
.readsFt=true
) // Floating-Point Multiply
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x03, div_s, div.s,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true,
.readsFt=true
) // Floating-Point Divide
// OP fd, fs
@ -32,75 +44,99 @@ RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x04, sqrt_s, sqrt.s,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true
) // Floating-Point Square Root
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x05, abs_s, abs.s,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true
) // Floating-Point Absolute Value
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x06, mov_s, mov.s,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true
) // Floating-Point Move
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x07, neg_s, neg.s,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true
) // Floating-Point Negate
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x08, round_l_s, round.l.s,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true
) // Floating-Point Round to Long Fixed-Point
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x09, trunc_l_s, trunc.l.s,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true
) // Floating-Point Truncate to Long Fixed-Point
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x0A, ceil_l_s, ceil.l.s,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true
) // Floating-Point Ceiling Convert to Long Fixed-Point
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x0B, floor_l_s, floor.l.s,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true
) // Floating-Point Floor Convert to Long Fixed-Point
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x0C, round_w_s, round.w.s,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true
) // Floating-Point Round to Word Fixed-Point
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x0D, trunc_w_s, trunc.w.s,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true
) // Floating-Point Truncate to Word Fixed-Point
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x0E, ceil_w_s, ceil.w.s,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true
) // Floating-Point Ceiling Convert to Word Fixed-Point
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x0F, floor_w_s, floor.w.s,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true
) // Floating-Point Floor Convert to Word Fixed-Point
// OP fd, fs
@ -109,19 +145,25 @@ RABBITIZER_DEF_INSTR_ID_ALTNAME(
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true,
.isDouble=true
.isDouble=true,
.modifiesFd=true,
.readsFs=true
)
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x24, cvt_w_s, cvt.w.s,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true
)
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x25, cvt_l_s, cvt.l.s,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true
)
// OP fs, ft
@ -129,96 +171,128 @@ RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x30, c_f_s, c.f.s,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.readsFs=true,
.readsFt=true
)
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x31, c_un_s, c.un.s,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.readsFs=true,
.readsFt=true
)
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x32, c_eq_s, c.eq.s,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.readsFs=true,
.readsFt=true
)
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x33, c_ueq_s, c.ueq.s,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.readsFs=true,
.readsFt=true
)
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x34, c_olt_s, c.olt.s,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.readsFs=true,
.readsFt=true
)
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x35, c_ult_s, c.ult.s,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.readsFs=true,
.readsFt=true
)
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x36, c_ole_s, c.ole.s,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.readsFs=true,
.readsFt=true
)
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x37, c_ule_s, c.ule.s,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.readsFs=true,
.readsFt=true
)
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x38, c_sf_s, c.sf.s,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.readsFs=true,
.readsFt=true
)
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x39, c_ngle_s, c.ngle.s,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.readsFs=true,
.readsFt=true
)
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x3A, c_seq_s, c.seq.s,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.readsFs=true,
.readsFt=true
)
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x3B, c_ngl_s, c.ngl.s,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.readsFs=true,
.readsFt=true
)
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x3C, c_lt_s, c.lt.s,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.readsFs=true,
.readsFt=true
)
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x3D, c_nge_s, c.nge.s,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.readsFs=true,
.readsFt=true
)
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x3E, c_le_s, c.le.s,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.readsFs=true,
.readsFt=true
)
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x3F, c_ngt_s, c.ngt.s,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.readsFs=true,
.readsFt=true
)

View File

@ -6,12 +6,16 @@ RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x20, cvt_s_w, cvt.s.w,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true
)
RABBITIZER_DEF_INSTR_ID_ALTNAME(
cpu, 0x21, cvt_d_w, cvt.d.w,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs},
.instrType=RABBITIZER_INSTR_TYPE_UNKNOWN,
.isFloat=true,
.isDouble=true
.isDouble=true,
.modifiesFd=true,
.readsFs=true
)

View File

@ -439,6 +439,7 @@ RABBITIZER_DEF_INSTR_ID(
.instrType=RABBITIZER_INSTR_TYPE_I,
.isFloat=true,
.readsRs=true,
.modifiesFt=true,
.canBeLo=true,
.doesDereference=true,
.doesLoad=true,
@ -451,6 +452,7 @@ RABBITIZER_DEF_INSTR_ID(
.isFloat=true,
.isDouble=true,
.readsRs=true,
.modifiesFt=true,
.canBeLo=true,
.doesDereference=true,
.doesLoad=true,
@ -462,6 +464,7 @@ RABBITIZER_DEF_INSTR_ID(
.instrType=RABBITIZER_INSTR_TYPE_I,
.isFloat=true,
.readsRs=true,
.readsFt=true,
.canBeLo=true,
.doesDereference=true,
.doesStore=true,
@ -474,6 +477,7 @@ RABBITIZER_DEF_INSTR_ID(
.isFloat=true,
.isDouble=true,
.readsRs=true,
.readsFt=true,
.canBeLo=true,
.doesDereference=true,
.doesStore=true,

View File

@ -27,55 +27,80 @@ RABBITIZER_DEF_INSTR_ID_ALTNAME(
RABBITIZER_DEF_INSTR_ID_ALTNAME(
r5900, 0x16, rsqrt_s, rsqrt.s,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true,
.readsFt=true
) // floating point Reciprocal SQuare RooT
RABBITIZER_DEF_INSTR_ID_ALTNAME(
r5900, 0x18, adda_s, adda.s,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.isFloat=true
.isFloat=true,
.modifiesFs=true,
.readsFt=true
) // floating point ADD to Accumulator
RABBITIZER_DEF_INSTR_ID_ALTNAME(
r5900, 0x19, suba_s, suba.s,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.isFloat=true
.isFloat=true,
.modifiesFs=true,
.readsFt=true
) // floating point SUBtract to Accumulator
RABBITIZER_DEF_INSTR_ID_ALTNAME(
r5900, 0x1A, mula_s, mula.s,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.isFloat=true
.isFloat=true,
.modifiesFs=true,
.readsFt=true
) // floating point MULtiply to Accumulator
RABBITIZER_DEF_INSTR_ID_ALTNAME(
r5900, 0x1C, madd_s, madd.s,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true,
.readsFt=true
) // floating point Multiply-ADD
RABBITIZER_DEF_INSTR_ID_ALTNAME(
r5900, 0x1D, msub_s, msub.s,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true,
.readsFt=true
) // floating point Multiply abd SUBtract
RABBITIZER_DEF_INSTR_ID_ALTNAME(
r5900, 0x1E, madda_s, madda.s,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.isFloat=true
.isFloat=true,
.readsFs=true,
.readsFt=true
) // floating point Multiply-ADD Accumulator
RABBITIZER_DEF_INSTR_ID_ALTNAME(
r5900, 0x1F, msuba_s, msuba.s,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.isFloat=true
.isFloat=true,
.readsFs=true,
.readsFt=true
) // floating point Multiply SUBtract from Accumulator
RABBITIZER_DEF_INSTR_ID_ALTNAME(
r5900, 0x28, max_s, max.s,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true,
.readsFt=true
) // floating point MAXimum
RABBITIZER_DEF_INSTR_ID_ALTNAME(
r5900, 0x29, min_s, min.s,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true,
.readsFt=true
) // floating point MINimum
// Due to the R5900's FPU being non properly complaint the instruction cvt.w.s always behaves as trunc.w.s because is because EE can only do round-to-zero.
@ -86,16 +111,22 @@ RABBITIZER_DEF_INSTR_ID_ALTNAME(
RABBITIZER_DEF_INSTR_ID_ALTNAME(
r5900, 0x24, trunc_w_s, trunc.w.s,
.operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs},
.isFloat=true
.isFloat=true,
.modifiesFd=true,
.readsFs=true
) // Floating-Point Truncate to Word Fixed-Point
RABBITIZER_DEF_INSTR_ID_ALTNAME(
r5900, 0x34, c_lt_s, c.lt.s,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.isFloat=true
.isFloat=true,
.readsFs=true,
.readsFt=true
)
RABBITIZER_DEF_INSTR_ID_ALTNAME(
r5900, 0x36, c_le_s, c.le.s,
.operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft},
.isFloat=true
.isFloat=true,
.readsFs=true,
.readsFt=true
)

View File

@ -98,6 +98,7 @@ class Instruction:
def isFloat(self) -> bool: ...
def isDouble(self) -> bool: ...
def isUnsigned(self) -> bool: ...
def modifiesRs(self) -> bool: ...
def modifiesRt(self) -> bool: ...
def modifiesRd(self) -> bool: ...
def readsRs(self) -> bool: ...
@ -107,6 +108,12 @@ class Instruction:
def readsLO(self) -> bool: ...
def modifiesHI(self) -> bool: ...
def modifiesLO(self) -> bool: ...
def modifiesFs(self) -> bool: ...
def modifiesFt(self) -> bool: ...
def modifiesFd(self) -> bool: ...
def readsFs(self) -> bool: ...
def readsFt(self) -> bool: ...
def readsFd(self) -> bool: ...
def notEmitedByCompilers(self) -> bool: ...
def canBeHi(self) -> bool: ...
def canBeLo(self) -> bool: ...

View File

@ -357,6 +357,7 @@ DEF_DESCRIPTOR_METHOD_BOOL(isTrap)
DEF_DESCRIPTOR_METHOD_BOOL(isFloat)
DEF_DESCRIPTOR_METHOD_BOOL(isDouble)
DEF_DESCRIPTOR_METHOD_BOOL(isUnsigned)
DEF_DESCRIPTOR_METHOD_BOOL(modifiesRs)
DEF_DESCRIPTOR_METHOD_BOOL(modifiesRt)
DEF_DESCRIPTOR_METHOD_BOOL(modifiesRd)
DEF_DESCRIPTOR_METHOD_BOOL(readsRs)
@ -366,6 +367,12 @@ DEF_DESCRIPTOR_METHOD_BOOL(readsHI)
DEF_DESCRIPTOR_METHOD_BOOL(readsLO)
DEF_DESCRIPTOR_METHOD_BOOL(modifiesHI)
DEF_DESCRIPTOR_METHOD_BOOL(modifiesLO)
DEF_DESCRIPTOR_METHOD_BOOL(modifiesFs)
DEF_DESCRIPTOR_METHOD_BOOL(modifiesFt)
DEF_DESCRIPTOR_METHOD_BOOL(modifiesFd)
DEF_DESCRIPTOR_METHOD_BOOL(readsFs)
DEF_DESCRIPTOR_METHOD_BOOL(readsFt)
DEF_DESCRIPTOR_METHOD_BOOL(readsFd)
DEF_DESCRIPTOR_METHOD_BOOL(notEmitedByCompilers)
DEF_DESCRIPTOR_METHOD_BOOL(canBeHi)
DEF_DESCRIPTOR_METHOD_BOOL(canBeLo)
@ -493,6 +500,7 @@ static PyMethodDef rabbitizer_type_Instruction_methods[] = {
METHOD_NO_ARGS(isFloat, ""),
METHOD_NO_ARGS(isDouble, ""),
METHOD_NO_ARGS(isUnsigned, ""),
METHOD_NO_ARGS(modifiesRs, ""),
METHOD_NO_ARGS(modifiesRt, ""),
METHOD_NO_ARGS(modifiesRd, ""),
METHOD_NO_ARGS(readsRs, ""),
@ -502,6 +510,12 @@ static PyMethodDef rabbitizer_type_Instruction_methods[] = {
METHOD_NO_ARGS(readsLO, ""),
METHOD_NO_ARGS(modifiesHI, ""),
METHOD_NO_ARGS(modifiesLO, ""),
METHOD_NO_ARGS(modifiesFs, ""),
METHOD_NO_ARGS(modifiesFt, ""),
METHOD_NO_ARGS(modifiesFd, ""),
METHOD_NO_ARGS(readsFs, ""),
METHOD_NO_ARGS(readsFt, ""),
METHOD_NO_ARGS(readsFd, ""),
METHOD_NO_ARGS(notEmitedByCompilers, ""),
METHOD_NO_ARGS(canBeHi, ""),
METHOD_NO_ARGS(canBeLo, ""),

View File

@ -23,6 +23,7 @@ pub struct InstrDescriptor {
is_unsigned: bool,
modifies_rs: bool,
modifies_rt: bool,
modifies_rd: bool,
@ -35,6 +36,14 @@ pub struct InstrDescriptor {
modifies_hi: bool,
modifies_lo: bool,
modifies_fs: bool,
modifies_ft: bool,
modifies_fd: bool,
reads_fs: bool,
reads_ft: bool,
reads_fd: bool,
not_emited_by_compilers: bool,
can_be_hi: bool,

View File

@ -115,6 +115,7 @@ extern "C" {
fn RabbitizerInstrDescriptor_isDouble(self_: *const instr_descriptor::InstrDescriptor) -> bool;
fn RabbitizerInstrDescriptor_isUnsigned(self_: *const instr_descriptor::InstrDescriptor) -> bool;
fn RabbitizerInstrDescriptor_modifiesRs(self_: *const instr_descriptor::InstrDescriptor) -> bool;
fn RabbitizerInstrDescriptor_modifiesRt(self_: *const instr_descriptor::InstrDescriptor) -> bool;
fn RabbitizerInstrDescriptor_modifiesRd(self_: *const instr_descriptor::InstrDescriptor) -> bool;
fn RabbitizerInstrDescriptor_readsRs(self_: *const instr_descriptor::InstrDescriptor) -> bool;
@ -125,6 +126,14 @@ extern "C" {
fn RabbitizerInstrDescriptor_readsLO(self_: *const instr_descriptor::InstrDescriptor) -> bool;
fn RabbitizerInstrDescriptor_modifiesHI(self_: *const instr_descriptor::InstrDescriptor) -> bool;
fn RabbitizerInstrDescriptor_modifiesLO(self_: *const instr_descriptor::InstrDescriptor) -> bool;
fn RabbitizerInstrDescriptor_modifiesFs(self_: *const instr_descriptor::InstrDescriptor) -> bool;
fn RabbitizerInstrDescriptor_modifiesFt(self_: *const instr_descriptor::InstrDescriptor) -> bool;
fn RabbitizerInstrDescriptor_modifiesFd(self_: *const instr_descriptor::InstrDescriptor) -> bool;
fn RabbitizerInstrDescriptor_readsFs(self_: *const instr_descriptor::InstrDescriptor) -> bool;
fn RabbitizerInstrDescriptor_readsFt(self_: *const instr_descriptor::InstrDescriptor) -> bool;
fn RabbitizerInstrDescriptor_readsFd(self_: *const instr_descriptor::InstrDescriptor) -> bool;
fn RabbitizerInstrDescriptor_notEmitedByCompilers(
self_: *const instr_descriptor::InstrDescriptor,
) -> bool;
@ -584,6 +593,11 @@ impl Instruction {
RabbitizerInstrDescriptor_isUnsigned(self.descriptor)
}
}
pub fn modifies_rs(&self) -> bool {
unsafe {
RabbitizerInstrDescriptor_modifiesRs(self.descriptor)
}
}
pub fn modifies_rt(&self) -> bool {
unsafe {
RabbitizerInstrDescriptor_modifiesRt(self.descriptor)
@ -629,6 +643,36 @@ impl Instruction {
RabbitizerInstrDescriptor_modifiesLO(self.descriptor)
}
}
pub fn modifies_fs(&self) -> bool {
unsafe {
RabbitizerInstrDescriptor_modifiesFs(self.descriptor)
}
}
pub fn modifies_ft(&self) -> bool {
unsafe {
RabbitizerInstrDescriptor_modifiesFt(self.descriptor)
}
}
pub fn modifies_fd(&self) -> bool {
unsafe {
RabbitizerInstrDescriptor_modifiesFd(self.descriptor)
}
}
pub fn reads_fs(&self) -> bool {
unsafe {
RabbitizerInstrDescriptor_readsFs(self.descriptor)
}
}
pub fn reads_ft(&self) -> bool {
unsafe {
RabbitizerInstrDescriptor_readsFt(self.descriptor)
}
}
pub fn reads_fd(&self) -> bool {
unsafe {
RabbitizerInstrDescriptor_readsFd(self.descriptor)
}
}
pub fn not_emited_by_compilers(&self) -> bool {
unsafe {
RabbitizerInstrDescriptor_notEmitedByCompilers(self.descriptor)

View File

@ -53,10 +53,10 @@ const RabbitizerInstrDescriptor RabbitizerInstrDescriptor_Descriptors[] = {
[RABBITIZER_INSTR_ID_cpu_scd] = { .operands={RAB_OPERAND_cpu_rt, RAB_OPERAND_cpu_immediate_base}, .instrType=RABBITIZER_INSTR_TYPE_I, .readsRs=true, .readsRt=true, .canBeLo=true, .doesDereference=true, .doesStore=true },
[RABBITIZER_INSTR_ID_cpu_sd] = { .operands={RAB_OPERAND_cpu_rt, RAB_OPERAND_cpu_immediate_base}, .instrType=RABBITIZER_INSTR_TYPE_I, .readsRs=true, .readsRt=true, .canBeLo=true, .doesDereference=true, .doesStore=true, .accessType=RAB_ACCESSTYPE_DOUBLEWORD },
[RABBITIZER_INSTR_ID_cpu_cache] = { .operands={RAB_OPERAND_cpu_op, RAB_OPERAND_cpu_immediate_base}, .instrType=RABBITIZER_INSTR_TYPE_I, .readsRs=true, .notEmitedByCompilers=true },
[RABBITIZER_INSTR_ID_cpu_lwc1] = { .operands={RAB_OPERAND_cpu_ft, RAB_OPERAND_cpu_immediate_base}, .instrType=RABBITIZER_INSTR_TYPE_I, .isFloat=true, .readsRs=true, .canBeLo=true, .doesDereference=true, .doesLoad=true, .accessType=RAB_ACCESSTYPE_FLOAT },
[RABBITIZER_INSTR_ID_cpu_ldc1] = { .operands={RAB_OPERAND_cpu_ft, RAB_OPERAND_cpu_immediate_base}, .instrType=RABBITIZER_INSTR_TYPE_I, .isFloat=true, .isDouble=true, .readsRs=true, .canBeLo=true, .doesDereference=true, .doesLoad=true, .accessType=RAB_ACCESSTYPE_DOUBLEFLOAT },
[RABBITIZER_INSTR_ID_cpu_swc1] = { .operands={RAB_OPERAND_cpu_ft, RAB_OPERAND_cpu_immediate_base}, .instrType=RABBITIZER_INSTR_TYPE_I, .isFloat=true, .readsRs=true, .canBeLo=true, .doesDereference=true, .doesStore=true, .accessType=RAB_ACCESSTYPE_FLOAT },
[RABBITIZER_INSTR_ID_cpu_sdc1] = { .operands={RAB_OPERAND_cpu_ft, RAB_OPERAND_cpu_immediate_base}, .instrType=RABBITIZER_INSTR_TYPE_I, .isFloat=true, .isDouble=true, .readsRs=true, .canBeLo=true, .doesDereference=true, .doesStore=true, .accessType=RAB_ACCESSTYPE_DOUBLEFLOAT },
[RABBITIZER_INSTR_ID_cpu_lwc1] = { .operands={RAB_OPERAND_cpu_ft, RAB_OPERAND_cpu_immediate_base}, .instrType=RABBITIZER_INSTR_TYPE_I, .isFloat=true, .readsRs=true, .modifiesFt=true, .canBeLo=true, .doesDereference=true, .doesLoad=true, .accessType=RAB_ACCESSTYPE_FLOAT },
[RABBITIZER_INSTR_ID_cpu_ldc1] = { .operands={RAB_OPERAND_cpu_ft, RAB_OPERAND_cpu_immediate_base}, .instrType=RABBITIZER_INSTR_TYPE_I, .isFloat=true, .isDouble=true, .readsRs=true, .modifiesFt=true, .canBeLo=true, .doesDereference=true, .doesLoad=true, .accessType=RAB_ACCESSTYPE_DOUBLEFLOAT },
[RABBITIZER_INSTR_ID_cpu_swc1] = { .operands={RAB_OPERAND_cpu_ft, RAB_OPERAND_cpu_immediate_base}, .instrType=RABBITIZER_INSTR_TYPE_I, .isFloat=true, .readsRs=true, .readsFt=true, .canBeLo=true, .doesDereference=true, .doesStore=true, .accessType=RAB_ACCESSTYPE_FLOAT },
[RABBITIZER_INSTR_ID_cpu_sdc1] = { .operands={RAB_OPERAND_cpu_ft, RAB_OPERAND_cpu_immediate_base}, .instrType=RABBITIZER_INSTR_TYPE_I, .isFloat=true, .isDouble=true, .readsRs=true, .readsFt=true, .canBeLo=true, .doesDereference=true, .doesStore=true, .accessType=RAB_ACCESSTYPE_DOUBLEFLOAT },
[RABBITIZER_INSTR_ID_cpu_lwc2] = { .operands={RAB_OPERAND_cpu_cop2t, RAB_OPERAND_cpu_immediate_base}, .instrType=RABBITIZER_INSTR_TYPE_I, .readsRs=true, .canBeLo=true, .doesDereference=true, .doesLoad=true },
[RABBITIZER_INSTR_ID_cpu_ldc2] = { .operands={RAB_OPERAND_cpu_cop2t, RAB_OPERAND_cpu_immediate_base}, .instrType=RABBITIZER_INSTR_TYPE_I, .readsRs=true, .canBeLo=true, .doesDereference=true, .doesLoad=true },
[RABBITIZER_INSTR_ID_cpu_swc2] = { .operands={RAB_OPERAND_cpu_cop2t, RAB_OPERAND_cpu_immediate_base}, .instrType=RABBITIZER_INSTR_TYPE_I, .readsRs=true, .canBeLo=true, .doesDereference=true, .doesStore=true },
@ -154,90 +154,90 @@ const RabbitizerInstrDescriptor RabbitizerInstrDescriptor_Descriptors[] = {
[RABBITIZER_INSTR_ID_cpu_tlbwr] = { .operands={0}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN },
[RABBITIZER_INSTR_ID_cpu_tlbp] = { .operands={0}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .notEmitedByCompilers=true },
[RABBITIZER_INSTR_ID_cpu_eret] = { .operands={0}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .notEmitedByCompilers=true },
[RABBITIZER_INSTR_ID_cpu_mfc1] = { .operands={RAB_OPERAND_cpu_rt, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesRt=true },
[RABBITIZER_INSTR_ID_cpu_dmfc1] = { .operands={RAB_OPERAND_cpu_rt, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesRt=true },
[RABBITIZER_INSTR_ID_cpu_mtc1] = { .operands={RAB_OPERAND_cpu_rt, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .readsRt=true },
[RABBITIZER_INSTR_ID_cpu_dmtc1] = { .operands={RAB_OPERAND_cpu_rt, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .readsRt=true },
[RABBITIZER_INSTR_ID_cpu_mfc1] = { .operands={RAB_OPERAND_cpu_rt, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesRt=true, .readsFs=true },
[RABBITIZER_INSTR_ID_cpu_dmfc1] = { .operands={RAB_OPERAND_cpu_rt, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesRt=true, .readsFs=true },
[RABBITIZER_INSTR_ID_cpu_mtc1] = { .operands={RAB_OPERAND_cpu_rt, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .readsRt=true, .modifiesFs=true },
[RABBITIZER_INSTR_ID_cpu_dmtc1] = { .operands={RAB_OPERAND_cpu_rt, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .readsRt=true, .modifiesFs=true },
[RABBITIZER_INSTR_ID_cpu_cfc1] = { .operands={RAB_OPERAND_cpu_rt, RAB_OPERAND_cpu_cop1cs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesRt=true },
[RABBITIZER_INSTR_ID_cpu_ctc1] = { .operands={RAB_OPERAND_cpu_rt, RAB_OPERAND_cpu_cop1cs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .readsRt=true },
[RABBITIZER_INSTR_ID_cpu_bc1f] = { .operands={RAB_OPERAND_cpu_branch_target_label}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isBranch=true },
[RABBITIZER_INSTR_ID_cpu_bc1t] = { .operands={RAB_OPERAND_cpu_branch_target_label}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isBranch=true },
[RABBITIZER_INSTR_ID_cpu_bc1fl] = { .operands={RAB_OPERAND_cpu_branch_target_label}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isBranch=true, .isBranchLikely=true },
[RABBITIZER_INSTR_ID_cpu_bc1tl] = { .operands={RAB_OPERAND_cpu_branch_target_label}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isBranch=true, .isBranchLikely=true },
[RABBITIZER_INSTR_ID_cpu_add_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_sub_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_mul_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_div_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_sqrt_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_abs_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_mov_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_neg_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_round_l_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_trunc_l_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_ceil_l_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_floor_l_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_round_w_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_trunc_w_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_ceil_w_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_floor_w_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_cvt_d_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .isDouble=true },
[RABBITIZER_INSTR_ID_cpu_cvt_w_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_cvt_l_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_c_f_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_c_un_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_c_eq_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_c_ueq_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_c_olt_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_c_ult_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_c_ole_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_c_ule_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_c_sf_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_c_ngle_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_c_seq_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_c_ngl_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_c_lt_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_c_nge_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_c_le_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_c_ngt_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_add_d] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_sub_d] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_mul_d] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_div_d] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_sqrt_d] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_abs_d] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_mov_d] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_neg_d] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_round_l_d] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_trunc_l_d] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_ceil_l_d] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_floor_l_d] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_round_w_d] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_trunc_w_d] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_ceil_w_d] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_floor_w_d] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_cvt_s_d] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .isDouble=true },
[RABBITIZER_INSTR_ID_cpu_cvt_w_d] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .isDouble=true },
[RABBITIZER_INSTR_ID_cpu_cvt_l_d] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .isDouble=true },
[RABBITIZER_INSTR_ID_cpu_c_f_d] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_c_un_d] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_c_eq_d] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_c_ueq_d] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_c_olt_d] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_c_ult_d] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_c_ole_d] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_c_ule_d] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_c_df_d] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_c_ngle_d] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_c_deq_d] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_c_ngl_d] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_c_lt_d] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_c_nge_d] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_c_le_d] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_c_ngt_d] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_cvt_s_w] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_cvt_d_w] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .isDouble=true },
[RABBITIZER_INSTR_ID_cpu_cvt_s_l] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true },
[RABBITIZER_INSTR_ID_cpu_cvt_d_l] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .isDouble=true },
[RABBITIZER_INSTR_ID_cpu_add_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesFd=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_sub_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesFd=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_mul_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesFd=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_div_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesFd=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_sqrt_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesFd=true, .readsFs=true },
[RABBITIZER_INSTR_ID_cpu_abs_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesFd=true, .readsFs=true },
[RABBITIZER_INSTR_ID_cpu_mov_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesFd=true, .readsFs=true },
[RABBITIZER_INSTR_ID_cpu_neg_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesFd=true, .readsFs=true },
[RABBITIZER_INSTR_ID_cpu_round_l_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesFd=true, .readsFs=true },
[RABBITIZER_INSTR_ID_cpu_trunc_l_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesFd=true, .readsFs=true },
[RABBITIZER_INSTR_ID_cpu_ceil_l_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesFd=true, .readsFs=true },
[RABBITIZER_INSTR_ID_cpu_floor_l_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesFd=true, .readsFs=true },
[RABBITIZER_INSTR_ID_cpu_round_w_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesFd=true, .readsFs=true },
[RABBITIZER_INSTR_ID_cpu_trunc_w_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesFd=true, .readsFs=true },
[RABBITIZER_INSTR_ID_cpu_ceil_w_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesFd=true, .readsFs=true },
[RABBITIZER_INSTR_ID_cpu_floor_w_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesFd=true, .readsFs=true },
[RABBITIZER_INSTR_ID_cpu_cvt_d_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .isDouble=true, .modifiesFd=true, .readsFs=true },
[RABBITIZER_INSTR_ID_cpu_cvt_w_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesFd=true, .readsFs=true },
[RABBITIZER_INSTR_ID_cpu_cvt_l_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesFd=true, .readsFs=true },
[RABBITIZER_INSTR_ID_cpu_c_f_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_c_un_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_c_eq_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_c_ueq_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_c_olt_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_c_ult_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_c_ole_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_c_ule_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_c_sf_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_c_ngle_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_c_seq_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_c_ngl_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_c_lt_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_c_nge_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_c_le_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_c_ngt_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_add_d] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesFd=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_sub_d] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesFd=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_mul_d] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesFd=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_div_d] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesFd=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_sqrt_d] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesFd=true, .readsFs=true },
[RABBITIZER_INSTR_ID_cpu_abs_d] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesFd=true, .readsFs=true },
[RABBITIZER_INSTR_ID_cpu_mov_d] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesFd=true, .readsFs=true },
[RABBITIZER_INSTR_ID_cpu_neg_d] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesFd=true, .readsFs=true },
[RABBITIZER_INSTR_ID_cpu_round_l_d] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesFd=true, .readsFs=true },
[RABBITIZER_INSTR_ID_cpu_trunc_l_d] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesFd=true, .readsFs=true },
[RABBITIZER_INSTR_ID_cpu_ceil_l_d] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesFd=true, .readsFs=true },
[RABBITIZER_INSTR_ID_cpu_floor_l_d] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesFd=true, .readsFs=true },
[RABBITIZER_INSTR_ID_cpu_round_w_d] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesFd=true, .readsFs=true },
[RABBITIZER_INSTR_ID_cpu_trunc_w_d] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesFd=true, .readsFs=true },
[RABBITIZER_INSTR_ID_cpu_ceil_w_d] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesFd=true, .readsFs=true },
[RABBITIZER_INSTR_ID_cpu_floor_w_d] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesFd=true, .readsFs=true },
[RABBITIZER_INSTR_ID_cpu_cvt_s_d] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .isDouble=true, .modifiesFd=true, .readsFs=true },
[RABBITIZER_INSTR_ID_cpu_cvt_w_d] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .isDouble=true, .modifiesFd=true, .readsFs=true },
[RABBITIZER_INSTR_ID_cpu_cvt_l_d] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .isDouble=true, .modifiesFd=true, .readsFs=true },
[RABBITIZER_INSTR_ID_cpu_c_f_d] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_c_un_d] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_c_eq_d] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_c_ueq_d] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_c_olt_d] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_c_ult_d] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_c_ole_d] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_c_ule_d] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_c_df_d] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_c_ngle_d] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_c_deq_d] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_c_ngl_d] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_c_lt_d] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_c_nge_d] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_c_le_d] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_c_ngt_d] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_cpu_cvt_s_w] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesFd=true, .readsFs=true },
[RABBITIZER_INSTR_ID_cpu_cvt_d_w] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .isDouble=true, .modifiesFd=true, .readsFs=true },
[RABBITIZER_INSTR_ID_cpu_cvt_s_l] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .modifiesFd=true, .readsFs=true },
[RABBITIZER_INSTR_ID_cpu_cvt_d_l] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .instrType=RABBITIZER_INSTR_TYPE_UNKNOWN, .isFloat=true, .isDouble=true, .modifiesFd=true, .readsFs=true },
[RABBITIZER_INSTR_ID_cpu_USERDEF_00] = { .operands={0} },
[RABBITIZER_INSTR_ID_cpu_USERDEF_01] = { .operands={0} },
[RABBITIZER_INSTR_ID_cpu_USERDEF_02] = { .operands={0} },
@ -523,19 +523,19 @@ const RabbitizerInstrDescriptor RabbitizerInstrDescriptor_Descriptors[] = {
[RABBITIZER_INSTR_ID_r5900_ei] = { .operands={0} },
[RABBITIZER_INSTR_ID_r5900_di] = { .operands={0} },
[RABBITIZER_INSTR_ID_r5900_c1__sqrt_s] = { .operands={RAB_OPERAND_cpu_copraw} },
[RABBITIZER_INSTR_ID_r5900_rsqrt_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .isFloat=true },
[RABBITIZER_INSTR_ID_r5900_adda_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .isFloat=true },
[RABBITIZER_INSTR_ID_r5900_suba_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .isFloat=true },
[RABBITIZER_INSTR_ID_r5900_mula_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .isFloat=true },
[RABBITIZER_INSTR_ID_r5900_madd_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .isFloat=true },
[RABBITIZER_INSTR_ID_r5900_msub_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .isFloat=true },
[RABBITIZER_INSTR_ID_r5900_madda_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .isFloat=true },
[RABBITIZER_INSTR_ID_r5900_msuba_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .isFloat=true },
[RABBITIZER_INSTR_ID_r5900_max_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .isFloat=true },
[RABBITIZER_INSTR_ID_r5900_min_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .isFloat=true },
[RABBITIZER_INSTR_ID_r5900_trunc_w_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .isFloat=true },
[RABBITIZER_INSTR_ID_r5900_c_lt_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .isFloat=true },
[RABBITIZER_INSTR_ID_r5900_c_le_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .isFloat=true },
[RABBITIZER_INSTR_ID_r5900_rsqrt_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .isFloat=true, .modifiesFd=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_r5900_adda_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .isFloat=true, .modifiesFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_r5900_suba_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .isFloat=true, .modifiesFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_r5900_mula_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .isFloat=true, .modifiesFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_r5900_madd_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .isFloat=true, .modifiesFd=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_r5900_msub_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .isFloat=true, .modifiesFd=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_r5900_madda_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .isFloat=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_r5900_msuba_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .isFloat=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_r5900_max_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .isFloat=true, .modifiesFd=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_r5900_min_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .isFloat=true, .modifiesFd=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_r5900_trunc_w_s] = { .operands={RAB_OPERAND_cpu_fd, RAB_OPERAND_cpu_fs}, .isFloat=true, .modifiesFd=true, .readsFs=true },
[RABBITIZER_INSTR_ID_r5900_c_lt_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .isFloat=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_r5900_c_le_s] = { .operands={RAB_OPERAND_cpu_fs, RAB_OPERAND_cpu_ft}, .isFloat=true, .readsFs=true, .readsFt=true },
[RABBITIZER_INSTR_ID_r5900_qmfc2] = { .operands={RAB_OPERAND_cpu_rt, RAB_OPERAND_r5900_vfs}, .modifiesRt=true },
[RABBITIZER_INSTR_ID_r5900_cfc2] = { .operands={RAB_OPERAND_cpu_rt, RAB_OPERAND_r5900_vis}, .modifiesRt=true },
[RABBITIZER_INSTR_ID_r5900_qmtc2] = { .operands={RAB_OPERAND_cpu_rt, RAB_OPERAND_r5900_vfs}, .readsRt=true },

View File

@ -525,6 +525,9 @@ bool RabbitizerInstrDescriptor_isUnsigned(const RabbitizerInstrDescriptor *self)
return self->isUnsigned;
}
bool RabbitizerInstrDescriptor_modifiesRs(const RabbitizerInstrDescriptor *self) {
return self->modifiesRs;
}
bool RabbitizerInstrDescriptor_modifiesRt(const RabbitizerInstrDescriptor *self) {
return self->modifiesRt;
}
@ -555,6 +558,26 @@ bool RabbitizerInstrDescriptor_modifiesLO(const RabbitizerInstrDescriptor *self)
return self->modifiesLO;
}
bool RabbitizerInstrDescriptor_modifiesFs(const RabbitizerInstrDescriptor *self) {
return self->modifiesFs;
}
bool RabbitizerInstrDescriptor_modifiesFt(const RabbitizerInstrDescriptor *self) {
return self->modifiesFt;
}
bool RabbitizerInstrDescriptor_modifiesFd(const RabbitizerInstrDescriptor *self) {
return self->modifiesFd;
}
bool RabbitizerInstrDescriptor_readsFs(const RabbitizerInstrDescriptor *self) {
return self->readsFs;
}
bool RabbitizerInstrDescriptor_readsFt(const RabbitizerInstrDescriptor *self) {
return self->readsFt;
}
bool RabbitizerInstrDescriptor_readsFd(const RabbitizerInstrDescriptor *self) {
return self->readsFd;
}
bool RabbitizerInstrDescriptor_notEmitedByCompilers(const RabbitizerInstrDescriptor *self) {
return self->notEmitedByCompilers;
}

View File

@ -47,16 +47,30 @@ int main() {
LOGIC_ERROR_A_IMPLIES_B(uniqueId, errorCount, descriptor->isDouble, descriptor->isFloat);
// modifiesR* and readsR*
LOGIC_ERROR(uniqueId, errorCount, !(descriptor->modifiesRs && descriptor->readsRs));
LOGIC_ERROR(uniqueId, errorCount, !(descriptor->modifiesRt && descriptor->readsRt));
LOGIC_ERROR(uniqueId, errorCount, !(descriptor->modifiesRd && descriptor->readsRd));
LOGIC_ERROR(uniqueId, errorCount, !(descriptor->readsRs && !RabbitizerInstrDescriptor_hasOperandAlias(descriptor, RAB_OPERAND_cpu_rs)));
LOGIC_ERROR(uniqueId, errorCount, !((descriptor->modifiesRs || descriptor->readsRs) && !RabbitizerInstrDescriptor_hasOperandAlias(descriptor, RAB_OPERAND_cpu_rs)));
LOGIC_ERROR(uniqueId, errorCount, !((descriptor->modifiesRt || descriptor->readsRt) && !RabbitizerInstrDescriptor_hasOperandAlias(descriptor, RAB_OPERAND_cpu_rt)));
LOGIC_ERROR(uniqueId, errorCount, !((descriptor->modifiesRd || descriptor->readsRd) && !RabbitizerInstrDescriptor_hasOperandAlias(descriptor, RAB_OPERAND_cpu_rd)));
LOGIC_ERROR_A_IMPLIES_B(uniqueId, errorCount, RabbitizerInstrDescriptor_hasOperandAlias(descriptor, RAB_OPERAND_cpu_rs), descriptor->readsRs);
LOGIC_ERROR_A_IMPLIES_B(uniqueId, errorCount, RabbitizerInstrDescriptor_hasOperandAlias(descriptor, RAB_OPERAND_cpu_rs), (descriptor->readsRs || descriptor->modifiesRs));
LOGIC_ERROR_A_IMPLIES_B(uniqueId, errorCount, RabbitizerInstrDescriptor_hasOperandAlias(descriptor, RAB_OPERAND_cpu_rt), (descriptor->readsRt || descriptor->modifiesRt));
LOGIC_ERROR_A_IMPLIES_B(uniqueId, errorCount, RabbitizerInstrDescriptor_hasOperandAlias(descriptor, RAB_OPERAND_cpu_rd), (descriptor->readsRd || descriptor->modifiesRd));
// float modifiesR* and readsR*
LOGIC_ERROR(uniqueId, errorCount, !(descriptor->modifiesFs && descriptor->readsFs));
LOGIC_ERROR(uniqueId, errorCount, !(descriptor->modifiesFt && descriptor->readsFt));
LOGIC_ERROR(uniqueId, errorCount, !(descriptor->modifiesFd && descriptor->readsFd));
LOGIC_ERROR(uniqueId, errorCount, !((descriptor->modifiesFs || descriptor->readsFs) && !RabbitizerInstrDescriptor_hasOperandAlias(descriptor, RAB_OPERAND_cpu_fs)));
LOGIC_ERROR(uniqueId, errorCount, !((descriptor->modifiesFt || descriptor->readsFt) && !RabbitizerInstrDescriptor_hasOperandAlias(descriptor, RAB_OPERAND_cpu_ft)));
LOGIC_ERROR(uniqueId, errorCount, !((descriptor->modifiesFd || descriptor->readsFd) && !RabbitizerInstrDescriptor_hasOperandAlias(descriptor, RAB_OPERAND_cpu_fd)));
LOGIC_ERROR_A_IMPLIES_B(uniqueId, errorCount, RabbitizerInstrDescriptor_hasOperandAlias(descriptor, RAB_OPERAND_cpu_fs), (descriptor->readsFs || descriptor->modifiesFs));
LOGIC_ERROR_A_IMPLIES_B(uniqueId, errorCount, RabbitizerInstrDescriptor_hasOperandAlias(descriptor, RAB_OPERAND_cpu_ft), (descriptor->readsFt || descriptor->modifiesFt));
LOGIC_ERROR_A_IMPLIES_B(uniqueId, errorCount, RabbitizerInstrDescriptor_hasOperandAlias(descriptor, RAB_OPERAND_cpu_fd), (descriptor->readsFd || descriptor->modifiesFd));
// An instruction should have at most canBeHi or canBeLo, not both
LOGIC_ERROR(uniqueId, errorCount, !(descriptor->canBeHi && descriptor->canBeLo));