Claims
- 1. A method comprising:
receiving a shift count of M; shifting a first operand having a first set of L data elements left by ‘L−M’ data elements; shifting a second operand having a second set of L data elements right by M data elements; merging said shifted first set with said shifted second set to generate a resultant having L data elements.
- 2. The method of claim 1 wherein said shifting of said first operand generates said shifted first set comprising M data elements aligned with a left edge of said first operand.
- 3. The method of claim 2 wherein said left shifting removes said ‘L−M’ data elements from said first operand and wherein zeroes are inserted at a right edge of said first operand to replace space vacated by said ‘L−M’ data elements that are shifted out.
- 4. The method of claim 3 wherein said shifting of said second operand generates said shifted second set comprising of ‘L−M’ data elements aligned with a right edge of said second operand.
- 5. The method of claim 4 wherein said right shifting removes said M data elements from said second operand and wherein zeroes are inserted at a left edge of said second operand to replace space vacated by said shifted out M data elements.
- 6. The method of claim 5 wherein said merging comprises performing a logical OR operation on said shifted first set and said shifted second set.
- 7. The method of claim 6 wherein said resultant is comprised of said M data elements from said shifted first set and said ‘L−M’ data elements from said shifted second set, and wherein said M data elements from shifted first set do not overlap with said ‘L−M’ data elements from said shifted second set.
- 8. The method of claim 7 wherein said first operand, said second operand, and said resultant are packed data operands.
- 9. The method of claim 8 wherein each data element is a byte of data.
- 10. The method of claim 9 wherein L is equal to 8.
- 11. The method of claim 10 wherein M is a value ranging from 0 to 15.
- 12. The method of claim 9 wherein L is equal to 16.
- 13. The method of claim 12 wherein M is a number ranging from 0 to 31.
- 14. A method comprising:
receiving shift right merge instruction, a count, a first data operand including a first set of data elements, and a second data operand including a second set of data elements; shifting said first set of data elements left until a number of data elements that remain in said first data operand is equal to said count; shifting said second set of data elements right to remove a number equal to said count of data elements from said second data operand; and merging together said shifted first set of data elements with said shifted second set of data elements to obtain a resultant including data elements from both said first data operand and said second data operand.
- 15. The method of claim 14 wherein said shifting left of said first set of data elements comprises removing data elements from a left edge of said first data operand and inserting zeroes at a right edge of said first data operand to fill locations vacated by said removed data elements.
- 16. The method of claim 15 wherein said shifting right of said second set of data elements comprises removing data elements from a right edge of said second data operand and inserting zeroes at a left edge of said second operand to fill locations vacated by said removed data elements.
- 17. The method of claim 16 wherein said merging comprises a logical OR-ing together of said shifted first set of data elements and said shifted second set of data elements.
- 18. The method of claim 17 wherein said first operand and said second operand are loaded with data from adjacent memory locations of a contiguous data block, and wherein said first set of data elements and said second set of data elements are not overlapping.
- 19. A method comprising:
receiving a shift merge instruction and a shift count of M; concatenating a first operand having a first set of L data elements with a second operand having a second set of L data elements to form a 2L long block of data elements; shifting said block right by M positions, wherein rightmost M data elements are dropped; and outputting rightmost L data elements from said shifted block as resultant for said shift merge instruction.
- 20. The method of claim 19 wherein said right shifting further comprises inserting zeroes at a leftmost edge of said block to fill space vacated by said M data elements.
- 21. The method of claim 20 wherein said first operand and said second operand are packed data operands.
- 22. The method of claim 21 wherein each data element comprises a byte of data.
- 23. The method of claim 22 wherein L is equal to 8.
- 24. The method of claim 23 wherein M is a value ranging from 0 to 15.
- 25. The method of claim 24 wherein said block is held in a temporary packed data register having room available for 2L data elements.
- 26. An apparatus comprising:
a decoder to decode a shift right merge instruction; a scheduler to dispatch said instruction for execution with a first operand comprised of a first set of L data elements, a second operand comprised of a second set of L data elements, and a shift count of M; and an execution unit to execute said instruction, said instruction to cause said execution unit to:
shift said first operand left by ‘L−M’ data elements; shift said second operand right by M data elements; merge said shifted first operand with said shifted second operand to generate a resultant having L data elements.
- 27. The apparatus of claim 26 wherein said shift right merge instruction is comprised of one micro-instruction (uop).
- 28. The apparatus of claim 27 wherein said shift left of said first operand generates a shifted first set of data comprised of M data elements aligned with a leftmost edge of said first operand.
- 29. The apparatus of claim 28 wherein said shift left removes ‘L−M’ data elements from said first operand and wherein zeroes are inserted at a right edge of said first operand to replace space vacated by said shifted out ‘L−M’ data elements.
- 30. The apparatus of claim 29 wherein said shift right of said second operand generates said shifted second set comprising of ‘L−M’ data elements aligned with a right edge of said second operand.
- 31. The apparatus of claim 30 wherein said shift right removes said M data elements from said second operand and wherein zeroes are inserted at a left edge of said second operand to replace space vacated by said shifted out M data elements.
- 32. The apparatus of claim 31 wherein said first operand, said second operand, and said resultant are packed data registers.
- 33. The apparatus of claim 32 wherein each data element is a byte of data.
- 34. The apparatus of claim 33 wherein L is equal to 8.
- 35. The apparatus of claim 34 wherein M is a value ranging from 0 to 15.
- 36. The apparatus of claim 35 wherein said apparatus comprises a 64 bit architecture.
- 37. The apparatus of claim 33 wherein L is equal to 16, M is a value ranging from 0 to 31, and said apparatus comprises a 128 bit architecture.
- 38. A system comprising:
a memory to store data and instructions; a processor coupled to said memory on a bus, said processor operable to perform a shift right merge operation, said processor comprising:
a bus unit to receive an instruction from said memory; a decoder to decode an instruction to perform a shift right merge of shift count M on a first operand having a first set of K data elements and a second operand having a second set of L data elements; a scheduler to dispatch said decoded instruction for execution; and an execution unit to execute said decoded instruction, said decoded instruction to cause said execution unit to:
shift said first operand left by ‘K−M’ data elements; shift said second operand right by M data elements; merge said shifted first operand with said shifted second operand to generate a resultant having K data elements.
- 39. The system of claim 38 wherein K is equal to L, and K and L are both 8.
- 40. The system of claim 38 wherein:
said shift left removes ‘K−M’ data elements from said first operand and wherein zeroes are inserted at a right edge of said first operand to replace space vacated by said shifted out ‘K−M’ data elements; and said shift right removes said M data elements from said second operand and wherein zeroes are inserted at a left edge of said second operand to replace space vacated by said shifted out M data elements.
- 41. The system of claim 38 wherein each data element comprises a byte of data, and said first operand and said second operands are packed data operands.
- 42. A machine readable medium having embodied thereon a computer program, said computer program being executable by a machine to perform a method comprising:
receiving a shift count of M; shifting a first operand having a first set of L data elements left by ‘L−M’ data elements; shifting a second operand having a second set of L data elements right by M data elements; merging said shifted first set with said shifted second set to generate a resultant having L data elements.
- 43. The machine readable medium of claim 42 wherein:
said left shifting removes said ‘L−M’ data elements from said first operand and wherein zeroes are inserted at a right edge of said first operand to replace space vacated by said ‘L−M’ data elements that are shifted out; said right shifting removes said M data elements from said second operand and wherein zeroes are inserted at a left edge of said second operand to replace space vacated by said shifted out M data elements; and said merging comprises performing a logical OR operation on said shifted first set and said shifted second set.
- 44. The method of claim 43 wherein said first operand, said second operand, and said resultant are packed data operands.
Parent Case Info
[0001] This patent application is a Continuation In Part of U.S. patent application Ser. No. 09/952,891, entitled “An Apparatus And Method For Efficient Filtering And Convolution Of Content Data”, filed Oct. 29, 2001.
[0002] The patent application is related to co-pending U.S. patent application Ser. No. __/__,__, entitled “Fast Full Search Motion Estimation With SIMD Merge Instruction” filed on Oct. 25, 2002.
Continuation in Parts (1)
|
Number |
Date |
Country |
Parent |
09952891 |
Oct 2001 |
US |
Child |
10280511 |
Oct 2002 |
US |