Binary Code Translation Circuit Direct Function Execution

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Dynamic binary-code translation processes are inefficient due to indirect branches caused by function returning, leading to reduced processing speed and system efficiency in cross-platform virtualization.

Innovation Solution

A binary-code translation device and method that translates a second program code to a first program code, allowing the processor to directly execute a second function without returning to the program execution address, by utilizing a translation circuit and memory to store function libraries and acquire function addresses dynamically during execution.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If dynamic binary-code translation is used for cross-platform virtualization, then platform compatibility is improved, but processing speed deteriorates due to indirect branches caused by function returning

Engineering Contradiction:
Improveplatform compatibilityVSAvoidprocessing speed
Core Design Contradiction:
Adaptability or versatilityVSSpeed

Solution Approach 1:

The patent applies preliminary action by pre-translating the second program code to generate the first program code before execution. The translation circuit translates the source program code into target program code in advance, storing function addresses and preparing translation results ahead of time. This eliminates the need for indirect branching during runtime, as the processor can directly execute the pre-translated code with known function addresses, thus resolving the speed penalty associated with dynamic translation.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces an intermediary mechanism - a translation circuit that acts as a mediator between the source program code and the processor. This translation circuit generates a intermediate first program code that bridges the compatibility gap between different platforms while eliminating indirect branches. The intermediary translation layer prepares direct function calls with resolved addresses, allowing the processor to execute without the speed-reducing indirect branching operations.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If function addresses are resolved dynamically during execution, then code reusability is improved, but system efficiency deteriorates due to redundant memory accesses and indirect branches

Engineering Contradiction:
Improvecode reusabilityVSAvoidsystem efficiency
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The patent applies preliminary action by pre-resolving function addresses during the translation phase rather than during execution. The translation circuit analyzes the source program code, identifies function calls, and resolves their addresses in advance, storing them in the first program code. This eliminates redundant memory accesses during runtime, as function addresses are already resolved and stored, allowing direct execution without repeated lookups or indirect branching.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent extracts the address resolution process from the execution phase and separates it into the translation phase. By taking out the function address resolution from runtime execution and performing it preliminarily during code translation, the system eliminates redundant memory accesses during execution. The extracted address information is stored in the translated program code, enabling efficient direct execution while maintaining code reusability.

Inventive Principle:
Principle #2Taking out (Extraction)

3Adaptability or versatility

If indirect branching is used for function returning, then program flexibility is improved, but processing efficiency deteriorates

Engineering Contradiction:
Improveprogram flexibilityVSAvoidprocessing efficiency
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The patent applies preliminary action by pre-determining function return addresses during the translation phase. The translation circuit analyzes control flow and resolves all function return addresses before execution, storing them directly in the translated program code. This eliminates indirect branching during runtime, allowing the processor to execute direct jumps to known addresses, thus maintaining program flexibility while dramatically improving processing efficiency.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent applies dynamics by transitioning from static indirect branching to dynamic direct execution. While the source program maintains its flexible structure with function calls, the translation circuit dynamically analyzes and resolves addresses, then embeds direct jump instructions in the translated code. This dynamic translation process preserves program flexibility while eliminating the efficiency penalty of indirect branches during execution.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS10203942B2Binary-code translation device and method
Publication Date: 2019.02.12 NAT CHIAO TUNG UNIV
  • US10203942B2 patent drawing
  • US10203942B2 patent drawing
  • US10203942B2 patent drawing

AI summary

A binary-code translation device includes a translation circuit, a memory and a processor. The processor executes a first program code translated from a second code by the translation circuit. The first program code is temporarily stored in the memory and has a program execution address. At least one function library is temporarily stored in the memory and includes a first and a second function, which are located at a first and a second function address in the memory respectively. When the processor is still executing the first program code and calls the first function, the translation circuit translates the first program code to acquire the second function subsequent to the first function, and the processor acquires the second function address. When the first program code calls the first function and the first function is executed completely, the processor directly executes the second function without returning to the program execution address.