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

Function StorePair

arch/armv7/il.cpp:540–566  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

538
539
540static void StorePair(
541 Architecture* arch,
542 LowLevelILFunction& il,
543 InstructionOperand& src1,
544 InstructionOperand& src2,
545 InstructionOperand& dst,
546 size_t addr)
547{
548 ExprId address, value;
549 size_t srcSize = get_register_size(src1.reg);
550 LowLevelILLabel trueCode, falseCode;
551
552 if (dst.cls == MEM_POST_IDX)
553 address = ILREG(dst);
554 else
555 address = ReadAddress(il, dst, addr);
556
557 if (arch->GetEndianness() == LittleEndian)
558 value = il.RegisterSplit(srcSize, src2.reg, src1.reg);
559 else
560 value = il.RegisterSplit(srcSize, src1.reg, src2.reg);
561
562 il.AddInstruction(il.Store(srcSize * 2, address, value));
563
564 if (dst.cls == MEM_POST_IDX || dst.cls == MEM_PRE_IDX)
565 il.AddInstruction(SetRegisterOrBranch(il, dst.reg, ReadAddress(il, dst, addr)));
566}
567
568
569static void StorePairExclusive(

Callers 2

StorePairExclusiveFunction · 0.85

Calls 7

ReadAddressFunction · 0.85
SetRegisterOrBranchFunction · 0.85
RegisterSplitMethod · 0.80
get_register_sizeFunction · 0.50
GetEndiannessMethod · 0.45
AddInstructionMethod · 0.45
StoreMethod · 0.45

Tested by

no test coverage detected