发明名称 Determining destinations of a dynamic branch
摘要 A method, a translator, and a computer-readable medium for translating compiled programming code from a first code state to a second code state are disclosed. The programming code in the first state has a plurality of basic blocks, where each basic block has a set of instructions. At least one basic block ends in a dynamic branch, the dynamic branch being a transfer to one of a set of destinations based on a calculation of a destination address. The plurality of basic blocks in the first state of the programming code are identified, as are links between the identified basic blocks. A control flow graph (CFG) of the programming code is then constructed based on the identified basic blocks and identified links, where the CFG is in a preliminary form. At least one basic block ending in a dynamic branch is identified, and all identified basic blocks that lead to the dynamic branch are explored, based on the CFG, as far back as is necessary to fully determine a set of destination addresses for the dynamic branch. The set of destination addresses defines the set of destinations from the dynamic branch. Such set of destinations is examined to identify a branch table, and the CFG is updated to reflect the set of destinations and the identified branch table. The programming code is then translated from the first state to the second state based at least in part on the updated CFG.
申请公布号 US2008288915(A1) 申请公布日期 2008.11.20
申请号 US20030625406 申请日期 2003.07.23
申请人 KRABLIN G LAWRENCE;JENNINGS ANDREW T;FENDER TIMOTHY N;STRATTON WILLIAM 发明人 KRABLIN G. LAWRENCE;JENNINGS ANDREW T.;FENDER TIMOTHY N.;STRATTON WILLIAM
分类号 G06F9/32;G06F9/44;G06F9/45 主分类号 G06F9/32
代理机构 代理人
主权项
地址