Method and apparatus for performing integer operations in response to a result of a floating point operation
First Claim
1. In a computer system, a method comprising:
- performing an operation on data stored in a packed floating point format;
extracting data from a result of the operation, the result stored in the packed floating point format, wherein the extracted data comprises one or more bits representing redundant data for each number represented in the packed floating point result;
transferring the one or more bits for each number of the packed floating point result a common integer register; and
determining whether a branching condition is met based on the bits stored in the integer register.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and apparatus for performing a move mask operation. The present invention provides a method and apparatus for performing operations on packed data values of a first size and format and conversion of the results to data of a second size and format by eliminating redundant data. The present invention is useful, for example, when comparisons are performed on floating point data that is typically larger (e.g., 64 bits) than integer data (e.g., 32 bits) and integer operations are preformed based on the result. Because many processors branch based on integer data, the comparison results stored as floating point data must be transferred to an integer register prior to branching. The present invention takes advantage of redundancy of the floating point comparison results to transfer enough data to convey the comparison result to integer registers with a single instruction.
86 Citations
16 Claims
-
1. In a computer system, a method comprising:
-
performing an operation on data stored in a packed floating point format;
extracting data from a result of the operation, the result stored in the packed floating point format, wherein the extracted data comprises one or more bits representing redundant data for each number represented in the packed floating point result;
transferring the one or more bits for each number of the packed floating point result a common integer register; and
determining whether a branching condition is met based on the bits stored in the integer register. - View Dependent Claims (2, 3, 4)
-
-
5. A circuit comprising:
-
a first set of registers to store data in a packed floating point format;
a first arithmetic unit coupled to the first set of registers to perform a compare operation on data stored in the first set of registers and to store a result as a packed floating point value in one of the first set of registers, the first arithmetic unit further to extract a set of bits from the result, where each bit in the set of bits represents redundant bits in each number represented by the packed floating point format;
a second set of registers to store data in an integer format;
a transfer circuit coupled between the first set of registers and the second set of registers, the transfer circuit to transfer the set of bits to one of the integer registers; and
a second arithmetic unit to cause branching operations to be performed based on the set of bits stored in the integer registers.
-
-
6. An apparatus comprising:
-
means for performing an operation on data stored in a packed floating point format;
means for extracting data from a result of the operation, the result stored in the packed floating point format, wherein the extracted data comprises one or more bits representing redundant data for each number represented in the packed floating point result;
means for transferring the one or more bits for each number of the packed floating point result a common integer register; and
means for determining whether a branching condition is met based on the bits stored in the integer register. - View Dependent Claims (7, 8, 9)
-
-
10. A graphics display system comprising:
-
a bus;
a display device coupled to the bus; and
a processor coupled to the display device, the processor having a plurality of registers to store packed floating point data and integer data, the processor further comprising circuitry to extract a set of one or more bits of data from one of the registers that stores floating point data and to transfer the extracted bits to an integer register to perform an integer operation, wherein the set of one or more bits comprises at least one bit corresponding to redundant data in each number represented by the packed floating point register, the processor further to cause the display device to change what is displayed in response to the integer operation. - View Dependent Claims (11, 12)
-
-
13. An article comprising a machine-readable medium having stored thereon sequences of instructions that, when executed, cause one or more processors to:
-
perform an operation on data stored in a packed floating point format;
extract data from a result of the operation, the result stored in the packed floating point format, wherein the extracted data comprises one or more bits representing redundant data for each number represented in the packed floating point result;
transfer the one or more bits for each number of the packed floating point result a common integer register; and
determine whether a branching condition is met based on the bits stored in the integer register. - View Dependent Claims (14, 15, 16)
-
Specification