首页>
外国专利>
Control flow graph flattening device and method
Control flow graph flattening device and method
展开▼
机译:控制流程图展平装置和方法
展开▼
页面导航
摘要
著录项
相似文献
摘要
Control Flow Graph flattening of a function comprising a plurality of basic blocks having an address and at least one instruction. A processor creates a jump table associating a label of each basic block with its address, creates a coefficient array comprising constant coefficients, creates a dispatcher basic block comprising instructions to look up an address in the jump table and to jump to the address, replaces a Jump terminal instruction by a jump to the dispatcher basic block in each basic block, creates and inserts at least one lookup functions in each of the plurality of basic blocks, each lookup function returning a derived value based on a constant coefficient depending on at least an index of the basic block; creates and inserts a first branch function calculating the label of a subsequent basic block based on at least the derived value and a second branch function calculating the index of the subsequent basic block; and creates and inserts into the dispatcher basic block a transition function obtaining the address in the jump table based on at least the label of a subsequent basic block.
展开▼