MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / ExtractBits

Function ExtractBits

arch/arm64/il.cpp:1158–1164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1156
1157
1158static ExprId ExtractBits(
1159 LowLevelILFunction& il, InstructionOperand& reg, size_t nbits, size_t rightMostBit)
1160{
1161// Get N set bits at offset O
1162#define BITMASK(N, O) (((1LL << nbits) - 1) << O)
1163 return il.And(REGSZ_O(reg), ILREG_O(reg), il.Const(REGSZ_O(reg), BITMASK(nbits, rightMostBit)));
1164}
1165
1166static ExprId ExtractBit(LowLevelILFunction& il, InstructionOperand& reg, size_t bit)
1167{

Callers 1

Calls 2

AndMethod · 0.45
ConstMethod · 0.45

Tested by

no test coverage detected