Claims
- 1. A method comprising:
decoding a plurality of instructions including a multiply-add instruction of a variable length instruction format comprising a first and a second opcode field, an addressing mode field, a first source field to indicate a first operand, the first operand having a first plurality of byte data elements including at least A1, A2, A3, and A4 byte data elements, and a second source field to indicate a second operand having a second plurality of byte data elements including at least B1, B2, B3, and B4 byte data elements; determining a length of the multiply-add instruction from said first opcode field, said addressing mode field, and optionally from said first source field, said second source field and an optional base field; and responsive to said second opcode field, enabling an execution unit with the decoded multiply-add instruction to perform the operation (A1×B1)+(A2×B2) to generate a first 16-bit data element of a packed result data, and to perform the operation (A3×B3)+(A4×B4) to generate a second 16-bit data element of the packed result data.
- 2. The method of claim 1, said first plurality of byte data elements including at least 16 byte data elements and said second plurality of data elements including at least 16 byte data elements.
- 3. The method of claim 1, said first plurality of data elements further including at least A5, A6, A7, and A8 as byte data elements, and said second plurality of data elements further including at least B5, B6, B7, and B8 as data elements, the method further comprising:
responsive to said second opcode field, enabling an execution unit with the decoded multiply-add instruction to perform the operation (A5×B5)+(A6×B6) to generate a third 16-bit data element of the packed result data, and to perform the operation (A7×B7)+(A8×B8) to generate a fourth 16-bit data element of the packed result data.
- 4. The method of claim 1 wherein said first plurality of data elements are treated as unsigned bytes.
- 5. The method of claim 4 wherein said second plurality of data elements are treated as signed bytes.
- 6. The method of claim 5 wherein each of said first, second, third and fourth 16-bit data elements are generated using signed saturation.
- 7. An apparatus to perform the method of claim 6 comprising:
a packed multiply-adder circuit; at least one state machine; and a machine-accessible medium including data that, when accessed by said at least one state machine, causes said at least one state machine enable the packed multiply-adder circuit to perform the method of claim 6.
- 8. An apparatus to perform the method of claim 3 comprising:
an operation control unit; and a machine-accessible medium including data that, when accessed by said operation control unit responsive to said second opcode field, causes the execution unit to perform the method of claim 3.
- 9. The method of claim 3 wherein said first source field comprises bits five through three of the variable length instruction format.
- 10. The method of claim 9 wherein said second source field comprises bits two through zero of the instruction format.
- 11. The method of claim 10 wherein said first plurality of byte data elements is overwritten by said packed result data responsive to the multiply-add instruction.
- 12. The method of claim 1 wherein said decoding a plurality of instructions is performed concurrently.
- 13. The method of claim 12 wherein said first opcode field is set to a hexadecimal value of 0F38.
- 14. The method of claim 13 wherein said second opcode field is set to a hexadecimal value of 04.
- 15. An apparatus comprising:
a first input to receive a first packed data comprising at least four byte data elements a second input to receive a second packed data comprising at least four byte data elements; a decoder to decode a plurality of instructions including a first instruction comprising a first opcode field having a hexadecimal value of 0F38, a second opcode field having a hexadecimal value of 04, an addressing mode field, a first source field indicating a first location to access said first packed data, and a second source field indicating a second location to access said second packed data; a multiply-adder circuit, enabled by the decoded first instruction, to multiply each of a first pair of byte data elements of the first packed data with respective byte data elements of the second packed data and to generate a first 16-bit result representing a first sum of products of the first pair of multiplications, and to multiply each of a second pair of byte data elements of the first packed data with respective byte data elements of the second packed data and to generate a second 16-bit result representing a second sum of products of the second pair of multiplications; and an ouput to store a third packed data comprising at least said first and second 16-bit results in response to the first instruction.
- 16. The apparatus of claim 15 wherein said first and second packed data each contain at least eight byte data elements.
- 17. The apparatus of claim 15 wherein said first and second packed data each contain at least sixteen byte data elements.
- 18. The apparatus of claim 15 wherein the first packed data comprises unsigned byte data elements.
- 19. The apparatus of claim 15 wherein the second packed data comprises signed byte data elements.
- 20. The apparatus of claim 19 wherein the first packed data comprises unsigned byte data elements.
- 21. The apparatus of claim 20 wherein the first and second 16-bit results are generated using signed saturation.
- 22. The apparatus of claim 15 wherein the multiply-adder circuit comprises a first and a second 16×16 multiplier to perform the first and the second pair of multiplications respectively.
- 23. A computing system comprising:
an addressable memory to store data; a processor including:
a first storage area to store M packed unsigned byte data elements; a second storage area to store M packed signed byte data elements; a decoder to decode a first instruction comprising a first opcode field having a hexadecimal value of 0F38, a second opcode field having a hexadecimal value of 04, a first source field indicating said first storage area, and a second source field indicating said second storage area; an execution unit, responsive to the decoder decoding a first instruction, to produce M products of multiplication of the packed byte data elements stored in the first storage area by corresponding packed byte data elements stored in the second storage area, and to sum the M products of multiplication pairwise to produce M/2 results representing M/2 sums of products; and a third storage area to store M/2 packed 16-bit data elements, the third storage area corresponding to a destination specified by the first instruction to store the M/2 results; and a magnetic storage device to store said first instruction.
- 24. The computing system of claim 23 wherein M is 16.
- 25. The computing system of claim 23 wherein M is 8.
- 26. The computing system of claim 23 wherein each of said M/2 16-bit results are generated using signed saturation.
RELATED APPLICATIONS
[0001] This is a continuation-in-part application claiming, under 35 U.S.C. § 120, the benefit of the filing dates of U.S. application Ser. No. 09/952,891, filed Oct. 29, 2001, currently pending.
Continuation in Parts (1)
|
Number |
Date |
Country |
Parent |
09952891 |
Oct 2001 |
US |
Child |
10610831 |
Jun 2003 |
US |