Checks if tied operands exist in the instruction and sets - The writeback flag in detail - Saves the indices of the tied destination operands.
| 223 | /// - The writeback flag in detail |
| 224 | /// - Saves the indices of the tied destination operands. |
| 225 | void MCInst_handleWriteback(MCInst *MI, const MCInstrDesc *InstDesc) |
| 226 | { |
| 227 | const MCOperandInfo *OpInfo = InstDesc[MCInst_getOpcode(MI)].OpInfo; |
| 228 | unsigned short NumOps = InstDesc[MCInst_getOpcode(MI)].NumOperands; |
| 229 | |
| 230 | unsigned i; |
| 231 | for (i = 0; i < NumOps; ++i) { |
| 232 | if (MCOperandInfo_isTiedToOp(&OpInfo[i])) { |
| 233 | int idx = MCOperandInfo_getOperandConstraint( |
| 234 | &InstDesc[MCInst_getOpcode(MI)], i, |
| 235 | MCOI_TIED_TO); |
| 236 | |
| 237 | if (idx == -1) |
| 238 | continue; |
| 239 | |
| 240 | if (i >= MAX_MC_OPS) { |
| 241 | assert(0 && |
| 242 | "Maximum number of MC operands reached."); |
| 243 | } |
| 244 | MI->tied_op_idx[i] = idx; |
| 245 | |
| 246 | if (MI->flat_insn->detail) |
| 247 | MI->flat_insn->detail->writeback = true; |
| 248 | } |
| 249 | } |
| 250 | } |
| 251 | |
| 252 | /// Check if operand with OpNum is tied by another operand |
| 253 | /// (operand is tying destination). |
nothing calls this directly
no test coverage detected
searching dependent graphs…