Method and system for reducing program code size

In a method for reducing code size a replaceable subset of instructions at a first location within a set of instructions and a matching target subset of instructions at a second location within the set of instructions are identified. A base offset and a relative offset are determined. The base offse...

Full description

Saved in:
Bibliographic Details
Main Authors Wu, Youfeng, Breternitz, Jr, Mauricio
Format Patent
LanguageEnglish
Published 23.11.2010
Online AccessGet full text

Cover

Loading…
More Information
Summary:In a method for reducing code size a replaceable subset of instructions at a first location within a set of instructions and a matching target subset of instructions at a second location within the set of instructions are identified. A base offset and a relative offset are determined. The base offset and the relative offset indicate an absolute offset from the first location to the second location. An instruction to cause a base offset storage element to be loaded with the base offset is inserted prior to the first location. The replaceable subset of instructions is replaced with a second instruction to cause a program counter to be modified based on the relative offset and a value in the base offset register so that the modified program counter indicates the second location.