Binary Transformation for Executable Code Address Simplification

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The inefficiencies in converting source code to executable code result in unnecessary instructions due to compilers assuming larger address sizes, leading to increased program size and reduced execution speed, particularly in RISC processors where constant values require multiple instructions to load.

Innovation Solution

A method and system for optimizing executable code by identifying and transforming address-loading instructions to reduce the number of instructions required, using binary transformation to load addresses in fewer instructions than originally generated by the compiler, thereby simplifying address handling.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If the compiler assumes a larger address size (64 bits) to ensure compatibility, then the code can handle maximum address requirements, but unnecessary instructions are generated increasing program size

Engineering Contradiction:
Improveaddress size compatibilityVSAvoidprogram size
Core Design Contradiction:
Adaptability or versatilityVSQuantity of substance

Solution Approach 1:

The system changes the parameter of address size assumption from fixed 64-bit to dynamic detection. By detecting the actual address size needed and adjusting the instruction generation accordingly, the system eliminates unnecessary instructions while maintaining compatibility with different address space requirements.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The compiler generates instructions based on the actual address size required rather than assuming the maximum possible size. This partial action approach generates only the necessary instructions for the specific address range needed, avoiding the excessive action of generating full 64-bit instructions when smaller addresses are sufficient.

Inventive Principle:
Principle #16Partial or excessive action

2Adaptability or versatility

If the compiler generates code assuming a larger address size, then maximum address requirements are met, but execution speed is reduced due to additional unnecessary instructions

Engineering Contradiction:
Improveaddress space coverageVSAvoidexecution speed
Core Design Contradiction:
Adaptability or versatilityVSSpeed

Solution Approach 1:

The system dynamically adjusts the address size parameter based on actual requirements rather than using a fixed conservative estimate. This enables the code to execute faster by avoiding unnecessary instructions while still covering the required address space when needed.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The system applies partial action by generating only the necessary instructions for the actual address size required, rather than always generating full 64-bit instructions. This reduces the instruction count and improves execution speed while maintaining the ability to handle maximum address requirements when necessary.

Inventive Principle:
Principle #16Partial or excessive action

3Speed

If a 32 bit instruction format is used with limited data bits, then loading constants is faster by avoiding memory loads, but larger numbers require multiple instructions

Engineering Contradiction:
Improveconstant loading speedVSAvoidinstruction count for large numbers
Core Design Contradiction:
SpeedVSDevice complexity

Solution Approach 1:

The system segments large address values into multiple parts and loads them separately using multiple instructions when necessary. This segmentation approach allows the 32-bit instruction format to handle large numbers by combining multiple smaller constant loads, maintaining speed for small constants while accommodating large addresses when needed.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS7676799B1Address simplification by binary transformation
Publication Date: 2010.03.09 ORACLE AMERICAN INC
  • US7676799B1 patent drawing
  • US7676799B1 patent drawing
  • US7676799B1 patent drawing

AI summary

A method for optimizing executable code includes identifying a plurality of instructions in the executable code matching a predetermined instruction pattern, assessing whether the binary number conforms to a predetermined bit pattern, and transforming the plurality of instructions into transformed instructions when the binary number conforms to the bit pattern.