The content of the invention
For defect of the prior art, it is an object of the invention to provide a kind of renaming preprocess method.
A kind of renaming preprocess method provided according to the present invention, comprises the following steps:
(A) another possible correct program in a branch point is determined;
(B) decode it is described another may correct program, and set a temporal cache for storage decoding it is described another
One group of instruction that possible correct program is obtained;
(C) register renaming operation is carried out, sets a prefetched instruction to cache for the instruction after storage again life operation;
Wherein, the step (C) further comprises the steps:(C.1):Operation note position is true in selected source operand address code
Recognize position;
(C.2):Judge that the branch point whether there is into the program for not including selected instruction between selected instruction to select
The related destination operand address code in operation note position;
If there is the operation deposit selected in the branch point to the program for not including selected instruction between selected instruction
The related destination operand address code in device position, then exist in the branch point to the program for not including selected instruction between selected instruction
The related destination operand address code in each operation note selected position in arrange that last operation select and deposit
The related destination operand address code in device position is known as operation note position and confirms destination operand address code, into step (C.3),
If the operation selected is not present in the branch point to the program for not including selected instruction between selected instruction to post
The related destination operand address code in storage position, into step (C.4);
(C.3):Destination operand address code, which carries out renaming, i.e. destination register weight, to be confirmed to operation note position
Operation note position is named to confirm that institute is more in renaming for the operation note contained among destination operand address code position
Positive operation, the operation just corrected as operation note position, into step (C.7);
(C.4):Judge in the program before the branch point with the presence or absence of the related purpose operation in operation note position selected
Number address code,
If there is the related destination operand address code in operation note position selected in the program before the branch point,
Arranged most in the related destination operand address code in operation note position that each is selected present in program before the branch point
The related destination operand address code in operation note position that afterwards that is selected is referred to as operation note position and confirms purpose operation
Number address code, into step (C.5),
If the related destination operand address code in operation note position selected is not present in the program before the branch point,
Into step (C.6);
(C.5):Destination operand address code, which carries out renaming, i.e. destination register weight, to be confirmed to operation note position
Name, operation note position confirms that institute is more in renaming for the operation note contained among destination operand address code position
Positive operation, the operation just corrected as operation note position, into step (C.7);
(C.6):The behaviour of selected operation note position in the source operand address code of a selected non-renaming
Make, with regard to carrying out reservation origin operation;
(C.7):The register operated after the operation note bit manipulation corrigendum in selected source operand address code
Operation is corrected name corresponding to operated register as selected source operand address Code memory name renaming institute more
The register name for the renaming for being just;
(D) one group of execution unit is set to cache, each execution unit caching corresponds to each execution unit respectively, so that storage is described
Corresponding instruction performed by execution unit, wherein, instructing to corresponding with the instruction of renaming for renaming is held for distribution
Execution unit buffer memory corresponding to row unit, to improve the execution efficiency of execution unit;
(E) fetching is carried out to the instruction through renaming.
Further, the step (E) further comprises the steps:
(E.1) a correct branched program of the branch point to be processed is confirmed;
(E.2) judge the correct branched program whether the branched program with the configuration processor of the branch point to be processed
It is identical, if the correct branched program and the branch of the configuration processor of the branch point to be processed are identicals, it is determined that
The branched program removed from the branch point to be processed is correct, step (E.3) is then performed, if correct branch's journey
Sequence is different from the configuration processor branch of the branch point to be processed, it is determined that removed from the branch point to be processed
Branched program is wrong, then performs step (E.5.);
(E.3) judge whether stored to be processed described in prefetched instruction caching and execution unit caching
The branch instruction that branch point is removed, if being stored in prefetched instruction caching and execution unit caching from handling
The branch instruction removed of the branch point, then perform step (E.4);
(E.4) branch instruction removed from the branch point to be processed is deleted;
(E.5) judge whether stored to be processed described in prefetched instruction caching and execution unit caching
The branch instruction that branch point is removed, if being stored in prefetched instruction caching and execution unit caching from handling
The branch instruction removed of the branch point, then step (E.6) is performed, if in prefetched instruction caching and described performing list
The branch instruction removed from the branch point to be processed is not stored in member caching, step (E.7) is performed;
(E.6) the corresponding branched program removed from the branch point to be processed of the branch instruction is removed to make
From the branched program that the branch point to be performed is removed is determined, after the branched program to be performed is removed, to incite somebody to action described
Prefetched instruction is cached and the branch removed from the branch point to be processed having in execution unit caching
Instruction is deleted;With
(E.7) without operation.
Further, the step (A) further comprises the steps:
(A.1) Branch Processing Unit and an at least recording unit are set;
(A.2) an at least subrecord unit is distributed in the recording unit, for recording the use under the branch point
Branched program state;
(A.3) by handling the subrecord cell data, judge conventional branched program, the branched program being of little use and
The branched program that pole is of little use, if branched program is conventional branched program, performs step (A.4), if branched program is not
Conventional branched program, then perform step (A.5), if branched program is the branched program that pole is of little use, performs step
(A.6);
(A.4) the conventional branched program deposit caching that will be judged by performing in step (A.3);
(A.5) branched program that is of little use judged by performing in step (A.3) is removed;With
(A.6) remove and be of little use branched program by performing the pole judged in step (A.3), and cancel corresponding
The subrecord unit.
Further, the operation of the register in destination operand address code corresponding to the register name of non-renaming is posted
Storage position is the register name of non-renaming in the non-renaming register-bit of destination operand address code, destination operand address code
Corresponding register is the non-renaming register of destination operand address code, wherein, the non-renaming of destination operand address code
Register mappings among register section occupied by register-bit to the non-renaming register of destination operand address code
The operation note position the same position sequence number of position serial number destination operand address code renaming register-bit occupied by
Among register among register section.
Preferably, when the address code that the branch point removes the instruction of another possible correct program is that source is grasped
Make number address code or destination operand address code, then the register of the corresponding non-renaming register name of the address code instructed exists
Instruct the Register renaming map table quoted to map out the name corresponding to the register come, be used as the address code of instruction
The register name for the renaming that register name renaming is corrected as.
Preferably, the branch point removes first instruction correspondence register of another possible correct program
Renaming mapping table is used for the branch point in the corresponding Register renaming map table of first instruction of configuration processor
Hold the corresponding Register renaming map table for first instruction that another possible correct program is removed as the branch point
Content, i.e., described branch point remove another may correct program first instruction corresponding Register renaming map
Table just completes reference.
Preferably, when the address code in the configuration processor for being not applied to be not carried out in the register name of renaming
In, then the register name of selected part among the register name of renaming is cancelled to the configuration processor distributed to and be not carried out, then
Distributing to another correctly program may use, and carry out another possible correct program renaming, and among renaming
The destination operand address code of each non-renaming distributes the register name for the renaming that a possible correct program is used,
Wherein, each the register name of the renaming of the destination operand address code distribution of non-renaming is different.
Preferably, when another possibility, correctly program is conditional branching program, then will be in the conditional branching
The address information that program is added in the corresponding prefetched instruction caching come out according to the address computation of the condition;
After condition is performed, the location of instruction found according to the address information in corresponding prefetched instruction caching carries out pre-
Take.
Compared with prior art, the present invention has following beneficial effect:
, in advance may to another while most possible correct branched program is performed in branch prediction is carried out
Correct program is handled.And result is stored in caching, and the guide to result is provided, so that ought be most
When being possible to correct branched program and being identified mistake, according to guide help to find another may correct program processing knot
Really.And then the energy of the loss that is caused due to branch misprediction of microprocessor and waste is reduced, improve the place of microprocessor
Efficiency is managed, energy is saved in help.Renaming preprocess method of the present invention is cached there is provided one group of execution unit, and the execution unit delays
Deposit each execution unit to correspond, reduce the addressing time of each execution unit, improve the efficiency of execution unit.
Embodiment
According to the claim and specification disclosure of that of the present invention, technical scheme literary institute specific as follows
State.
As shown in figure 1, renaming preprocess method of the present invention includes step 1001:Determine that another may correct journey
Sequence.Multiple branched programs are taken in a branch point of a program.Through branch prediction, will most possibly correct branched program at this
Instruction fetch on branch point, and load execution.Then when the correct branch of the branch point does not confirm, possible branch's journey is determined
Sequence.Specifically, when the correct branch of the branch point does not confirm, it is responsible for indicating that this branch clicks by analyzing the branch point
With the branched program indicated by branched program, or by analyzing making recorded in the branched program usage record of branch instruction
Used branched program, so that it is determined that the possibility branched program that the branch point has.It is noted that due to most possibly just
True branched program is used to carry out, so the possible branched program does not include the most possible branched program.Then,
Instruction fetch is carried out to one of them possible branched program or multiple possible branched programs in the branch point, and by fetched instruction
Branched program deposit caching.It is worth mentioning, each possible branched program can be analyzed, predicts each possible branch's journey
Sequence takes possibility.Possibility is taken according to possible branched program, it is determined that than the branched program that may be performed, so
Instruction fetch is carried out to the more possible branched program afterwards, then the branched program of fetched instruction is stored in caching.Finally, take and work as
In it is multiple may but the uncertain programs performed, will be removed from branch point and be stored in the application definition of caching may be just for another
True program.If another may correct program from branch point remove and be stored in after caching again from branch point remove after by with
In execution, be also defined as another may correct program it is noted that access highest branched program, and compare and have
Possible branched program is all suitable for renaming preprocess method of the present invention.It is noted that setting a decoded instruction to cache
For storing decoded instruction.The instruction fetch of another possible correct program may be derived from one of caching in processor,
Decoded instruction caching can also be derived from.
It is noted that renaming preprocess method of the present invention is available for setting a Branch Processing Unit and an at least record
Unit, with the state according to each branched program, conventional branched program is stored in and cached.The Branch Processing Unit can be according to branch
The state of program sets the corresponding recording unit, and the Branch Processing Unit distributes an at least subrecord in the recording unit
Unit.The subrecord unit supplies the used branched program of record same case, and subrecord unit correspondence is mutually being sympathized with
The next used branched program of condition.One, the data of the branched program were used so that record is corresponding.The Branch Processing Unit
The data of each subrecord unit of the corresponding recording unit of the branched program are read respectively, and are handled, to determine in phase
The most frequently used with the case of and/or recently the most frequently used branched program, conventional and/or conventional recently branched program, it is of little use
And/or the branched program that the branched program being of little use recently and pole are of little use and/or most proximal pole is of little use.Will be conventional and/or most
Closely conventional branched program deposit caching, or the deposit caching when taking the conventional branched program.Decoded instruction is cached
In this be of little use and/or branched program for being of little use recently is removed.Pole is of little use and/or branch's journey that most proximal pole is of little use
The corresponding subrecord unit of branched program that pole is of little use and/or most proximal pole is of little use is removed and cancelled to sequence.
The cache algorithm invented is given tacit consent in social existing invention in the world for example to be had " LRU "
(LRU), " least conventional page replacement algorithm recently " (LFU), fifo algorithm (FIFO).
For example, the operation to correcting branched program, a recording unit, which can be set, is used to record what refitting in an execution loaded
First used branched program.Specifically, the Branch Processing Unit is first that refitting loads in the recording unit
Used branched program distributes corresponding subrecord unit respectively in branch, for recording making for the corresponding branched program
Use situation data.Preferably, the access times of the subrecord unit record branched program corresponding with the subrecord unit and/
Or frequency of use and/or nearest service condition and recently when service condition.When predicted in execution it is wrong after, the branch process
Whether first branched program taken that element analysis refitting loads is assigned with what is taken with this first in the recording unit
The corresponding subrecord unit of branched program.If the subrecord unit is the allocated, the data in the subrecord unit are entered
Row modification.Preferably, the number of times data modification in the subrecord unit it used and/or nearest service condition and/or
Recently when service condition.If the subrecord unit is not distributed, distribute a subrecord unit and taken for recording this first
The data of branched program, and the data of the subrecord unit are modified.Preferably, by the data of the subrecord unit
It is modified to the record for having used once and/or having increased when nearest usage record and/or increase use recently.The processing unit is read
The data of the corresponding subrecord unit of each branched program are taken, are then given tacit consent to by social existing invention in the world
The cache algorithm invented is (for example:LRU) data to the respectively subrecord unit are handled, to determine respectively should for refitting loading
Commonly used in branched program and/or branched program conventional recently.Specifically, the Branch Processing Unit by analyzing, compare and
Each subelement recorded data of computing, it is determined that in the respectively branched program being fitted into commonly use the branched program, be of little use
And/or the branched program that the branched program being of little use recently and pole are of little use and/or most proximal pole is of little use.Then this is commonly used
And/or decoded after the first instruction fetch of correction branched program conventional recently, then the conventional and/or conventional recently correction branch
In the decoded instruction deposit decoded instruction caching of program.Or taken in the conventional and/or correction branched program conventional recently
Used time, the conventional and/or correction branched program conventional recently obtains the conventional and/or conventional recently correction point after being decoded
After Zhi Chengxu decoded instruction, the decoded instruction deposit of the conventional and/or conventional recently correction branched program has been solved
In code instruction caching.And will be of little use and/or the correction branch that is of little use recently removes from caching, and pole is of little use and/or most
Proximal pole be of little use correction branch then from caching remove and its corresponding subrecord unit is also cancelled into distribution.
Another recording unit, which can be set, to be used to record the Article 2 branched program for resetting loading in an execution.Specifically
Say, the Article 2 branched program used branched program point that the Branch Processing Unit loads in another recording unit for refitting
With corresponding subrecord unit for the data of the branched program corresponding to record.Preferably, the subrecord unit record with
The access times and/or frequency of use of the corresponding branched program of subrecord unit and/or nearest service condition and recently what
When service condition.When predicted in execution it is wrong after, the branch that takes of Article 2 that Branch Processing Unit analysis refitting loads
Program is in the corresponding subrecord unit of the branched program that whether recording unit is assigned with the Article 2 is taken.If the son
Recording unit is the allocated, then the data in the subrecord unit is modified.Preferably, by the number in the subrecord unit
According to be revised as it using number of times and/or nearest service condition and/or recently when service condition.If the subrecord unit does not have
Distribution, then distribute a subrecord unit to record the data for the branched program that the Article 2 is taken, and by the subrecord unit
Data be modified.Preferably, the data correction of the subrecord unit is used into note recently to have used once and/or having increased
The record when record and/or increase use recently.The processing unit reads the corresponding subrecord unit of each branched program
Data, then with cache algorithm of the prior art (for example:LRU) data to the respectively subrecord unit are handled, with true
Commonly used in fixed respectively branched program being fitted into and/or branched program conventional recently.Specifically, the Branch Processing Unit
By analyzing, comparing and each subelement recorded data of computing, it is determined that commonly used in the respectively branched program being fitted into and/or
The conventional recently branched program, the branched program for being of little use and/or being of little use recently and pole be of little use and/or most proximal pole seldom
Branched program.Then it will be decoded after the first instruction fetch of conventional and/or conventional recently correction branched program, it is then that this is normal
With and/or the decoded instruction deposit decoded instruction caching of conventional recently correction branched program in, or this it is conventional and/or
After conventional correction branched program is decoded after taking recently at that time, by the conventional and/or conventional recently correction branch journey
In the decoded instruction deposit decoded instruction caching of sequence.And will be of little use and/or be of little use correction branch recently from caching
Remove, and pole is of little use and/or most proximal pole is of little use corrects branch and then removed and by its corresponding subrecord list from caching
Member also cancels distribution.The Branch Processing Unit can be used for the branched program prefetched to non-executing record to operate.
A settable recording unit prefetches branched program for recording the non-executing, and the Branch Processing Unit is in the record
Branched program is prefetched to each non-executing in unit and distributes corresponding subrecord unit respectively, for recording the corresponding non-executing
Prefetch the data of branched program.Preferably, record the non-executing prefetch branched program access times and/or frequency of use and/
Or recently service condition and recently when the data of service condition.When prefetching a branched program in non-executing mode, the bifurcation
Whether the reason element analysis recording unit is that the non-executing mode prefetches the corresponding subrecord unit of branched program distribution.If,
The corresponding subrecord unit has been distributed, then the data of the corresponding subrecord unit be modified the number of times that it uses and/
Or recently service condition and/or recently when service condition.If the corresponding subrecord unit is not distributed, then the processing list
Corresponding subrecord unit of branch's distribution that member is prefetched in the recording unit for the non-executing.Then by the subrecord unit
Recorded data is modified.Preferably, the subrecord unit recorded data is modified to and has used once and/or increased
Plus usage record and/or the record that when uses recently recently.The Branch Processing Unit reads each non-executing and prefetches branched program
Corresponding respectively subrecord unit, is then handled, with determine those be non-executing prefetch conventional in branched program and/or
Branch is commonly used recently.Specifically, the Branch Processing Unit gives tacit consent to what is invented by social existing invention in the world
Cache algorithm is (for example:LRU) data to the respectively subrecord unit are analyzed, compared and computing, are determined the most frequently used and/or most
Nearly the most frequently used non-executing prefetches branched program, conventional and/or non-executing conventional recently prefetches branched program, be of little use and/
Or the non-executing that is of little use recently prefetches branched program and pole is of little use and/or the most proximal pole non-executing that is of little use prefetches branched program.
Decoded after the non-executing that is conventional and/or commonly using recently is prefetched into the first instruction fetch of branched program, then conventional and/or normal recently
The non-executing prefetches the decoded instruction deposit decoded instruction caching of branched program, or one of them delays within a processor
Deposit and take conventional and/or non-executing conventional recently and prefetch after being decoded after branched program at that time, will be conventional and/or most
Closely the conventional non-executing prefetches the decoded instruction deposit decoded instruction caching of branched program.It will be of little use and/or recently
The non-executing being of little use prefetches branched program and removed from caching.Pole is of little use and/or most proximal pole is of little use that this non-is held
The non-executing that the capable instruction for prefetching branched program is then removed from caching and cancellation pole is of little use and/or most proximal pole is of little use is pre-
Take the corresponding subrecord unit of branched program.
If it is noted that this another may have branched program in correct program, can be by using manufacture weight
The same branch records and predicts instruction come true with same branch prediction method when another possible correct program is performed after dress
Recognize the branched program having for another the possible correct program for needing instruction fetch, then by its instruction fetch, finally entered
Row renaming preprocess method of the present invention.Or this another may correct program the branched program having refer to it is many using taking
Individual possible branched program, is then carried out renaming preprocess method of the present invention.
Renaming preprocess method of the present invention further comprises step 1002:First decoding this, another may correct journey
Sequence, obtains decoded instruction before one group of instruction, but instruction fetch and uses the decoding for keeping former instruction, and set temporal cache confession
Store group instruction.It is worth mentioning, group instruction includes not solving code instruction and decoded instruction, and decoded instruction need not be entered
Row decoding operate.It is noted that group instruction is stored into this according to the position of instruction input, sequence and time after refitting
The corresponding position in temporal cache.Renaming preprocess method of the present invention further comprises step 1003:Group instruction is posted
Storage renaming is operated.Then, then step 1005 is performed:Set a prefetched instruction to cache, register renaming will have been carried out
Instruction is stored in prefetched instruction caching.Renaming preprocess method of the present invention further comprises step 1006:One group is set to hold
Row unit caches, execution unit caching one execution unit of correspondence.Each execution unit performs corresponding instruction type.First
Judge each instruction of renaming instruction type, then by the instruction of renaming send to described in renaming
The execution unit corresponding to the corresponding execution unit is instructed to be stored in caching, to improve the execution efficiency of the execution unit.
It is noted that in step 1005, can be to having performed the instruction after renaming operation after renaming operation has been performed
Reordered, then be stored in prefetched instruction caching.Further judge the instruction of each renamed instructions reordered
Type, the renamed instructions that then will reorder send corresponding to the instruction reordered with renaming
Stored in execution unit caching corresponding to the execution unit.
As shown in Fig. 2 the register renaming operation mentioned by step 1003, is specifically included:
Step 2001:Operation note position acknowledgement bit (bit addressing) in selected source operand address code.Grasped in address code
Make register operation (register addressing) be divided into do not operate only a position and also between the position that operates be different each
The operation (bit addressing) of operation note position.
It may select an instruction in correct program this another, and one is selected not in a formerly fixed instruction
The source operand address code of renaming, and the behaviour of operation note in the source operand address code of a selected non-renaming
Make (register addressing) be divided into do not operate only a position and also between the position that operates be different each operation note positions
Operate (bit addressing), and the operation (bit addressing) of central operation note position is referred to as the operation of operation note position, and in choosing
Selected in the operation (bit addressing) for each operation note position being divided into the source operand address code of a fixed non-renaming
The operation of the operation (bit addressing), referred to as selected operation note of fixed operation note position.The selected operation is posted
Position operated by the operation of storage position, is referred to as the acknowledgement bit of the selected operation note position.
If occurring the confirmation for operating the selected operation note position in the destination operand address code of non-renaming
Position (bit addressing), then this destination operand address code be referred to as select operation note position correlation destination operand address
Code.If the acknowledgement bit for operating selected operation note position occurs in the operation of operation note position, it is referred to as selecting
The associative operation register-bit operation of operation note position.
The arrangement of address code is sequential, order of the instruction in its corresponding programme where address code, just as address code
Order.The arrangement of address code is to be arranged by the order of its address code after arriving first in a program.
Step 2002:Judge the branch point into the program for not including selected instruction between selected instruction with the presence or absence of selected
The fixed related destination operand address code in operation note position.
If there is the operation deposit selected in the branch point to the program for not including selected instruction between selected instruction
The related destination operand address code in device position, then exist in the branch point to the program for not including selected instruction between selected instruction
The related destination operand address code in each operation note selected position in arrange that last operation select and deposit
The related destination operand address code in device position is known as operation note position and confirms destination operand address code, into step 2003.
If the operation selected is not present in the branch point to the program for not including selected instruction between selected instruction to post
The related destination operand address code in storage position, into step 2004.
Step 2003:Confirm that destination operand address code carries out renaming, i.e. purpose and deposited to operation note position
Think highly of name.Inquiry operation register-bit confirms the operation (register addressing) of operation note among destination operand address code
Be divided into do not operate only a position and also between the position that operates be different each operation note positions operation (bit addressing),
Position operated by the operation of the operated position of its central operation operation note selected with this is that identical that operation is posted
The operation of storage position, the operation of operated position is confirmed in operation note position after being corrected in the renaming of destination address code
The operated position (bit addressing) for being, being just corrected the rear operated position for being as the operation of the selected operation note position, (position is sought
Location).
Step 2004:Judge in the program before the branch point with the presence or absence of the related purpose behaviour in operation note position selected
Make number address code.
If there is the related destination operand address code in operation note position selected in the program before the branch point,
Arranged most in the related destination operand address code in operation note position that each is selected present in program before the branch point
The related destination operand address code in operation note position that afterwards that is selected is known as destination address code and is referred to as operation deposit
Device position confirms destination operand address code, into step 2005.
If the related destination operand address code in operation note position selected is not present in the program before the branch point,
Into step 2006.
Step 2005:Confirm that destination operand address code carries out renaming, i.e. purpose and deposited to operation note position
Think highly of name.Inquiry operation register-bit confirms that the operation (register addressing) of operation note among destination address code is divided into
Do not operate only a position and also between the position that operates be different each operation note positions operation (bit addressing), it is central its
Position operated by the operation of the operated position of the operation operation note position selected with this is that operation note of identical position
Operation (bit addressing), the operation of operated position confirms to be corrected in the renaming of destination address code in operation note position
The operated position (bit addressing) for being, is just corrected the rear operated position for being as the operation of the selected operation note position afterwards
(bit addressing).
Step 2006:Selected operation note position in the source operand address code of a selected non-renaming
Operation, with regard to carrying out reservation origin operation.
It is noted that the operation of the register operated in source operand address code is divided into each operation note
By above-mentioned corrigendum step 2001, step 2002 or step 2003 or step 2004 or step 2005 or step after the operation of position
After 2006 corrigendums, the operation of the register operated in source operand address code is corrected corresponding to the rear operated register for being
Name, the register name for the renaming being just corrected as source operand address Code memory renaming.
It is noted that the register name of the revised address code of the register name of address code is to be incorporated into address code deposit
Among device name.Program point is exactly the program corresponding points of some location of instruction in program.
Refer to invent it is noted that the renaming algorithm invented is given tacit consent in social existing invention in the world
For the various algorithms of the renaming applied to program.
It is worth mentioning that:The determination method of the name of renaming described in step 1003 is:First analyze those renamings
Being not applied to those that those have been not carried out among name is used among the address code in the program of execution, if the name of renaming
It is central to be not applied to those that those have been not carried out and be used among the address code in the program that performs, just by these renamings
The name that a fraction is chosen among name first cancel in the program for being reserved as performing distributed to and be not carried out, then
It is reallocated to and is used by another central possible correct program, and carries out another possible correct program renaming, and
The life again that the destination operand address code of each non-renaming is used with another possible correct program among renaming
The name of name, but the name of the renaming of the destination operand address code distribution of each non-renaming is different.And distribute that Ke Cai
Give tacit consent to the renaming algorithm invented with social existing invention in the world to be allocated, or by randomly choosing distribution weight
The name of name, but the destination operand address code of some non-renamings can also use social existing invention in the world write from memory
The renaming algorithm invented is recognized to having between destination operand address code that is multiple different or not being same non-renaming
Change the name of same renaming in the case of special relationship.
It is noted that the register carried out among the register renaming operation mentioned by step 1003 can be according to one
The corresponding register mappings information that Register renaming map table is recorded is modified.
It is noted that configuration processor is also to use the Register renaming map table, mathematically, mapping is then individual
Term, refers to the relation of element mutually " correspondence " between the collection of two elements, is noun;Also referring to " formation corresponding relation ", this is moved
Make, verb.And hereafter map, refer to correspondence, or finger-type into correspondingly.
Register renaming map table is illustrated with one embodiment below.
The corresponding Register renaming map table of the instruction is just to that should instruct in setting.
The central destination operand address code refers to some address code in some instruction in program.
The position among register in the destination operand address code corresponding to the register name of renaming, is known as the mesh
Operand address code renaming register-bit.Deposit in the destination operand address code corresponding to the register name of renaming
Device, is known as the destination operand address code renaming register.The register of non-renaming in the destination operand address code
The position among register corresponding to name, is known as the non-renaming register-bit of the destination operand address code.The purpose is operated
Register in number address code corresponding to the register name of non-renaming, is known as the non-renaming of destination operand address code and posts
Storage.The mapping set in destination operand address code is referred to as the mapping of destination operand address code,
Explanation:The non-renaming position of the destination operand address code is the non-renaming register of the destination operand address code
Register section, is also a register.The destination operand address code renaming position is that the destination operand address code is ordered again
The register section of name register, is also a register.The part of register, is also a register in a word.
The destination operand address code sets mapping:The register name institute of non-renaming is right in the destination operand address code
The mapping for the position among register answered is mapped by the example of mapping hereafter.And with the purpose in example hereafter
Filial generation table purpose behaviour exemplified by a position among register in operand address code corresponding to the register name of non-renaming
Make each the example among the register in number address code corresponding to the register name of non-renaming, and hereafter one should
A position among register in destination operand address code corresponding to the register name of non-renaming, is referred to as purpose operation
Non- renaming in the position of register in number address code corresponding to the register name of non-renaming, the destination operand address code
Register name corresponding to this of register be in the destination operand address code corresponding to the register name of non-renaming
Register each one of position.Non- renaming posts in each destination operand address code hereafter occurred
This of the register corresponding to storage name in that hereafter the mentioned for the first time destination operand address code all referring to not weighing
The position of register corresponding to the register name of name.
Step:Mapping relations illustrate, because central purpose behaviour among the mapping that the destination operand address code is set
Each position for making the register in number address code corresponding to the register name of non-renaming is that have a sequence number, and the destination operand
Also there is a sequence number each position of address code renaming register, so non-renaming is posted in the central destination operand address code
Storage name corresponding to register this occupied by register section be then be mapped to in the destination operand address code
The position sequence number of this of the register corresponding to the register name of non-renaming is the destination operand address of same position sequence number
Among register section occupied by code renaming register-bit.Do not ordered again in the central destination operand address code alternatively
The register among register section occupied by this of the register corresponding to the register name of name is mapped to being somebody's turn to do
The position sequence number of this of the register in destination operand address code corresponding to the register name of non-renaming is same position sequence number
The destination operand address code renaming register-bit occupied by register section among register among.
And each position of the register in the destination operand address code corresponding to the register name of non-renaming is all entered
The mapping gone out produced by after row step, then as the mapping set in the destination operand address code, and the destination operand
The mapping set in the code of location also includes:Register in the destination operand address code corresponding to the register name of non-renaming
The register of non-renaming in the destination operand address code among each mapping all gone out produced by after carry out step
Register mappings corresponding to name are into the destination operand address code renaming register, this mapping.
The Register renaming map table of a upper instruction is completed after quoting, the Register renaming map of next instruction
Table is just quoted.Each Register renaming map table is to complete what is quoted one by one by the order of its corresponding instruction.
The reference of table in instruction, so that one instructs as an example, an instruction hereafter is referred to as the instruction.And the instruction
The example of the Register renaming map table of the example exactly instruction.
Register corresponding to the register name of the non-renaming of destination operand address code of the upper instruction of the instruction exists
Mapping in the Register renaming map table of the upper instruction of the instruction, then claim upper one of the instruction to instruct its destination operand
The non-renaming register of address code is related to mapping.The deposit of the non-renaming of destination operand address code of the upper instruction of the instruction
Reflecting in each register Register renaming map table that one instructs in the instruction in the register corresponding to device name
Penetrate, be then referred to as upper one of the instruction and instruct the small register of the non-renaming of its destination operand address code to be related to mapping.If this refers to
The mapping in the Register renaming map table of an instruction is made, neither upper one of the instruction is with instructing its destination operand
The location non-renaming register of code is related to mapping, nor upper one of the instruction instructs its non-renaming of destination operand address code small
Register is related to mapping, then such mapping is referred to as non-upper command mappings.
It is referred to as non-upper finger in the table of a upper instruction for the corresponding Register renaming map table reference of the instruction instruction
Make the mapping of mapping, and quote the destination operand of setting in institute in each destination operand address code of a upper instruction
Location code mapping.Claim if the corresponding Register renaming map table completion of the instruction is quoted in the table of a upper instruction for the instruction
For the mapping of non-upper command mappings, and complete to quote setting in institute in each destination operand address code of a upper instruction
Destination operand address code maps, then the corresponding Register renaming map table of the instruction just completes reference.Pair of the instruction
The completion of Register renaming map table is answered to quote the mapping for being referred to as non-upper command mappings in the table of a upper instruction for the instruction, with
And complete quote it is upper one instruction each destination operand address code on institute in set destination operand address code map after,
The corresponding Register renaming map table of the instruction is known as the Register renaming map table quoted
The branch point removes the corresponding Register renaming map table of first instruction of another possible correct program,
The branch point can also be removed the corresponding register renaming quoted of first instruction of the program for execution
Life is thought highly of in the corresponding deposit that the content of mapping table removes first instruction of another possible correct program as the branch point
The content of name mapping table.The branch point removes the corresponding register renaming of first instruction of another possible correct program
Mapping table removes the branch point content of the corresponding Register renaming map table of first instruction of the program for execution
In the corresponding Register renaming map table for first instruction that another possible correct program is removed as the branch point
Hold the corresponding Register renaming map table that the branch point after finishing removes first instruction of another possible correct program
Just complete reference.The corresponding register renaming that the branch point removes first instruction of another possible correct program is reflected
The content that firing table removes the branch point in the corresponding Register renaming map table of first instruction of the program for execution is made
The content of the corresponding Register renaming map table of first instruction of another possible correct program is removed for the branch point
The branch point after finishing removes the corresponding Register renaming map table of first instruction of another possible correct program
Just it is referred to as the Register renaming map table quoted.
By taking an address code in an instruction as an example, and the instruction in example is referred to as the instruction, and the address in example
Code is referred to as the address code.
The non-renaming of the address code of the instruction if the address code of the instruction is a source operand address code
The corresponding register of register name reflected under the mapping of the corresponding Register renaming map table quoted of the instruction
The register shot out name corresponding in setting, is just corrected as the address code register name renaming of the instruction
Renaming register name.
The address code of the instruction does not order again if the address code of the instruction is a destination operand address code
The corresponding register of register name of name institute under the mapping of the corresponding Register renaming map table quoted of the instruction
The register come name corresponding in setting is mapped out, is just corrected as the address code register name renaming of the instruction
For renaming register name, in addition can also be new to the address code register name one of the instruction through renaming algorithm
Renaming name.
It is noted that in data movement instruction or exchange instruction, if certain form of data command or exchange refer to
The register name of source operand address code of the non-renaming in order and posting for the destination operand address code of the non-renaming
Storage name is different, then the register name correspondence of the non-renaming of the source operand address code of the non-renaming in the data command
Register mapped out under the mapping of the corresponding Register renaming map table quoted of the instruction come register
The corresponding name in setting, just as posting that the source operand address Code memory name renaming of its instruction is corrected as
The register name use of the register name of storage renaming, then the destination operand address code of the data command non-renaming
The register name for the register renaming that revised data command source operand address code is corrected as is not weighed as this
The register name for the renaming that the destination operand address code register name renaming of name is corrected as, so that, amendment
The destination operand address of the register name and the renaming of the source operand address code of the renaming of the data command afterwards
The register name of code is identical.If destination operand address code in certain form of data movement instruction or exchange instruction is posted
Storage name is identical with the register name of source operand address code, then the deposit of the destination operand address code of the non-renaming of the instruction
Device name amendment is corresponding in the instruction using the corresponding register of register name of the destination operand address code of its instruction
The lower name for mapping out the register come corresponding in setting of mapping in the Register renaming map table quoted, makees
The name for the register renaming being corrected as the destination operand address code register name renaming of its instruction is repaiied
Just or the instruction is translated into do-nothing instruction, but the corresponding Register renaming map table of the instruction is without amendment.
The example for one group of Register renaming map table of application shown in Fig. 4.Table 1 is the register corresponding to instruction 1
Renaming mapping table, and the corresponding instruction 1 of table 1.Table 2 correspondingly refers to for the Register renaming map table corresponding to instruction 2, and table 2
Make 2.Table 3 is to instruct the Register renaming map table corresponding to 3, and the corresponding instruction 3 of table 3.Table 4 is posting corresponding to instruction 4
Storage renaming mapping table.A, A1, B, B2 represent register respectively.Table 1 record map information be:A is mapped as A1, B mappings
For B2.If there is the name A of the address code of operand in the instruction 1 corresponding to table 1, and instruct the address code of 1 destination operand
Name A is modified to A2.Then the mapping mode of table 2 is that A is mapped as A2, then the map information that table 2 is recorded is that A is mapped as A2, B mappings
For B2.If there is the name B of the address code of destination operand in the instruction 2 corresponding to table 2, and instructs the address of 2 destination operand
The name B of code is modified to B3.Then the mapping mode of table 3 is that B is mapped as B3, then the map information that table 3 is recorded is that A is mapped as A2, B
It is mapped as B3.If there is the name A of the address code of destination operand in the instruction 3 corresponding to table 3, and instruct 3 destination operand
The corresponding register A of name is modified to A3 in address.Then the mapping mode of table 4 is that A is mapped as A3, then the mapping letter that table 4 is recorded
Cease and be mapped as A3 for A, B is mapped as B3.It is noted that the source operand address code or non-renaming of the non-renaming of instruction
Destination operand address code can be modified according to the record of instruction corresponding Register renaming map table in itself.
As shown in figure 3, renaming preprocess method of the present invention further comprises step 1007:To the instruction Jing Guo renaming
Carry out instruction fetch.The step 1007 further comprises the steps:
Step 3001:Confirm a correct branched program of the branch point to be processed.The branch point to be processed is performed to take
Under first instruction it is upper one instruction jump instruction, obtain the program indicated by the jump instruction, then redirect this
Indicated program is instructed as the correct branched program of the branch point to be processed.Or execution branch point to be processed takes
Under first instruction it is upper one instruction branch instruction, the program indicated by the branch instruction is obtained, then by the branch
Indicated program is instructed as the correct program of the branch point to be processed.
Step 3002:Judge the correct branched program whether the branched program with the configuration processor of the branch point to be processed
It is identical.If the branch of the configuration processor of the correct branched program and the branch point to be processed is identical, it is determined that from will
The branched program that the branch point of processing removes execution is correct, then performs step 3003.If the correct branched program with
The configuration processor branch of the branch point to be processed is different, it is determined that the branch of execution is removed from the branch point to be processed
Program is wrong, then performs step 3005.
Step 3003:Judge whether stored from this point to be processed in prefetched instruction caching and execution unit caching
The branch instruction that fulcrum is removed.If being stored in prefetched instruction caching and execution unit caching from this point to be processed
The branch instruction that fulcrum is removed, then perform step 3004.It is worth mentioning, the branch instruction removed includes passing through renaming
Instruction and general branch instruction.
Step 3004:Will be stored from the branch point to be processed from prefetched instruction caching and execution unit caching
On the branch instruction removed delete.
Step 3005:Judge whether stored from this point to be processed in prefetched instruction caching and execution unit caching
The branch instruction that fulcrum is removed.If being stored in prefetched instruction caching and execution unit caching from this point to be processed
The branch instruction that fulcrum is removed, then perform step 3006.If not having in prefetched instruction caching and execution unit caching
The branch instruction removed from the branch point to be processed is stored, step is performed:3007.
Step 3006:Remove what is removed in this to be performed branch point from prefetched instruction caching and execution unit caching
A upper finger for first instruction of the configuration processor that the branch point to be processed is removed is performed among branched program in system
The corresponding branched program that the jump instruction of order or branch instruction are confirmed is used as this to be performed branch determined from this
The branched program removed of point, after then the branched program is removed, then remove from some caching prefetched instruction caching and
The execution unit caches and is performed the configuration processor that the branch point to be processed is removed in system among unexistent branched program
First instruction a upper instruction jump instruction or the corresponding branched program that is confirmed of branch instruction, and after removing
Branch next branch using branch prediction method confirm after removed again from some caching, then by the prefetched instruction caching with
The branch instruction removed from the branch point to be processed contained in execution unit caching is deleted.It is worth mentioning that step
The program removed among rapid 3006 is performed as a configuration processor under execution system arrangement after the removal.It is worth mentioning
The instruction not decoded in the instruction for being the branched program that the branch point is removed, is decoded to the instruction not decoded.To solution
To carrying out the command operating that non-renaming is operated after code, first by the corresponding register renaming of the instruction at the beginning of non-renaming
Mapping table is dealt into the renaming unit for being responsible for processing configuration processor renaming, and the instruction that then this do not carried out to renaming operation is put
Renaming operation is carried out in the renaming unit for being responsible for processing configuration processor renaming.
Step 3007:Without operation.
It is noted that when carrying out renaming operation, to each another may correct program set pair
The group name answered operates for renaming, so as to avoid another two or more possible correct programs from carrying out simultaneously
When renaming is operated, the identical alias is used to register.It is noted that group name may be provided at the renaming table
In.
It is noted that resetting instruction fetch in the beginning instruction buffer for handling another possible correct program
Afterwards, in processing ending instruction buffer instruction fetch, according to the beginning instruction buffer weight for handling another possible correct program
Special case, the time of the good processing ending instruction buffer input instruction vacant without spatial cache of layout and position are there remains after dress
Put.For example, a caching has been stored for A branches, the number of instructions of A branches is then calculated, so that it is determined that filling up idle space
Input time and input position.Then basis fills up the input time of idle space and input position takes from another caching
Instruction, to put forward the utilization rate of effect caching.
It is noted that when being stored in the instruction in prefetched instruction caching, energy in being cached according to prefetched instruction
Number of instructions, advance layout need to be stored in well the number of instructions in prefetched instruction caching.
If it is noted that this another may correct program be conditional branching program, can be by the conditional branching
Address information in the corresponding prefetched instruction caching that the address that program adds the respective conditions is calculated.When condition is performed
Afterwards, the address information in being cached according to the prefetched instruction finds corresponding prefetched instruction cache instruction position and prefetched.
If, may be just by another related to the branch it is noted that some branched program will be performed
True program locking.The branched program of locking is just preferentially looked for after branch prediction failure.
Renaming preprocess method of the present invention further provides a setting at least renaming unit.The renaming unit is supplied
Carry out renaming operation.First, another possible correct program is allocated to the renaming unit.It is noted that
If there are multiple another possible correct program, correctly program the heavy life may be distributed respectively by each another
Name unit.Then, the renaming situation and the situation of program of each register before the branch point to be processed are recorded.Specifically
Ground says, in this procedure, before the branch point to be processed, the original name of each register, and repaiied after renaming is operated
The title and the title of last time amendment just crossed.It is noted that these situations all may be recorded in the renaming table.Value
Obtain one and be mentioned that in each register during renaming, the instruction corresponding to alias that each register is used is in the branch point
The alias finally corrected before is also recorded in the renaming table.It is noted that the renaming table is available for record at each point
The renaming situation and the situation of program of each register before fulcrum.Specifically, in this procedure, to be processed every
Before one branch point, the original name of each register, and corrected title and last time amendment after renaming is operated
Title.It is noted that these situations all may be recorded in the renaming table.Preferably, two renaming units are set.Respectively
The corresponding renaming table can be set in renaming unit, in order to carry out renaming operation.The renaming table can this be heavy by two
Unit access is named, to avoid each renaming unit from carrying out using identical alias when respective renaming is operated.But this is heavy
Name list can only be changed by corresponding renaming unit.
The above enumerates for the specific embodiment of the present invention, for the equipment and structure of wherein not detailed description, should
When being interpreted as taking the existing common apparatus in this area and universal method to be practiced.
The above embodiment of the present invention is only that explanation technical solution of the present invention is used simultaneously, only the row of technical solution of the present invention
Lift, the technical scheme and its protection domain being not intended to limit the invention.Using equivalent technologies mean, equivalent apparatus etc. to this hair
The improvement of technical scheme disclosed in bright claims and specification is considered to be without departing from claims of the present invention
And the scope disclosed in specification.