IP Library › Granted Patent US 12,572,355
Granted Patent B2
US 12,572,355 · App. 17/514,523 · Granted Mar 10, 2026

Modular addition instruction

Inventors: Fabian Boemer (Santa Barbara, CA); Vinodh Gopal (Westborough, MA); Gelila Seifu (San Jose, CA); Sejun Kim (Hillsboro, OR); Jack Crawford (London, GB)
Assignee: Intel Corporation
G06F9/3001G06F9/30018G06F9/30036G06F9/30038G06F9/30098G06F9/30145G06F9/3851G06F9/3887G06F9/3888
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 12,572,355
App. No.
17/514,523
Granted
Mar 10, 2026
Kind
B2
Abstract

One embodiment provides a processor comprising first circuitry to decode an instruction into a decoded instruction, the instruction to indicate a first source operand, a second source operand and a third operand, and second circuitry including a processing resource to execute the decoded instruction. Responsive to the decoded instruction, the processing resource is to output a result of a modular addition operation based on a data element of first source operand data plus a data element of second source operand data modulo a data element of third operand data, provided that the data elements of the first operand data and second operand data are less than the data element of the third operand data.

Claims (34)

1 . A processor comprising:

first circuitry to decode an instruction into a decoded instruction, the instruction to indicate a first source operand, a second source operand, a third source operand, and a destination operand; and

second circuitry including a processing resource to execute the decoded instruction, wherein responsive to the decoded instruction, the processing resource is configured to:

compare a first integer data element of first source operand data and a second integer data element of second source operand data with a third integer data element of third source operand data;

set a bit in a bitmask in response to a determination that the first integer data element or the second integer data element is greater than or equal to the third integer data element, wherein the bit is to be set in a position of the bitmask that corresponds with a first parallel execution channel of multiple parallel execution channels;

add the first integer data element of the first source operand data to the second integer data element of the second source operand data to generate an intermediate value;

determine whether the intermediate value is greater than or equal to the third integer data element of the third source operand data;

output, to a location specified by the destination operand, a result of the intermediate value minus the third integer data element in response to a determination by the processing resource that the intermediate value is greater than or equal to the third integer data element; and

otherwise output the intermediate value to the location specified by the destination operand.

2 . The processor as in claim 1 , wherein the processing resource is configured to execute the decoded instruction via the multiple parallel execution channels and the first integer data element, the second integer data element, and the third integer data element are associated with the first parallel execution channel of the multiple parallel execution channels.

3 . The processor as in claim 1 , wherein the first source operand data and the second source operand data are of a packed data type including multiple integer data elements and each integer data element position within the multiple integer data elements is associated with a respective parallel execution channel of the multiple parallel execution channels.

4 . The processor as in claim 3 , wherein the third source operand data is of a packed data type including multiple integer data elements and each integer data element position within the multiple integer data elements is associated with a respective parallel execution channel of the multiple parallel execution channels.

5 . The processor as in claim 3 , wherein the third source operand data includes a single integer data element and the single integer data element is associated with each parallel execution channel of the multiple parallel execution channels.

6 . The processor as in claim 1 , further comprising a register file having a plurality of registers of differing widths, wherein the destination operand, the first source operand, the second source operand, and the third source operand each specify a register within the register file.

7 . The processor as in claim 6 , wherein the destination operand is to specify a 128-bit register, a 256-bit register, or a 512-bit register and the processing resource is to output the result to the destination operand in a packed data type including multiple integer data elements.

8 . The processor as in claim 1 , wherein the first source operand data and the second source operand data include multiple 32-bit integer data elements and the third source operand data includes at least one 32-bit integer data element.

9 . The processor as in claim 1 , wherein the first source operand data and the second source operand data include multiple 64-bit integer data elements and the third source operand data includes at least one 64-bit integer data element.

10 . An apparatus comprising:

decoder circuitry to decode an instruction into a decoded instruction, the instruction to include a field for an identifier of a first source operand, a field for an identifier of a second source operand, a field for an identifier of a third source operand, a field for an identifier of a destination operand, and a field for an opcode, the opcode to indicate to perform a modular addition operation on integer data elements associated with the first source operand, second source operand, and third source operand; and

execution circuitry to execute the decoded instruction according to the opcode, the execution circuitry including multiple parallel execution channels, wherein an execution channel of the multiple parallel execution channels includes:

first circuitry to output an integer intermediate value based on a sum of a first integer data element associated with first source operand data and a second integer data element associated with second source operand data;

second circuitry to output the integer intermediate value as a result in response to a determination that the integer intermediate value is less than a third integer data element associated with third source operand data and otherwise output the integer intermediate value minus the third integer data element as the result; and

third circuitry to write the result to the destination operand, wherein the first source operand data and the second source operand data are each of a packed data type including multiple integer data elements, wherein the execution circuitry is to perform the modular addition operation as a parallel operation on corresponding integer data elements of the first source operand data and the second source operand data, and wherein the third integer data element is to be used for the parallel operation on each of the integer data elements of the first source operand data.

11 . The apparatus as in claim 10 , wherein the field for the identifier of the first source operand, the field for the identifier of the second source operand, or the field for the identifier of the third source operand is to identify a vector register.

12 . The apparatus as in claim 10 , wherein the field for the identifier of the first source operand, the field for the identifier of the second source operand, or the field for the identifier of the third source operand is to identify a memory location.

13 . An apparatus comprising:

decoder circuitry to decode an instruction into a decoded instruction, the instruction to include a field for an identifier of a first source operand, a field for an identifier of a second source operand, a field for an identifier of a third source operand, a field for an identifier of a destination operand, and a field for an opcode, the opcode to indicate to perform a modular addition operation on integer data elements associated with the first source operand, second source operand, and third source operand; and

execution circuitry to execute the decoded instruction according to the opcode, the execution circuitry including multiple parallel execution channels, wherein an execution channel of the multiple parallel execution channels includes:

first circuitry to output an integer intermediate value based on a sum of a first integer data element associated with first source operand data and a second integer data element associated with second source operand data;

second circuitry to output the integer intermediate value as a result in response to a determination that the integer intermediate value is less than a third integer data element associated with third source operand data and otherwise output the integer intermediate value minus the third integer data element as the result; and

third circuitry to write the result to the destination operand,

wherein the second circuitry includes:

a first circuit to output a subtraction result based on the integer intermediate value minus the third integer data element and a status flag to indicate a sign of the subtraction result; and

a second circuit to output the integer intermediate value in response to a determination that the status flag indicates that the subtraction result is negative, otherwise the second circuit to output the subtraction result.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 11, 2022
From: BOEMER, FABIAN; GOPAL, VINODH; SEIFU, GELILA; KIM, SEJUN; CRAWFORD, JACK
To: INTEL CORPORATION
Reel/Frame 058623/0524 →
Continuity (1)
Related Publication 20230140257A1 · May 4, 2023
References Cited (37)
US 6036350A · Mennemeier et al. · 2000 [cited by applicant]
US 6185670B1 · Huff et al. · 2001 [cited by applicant]
US 6470440B1 · Van Nguyen et al. · 2002 [cited by applicant]
US 6564314B1 · May · 2003 [cited by examiner]
US 7196708B2 · Dorojevets · 2007 [cited by examiner]
US 8205097B2 · Malzahn · 2012 [cited by examiner]
US 8995651B1 · Lee · 2015 [cited by examiner]
US 20030061539A1 · Murray · 2003 [cited by applicant]
US 20050027969A1 · Simon et al. · 2005 [cited by applicant]
US 20050219422A1 · Dorojevets · 2005 [cited by examiner]
US 20110153993A1 · Gopal et al. · 2011 [cited by applicant]
US 20110276790A1 · Olson et al. · 2011 [cited by applicant]
US 20150006857A1 · Kuo · 2015 [cited by applicant]
US 20180046900A1 · Dally et al. · 2018 [cited by applicant]
US 20180189064A1 · Plotnikov et al. · 2018 [cited by applicant]
US 20190079762A1 · Heinecke et al. · 2019 [cited by applicant]
US 20190196826A1 · Madduri et al. · 2019 [cited by applicant]
US 20200210199A1 · Ould-Ahmed-Vall · 2020 [cited by applicant]
US 20230081763A1 · Boemer et al. · 2023 [cited by applicant]
US 20230140257A1 · Boemer et al. · 2023 [cited by applicant]
DE 102022124466A1 · 2023 [cited by applicant]
EP 4152147A1 · 2023 [cited by applicant]
Amos R. Omondi, Cryptography Arithmetic, 2020, Springer, pp. 143-154. (Year: 2020). [cited by examiner]
John Hennessy, Computer Architecture, 2012, Elsevier, pp. 236-241. (Year: 2012). [cited by examiner]
Intel, Intel 64 and IA-32 Architecture Software Developer's Manual, 2015, pp. 3-1 to 3-30. (Year: 2025). [cited by examiner]
Publication of CN Application No. 202211158890.X, mailed May 15, 2023, 4 pages. [cited by applicant]
Intention to Grant, EP App. No. 22188194.9, Jun. 25, 2024, 6 pages. [cited by applicant]
CN Publication Notificaiton for CN202210981945.0, 4 pages, Mar. 24, 2023. [cited by applicant]
European Search Report and Search Opinion, EP App. No. 22188194.9, Feb. 6, 2023, 7 pages. [cited by applicant]
Extended European Search Report for EP22188194.9, 7 pages, Feb. 6, 2023. [cited by applicant]
Decision to Grant, EP App. No. 22188194.9, Oct. 10, 2024, 2 pages. [cited by applicant]
Intel Labs, HEXL GitHub Repository, 8 pages, https://github.com/IntelLabs/hexl. [cited by applicant]
Microsoft Research, “Microsoft SEAL GitHub Repository”, GitHub, 13 pages, https://github.com/microsoft/SEAL. [cited by applicant]
Non-Final Office Action, U.S. Appl. No. 17/476,726, Oct. 30, 2024, 22 pages. [cited by applicant]
Notice of Allowance, U.S. Appl. No. 17/476,726, Apr. 29, 2025, 8 pages. [cited by applicant]
Notice of Allowance, U.S. Appl. No. 17/476,726, Aug. 28, 2025, 7 pages. [cited by applicant]
Palisade Project Contributors, “Palisade GitLab Repository”, GitLab, 1 page, https://gitlab.com/palisade. [cited by applicant]