Patent ID: 7203935

Claim:
A method for code compression of a program, the method comprising: a) separating code from data; b) introducing software transformations necessary to make address mappings between compressed and uncompressed space into the code; c) obtaining statistics about frequency of occurrence of instructions, wherein said statistics include frequency of occurrence of two consecutive instructions; d) parsing the program to identify occurrence of instructions or instruction pairs that appear in step c; e) replacing the identified instructions in step d with an address to a compressed bus-word table; f) generating an address mapping from uncompressed address to compressed addresses; wherein step b comprises loading offsets in memory and deriving the offsets using a load instruction; wherein prior to loading, a neg instruction is inserted that complements with a jump, register's value to make an invalid target address; and wherein during decompression, a decompression engine creates a valid address from the invalid target address using an offset.