# US 2012/0254588 A1 · Systems, apparatuses, and methods for blending two source operands into a single destination using a writemask

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2012/0254588 A1
- Document ID: US20120254588A1
- Status: Published application
- Kind: A1
- Application number: 13/078,864
- Filed: 2011-04-01
- Published: 2012-10-04
- Earliest claimed: 2011-04-01
- Inventors: Jesus Corbal San Adrian; Bret L. Toll; Robert C. Valentine; Jeffrey G. Wiedemeier; Sridhar Samudrala; Milind Baburao Girkar; Andrew Thomas Forsyth; Elmoustapha Ould-Ahmed-Vall; Dennis R. Bradford; Lisa K. Wu
- Web page: https://patentgrep.com/patent/US20120254588A1

## CPC

- G06F 9/30032: {Movement instructions, e.g. MOVE, SHIFT, ROTATE, SHUFFLE}
- G06F 9/30018: {Bit or string instructions}
- G06F 9/30036: {Instructions to perform operations on packed data, e.g. vector, tile or matrix operations}
- G06F 9/30038: {using a mask}
- G06F 9/30043: {LOAD or STORE instructions; Clear instruction}
- G06F 9/30192: {according to data descriptor, e.g. dynamic data typing}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Embodiments of systems, apparatuses, and methods for performing a blend instruction in a computer processor are described. In some embodiments, the execution of a blend instruction causes a data element-by-element selection of data elements of first and second source operands using the corresponding bit positions of a writemask as a selector between the first and second operands and storage of the selected data elements into the destination at the corresponding position in the destination.

## Claims

### Claim 1

A method of performing blend instruction in a computer processor, comprising:
fetching the blend instruction, wherein the blend instruction includes a writemask operand, a destination operand, a first source operand, and a second source operand;
decoding the fetched blend instruction;
executing the decoded blend instruction to perform a data element-by-element selection of data elements of the first and second source operands using the corresponding bit positions of the writemask as a selector between the first and second operands; and
storing the selected data elements into the destination at the corresponding position in the destination.

### Claim 2 (depends on 1)

The method of claim 1, wherein the writemask is a 16-bit register.

### Claim 3 (depends on 1)

The method of claim 1, wherein the writemask is a 16-bit register and only the eight least significant bit positions are used as a selector and the data elements are 64 bits in size.

### Claim 4 (depends on 1)

The method of claim 1, wherein the first source is a 512-bit register and the second source is memory.

### Claim 5 (depends on 4)

The method of claim 4, wherein data elements of the second source are upconverted from 16-bit to 32-bit.

### Claim 5 (depends on 1)

The method of claim 1, wherein the determining is done for each bit position of the writemask in parallel.

### Claim 6 (depends on 1)

The method of claim 1, wherein the first and second sources are 512-bit registers.

### Claim 6 (depends on 1)

The method of claim 1, wherein the first and second source operands are 512-bit registers.

### Claim 7 (depends on 1)

The method of claim 1, wherein the second source operand is a 512-bit memory location and the data elements from that memory location are loaded into a temporary 512-bit register prior to the concatenation of the sources.

### Claim 8 (depends on 1)

The method of claim 1, wherein the data elements are 32-bit.

### Claim 9

A method, comprising:
in response to an blend instruction that includes a first and second source operand, a destination operand, a writemask operand,
evaluating a value of the writemask at a first bit position,
determining if the value at the first bit position indicates that a corresponding first data element of the first source should be saved at a corresponding first data element position in the destination or if a corresponding first data element of the second source should be saved at the corresponding first data element position in the destination, and
storing the first data element indicated by the value at the first bit position into the first data element position in the destination.

### Claim 10 (depends on 9)

The method of claim 9, further comprising:
evaluating a value of the writemask at a second bit position,
determining if the value at the second bit position indicates that a corresponding second data element of the first source should be saved at a corresponding second data element position in the destination or if a corresponding second data element of the second source should be saved at the corresponding second data element position in the destination, and
storing the second data element indicated by the value at the second bit position into the second data element position in the destination.

### Claim 11 (depends on 10)

The method of claim 10, further comprising:
determining that all bit positions of the writemask have been evaluated indicating an end to the blend instruction.

### Claim 12 (depends on 9)

The method of claim 9, wherein the writemask is a 16-bit register.

### Claim 13 (depends on 9)

The method of claim 9, wherein the writemask is a 16-bit register and only the eight least significant bit positions are used as a selector and the data elements are 64 bits in size.

### Claim 14 (depends on 9)

The method of claim 9, wherein the first source is a 512-bit register and the second source is memory.

### Claim 15 (depends on 14)

The method of claim 14, wherein data elements of the second source are upconverted from 16-bit to 32-bit.

### Claim 16 (depends on 9)

The method of claim 9, wherein the first and second sources are 512-bit registers.

### Claim 17 (depends on 9)

The method of claim 9, wherein the first and second source operands are 512-bit registers.

### Claim 18 (depends on 9)

The method of claim 9, wherein the second source operand is a 512-bit memory location and the data elements from that memory location are loaded into a temporary 512-bit register prior to the concatenation of the sources.

### Claim 19

An apparatus comprising;
a hardware decoder to decode an blend instruction, wherein the align instruction includes a writemask operand, a destination operand, a first source operand, and a second source operand;
execution logic to perform a data element-by-element selection of the data elements of the first and second source operands using the corresponding bit positions of the writemask as a selector between the first and second operands and store the selected data elements into the destination at the corresponding position in the destination.

### Claim 20 (depends on 19)

The apparatus of claim 19, further comprising:
a 16-bit writemask register to store the writemask; and
at least two 512-bit registers to store the data elements of the first and second sources.
