|
|
@ -871,8 +871,7 @@ private:
|
|
|
|
ASSERT_MSG(!instr.conversion.saturate_a, "Unimplemented");
|
|
|
|
ASSERT_MSG(!instr.conversion.saturate_a, "Unimplemented");
|
|
|
|
|
|
|
|
|
|
|
|
switch (opcode->GetId()) {
|
|
|
|
switch (opcode->GetId()) {
|
|
|
|
case OpCode::Id::I2I_R:
|
|
|
|
case OpCode::Id::I2I_R: {
|
|
|
|
case OpCode::Id::I2F_R: {
|
|
|
|
|
|
|
|
ASSERT_MSG(!instr.conversion.selector, "Unimplemented");
|
|
|
|
ASSERT_MSG(!instr.conversion.selector, "Unimplemented");
|
|
|
|
|
|
|
|
|
|
|
|
std::string op_a =
|
|
|
|
std::string op_a =
|
|
|
@ -885,6 +884,17 @@ private:
|
|
|
|
regs.SetRegisterToInteger(instr.gpr0, instr.conversion.is_signed, 0, op_a, 1, 1);
|
|
|
|
regs.SetRegisterToInteger(instr.gpr0, instr.conversion.is_signed, 0, op_a, 1, 1);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
case OpCode::Id::I2F_R: {
|
|
|
|
|
|
|
|
std::string op_a =
|
|
|
|
|
|
|
|
regs.GetRegisterAsInteger(instr.gpr20, 0, instr.conversion.is_signed);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (instr.conversion.abs_a) {
|
|
|
|
|
|
|
|
op_a = "abs(" + op_a + ')';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
regs.SetRegisterToFloat(instr.gpr0, 0, op_a, 1, 1);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
case OpCode::Id::F2F_R: {
|
|
|
|
case OpCode::Id::F2F_R: {
|
|
|
|
std::string op_a = regs.GetRegisterAsFloat(instr.gpr20);
|
|
|
|
std::string op_a = regs.GetRegisterAsFloat(instr.gpr20);
|
|
|
|
|
|
|
|
|
|
|
@ -1078,7 +1088,12 @@ private:
|
|
|
|
std::string predicate = "(((" + op_a + ") " + comparator + " (" + op_b + ")) " +
|
|
|
|
std::string predicate = "(((" + op_a + ") " + comparator + " (" + op_b + ")) " +
|
|
|
|
combiner + " (" + second_pred + "))";
|
|
|
|
combiner + " (" + second_pred + "))";
|
|
|
|
|
|
|
|
|
|
|
|
regs.SetRegisterToFloat(instr.gpr0, 0, predicate + " ? 1.0 : 0.0", 1, 1);
|
|
|
|
if (instr.fset.bf) {
|
|
|
|
|
|
|
|
regs.SetRegisterToFloat(instr.gpr0, 0, predicate + " ? 1.0 : 0.0", 1, 1);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
regs.SetRegisterToInteger(instr.gpr0, false, 0, predicate + " ? 0xFFFFFFFF : 0", 1,
|
|
|
|
|
|
|
|
1);
|
|
|
|
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
default: {
|
|
|
|
default: {
|
|
|
|