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

Function isT2SOImmTwoPartVal

arch/ARM/ARMAddressingModes.h:367–393  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

365}
366
367static inline bool isT2SOImmTwoPartVal (unsigned Imm)
368{
369 unsigned V = Imm;
370 // Passing values can be any combination of splat values and shifter
371 // values. If this can be handled with a single shifter or splat, bail
372 // out. Those should be handled directly, not with a two-part val.
373 if (getT2SOImmValSplatVal(V) != -1)
374 return false;
375 V = rotr32 (~255U, getT2SOImmValRotate(V)) & V;
376 if (V == 0)
377 return false;
378
379 // If this can be handled as an immediate, accept.
380 if (getT2SOImmVal(V) != -1) return true;
381
382 // Likewise, try masking out a splat value first.
383 V = Imm;
384 if (getT2SOImmValSplatVal(V & 0xff00ff00U) != -1)
385 V &= ~0xff00ff00U;
386 else if (getT2SOImmValSplatVal(V & 0x00ff00ffU) != -1)
387 V &= ~0x00ff00ffU;
388 // If what's left can be handled as an immediate, accept.
389 if (getT2SOImmVal(V) != -1) return true;
390
391 // Otherwise, do not accept.
392 return false;
393}
394
395static inline unsigned getT2SOImmTwoPartFirst(unsigned Imm)
396{

Callers

nothing calls this directly

Calls 4

getT2SOImmValSplatValFunction · 0.85
rotr32Function · 0.85
getT2SOImmValRotateFunction · 0.85
getT2SOImmValFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…