Translation method in dynamic binary translation

The present invention relates to a method of dynamic binary translation translation, comprising the steps of: Find statistical code translation occurs frequently and affects the quality of the translation of the translated code segments; identify the mode of the instruction code fragments; determining translation instruction pattern correspondence relationship ; scanned basic block to be translated, to find the command mode, found, the matching is successful, to mark the command mode, otherwise, the matching is not successful, the end of the scan; basic block translation, the translation instruction is encountered marks by the instruction translation correspondence relationship translation mode, otherwise, according to a conventional translation. The present invention, by matching the translation mode of a basic block of instructions, to reduce the overhead caused by the optimization code duplication, and improve the quality of the translation effects, thereby improving the performance of dynamic binary translation.