发明名称 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 (710) creates (510) a jump table associating a label (X i ) of each basic block with its address, creates (512) a coefficient array comprising constant coefficients, creates (514) a dispatcher basic block comprising instructions to look up an address in the jump table and to jump to the address, replaces (516) a jump terminal instruction by a jump to the dispatcher basic block in each basic block, creates and inserts (520) at least one lookup function 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 (P i ) of the basic block; creates and inserts (522) a first branch function (B i ()) calculating the label (X i+1 ) of a subsequent basic block based on at least the derived value, and a second branch function (Bparam i ()) calculating the index (P i+1 ) of the subsequent basic block; and creates and inserts (524) into the dispatcher basic block a transition function (F()) obtaining the address in the jump table based on at least the label (X i+1 ) of a subsequent basic block.
申请公布号 EP3012762(A1) 申请公布日期 2016.04.27
申请号 EP20140306694 申请日期 2014.10.24
申请人 THOMSON LICENSING 发明人 SALMON-LEGAGNEUR, CHARLES;MONSIFROT, ANTOINE
分类号 G06F21/12;G06F21/14 主分类号 G06F21/12
代理机构 代理人
主权项
地址