发明名称 Vector compare-and-exchange operation
摘要 A vector compare-and-exchange operation is performed by: decoding by a decoder in a processing device, a single instruction specifying a vector compare-and-exchange operation for a plurality of data elements between a first storage location, a second storage location, and a third storage location; issuing the single instruction for execution by an execution unit in the processing device; and responsive to the execution of the single instruction, comparing data elements from the first storage location to corresponding data elements in the second storage location; and responsive to determining a match exists, replacing the data elements from the first storage location with corresponding data elements from the third storage location.
申请公布号 US8996845(B2) 申请公布日期 2015.03.31
申请号 US200912644529 申请日期 2009.12.22
申请人 Intel Corporation 发明人 Rajwar Ravi;Forsyth Andrew T.
分类号 G06F15/00;G06F15/76;G06F9/30 主分类号 G06F15/00
代理机构 Vecchia Patent Agent, LLC 代理人 Vecchia Patent Agent, LLC
主权项 1. A method comprising: decoding by a decoder in a processing device, a single vector compare-and-exchange instruction that includes a first storage operand that references a first storage location, a second storage operand that references a second storage location, and a third storage operand that references third storage location, the single vector compare-and-exchange instruction to perform a read-modify-write operation for the first storage location, the second storage location, and the third storage location; issuing the single instruction for execution by an execution unit in the processing device; and responsive to the execution of the single instruction, performing the read-modify-write operation including: copying an initial value that is stored in the first storage location, into the second storage location;storing a replacement value in the third storage location, wherein the replacement value differs from the initial value;comparing a present value that is presently stored in the first storage location, to the initial value that is stored in the second storage location to determine whether the present value is the same as the initial value;replacing the present value in the first storage location with the replacement value responsive to determining that the present value is the same as the initial value; andleaving the present value in the first storage location responsive to determining that the present value differs from the initial value.
地址 Santa Clara CA US