Binary system translation method and device based on execution tree depth

A translation device and binary technology, applied in the computer field, can solve the problem of low performance of super blocks and achieve the effect of improving performance

Active Publication Date: 2015-02-25
浙江迪捷软件科技有限公司
View PDF3 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The main purpose of the present invention is to provide a binary translation method and device based on the depth of the execution tree to solve the problem of low performance of the target processor in the prior art after executing the binary translated super block

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Binary system translation method and device based on execution tree depth
  • Binary system translation method and device based on execution tree depth
  • Binary system translation method and device based on execution tree depth

Examples

Experimental program
Comparison scheme
Effect test

no. 1 example

[0022] figure 1 is a flow chart of the binary translation method according to the first embodiment of the present invention, such as figure 1 As shown, the method includes the following steps:

[0023] Step S0: Start to construct the super block, initialize the execution tree depth to 0, obtain the preset execution tree depth threshold, and start translation from the basic block where the preset start address is located.

[0024] Step S1: translate the obtained basic blocks.

[0025] Step S2: If the current instruction of the translated basic block is a direct jump instruction, obtain the basic block entered by the direct jump instruction, and return to step S1.

[0026] Step S3: If the current instruction of the translated basic block is a conditional jump instruction, obtain the basic block after the jump of the conditional jump instruction and the next basic block of the conditional jump instruction, and add 1 to the depth of the execution tree, and return to Step S1.

...

no. 2 example

[0034] figure 2 It is a flow chart of the binary translation method according to the second embodiment of the present invention. In this embodiment, when binary translation is performed from the address of an instruction, when a function call instruction or a conditional jump instruction is encountered on the current execution path, The instruction translation will be translated simultaneously on the current execution path and the execution path to be jumped to. Therefore, in this embodiment, the execution depth is also referred to as the translation depth. The translation depth can be flexibly set according to specific application scenarios. The greater the translation depth, the more basic blocks that make up the super block. More basic blocks will bring more code optimization effects, and the performance of the execution program will be improved accordingly. But the negative effect of more basic blocks is that the translation time becomes longer. After the translation of...

no. 3 example

[0046] image 3 is a block diagram of a binary translation device based on execution tree depth according to the third embodiment of the present invention, such as image 3 As shown, the translation device includes an initialization module 10 , a translation module 20 , a first acquisition module 30 , a second acquisition module 40 , a third acquisition module 50 and a judgment module 60 .

[0047] Among them, at the beginning of the translation, the initialization module 10 initializes the translation. Specifically, when the initialization module 10 starts to construct the super block, it initializes the depth of the execution tree to 0, and obtains a preset threshold of the depth of the execution tree. The basic block where the start address is located starts to translate.

[0048] First, the translation module 20 starts to translate the basic block where a certain start address in the binary program to be translated is located, and translates the basic blocks acquired by e...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a binary system translation method and device based on the execution tree depth. The method comprises the steps that when a super block begins to be constructed, the execution tree depth is initialized to be zero, a preset execution tree depth threshold value is obtained, translation is started from a basic block where a preset initial address is located, and in the translating process, if a current instruction of the translated basic block is a direct skip instruction, a basic block which the direct skip instruction enters is translated; if the current instruction of the translated basic block is a condition skip instruction, a basic block after the condition skip instruction skips and the next basic block of the condition skip instruction are translated, and one is added into the execution tree depth; if the current instruction of the translated basic block is a function call instruction, functions corresponding to the function call instruction are translated, one is added into the execution tree depth, when the execution tree depth reaches the execution tree depth threshold value, translation is finished, and all the translated basic blocks form the super block. The method and the device can promote the performance of an execution translation program.

Description

technical field [0001] The present invention relates to the field of computer technology, in particular to a binary translation method and device based on execution tree depth. Background technique [0002] Binary translation refers to the method of translating a binary program of a source processor into a machine language on another target processor, so that the translated program can be executed on the target processor. In the binary translation method, multiple basic blocks are constructed as a super block, wherein a basic block refers to a section of instructions with only a single entry and a single exit, and a super block refers to a collection of multiple basic blocks. [0003] The existing method is to form a super block with a plurality of basic blocks that have been executed on the source processor and then translate the super block. Therefore, the existing translation method does not translate the basic blocks that are not executed on the source processor into th...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/455G06F9/32
Inventor 康烁
Owner 浙江迪捷软件科技有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products