CN101901128B - 用于有效提升指令融合的装置、方法和系统 - Google Patents
用于有效提升指令融合的装置、方法和系统 Download PDFInfo
- Publication number
- CN101901128B CN101901128B CN200910253081.5A CN200910253081A CN101901128B CN 101901128 B CN101901128 B CN 101901128B CN 200910253081 A CN200910253081 A CN 200910253081A CN 101901128 B CN101901128 B CN 101901128B
- Authority
- CN
- China
- Prior art keywords
- instruction
- merge
- stored
- subsequently
- current accessed
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 230000004927 fusion Effects 0.000 title claims description 26
- 238000000034 method Methods 0.000 title claims description 22
- 230000001737 promoting effect Effects 0.000 title description 2
- 238000012545 processing Methods 0.000 claims abstract description 4
- 230000008569 process Effects 0.000 claims description 13
- 238000012360 testing method Methods 0.000 claims description 12
- 238000000605 extraction Methods 0.000 claims description 7
- 238000005516 engineering process Methods 0.000 abstract description 4
- 238000010586 diagram Methods 0.000 description 8
- 230000000875 corresponding effect Effects 0.000 description 4
- 238000004519 manufacturing process Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 238000012856 packing Methods 0.000 description 2
- 241001269238 Data Species 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 239000003795 chemical substances by application Substances 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000002596 correlated effect Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000001052 transient effect Effects 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30181—Instruction operation extension or modification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/38—Concurrent instruction execution, e.g. pipeline, look ahead
- G06F9/3836—Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution
- G06F9/3853—Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution of compound instructions
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0806—Multiuser, multiprocessor or multiprocessing cache systems
- G06F12/084—Multiuser, multiprocessor or multiprocessing cache systems with a shared cache
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0875—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches with dedicated cache, e.g. instruction or stack
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/40—Bus structure
- G06F13/4063—Device-to-bus coupling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/22—Microcontrol or microprogram arrangements
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30145—Instruction analysis, e.g. decoding, instruction word fields
- G06F9/3016—Decoding the operand specifier, e.g. specifier format
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/3017—Runtime instruction translation, e.g. macros
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30181—Instruction operation extension or modification
- G06F9/30196—Instruction operation extension or modification using decoder, e.g. decoder per instruction set, adaptable or programmable decoders
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/38—Concurrent instruction execution, e.g. pipeline, look ahead
- G06F9/3836—Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/45—Caching of specific data in cache memory
- G06F2212/452—Instruction code
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/62—Details of cache specific to multiprocessor cache arrangements
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Abstract
一种用于在计算机系统中实现有效指令融合的技术。在一个实施例中,如果指令队列中的第一指令可与第二指令融合,那么处理器逻辑将对第二指令的处理延迟阈值时间量。
Description
技术领域
一般来说,本发明的实施例涉及信息处理领域,更具体地说,涉及计算系统和微处理器中的指令融合领域。
背景技术
指令融合是指将两个指令组合成单个指令的过程,其导致处理器内的一个操作(或微操作“uop”)序列。存储在处理器指令队列(IQ)中的指令可在从IQ中读出之后以及在发送到指令解码器之前或者在通过指令解码器解码之后进行“融合”。通常,在指令解码前发生的指令融合称为“宏融合”,而在指令解码(例如,成为uop)后发生的指令融合称为“微融合”。宏融合的一个例子是将比较(“CMP”)指令或测试(“TEST”)指令(“CMP/TEST”)与条件转移(“JCC”)指令组合在一起。例如,CMP/TEST和JCC指令对可定期地在循环末端出现在程序中,在其中进行比较,并基于比较的结果,采取或不采取分支。由于宏融合可有效地增加指令吞吐量,所以希望能够找到尽可能多的机会来融合指令。
对于在一些现有技术的处理器微体系结构中找到的指令融合机会,CMP/TEST和JCC指令需要同时驻存在IQ中,使得当从IQ中读取这些指令时,可以将它们进行融合。然而,如果在IQ中存在可融合的CMP/TEST指令,并且尚未将进一步的指令写入IQ中(即,CMP/TEST指令是IQ中的最后一个指令),那么即使程序顺序中的下一个指令是JCC指令,仍会从IQ中读取CMP/TEST指令,并将它发送到解码器而不加以融合。举一个可能会出现错失融合机会的例子,如果CMP/TEST和JCC碰巧跨越(across)存储边界(例如,16字节边界),那么就会导致在一个周期内将CMP/TEST写入IQ,而在接下来的周期内写入JCC。在这种情况下,如果不存在停止(stalling)情形,那么就会在从IQ中读取CMP/TEST的同时或之后将JCC写入到IQ中,因此将错失融合机会,从而导致多个不必要的IQ读取、降低的指令吞吐量以及过量功耗。
发明内容
一种装置,包括:
指令队列(IQ);
逻辑,用于将对第一可融合指令的处理延迟阈值时间量,使得如果在所述阈值时间量内将可与所述第一可融合指令融合的第二可融合指令存储在所述IQ中,那么可将所述第二可融合指令与所述第一可融合指令融合。
该装置包括状态机,所述状态机用于在存储在所述IQ中的所述第一可融合指令和存储在所述IQ中的所述第二可融合指令之间执行中间指令时防止填充缓冲请求队列(fillbufferrequestqueue)FBRQ锁定对应于所述第一和第二可融合指令的条目。
一种系统,包括:
存储设备,用于分别在第一和第二访问边界(accessboundary)内存储第一和第二可融合指令;
处理器,具有用于将所述第一和第二可融合指令提取到指令队列(IQ)中的提取逻辑;
延迟逻辑,用于将从所述IQ中读取所述第一可融合指令延迟阈值周期数;
指令融合逻辑,用于在所述第一可融合指令之后以及在达到所述阈值周期量之前如果将所述第二可融合指令存储在所述IQ中则融合所述第一和第二可融合指令。
附图说明
在附图的各图中示例性而非限制性地示出本发明的实施例,附图中相似的附图标记指代相似的元件,其中:
图1示出可在其中使用本发明的至少一个实施例的微处理器的框图;
图2示出可在其中使用本发明的至少一个实施例的共享总线计算机系统的框图;
图3示出可在其中使用本发明的至少一个实施例的点对点互连计算机系统的框图;
图4示出可用于实现本发明的至少一个实施例的状态机的框图;
图5是可用于执行本发明的至少一个实施例的操作的流程图;
图6是在至少一个实施例中执行的操作的流程图。
具体实施方式
本发明的实施例可用于提高处理器中的指令吞吐量和/或减少处理器的功耗。在一个实施例中,找到否则将错失的指令融合机会,并且因此进行指令融合。在一个实施例中,通过以下方法来找到原本将错失的指令融合机会:将从指令队列(IQ)中读取最后一个指令的时间或者将从IQ中读取的最后一个指令发给解码阶段的时间延迟阈值周期数(athresholdnumberofcycles),以使得可以提取任何随后的可融合指令,将它们存储在IQ中(或者至少加以标识而不一定存储在IQ中),并且随后将它们与最后一个可融合指令进行融合。在一个实施例中,将对第一可融合指令的读取或发送延迟阈值周期数可以提高处理器性能,因为这样做可以避免将两个否则可融合的指令分开而不是作为单个指令来解码和处理。
阈值等待周期数的选择取决于其中使用特定实施例的微体系结构。例如,在一个实施例中,阈值周期数可以是2,而在其他实施例中,阈值周期数可以多于或少于2。在一个实施例中,阈值等待周期数提供了等待将存储在IQ中的随后可融合指令的最大时间量,同时保持了相对于将可融合指令作为单独指令来处理在等待随后可融合指令方面的总体等待时间/性能优势。在例如功率更关键的其他实施例中,阈值等待周期数可以更大,以便确保不使用额外功率来单独处理这两个可融合指令,即使这些等待周期可能会引起指令吞吐量的降低(虽然是暂时的)。
图1示出可在其中使用本发明的至少一个实施例的微处理器。具体来说,图1示出具有一个或多个处理器核105和110的微处理器100,每个处理器核分别具有与其相关联的本地高速缓存107和113。图1中还示出共享高速缓冲存储器115,它可存储每个本地高速缓存107和113中所存储的信息的至少一些信息的版本。在一些实施例中,微处理器100还可包括未在图1中示出的其他逻辑,例如集成的存储器控制器、集成的图形控制器、以及用于执行计算机系统内的其他功能(例如I/O控制)的其他逻辑。在一个实施例中,多处理器系统中的每个微处理器或多核处理器中的每个处理器核可包括逻辑119或以其他方式与逻辑119相关联,以便根据至少一个实施例实现中断通信技术。该逻辑可包括电路、软件或两者,以便实现比一些现有技术的实现更有效的指令融合。
在一个实施例中,逻辑119可包括用于减小错失指令融合机会的可能性的逻辑。在一个实施例中,当在IQ或其他提取指令存储结构中没有存储随后指令时,逻辑119延迟从IQ中读取第一指令(例如CMP)。在一个实施例中,逻辑119使第一可融合指令的读取或发送持续阈值周期数(例如两个周期),然后再读取IQ或将第一可融合指令发给解码器或其他处理逻辑,使得如果可与第一指令融合的第二可融合指令尚未存储在IQ中(例如,由于这两个可融合指令存储在存储器或高速缓存的不同存储边界中),那么不会错失融合这两个可融合指令的机会。在一些实施例中,阈值可以是固定的,而在其他实施例中,阈值可由用户或者根据独立于用户的算法改变、更改。在一个实施例中,第一可融合指令是CMP指令,而第二可融合指令是JCC指令。在其他实施例中,第一和/或第二指令可以不是CMP或JCC指令,而是任何可融合指令。此外,本发明的实施例可应用于融合多于两个指令。
例如,图2示出可在其中使用本发明的一个实施例的前端总线(FSB)计算机系统。任何处理器201、205、210或215可访问来自位于处理器核223、227、233、237、243、247、253、257之一内或以其他方式与其相关联的任何本地一级(L1)高速缓冲存储器220、225、230、235、240、245、250、255的信息。此外,任何处理器201、205、210或215可访问来自共享二级(L2)高速缓存203、207、213、217中任何一个的信息,或通过芯片组265访问来自系统存储器260的信息。根据至少一个实施例,图2的处理器中的一个或多个处理器可包括逻辑219或以其他方式与逻辑219相关联,以使得能够提高指令融合的效率。
除了如图2所示的FSB计算机系统以外,还可以结合本发明的各种实施例使用其他系统配置,包括点对点(P2P)互连系统和环形互连系统。例如,图3中的P2P系统可包括几个处理器,其中只举例示出两个处理器370、380。处理器370、380均可包括与存储器32、34连接的本地存储器控制器集线器(MCH)372、382。处理器370、380可经由点对点(PtP)接口350利用PtP接口电路378、388来交换数据。处理器370、380均可经由各自的PtP接口352、354利用点对点接口电路376、394、386、398来与芯片组390交换数据。芯片组390也可以经由高性能图形接口339与高性能图形电路338交换数据。本发明的实施例可位于具有任何数量的处理核的任何处理器内,或位于图3的每个PtP总线代理中。在一个实施例中,任何处理器核可包括本地高速缓冲存储器(未示出)或以其他方式与其相关联。此外,在这两个处理器外部的任一处理器中可包含共享高速缓存(未示出),它也经由p2p互连与这些处理器连接,使得如果处理器处于低功率模式,则可将任一个或者两个处理器的本地高速缓存信息存储在共享高速缓存中。根据至少一个实施例,图3的处理器或核中的一个或多个处理器或核可包括逻辑319或以其他方式与逻辑319相关联,以使得能够提高指令融合的效率。
在至少一个实施例中,在诸如IQ清除操作的一些中间操作发生(在第一和第二可融合指令之间发生)之前,第二可融合指令可能没有存储在IQ中,从而导致错失融合这两个否则可融合的指令的机会。在一个实施例中,其中高速缓存(或缓冲器)存储将要调度(可能多次)以便由处理器执行的解码指令(在将其从IQ中读取和解码后)或uop(例如,“解码流缓冲器(decodedstreambuffer)”或“DSB”、“跟踪高速缓存(tracecache)”或“TC”)的相关序列,第一可融合uop(例如CMP)可存储在高速缓存中,而在相同的可寻址范围(例如,相同的高速缓存路径)内没有可融合的第二uop(例如JCC)。这可在例如JCC横跨高速缓存行(由于高速缓存错失)或横跨页边界(由于翻译后援缓冲器错失)的情况下发生,在这种情况下,高速缓存可存储CMP而不存储JCC。随后,如果在存储CMP之后、但在将JCC存储在高速缓存中之前将处理器核管线清除(例如,由于断言“清除”信号),那么高速缓存只将CMP存储在它的路径之一中而不存储JCC。
在随后查找存储CMP的高速缓存行时,高速缓存可将错失JCC解释为错失的访问,并且可将JCC标记为下一个高速缓存填充操作的附加点。然而,因为CMP+JCC可作为融合的而从IQ中读取,所以可能找不到这个附加点。因此,所请求的JCC可能不会与来自IQ的将要填充的任何uop匹配,并且因此高速缓存将不能填充错失JCC,而是在预期融合的CMP+JCC的行上继续错失。此外,在一个利用未决填充请求队列(PFRQ)来存储uop高速缓存填充请求的实施例中,为特定的融合指令填充而保留的条目可能不会被解除分配(deallocate)(因为预期的融合指令填充从未发生),并且可能一直保持无用,直到下一个清除操作。在一个实施例中,每次访问错失的融合指令条目时都会发生PFRQ条目锁定,并且因而可以防止对相同位置的任何随后填充。
为了防止对PFRQ条目的不正确或不当锁定,在一个实施例中,可以使用状态机来监视从IQ中读取的uop,以检测由于例如达到对应PFRQ条目的最后一个uop但没有检测到填充起始点而完全错失具有该对应PFRQ条目的区域(例如,标记用于填充的区域)的情况。在一个实施例中,当遇到这种情况时,状态机可导致对PFRQ条目解除分配。在其他实施例中,在不存在两个可融合指令的情况下,可通过不在高速缓存中创建可从IQ中读取的可融合指令来避免不当PFRQ条目锁定。例如,如果在CMP之后紧跟非JCC指令,则可在高速缓存中创建融合指令条目,但是只有当从IQ中单独读出CMP时(例如,在阈值等待时间到期之后),才不会将这个融合指令条目填充到高速缓存中。在其他实施例中,可对状态机检测到跳过的填充区域的次数计数,可在跳过填充区域的次数达到某个阈值计数之后执行高速缓存刷新或无效操作。然后,可从高速缓存移除该填充区域,并且随后重新填充这个融合指令。
图4示出根据一个实施例的状态机,该状态机可用于避免由于IQ中错失的可融合指令而引起的不想要的PFRQ条目锁定情况。在状态401,IQ中的指令不在标记用于填充的区域中,“填充区域开始”信号指示IQ将要处理映射到填充区域的指令(根据高速缓存散列来自填充区域的指令),但不会从保存在PFRQ中的线性指令指针(“唇部(lip)”)开始(405)。这可导致状态机移到状态410。如果IQ中的下一个指令(不久将会对其解码)结束填充区域(例如,结束由高速缓存散列的行,或者是所采取的分支),则状态机导致对相应PFRQ条目解除分配415,并且状态机返回到状态401。然而,如果在状态401或在状态410时填充指针等于填充区域唇部(430),则状态机进入状态420,在状态420,访问位于填充区域中并且在填充开始点之后。从状态420,填充区域指示中的最后一个uop将会使状态机返回425到状态401,而不会对相应PFRQ条目解除分配。图4中的状态机可在硬件逻辑、软件、或其某个组合中实现。在其他实施例中,可以使用其他状态机或逻辑。
图5示出可以结合本发明的至少一个实施例使用的操作的流程图。在操作501,确定IQ中当前访问的指令是否可与任何随后指令融合。如果不能,则在操作505,从IQ中访问下一个指令,并将延迟计数复位。如果可以,则在操作510,将延迟计数器递增,并且在操作515,确定是否达到延迟计数阈值。如果没有达到,那么在操作520,不对当前访问的指令执行任何指令融合。如果达到了,则在操作505,从IQ中访问下一个指令,并将延迟计数复位。在其他实施例中,可执行其他操作以提高指令融合的效率。
图6示出可以结合至少一个实施例执行的操作的流程图。为了在具有多个解码器电路的处理器中执行一个实施例,有益的是确保在能够解码融合指令的特定解码器电路上解码第一可融合指令。在图6中,在操作601,确定特定指令是否是融合指令对中的第一指令。如果不是,那么在操作605,发送融合指令。如果是,那么在操作610,确定在第一可融合指令之后是否紧跟IQ中的有效指令。如果是,则在操作610,发送(issue)融合指令。如果不是,则在操作615,确定是否将第一可融合指令发给能够支持融合指令的解码器。在一个实施例中,解码器-0能够解码融合指令。如果没有将第一可融合指令发给解码器-0,那么在操作620,将第一可融合指令移动或“撤掉(nuke)”到不同的解码器,直到它对应于解码器-0。在操作625,将计数器设置为初始值N,并且在操作630,如果在该指令之后是有效指令,或者如果计数器为0,那么在操作635,发送融合指令。否则,在操作640,将计数器递减,并且撤掉无效指令。在其他实施例中,计数器可递增到最终值。在其他实施例中,除了撤掉操作外,其他操作也可清除无效指令。
至少一个实施例的一个或多个方面可由存储在机器可读介质上的代表性数据实现,这些代表性数据表示处理器中的各种逻辑,当由机器读取时其会导致机器构造逻辑以执行本文描述的技术。这些称为“IP核”的表示可存储在有形机器可读介质(“磁带”)中,并提供给各种客户或制造设施以加载到实际制造逻辑或处理器的制造机器中。
因此,描述了用于指导微体系结构存储器区域访问的方法和装置。应该理解,上述描述旨在说明性而非限制性。在阅读和理解上述描述之后,本领域技术人员将明白许多其他实施例。因此,本发明的范围应参考随附权利要求以及赋予这些权利要求的等价物的全部范围一起来确定。
Claims (18)
1.一种用于有效指令宏融合的装置,包括:
多个指令解码器电路;
指令队列IQ组件;和
逻辑组件,用于当在所述IQ或其他提取指令存储结构中没有存储随后可融合指令时,将对第一可融合指令的处理延迟阈值时间量,使得如果在所述阈值时间量内将可与所述第一可融合指令融合的随后第二可融合指令提取并存储在所述IQ中,那么可将所述第二可融合指令在发送到所述多个指令解码器电路中之一以前与所述第一可融合指令融合。
2.根据权利要求1所述的装置,其中在存储在所述IQ之前,所述第一可融合指令和所述第二可融合指令跨越提取边界存储。
3.根据权利要求1所述的装置,其中只有当所述第一可融合指令是存储在所述IQ中的最后一个指令时,所述逻辑组件才延迟对所述第一可融合指令的处理。
4.根据权利要求1所述的装置,其中所述逻辑组件包括计数器,所述计数器对于在所述第一可融合指令存储在所述IQ中并且是所述IQ中的最后一个指令之后的每个周期递增一次,直到达到对应于所述阈值时间量的阈值周期数。
5.根据权利要求1所述的装置,还包括状态逻辑组件,所述状态逻辑组件用于在存储在所述IQ中的所述第一可融合指令和存储在所述IQ中的所述第二可融合指令之间执行中间指令时防止填充缓冲请求队列(FBRQ)锁定对应于所述第一和第二可融合指令的条目。
6.根据权利要求5所述的装置,其中所述中间指令将导致清除所述IQ。
7.一种用于有效指令宏融合的方法,包括:
在将指令队列IQ中当前访问的指令发送到解码器之前确定所述当前访问的指令是否可与尚未存储在所述IQ中的任何随后指令融合;
如果所述当前访问的指令与尚未存储在所述IQ中的任何随后指令不可融合,那么从所述IQ访问下一个指令并将延迟计数器复位;
如果所述当前访问的指令是可融合的并且是所述IQ中的最后一个指令,那么在将所述当前访问的指令发送到解码器之前将所述延迟计数器递增;以及
如果所述随后指令已被存储在所述IQ中、所述当前访问的指令和所述随后指令是可融合的并且所述延迟计数器没有达到阈值,那么将所述当前访问的指令与所述随后指令进行融合。
8.根据权利要求7所述的方法,还包括:如果所述当前访问的指令和所述随后指令是不可融合的,那么将当前访问的指令与所述随后指令分开来处理。
9.根据权利要求7所述的方法,还包括:如果所述延迟计数器已经达到所述阈值,那么将当前访问的指令与所述随后指令分开来处理。
10.根据权利要求7所述的方法,还包括:如果当前访问的指令和所述随后指令是可融合的,并且在将随后指令存储在高速缓存中之前以及在将所述当前访问的指令存储在所述高速缓存中之后执行中间事件,那么防止填充缓冲请求队列(FBRQ)锁定对应于所述当前访问指令和所述随后指令的条目。
11.一种用于有效指令宏融合的系统,包括:
存储设备,用于分别在第一和第二访问边界内存储第一和第二可融合指令;
具有多个指令解码器电路的处理器,耦合到提取逻辑组件,所述提取逻辑组件用于将所述第一可融合指令和第二可融合指令在它们被发送到所述多个指令解码器电路中之一以便解码之前提取到指令队列IQ组件中;
延迟逻辑组件,用于当在所述IQ或其他提取指令存储结构中没有存储随后可融合指令时,将从所述IQ中读取所述第一可融合指令的时间延迟阈值周期量;
指令融合逻辑组件,用于在所述第一可融合指令之后以及在达到所述阈值周期量之前如果将所述第二可融合指令提取并存储在所述IQ中则将所述第一和第二可融合指令在它们被发送到所述多个指令解码器电路中所述之一以便解码之前进行融合。
12.根据权利要求11所述的系统,还包括计数器,如果所述第一可融合指令是所述IQ中的唯一指令,则所述计数器递增;当达到所述阈值周期量时,所述计数器停止计数。
13.根据权利要求12所述的系统,其中如果在达到所述阈值周期量之前将所述第二可融合指令存储在所述IQ中,则所述计数器将复位。
14.根据权利要求11所述的系统,其中所述存储设备包括指令高速缓存,并且所述第一和第二访问边界的大小均为64字节。
15.根据权利要求11所述的系统,其中所述存储设备包括动态随机存取存储器,并且所述第一和第二访问边界的大小均为4096字节。
16.根据权利要求11所述的系统,其中所述第一可融合指令是CMP/TEST指令,而所述第二可融合指令是JCC指令。
17.根据权利要求16所述的系统,其中所述阈值周期数是2。
18.根据权利要求11所述的系统,还包括状态逻辑组件,所述状态逻辑组件用于在存储在高速缓存中的所述第一可融合指令和存储在所述高速缓存中的所述第二可融合指令之间执行中间事件时防止填充缓冲请求队列(FBRQ)锁定对应于所述第一和第二可融合指令的条目。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410054184.XA CN103870243B (zh) | 2008-10-30 | 2009-10-30 | 用于提升有效指令融合的装置和方法 |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US12/290395 | 2008-10-30 | ||
US12/290,395 US9690591B2 (en) | 2008-10-30 | 2008-10-30 | System and method for fusing instructions queued during a time window defined by a delay counter |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410054184.XA Division CN103870243B (zh) | 2008-10-30 | 2009-10-30 | 用于提升有效指令融合的装置和方法 |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101901128A CN101901128A (zh) | 2010-12-01 |
CN101901128B true CN101901128B (zh) | 2016-04-27 |
Family
ID=42063260
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410054184.XA Active CN103870243B (zh) | 2008-10-30 | 2009-10-30 | 用于提升有效指令融合的装置和方法 |
CN200910253081.5A Active CN101901128B (zh) | 2008-10-30 | 2009-10-30 | 用于有效提升指令融合的装置、方法和系统 |
Family Applications Before (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410054184.XA Active CN103870243B (zh) | 2008-10-30 | 2009-10-30 | 用于提升有效指令融合的装置和方法 |
Country Status (8)
Country | Link |
---|---|
US (4) | US9690591B2 (zh) |
JP (2) | JP2012507794A (zh) |
KR (1) | KR101258762B1 (zh) |
CN (2) | CN103870243B (zh) |
BR (2) | BRPI0920782B1 (zh) |
DE (1) | DE102009051388A1 (zh) |
TW (1) | TWI455023B (zh) |
WO (1) | WO2010056511A2 (zh) |
Families Citing this family (32)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8090931B2 (en) * | 2008-09-18 | 2012-01-03 | Via Technologies, Inc. | Microprocessor with fused store address/store data microinstruction |
US9690591B2 (en) * | 2008-10-30 | 2017-06-27 | Intel Corporation | System and method for fusing instructions queued during a time window defined by a delay counter |
JP5491071B2 (ja) * | 2009-05-20 | 2014-05-14 | エヌイーシーコンピュータテクノ株式会社 | 命令融合演算装置および命令融合演算方法 |
US9223578B2 (en) * | 2009-09-25 | 2015-12-29 | Nvidia Corporation | Coalescing memory barrier operations across multiple parallel threads |
US8843729B2 (en) | 2010-04-27 | 2014-09-23 | Via Technologies, Inc. | Microprocessor that fuses MOV/ALU instructions |
US8856496B2 (en) | 2010-04-27 | 2014-10-07 | Via Technologies, Inc. | Microprocessor that fuses load-alu-store and JCC macroinstructions |
US20130081001A1 (en) * | 2011-09-23 | 2013-03-28 | Microsoft Corporation | Immediate delay tracker tool |
US9672037B2 (en) * | 2013-01-23 | 2017-06-06 | Apple Inc. | Arithmetic branch fusion |
US9886277B2 (en) * | 2013-03-15 | 2018-02-06 | Intel Corporation | Methods and apparatus for fusing instructions to provide OR-test and AND-test functionality on multiple test sources |
US9483266B2 (en) * | 2013-03-15 | 2016-11-01 | Intel Corporation | Fusible instructions and logic to provide OR-test and AND-test functionality using multiple test sources |
WO2014154917A1 (es) * | 2013-03-27 | 2014-10-02 | Intel Corporation | Mecanismo para facilitar la fusión dinámica y eficaz de instrucciones informáticas en programas de software |
US9792121B2 (en) | 2013-05-21 | 2017-10-17 | Via Technologies, Inc. | Microprocessor that fuses if-then instructions |
US9372695B2 (en) | 2013-06-28 | 2016-06-21 | Globalfoundries Inc. | Optimization of instruction groups across group boundaries |
US9348596B2 (en) | 2013-06-28 | 2016-05-24 | International Business Machines Corporation | Forming instruction groups based on decode time instruction optimization |
US10503513B2 (en) * | 2013-10-23 | 2019-12-10 | Nvidia Corporation | Dispatching a stored instruction in response to determining that a received instruction is of a same instruction type |
US9892803B2 (en) * | 2014-09-18 | 2018-02-13 | Via Alliance Semiconductor Co., Ltd | Cache management request fusing |
US20160179542A1 (en) * | 2014-12-23 | 2016-06-23 | Patrick P. Lai | Instruction and logic to perform a fused single cycle increment-compare-jump |
US10579389B2 (en) * | 2015-11-02 | 2020-03-03 | Arm Limited | Fusion of instructions by delaying handling of a partial subset of a fusible group of instructions |
US10387988B2 (en) * | 2016-02-26 | 2019-08-20 | Google Llc | Compiler techniques for mapping program code to a high performance, power efficient, programmable image processing hardware platform |
US10387147B2 (en) * | 2017-08-02 | 2019-08-20 | International Business Machines Corporation | Managing an issue queue for fused instructions and paired instructions in a microprocessor |
US11157280B2 (en) | 2017-12-07 | 2021-10-26 | International Business Machines Corporation | Dynamic fusion based on operand size |
US11256509B2 (en) | 2017-12-07 | 2022-02-22 | International Business Machines Corporation | Instruction fusion after register rename |
US11416252B2 (en) * | 2017-12-27 | 2022-08-16 | Arm Limited | Program instruction fusion |
US11194722B2 (en) * | 2018-03-15 | 2021-12-07 | Intel Corporation | Apparatus and method for improved cache utilization and efficiency on a many core processor |
US10929136B2 (en) | 2018-04-11 | 2021-02-23 | Futurewei Technologies, Inc. | Accurate early branch prediction using multiple predictors having different accuracy and latency in high-performance microprocessors |
US20200042322A1 (en) * | 2018-08-03 | 2020-02-06 | Futurewei Technologies, Inc. | System and method for store instruction fusion in a microprocessor |
US10831480B2 (en) * | 2019-02-25 | 2020-11-10 | International Business Machines Corporation | Move data and set storage key instruction |
US10831496B2 (en) | 2019-02-28 | 2020-11-10 | International Business Machines Corporation | Method to execute successive dependent instructions from an instruction stream in a processor |
US11216278B2 (en) * | 2019-08-12 | 2022-01-04 | Advanced New Technologies Co., Ltd. | Multi-thread processing |
KR102339882B1 (ko) | 2020-01-24 | 2021-12-14 | 정종범 | 역압대응이 가능한 티 모션 진자식 게이트밸브 |
US11249757B1 (en) | 2020-08-14 | 2022-02-15 | International Business Machines Corporation | Handling and fusing load instructions in a processor |
CN112363762B (zh) * | 2020-11-13 | 2023-01-06 | 苏州浪潮智能科技有限公司 | 一种融合命令处理方法、系统、设备以及介质 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1178941A (zh) * | 1996-10-07 | 1998-04-15 | 国际商业机器公司 | 通过合并存储操作进行集中存储的处理机及方法 |
US6338136B1 (en) * | 1999-05-18 | 2002-01-08 | Ip-First, Llc | Pairing of load-ALU-store with conditional branch |
US6647489B1 (en) * | 2000-06-08 | 2003-11-11 | Ip-First, Llc | Compare branch instruction pairing within a single integer pipeline |
CN101110017A (zh) * | 2005-08-09 | 2008-01-23 | 英特尔公司 | 一种组合指令的技术 |
WO2008036946A1 (en) * | 2006-09-21 | 2008-03-27 | Intel Corporation | Method and apparatus for performing logical compare operation |
Family Cites Families (32)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2834171B2 (ja) | 1989-02-06 | 1998-12-09 | 株式会社日立製作所 | コンパイル方法 |
US5392228A (en) | 1993-12-06 | 1995-02-21 | Motorola, Inc. | Result normalizer and method of operation |
US5860154A (en) | 1994-08-02 | 1999-01-12 | Intel Corporation | Method and apparatus for calculating effective memory addresses |
US6006324A (en) | 1995-01-25 | 1999-12-21 | Advanced Micro Devices, Inc. | High performance superscalar alignment unit |
JP3113792B2 (ja) | 1995-04-27 | 2000-12-04 | 松下電器産業株式会社 | 最適化装置 |
US6151618A (en) | 1995-12-04 | 2000-11-21 | Microsoft Corporation | Safe general purpose virtual machine computing system |
US6041403A (en) | 1996-09-27 | 2000-03-21 | Intel Corporation | Method and apparatus for generating a microinstruction responsive to the specification of an operand, in addition to a microinstruction based on the opcode, of a macroinstruction |
US5957997A (en) | 1997-04-25 | 1999-09-28 | International Business Machines Corporation | Efficient floating point normalization mechanism |
US5903761A (en) | 1997-10-31 | 1999-05-11 | Preemptive Solutions, Inc. | Method of reducing the number of instructions in a program code sequence |
US6112293A (en) | 1997-11-17 | 2000-08-29 | Advanced Micro Devices, Inc. | Processor configured to generate lookahead results from operand collapse unit and for inhibiting receipt/execution of the first instruction based on the lookahead result |
US6247113B1 (en) | 1998-05-27 | 2001-06-12 | Arm Limited | Coprocessor opcode division by data type |
US6282634B1 (en) | 1998-05-27 | 2001-08-28 | Arm Limited | Apparatus and method for processing data having a mixed vector/scalar register file |
US6018799A (en) | 1998-07-22 | 2000-01-25 | Sun Microsystems, Inc. | Method, apparatus and computer program product for optimizing registers in a stack using a register allocator |
US6742110B2 (en) | 1998-10-06 | 2004-05-25 | Texas Instruments Incorporated | Preventing the execution of a set of instructions in parallel based on an indication that the instructions were erroneously pre-coded for parallel execution |
TW477936B (en) * | 1998-12-29 | 2002-03-01 | Ind Tech Res Inst | Instruction folding method and device used in a stack machine |
US20030023960A1 (en) | 2001-07-25 | 2003-01-30 | Shoab Khan | Microprocessor instruction format using combination opcodes and destination prefixes |
US6675376B2 (en) | 2000-12-29 | 2004-01-06 | Intel Corporation | System and method for fusing instructions |
US6832307B2 (en) * | 2001-07-19 | 2004-12-14 | Stmicroelectronics, Inc. | Instruction fetch buffer stack fold decoder for generating foldable instruction status information |
US6587929B2 (en) * | 2001-07-31 | 2003-07-01 | Ip-First, L.L.C. | Apparatus and method for performing write-combining in a pipelined microprocessor using tags |
US6889318B1 (en) | 2001-08-07 | 2005-05-03 | Lsi Logic Corporation | Instruction fusion for digital signal processor |
US6718440B2 (en) | 2001-09-28 | 2004-04-06 | Intel Corporation | Memory access latency hiding with hint buffer |
US7051190B2 (en) | 2002-06-25 | 2006-05-23 | Intel Corporation | Intra-instruction fusion |
US6920546B2 (en) | 2002-08-13 | 2005-07-19 | Intel Corporation | Fusion of processor micro-operations |
US7653906B2 (en) * | 2002-10-23 | 2010-01-26 | Intel Corporation | Apparatus and method for reducing power consumption on simultaneous multi-threading systems |
US20040128485A1 (en) | 2002-12-27 | 2004-07-01 | Nelson Scott R. | Method for fusing instructions in a vector processor |
US7024544B2 (en) | 2003-06-24 | 2006-04-04 | Via-Cyrix, Inc. | Apparatus and method for accessing registers in a processor |
US7355601B2 (en) | 2003-06-30 | 2008-04-08 | International Business Machines Corporation | System and method for transfer of data between processors using a locked set, head and tail pointers |
KR101076815B1 (ko) | 2004-05-29 | 2011-10-25 | 삼성전자주식회사 | 분기 타겟 어드레스 캐쉬를 포함하는 캐쉬 시스템 |
US7937564B1 (en) | 2005-09-28 | 2011-05-03 | Oracle America, Inc. | Emit vector optimization of a trace |
US7676513B2 (en) | 2006-01-06 | 2010-03-09 | Microsoft Corporation | Scheduling of index merges |
US7917568B2 (en) | 2007-04-10 | 2011-03-29 | Via Technologies, Inc. | X87 fused multiply-add instruction |
US9690591B2 (en) * | 2008-10-30 | 2017-06-27 | Intel Corporation | System and method for fusing instructions queued during a time window defined by a delay counter |
-
2008
- 2008-10-30 US US12/290,395 patent/US9690591B2/en active Active
-
2009
- 2009-10-27 WO PCT/US2009/062219 patent/WO2010056511A2/en active Application Filing
- 2009-10-27 JP JP2011534680A patent/JP2012507794A/ja active Pending
- 2009-10-27 BR BRPI0920782A patent/BRPI0920782B1/pt active IP Right Grant
- 2009-10-27 KR KR1020117007623A patent/KR101258762B1/ko active IP Right Grant
- 2009-10-29 TW TW098136712A patent/TWI455023B/zh active
- 2009-10-30 CN CN201410054184.XA patent/CN103870243B/zh active Active
- 2009-10-30 BR BRPI0904287-3A patent/BRPI0904287A2/pt not_active Application Discontinuation
- 2009-10-30 DE DE102009051388A patent/DE102009051388A1/de not_active Ceased
- 2009-10-30 CN CN200910253081.5A patent/CN101901128B/zh active Active
-
2014
- 2014-11-28 JP JP2014241108A patent/JP5902285B2/ja active Active
-
2016
- 2016-04-30 US US15/143,522 patent/US20160246600A1/en not_active Abandoned
- 2016-04-30 US US15/143,518 patent/US20160378487A1/en not_active Abandoned
- 2016-04-30 US US15/143,520 patent/US10649783B2/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1178941A (zh) * | 1996-10-07 | 1998-04-15 | 国际商业机器公司 | 通过合并存储操作进行集中存储的处理机及方法 |
US6338136B1 (en) * | 1999-05-18 | 2002-01-08 | Ip-First, Llc | Pairing of load-ALU-store with conditional branch |
US6647489B1 (en) * | 2000-06-08 | 2003-11-11 | Ip-First, Llc | Compare branch instruction pairing within a single integer pipeline |
CN101110017A (zh) * | 2005-08-09 | 2008-01-23 | 英特尔公司 | 一种组合指令的技术 |
WO2008036946A1 (en) * | 2006-09-21 | 2008-03-27 | Intel Corporation | Method and apparatus for performing logical compare operation |
Also Published As
Publication number | Publication date |
---|---|
WO2010056511A3 (en) | 2010-07-08 |
BRPI0904287A2 (pt) | 2011-02-01 |
JP2012507794A (ja) | 2012-03-29 |
BRPI0920782B1 (pt) | 2020-04-22 |
BRPI0920782A2 (pt) | 2015-12-22 |
US9690591B2 (en) | 2017-06-27 |
CN101901128A (zh) | 2010-12-01 |
US20100115248A1 (en) | 2010-05-06 |
WO2010056511A2 (en) | 2010-05-20 |
JP2015072707A (ja) | 2015-04-16 |
US20160246600A1 (en) | 2016-08-25 |
CN103870243B (zh) | 2018-02-02 |
KR101258762B1 (ko) | 2013-04-29 |
US20160378487A1 (en) | 2016-12-29 |
CN103870243A (zh) | 2014-06-18 |
TWI455023B (zh) | 2014-10-01 |
KR20110050715A (ko) | 2011-05-16 |
US20170003965A1 (en) | 2017-01-05 |
TW201032129A (en) | 2010-09-01 |
JP5902285B2 (ja) | 2016-04-13 |
DE102009051388A1 (de) | 2010-05-06 |
US10649783B2 (en) | 2020-05-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101901128B (zh) | 用于有效提升指令融合的装置、方法和系统 | |
KR101899695B1 (ko) | 이기종 멀티-코어 시스템에 대한 동적 코어 선택 | |
JP2012507794A5 (zh) | ||
EP2542973B1 (en) | Gpu support for garbage collection | |
US20030061445A1 (en) | Methods and apparatus for improving throughput of cache-based embedded processors | |
WO2015061744A1 (en) | Ordering and bandwidth improvements for load and store unit and data cache | |
US9052910B2 (en) | Efficiency of short loop instruction fetch | |
KR102268601B1 (ko) | 데이터 포워딩을 위한 프로세서, 그것의 동작 방법 및 그것을 포함하는 시스템 | |
CN101645045A (zh) | 使用透明页变换的存储器管理 | |
US20100205609A1 (en) | Using time stamps to facilitate load reordering | |
US9639472B2 (en) | Prefetch list management in a computer system | |
JP2007207249A (ja) | ミス衝突処理状態でのキャッシュ・ヒットのための方法、システムおよびマイクロプロセッサ | |
CN102521173A (zh) | 一种自动将缓存在易失介质中的数据写回方法 | |
TWI517040B (zh) | 保護二進制轉譯碼的完整性 | |
TW201327165A (zh) | 對處理器的快取進行清除的方法以及該處理器 | |
WO2013101048A1 (en) | Apparatus and method for providing eventing ip and source data address in a statistical sampling infrastructure | |
Zhu et al. | An Efficient Point-to-Point Deterministic Record-Replay Enhanced with Signatures | |
US20100077145A1 (en) | Method and system for parallel execution of memory instructions in an in-order processor | |
CN116932425A (zh) | 一种内联计算引擎的任务执行方法、装置以及介质 | |
Ma et al. | Pipeline controller on dynamic memory access policy |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |