Patent ID: 7694286

Claim:
An apparatus for detecting base-register usage conflicts in computer code, the apparatus comprising: a processor coupled to a memory, the memory comprising a parsing module configured to parse assembly source code, the assembly source code configured to operate on a High Level Assembler (HLSAM) assembler; an identification module configured to identify a first assembly source code statement and a second assembly source code statement, each assembly source code statement comprising an assembly programmer coded assembly directive referencing a base register for address resolution according to base-displacement form, the base-displacement form comprising an addressing methodology used by an assembler to compute base-displacement resolutions within object code by calculating displacements relative to an address stored in a base register; a determination module configured to determine whether a base register for the first assembly source code statement matches the base register for the second assembly source code statement, wherein the first assembly source code statement is an ordinary USING assembly source code statement and the second assembly source code statement is a labeled USING assembly source code statement, the ordinary USING assembly source code statement and labeled USING assembly source code statements tracked in a common base-register table; a notification module configured to notify an assembly programmer in response to the first assembly source code statement and second assembly source code statement referencing the same base register; and a rectification module configured to modify an assembly source code statement such that the assembly source code statement references another base register in response to an acknowledgement of a base register conflict by the assembly programmer which provides the another base register for use in one of the first assembly source code statement and second assembly source code statement.