IP Library Granted Patent US 9,798,542
Granted Patent B2
US 9,798,542 · App. 14/530,029 · Granted Oct 24, 2017

Zero overhead looping by a decoder generating and enqueuing a branch instruction

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 9,798,542
App. No.
14/530,029
Granted
Oct 24, 2017
Kind
B2
Abstract

A method and apparatus for zero overheard loops is provided herein. The method includes the steps of identifying, by a decoder, a loop instruction and identifying, by the decoder, a last instruction in a loop body that corresponds to the loop instruction. The method further includes the steps of generating, by the decoder, a branch instruction that returns execution to a beginning of the loop body, and enqueing, by the decoder, the branch instruction into a branch reservation queue concurrently with an enqueing of the last instruction in a reservation queue.

Claims (23)

1. A method in a processor, comprising:

identifying, by a decoder, a loop instruction;

identifying, by the decoder, a last instruction in a loop body that corresponds to the loop instruction;

generating, by the decoder, a branch instruction that returns execution to a beginning of the loop body; and

enqueuing, by the decoder, the branch instruction into a branch reservation queue concurrently with an enqueuing of the last instruction in a reservation queue.

2. The method of claim 1 , further comprising maintaining a count of a number of times iterations of the loop body are fetched.

3. The method of claim 2 , wherein the count is maintained in a register in an instruction fetch unit.

4. The method of claim 1 , wherein the last instruction is not a branch instruction.

5. The method of claim 1 , further comprising executing the loop body speculatively until a loop count is resolved, wherein the loop count is a number of times the loop body is to be executed.

6. The method of claim 5 , wherein resolving the loop count includes determining the number of times the loop body is to be executed.

7. The method of claim 6 , further comprising canceling instructions associated with excessively fetched iterations of the loop body responsive to the number of times the loop body is to be executed being less than a number of fetched iterations of the loop body.

8. The method of claim 1 , wherein the loop instruction does not include an encoded immediate value of a number of times the loop instruction is to be executed.

9. The method of claim 1 , further comprising fetching a number of iterations of the loop body equal to an immediate value encoded in the loop instruction.

10. The method of claim 1 , wherein the identifying the loop instruction further comprises using an opcode to identify the loop instruction.

11. An apparatus, comprising:

a decoder configured to identify a loop instruction, identify a last instruction in a loop body corresponding to the loop instruction, generate a branch instruction that returns execution to a beginning of the loop body, and enqueue the branch instruction into a branch reservation queue concurrently with an enqueuing of the last instruction in the loop body in a reservation queue.

12. The apparatus of claim 11 , further comprising:

an instruction fetch unit including a first register configured to store a count of a number of times iterations of the loop body are fetched, a second register configured to store a start address of the loop body, and a third register configured to store an address that identifies the last instruction in the loop body in response to a signal received from the decoder that indicates the loop instruction has been decoded.

13. The apparatus of claim 12 , wherein the instruction fetch unit is configured to assert a signal that directs the decoder to generate the branch instruction in response to fetching the last instruction based on the address that identifies the last instruction in the loop body.

14. The apparatus of claim 11 , wherein the last instruction is not a branch instruction.

15. The apparatus of claim 11 , wherein the decoder is configured to identify the loop instruction based on an opcode of the loop instruction.

16. The apparatus of claim 11 , wherein the loop instruction does not include an encoded immediate value of a number of times the loop instruction is to be executed.

17. The apparatus of claim 11 , wherein the decoder is configured to cancel instructions associated with excessively fetched iterations of the loop body responsive to a number of times the loop body is to be executed being less than a number of fetched iterations of the loop body.

Assignments (6)
CORRECTIVE ASSIGNMENT TO CORRECT THE EXECUTION DATE PREVIOUSLY RECORDED AT REEL: 047422 FRAME: 0464. ASSIGNOR(S) HEREBY CONFIRMS THE MERGER. Recorded Mar 6, 2019
From: AVAGO TECHNOLOGIES GENERAL IP (SINGAPORE) PTE. LTD.
To: AVAGO TECHNOLOGIES INTERNATIONAL SALES PTE. LIMITED
Reel/Frame 048883/0702 →
MERGER Recorded Oct 5, 2018
From: AVAGO TECHNOLOGIES GENERAL IP (SINGAPORE) PTE. LTD.
To: AVAGO TECHNOLOGIES INTERNATIONAL SALES PTE. LIMITED
Reel/Frame 047422/0464 →
TERMINATION AND RELEASE OF SECURITY INTEREST IN PATENTS Recorded Feb 3, 2017
From: BANK OF AMERICA, N.A., AS COLLATERAL AGENT
To: BROADCOM CORPORATION
Reel/Frame 041712/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 1, 2017
From: BROADCOM CORPORATION
To: AVAGO TECHNOLOGIES GENERAL IP (SINGAPORE) PTE. LTD.
Reel/Frame 041706/0001 →
PATENT SECURITY AGREEMENT Recorded Feb 11, 2016
From: BROADCOM CORPORATION
To: BANK OF AMERICA, N.A., AS COLLATERAL AGENT
Reel/Frame 037806/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 31, 2014
From: KURD, TARIQ; REDFORD, JOHN; BARRETT, GEOFFREY
To: BROADCOM CORPORATION
Reel/Frame 034083/0299 →