MCPcopy Create free account
hub / github.com/capstone-engine/capstone / MCOperandInfo_getOperandConstraint

Function MCOperandInfo_getOperandConstraint

MCInstrDesc.c:30–41  ·  view source on GitHub ↗

Returns the value of the specified operand constraint if it is present. Returns -1 if it is not present.

Source from the content-addressed store, hash-verified

28/// Returns the value of the specified operand constraint if
29/// it is present. Returns -1 if it is not present.
30int 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}

Callers 1

MCInst_handleWritebackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…