Returns the value of the specified operand constraint if it is present. Returns -1 if it is not present.
| 28 | /// Returns the value of the specified operand constraint if |
| 29 | /// it is present. Returns -1 if it is not present. |
| 30 | int MCOperandInfo_getOperandConstraint(const MCInstrDesc *InstrDesc, |
| 31 | unsigned OpNum, |
| 32 | MCOI_OperandConstraint Constraint) |
| 33 | { |
| 34 | const MCOperandInfo OpInfo = InstrDesc->OpInfo[OpNum]; |
| 35 | if (OpNum < InstrDesc->NumOperands && |
| 36 | (OpInfo.Constraints & (1 << Constraint))) { |
| 37 | unsigned ValuePos = 4 + Constraint * 4; |
| 38 | return (OpInfo.Constraints >> ValuePos) & 0xf; |
| 39 | } |
| 40 | return -1; |
| 41 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…