Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Processing method for calling and returning function, and binary translation method and system

A technology of function calling and processing methods, applied in the field of binary translation, which can solve the problems of lower hit rate, lower program operation efficiency, lower binary translation performance, etc., and achieve the effect of solving hash conflicts, easy implementation, and cost saving

Inactive Publication Date: 2013-04-24
JIANGNAN INST OF COMPUTING TECH
View PDF1 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Hash table is an efficient and fast data structure. Although the above method improves the slow problem of traditional mapping method, there will inevitably be troubles of hash collision when using hash table. In this case, we can only skip to The backup return address recovery module handles it. If there are many hash collisions, the hit rate will decrease, the performance of binary translation will decrease, and the operating efficiency of the program will also decrease accordingly.

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
  • Processing method for calling and returning function, and binary translation method and system
  • Processing method for calling and returning function, and binary translation method and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0059] The embodiment of the present invention saves the address of the false instruction in the stack at the beginning of the function call, and obtains the return address (ie the value of the address of the false instruction) by the address taken out from the top of the stack when the function returns. The specific implementation of the present invention will be described in detail below in conjunction with the accompanying drawings and embodiments.

[0060] The binary translation method of the embodiment of the present invention is used to translate the function call and return program of the source program into the function call and return program of the target program, and the binary translation method includes:

[0061] Translate the function call instruction of the source program into the function call instruction of the corresponding target program;

[0062] Inserting the return address of the function call of the source program as a false instruction after the functio...

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 processing method for function call and return and a method and a system for binary translation. The processing method comprises: taking a return address of function call of a source program as a dummy order and storing the dummy order behind a function call order of an object program; storing an address of the dummy order in a stack at the beginning of the function callof the object program; taking out an address stored in the top of the stack when the function call of the object program is finished; and skipping behind the dummy order when the value of the addresstaken out from the stack top is equal to the return address of function call of the source program. The processing method can realize quick return after the function call and can avoid the problem oflow efficiency caused by Hash collision, thereby reducing the overhead of return-type indirect branch and improving performance of binary translation.

Description

technical field [0001] The invention relates to binary translation, in particular to a method for processing function calls and returns, a binary translation method and a system. Background technique [0002] Binary translation is the process of translating an executable program on one (source) machine into an executable program on another (target) machine. The binary translation system enables a large number of existing applications to be directly utilized by the new platform. . Such as figure 1 As shown, the executable program 111 of the source machine 11 (hereinafter referred to as the source program) is converted into the executable program 122 of the target machine (hereinafter referred to as the target program) by the binary translation system 121 on the target machine 12 . [0003] Function calls and returns are very common in programs. Although different high-level languages ​​call functions in different forms, they are similar in essence and follow the principle o...

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 Patents(China)
IPC IPC(8): G06F9/45
Inventor 唐大国王丽一漆锋滨文延华卿鹏孙俊
Owner JIANGNAN INST OF COMPUTING TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products