发明名称 Vector find element not equal instruction
摘要 Processing of character data is facilitated. A Find Element Not Equal instruction is provided that compares data of multiple vectors for inequality and provides an indication of inequality, if inequality exists. An index associated with the unequal element is stored in a target vector register. Further, the same instruction, the Find Element Not Equal instruction, also searches a selected vector for null elements, also referred to as zero elements. A result of the instruction is dependent on whether the null search is provided, or just the compare.
申请公布号 US9588762(B2) 申请公布日期 2017.03.07
申请号 US201213421442 申请日期 2012.03.15
申请人 INTERNATIONAL BUSINESS MACHINES CORPORATION 发明人 Bradbury Jonathan D.;Gschwind Michael K.;Schwarz Eric M.;Slegel Timothy J.
分类号 G06F9/30;G06F9/455 主分类号 G06F9/30
代理机构 Heslin Rothenberg Farley & Mesiti PC 代理人 Kinnaman, Esq. William A.;Hulihan, Esq. Matthew M.;Heslin Rothenberg Farley & Mesiti PC
主权项 1. A computer program product for executing a machine instruction in a central processing unit, the computer program product comprising: a non-transitory 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 Find Element Not Equal operation;an extension field to be used in designating one or more registers;a first register field to designate a first register, the first register comprising a first operand;a second register field to designate a second register, the second register comprising a second operand;a third register field to designate a third register, the third register comprising a third operand; anda mask field, the mask field comprising one or more controls to be used during execution of the machine instruction; andexecuting the machine instruction, the execution comprising: identifying the first register based on a combination of the first register field and a first portion of the extension field, identifying the second register based on a combination of the second register field and a second portion of the extension field, and identifying the third register based on a combination of the third register field and a third portion of the extension field;searching the second operand for a zero element, wherein the searching the second operand for a zero element finds a zero element at a first byte position and the searching provides a null index set to a value that is a byte position of a sequentially-first zero element found in the search;comparing one or more elements of the second operand with one or more elements of the third operand for inequality, wherein the comparing finds an unequal element at a second byte position and the comparing provides a compare index separate from the null index, the compare index being set to a value that is a byte position of a sequentially-first unequal element; andselecting between the null index and the compare index to provide a result of executing the machine instruction, the result being the null index or the compare index and being a value of a byte position of a sequentially-first zero or unequal element or a value indicating a size of the second operand, and the selecting being based on whether an unequal element or zero element is found, wherein the selecting selects the lesser of the first byte position and the second byte position.
地址 Armonk NY US
您可能感兴趣的专利