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

Method AlwaysBranch

arch/mips/arch_mips.cpp:1336–1356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1334 }
1335
1336 virtual bool AlwaysBranch(uint8_t* data, uint64_t addr, size_t len) override
1337 {
1338 (void)addr;
1339 Instruction instr;
1340 if (!Disassemble(data, addr, len, instr))
1341 return false;
1342
1343 uint32_t *value = (uint32_t*)data;
1344 uint32_t instValue = *value;
1345
1346 if (GetEndianness() == LittleEndian)
1347 instValue = bswap32(instValue);
1348
1349 instValue = (0x00000010 | (instValue & 0xffff0000));
1350
1351 if (GetEndianness() == LittleEndian)
1352 instValue = bswap32(instValue);
1353
1354 *value = instValue;
1355 return true;
1356 }
1357
1358 virtual bool InvertBranch(uint8_t* data, uint64_t addr, size_t len) override
1359 {

Callers

nothing calls this directly

Calls 1

bswap32Function · 0.70

Tested by

no test coverage detected