| 42 | } |
| 43 | |
| 44 | void ppc_fcmpo(uint32_t insword, decomp_result *res) |
| 45 | { |
| 46 | unsigned regtmp = 0; |
| 47 | |
| 48 | // 111111AAA00BBBBBCCCCC00001000000 "fcmpo crA,fB,fC" |
| 49 | regtmp = PPC_REG_CR0 + ((insword >> 23) & 7); |
| 50 | res->detail.ppc.operands[0].reg = (ppc_reg)(regtmp); |
| 51 | res->detail.ppc.operands[0].type = PPC_OP_REG; |
| 52 | |
| 53 | regtmp = PPC_REG_F0 + ((insword >> 16) & 31); |
| 54 | res->detail.ppc.operands[1].reg = (ppc_reg)(regtmp); |
| 55 | res->detail.ppc.operands[1].type = PPC_OP_REG; |
| 56 | |
| 57 | regtmp = PPC_REG_F0 + ((insword >> 11) & 31); |
| 58 | res->detail.ppc.operands[2].reg = (ppc_reg)(regtmp); |
| 59 | res->detail.ppc.operands[2].type = PPC_OP_REG; |
| 60 | |
| 61 | |
| 62 | #ifdef FORCE_TEST |
| 63 | SStream ss; |
| 64 | struct cs_struct* handle = 0; |
| 65 | struct MCInst tempmc = {0}; |
| 66 | char* first_space = 0; |
| 67 | |
| 68 | // SStream_Init(&ss); |
| 69 | ss.index = 0; |
| 70 | ss.buffer[0] = '\0'; |
| 71 | regtmp = PPC_REG_CR0 + ((insword >> 23) & 7); |
| 72 | tempmc.Operands[0].MachineOperandType = MCOperand::kRegister; |
| 73 | tempmc.Operands[0].Kind = 1; |
| 74 | tempmc.Operands[0].RegVal = regtmp; |
| 75 | regtmp = PPC_REG_F0 + ((insword >> 16) & 31); |
| 76 | tempmc.Operands[1].MachineOperandType = MCOperand::kRegister; |
| 77 | tempmc.Operands[1].Kind = 1; |
| 78 | tempmc.Operands[1].RegVal = regtmp; |
| 79 | regtmp = PPC_REG_F0 + ((insword >> 11) & 31); |
| 80 | tempmc.Operands[2].Kind = 1; |
| 81 | tempmc.Operands[2].MachineOperandType = MCOperand::kRegister; |
| 82 | tempmc.Operands[2].RegVal = regtmp; |
| 83 | |
| 84 | // temporarily set this so that print processing succeeds |
| 85 | res->insn.id = PPC_INS_FCMPU; |
| 86 | |
| 87 | if (handle_big != 0) |
| 88 | { |
| 89 | handle = (struct cs_struct*)handle_big; |
| 90 | } |
| 91 | else if (handle_lil != 0) |
| 92 | { |
| 93 | handle = (struct cs_struct*)handle_lil; |
| 94 | } |
| 95 | |
| 96 | #define PPC_FCMPUS 804 |
| 97 | |
| 98 | tempmc.csh = handle; |
| 99 | tempmc.Opcode = PPC_FCMPUS; |
| 100 | tempmc.flat_insn = &res->insn; |
| 101 | tempmc.flat_insn->detail = &res->detail; |
no outgoing calls
no test coverage detected