IP Library › Granted Patent US 9,804,850
Granted Patent B2
US 9,804,850 · App. 15/188,817 · Granted Oct 31, 2017

Methods, apparatus, instructions and logic to provide permute controls with leading zero count functionality

Inventors: Christopher J. Hughes (Santa Clara, CA); Mikhail Plotnikov (Nizhny Novgorod, RU); Andrey Naraikin (Nizhny Novgorod, RU); Robert Valentine (Qiryat Tivon, IL)
Assignee: Intel Corporation
G06F9/30145G06F9/30018G06F9/30032G06F9/30036G06F9/3834
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,804,850
App. No.
15/188,817
Granted
Oct 31, 2017
Kind
B2
Abstract

Instructions and logic provide SIMD permute controls with leading zero count functionality. Some embodiments include processors with a register with a plurality of data fields, each of the data fields to store a second plurality of bits. A destination register has corresponding data fields, each of these data fields to store a count of the number of most significant contiguous bits set to zero for corresponding data fields. Responsive to decoding a vector leading zero count instruction, execution units count the number of most significant contiguous bits set to zero for each of data fields in the register, and store the counts in corresponding data fields of the first destination register. Vector leading zero count instructions can be used to generate permute controls and completion masks to be used along with the set of permute controls, to resolve dependencies in gather-modify-scatter SIMD operations.

Claims (33)

1. A processor comprising:

decode circuitry to decode a first instruction specifying a vector leading zero count operation; and

an execution circuit, responsive to a decoded first instruction, to:

read values of data fields in a first register;

for each data field of the data fields in the first register, count a number of most significant contiguous bits set to zero, and

store the count as a value in a corresponding data field in a first destination register, wherein the first instruction is a vector leading zero count instruction used at least in part, to generate a set of permute controls in the second destination register, and a completion mask in the third destination register to be used with the set of permute controls.

2. The processor of claim 1 , wherein the first register comprises a first plurality of data fields, wherein each of the first plurality of data fields in the first register is to store a second plurality of bits and the first destination register comprising a third plurality of data fields corresponding to the first plurality of data fields, wherein each of the third plurality of data fields in the first destination register is to store a count of a number of most significant contiguous bits set to zero for a corresponding data field of the first plurality of data fields, the processor further comprising:

a second register comprising a fourth plurality of data fields corresponding to the third plurality of data fields, wherein each of the fourth plurality of data fields is to store a value of one less than a number of bits in the second plurality of bits

a second destination register comprising a fifth plurality of data fields corresponding to the third plurality of data fields;

said decode circuitry to decode a second instruction; and

the execution circuit, responsive to the decoded second instruction, to:

subtract the value of each of the data fields in the first destination register from a corresponding value of each of the data fields in the second register to generate a corresponding difference, and

store each of the corresponding differences as a value in a corresponding data field of the fifth plurality of data fields in the second destination register.

3. The processor of claim 2 , further comprising:

a third register comprising a sixth plurality of data fields corresponding to the fifth plurality of data fields, wherein each of the sixth plurality of data fields is to store a copy of a specific value;

a third destination register comprising a seventh plurality of mask fields, a portion of the seventh plurality of mask fields corresponding to the fifth plurality of data fields;

said decode stage to decode a third instruction specifying a vector comparison operation; and

the one or more execution units, responsive to the decoded second instruction, to:

compare the value of each of the data fields in the second destination register with a corresponding value of each of the data fields in the third register to generate a corresponding mask value, and

store each of the corresponding mask values in a corresponding mask field of the seventh plurality of mask fields in the third destination register.

4. The processor of claim 3 , wherein the specific value is a value of negative one.

5. The processor of claim 4 , wherein the vector comparison operation is a vector equality comparison operation.

6. The processor of claim 4 , wherein the vector comparison operation is a vector greater-than comparison operation.

7. The processor of claim 1 , wherein the value of one less than a number of bits in the second plurality of bits is thirty-one.

8. The processor of claim 1 , wherein the value of one less than a number of bits in the second plurality of bits is sixty-three.

9. A method comprising:

decoding a first instruction;

executing the decoded first instruction to, for each data field a first source register, counting a number of most significant contiguous bits set to zero and storing the count as a value in a corresponding data field in a first destination register, wherein the first instruction is a vector leading zero count instruction used at least in part, to generate a set of permute controls in the second vector destination register, and a completion mask in the mask destination register to be used with the set of permute controls.

10. The method of claim 9 , further comprising:

executing a second instruction to subtract the value of each of the data fields in the first destination register from a corresponding value of each of the data fields in a second source register to generate a corresponding difference, and store each of the corresponding differences as a value in a corresponding data field f a second destination register.

11. The method of claim 10 , further comprising:

executing a third instruction to compare the value of each of the data fields in the second destination register with a corresponding value of each of the data fields in the third source register to generate a corresponding mask value, and store each of the corresponding mask values in a corresponding mask field of a mask destination register.

12. The method of claim 11 , wherein the specific value is a value of negative one.

Continuity (2)
Continuation 13731008 · Dec 29, 2012
Related Publication 20160299763A1 · Oct 13, 2016