# US 2014/0208077 A1 · Vector floating point test data class immediate instruction

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

- Number: US 2014/0208077 A1
- Document ID: US20140208077A1
- Status: Published application
- Kind: A1
- Application number: 13/748,477
- Filed: 2013-01-23
- Published: 2014-07-24
- Earliest claimed: 2013-01-23
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Jonathan D. Bradbury; Eric M. Schwarz
- Web page: https://patentgrep.com/patent/US20140208077A1

## CPC

- G06F 9/3001: {Arithmetic instructions}
- G06F 9/30018: {Bit or string instructions}
- G06F 9/30021: {Compare instructions, e.g. Greater-Than, Equal-To, MINMAX}
- G06F 9/30032: {Movement instructions, e.g. MOVE, SHIFT, ROTATE, SHUFFLE}
- 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/30145: {Instruction analysis, e.g. decoding, instruction word fields}
- G06F 9/30167: {of immediate specifier, e.g. constants}
- G06F 9/30185: {according to one or more bits in the instruction, e.g. prefix, sub-opcode}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A Vector Floating Point Test Data Class Immediate instruction is provided that determines whether one or more elements of a vector specified in the instruction are of one or more selected classes and signs. If a vector element is of a selected class and sign, an element in an operand of the instruction corresponding to the vector element is set to a first defined value, and if the vector element is not of the selected class and sign, the operand element corresponding to the vector element is set to a second defined value.

## Claims

### Claim 1

A computer program product for executing a machine instruction in a central processing unit, the computer program product comprising:
a computer readable storage medium readable by a processing circuit and storing instructions for execution by the processing circuit for performing a method comprising:
obtaining, by a processor, a machine instruction for execution, the machine instruction being defined for computer execution according to a computer architecture, the machine instruction comprising:
at least one opcode field to provide an opcode, the opcode identifying a Vector Floating Point Test Data Class Immediate operation;
a first register field to be used to designate a first register, the first register comprising a first operand; and
a second register field to be used to designate a second register, the second register comprising a second operand; and
executing the machine instruction, the executing comprising:
determining properties of a chosen element of the second operand;
selecting from an input to the machine instruction a selected data unit representing the properties of the chosen element, the input including one or more data units to represent one or more properties;
checking whether the selected data unit is set to a particular value; and
based on the checking, setting an element in the first operand that corresponds to the chosen element of the second operand, the setting based on whether the selected data unit is set to the particular value.

### Claim 2 (depends on 1)

The computer program product of claim 1, wherein the second operand comprises a plurality of elements, wherein the determining comprises determining properties for each element of the plurality of elements, and wherein the setting comprises setting each element in the first operand corresponding to each element in the second operand based on whether the selected data unit is set to the particular value.

### Claim 3 (depends on 1)

The computer program product of claim 1, wherein the setting comprises setting the element in the first operand to ones based on the checking indicating the selected data unit is set to the particular value, and setting the element in the first operand to zero based on the checking indicating the selected data unit is not set to the particular value.

### Claim 4 (depends on 1)

The computer program product of claim 1, wherein the properties comprise a class and a sign.

### Claim 5 (depends on 1)

The computer program product of claim 1, wherein the input comprises a plurality of data units, each data unit of the plurality of data units representing a class and a sign.

### Claim 6 (depends on 5)

The computer program product of claim 5, wherein the plurality of data units comprises a plurality of bits, and wherein each bit represents one element class of a plurality of element classes, the plurality of element classes comprising zero, normal number, subnormal number, infinity, quiet not-a-number, signaling not-a-number, and each bit represents a sign of positive or negative.

### Claim 7 (depends on 1)

The computer program product of claim 1, wherein the machine instruction further comprises a field including the input.

### Claim 8 (depends on 1)

The computer program product of claim 1, wherein the machine instruction further comprises an extension field to be used in designating one or more registers, and wherein the first register field is combined with a first portion of the extension field to designate the first register and the second register field is combined with a second portion of the extension field to designate the second register.

### Claim 9 (depends on 1)

The computer program product of claim 1, wherein the machine instruction further comprises a mask field, the mask field to indicate whether one or more elements of the second operand are to be included in the determining.

### Claim 10 (depends on 1)

The computer program product of claim 1, wherein the machine instruction further comprises another mask field, the another mask field to indicate a size of a floating point number in an element of the second operand.

### Claim 11 (depends on 1)

The computer program product of claim 1, wherein the executing further comprises setting a condition code for the machine instruction, the condition code to summarize the setting of the elements of the first operand.

### Claim 12

A computer system for executing a machine instruction in a central processing unit, the computer system comprising:
a memory; and
a processor in communications with the memory, wherein the computer system is configured to perform a method, said method comprising:
obtaining, by a processor, a machine instruction for execution, the machine instruction being defined for computer execution according to a computer architecture, the machine instruction comprising:
at least one opcode field to provide an opcode, the opcode identifying a Vector Floating Point Test Data Class Immediate operation;
a first register field to be used to designate a first register, the first register comprising a first operand; and
a second register field to be used to designate a second register, the second register comprising a second operand; and
executing the machine instruction, the executing comprising:
determining properties of a chosen element of the second operand;
selecting from an input to the machine instruction a selected data unit representing the properties of the chosen element, the input including one or more data units to represent one or more properties;
checking whether the selected data unit is set to a particular value; and
based on the checking, setting an element in the first operand that corresponds to the chosen element of the second operand, the setting based on whether the selected data unit is set to the particular value.

### Claim 13 (depends on 12)

The computer system of claim 12, wherein the second operand comprises a plurality of elements, wherein the determining comprises determining properties for each element of the plurality of elements, and wherein the setting comprises setting each element in the first operand corresponding to each element in the second operand based on whether the selected data unit is set to the particular value.

### Claim 14 (depends on 12)

The computer system of claim 12, wherein the setting comprises setting the element in the first operand to ones based on the checking indicating the selected data unit is set to the particular value, and setting the element in the first operand to zero based on the checking indicating the selected data unit is not set to the particular value.

### Claim 15 (depends on 12)

The computer system of claim 12, wherein the input comprises a plurality of data units, each data unit of the plurality of data units representing a class and a sign.

### Claim 16 (depends on 12)

The computer system of claim 12, wherein the machine instruction further comprises a field including the input.

### Claim 17 (depends on 12)

The computer system of claim 12, wherein the machine instruction further comprises an extension field to be used in designating one or more registers, and wherein the first register field is combined with a first portion of the extension field to designate the first register and the second register field is combined with a second portion of the extension field to designate the second register, and wherein the machine instruction further comprises a mask field, the mask field to indicate whether one or more elements of the second operand are to be included in the determining, and wherein the machine instruction further comprises another mask field, the another mask field to indicate a size of a floating point number in an element of the second operand.

### Claim 18

A method of executing a machine instruction in a central processing unit, the method comprising:
obtaining, by a processor, a machine instruction for execution, the machine instruction being defined for computer execution according to a computer architecture, the machine instruction comprising:
at least one opcode field to provide an opcode, the opcode identifying a Vector Floating Point Test Data Class Immediate operation;
a first register field to be used to designate a first register, the first register comprising a first operand; and
a second register field to be used to designate a second register, the second register comprising a second operand; and
executing the machine instruction, the executing comprising:
determining properties of a chosen element of the second operand;
selecting from an input to the machine instruction a selected data unit representing the properties of the chosen element, the input including one or more data units to represent one or more properties;
checking whether the selected data unit is set to a particular value; and
based on the checking, setting an element in the first operand that corresponds to the chosen element of the second operand, the setting based on whether the selected data unit is set to the particular value.

### Claim 19 (depends on 18)

The method of claim 18, wherein the setting comprises setting the element in the first operand to ones based on the checking indicating the selected data unit is set to the particular value, and setting the element in the first operand to zero based on the checking indicating the selected data unit is not set to the particular value.

### Claim 20 (depends on 18)

The method of claim 18, wherein the machine instruction further comprises an extension field to be used in designating one or more registers, and wherein the first register field is combined with a first portion of the extension field to designate the first register and the second register field is combined with a second portion of the extension field to designate the second register, and wherein the machine instruction further comprises a mask field, the mask field to indicate whether one or more elements of the second operand are to be included in the determining, and wherein the machine instruction further comprises another mask field, the another mask field to indicate a size of a floating point number in an element of the second operand.
