Adding signed 8/16/32-bit integers to 64-bit integers
AssigneeAdvanced Micro Devices, Inc.
InventorThomas M. Deneau
Life of this patent
Estimating the term…
Loading patent…
AssigneeAdvanced Micro Devices, Inc.
InventorThomas M. Deneau
Estimating the term…
Disclosed are methods, apparatus, and computer-readable media for generating output computer code that adds a 64-bit integer to a smaller-length integer having a length of less than 64 bits. Input computer code includes a loop that includes adding a 64-bit integer and a smaller-length integer. Output code is generated that represents the input code in a format such as assembly language or machine code. The output code includes instructions to convert the smaller-length integer to a 64-bit integer, such that the conversion is not performed during each loop execution. The smaller-length integer is converted by subtracting an offset from the 64-bit integer, adding the offset to the smaller-length integer, and zero-extending the smaller-length integer. The offset is determined based on the length of the smaller-length integer. The output code preserves the integer semantics of the smaller-length integer as required by the input code.
A method for generating output computer code that includes instructions for adding a first integer of N bits to a second integer of M bits, wherein the second integer is a signed integer and wherein N is greater than M, the method comprising:
An apparatus for generating output computer code that includes instructions for adding a first integer of N bits to a second integer of M bits, wherein the second integer is a signed integer and wherein N is greater than M, the apparatus comprising:
A non-transitory computer-readable medium storing a set of instructions for execution by a processor, the set of instructions comprising:
Dependencies are inferred from the claim text.