CN102566975A - Device, method and processor for processing branch skipping of skipping path - Google Patents

Device, method and processor for processing branch skipping of skipping path Download PDF

Info

Publication number
CN102566975A
CN102566975A CN2010106072166A CN201010607216A CN102566975A CN 102566975 A CN102566975 A CN 102566975A CN 2010106072166 A CN2010106072166 A CN 2010106072166A CN 201010607216 A CN201010607216 A CN 201010607216A CN 102566975 A CN102566975 A CN 102566975A
Authority
CN
China
Prior art keywords
branch
instruction
node
redirect
path
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.)
Pending
Application number
CN2010106072166A
Other languages
Chinese (zh)
Inventor
李陆军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BEIJING GUORUI ZHONGSHU TECHNOLOGY CO LTD
Original Assignee
BEIJING GUORUI ZHONGSHU TECHNOLOGY CO LTD
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by BEIJING GUORUI ZHONGSHU TECHNOLOGY CO LTD filed Critical BEIJING GUORUI ZHONGSHU TECHNOLOGY CO LTD
Priority to CN2010106072166A priority Critical patent/CN102566975A/en
Publication of CN102566975A publication Critical patent/CN102566975A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a device, method and processor for processing branch skipping of a skipping path. The device comprises a node mark register unit, a node forecasting register unit, a searching unit, an execution unit and a resetting unit, wherein the node mark register unit is used for storing node judging information; the node forecasting register unit is used for loading the node judging information stored in the node mark register unit according to a first instruction; the searching unit is used for searching for a first set position of the node judging information in the node forecasting register unit; the execution unit is used for skipping the skipping path to a branch corresponding to the first set position and then executing the branch; and the resetting unit is used for resetting the first set position corresponding to the branch in the node forecasting register unit according to a second instruction after the branch corresponding to the first set position is completely executed. According to the scheme of the invention, the judgment waste caused by two branch skipping instructions in an ultra-long skipping path is efficiently reduced.

Description

Branch's redirect treating apparatus, method and the processor in a kind of redirect path
Technical field
The present invention relates to the micro-processor architecture technical field, be meant branch's redirect treating apparatus, method and the processor in a kind of redirect path especially.
Background technology
In the micro-processor architecture; At some to the severe especially occasion of real-time requirement; In some data processing and communication, requirement in real time is more strict than some other occasions, and the design of the controller in these microprocessors is usually with simplicity of design; Be easy to realize that the pipeline efficiency height is main design object.In the instruction design of this quasi-controller, the compacting instruction set processor with 5 grades of more common flowing water is that source designs it usually.The compacting instruction set processor of 5 grades of flowing water is processors of a kind of classical architecture, and technology maturation realizes that simply instruction process is efficient.
The jump instruction of this type processor can be called two branch instructions usually, and promptly working as the redirect condition is that true time jumps to the branch address execution; Otherwise when the redirect condition is a fictitious time, program continues to carry out downwards.
With reference to the example of Fig. 1, suppose that a certain program has the judgement branched structure of similar Fig. 1: promptly program has 6 C of branch, E, G, I and H branch, and each branch all carries out under certain conditions, wherein:
The condition that C branch carries out is that the A node is true, otherwise will not carry out;
The condition that E branch carries out is that the B node is true, otherwise will not carry out;
The condition that G branch carries out is that the D node is true, otherwise will not carry out;
The condition that I branch carries out is that the F node is true, otherwise carries out H branch.
A, B, D and F node have constituted the condition that CEGIH branch carries out.
In the processing mode of two branch instructions, the decision path of I branch is made up of ABDF, and concrete deterministic process is following:
At first judge the A node, whether will carry out C branch, then judge the B node by the decision of A node; Whether to carry out E branch by the decision of B node, and then judge the D node, whether will carry out G branch by the decision of D node; Judge the F node at last, determine whether to get into I branch.
It is thus clear that the execution route of I branch is the path of similar A (C) B (E) D (G) F (I), under worst case; A, B, D node are vacation; Judge that the path is the longest this moment, promptly just determines I through A, B, D at last after being judged as vacation for three times, and this is bigger waste.
Fig. 1 only shows 4 the node branch path situation that have, and in more individual path, judges that similarly waste is more serious.In data processing and communication, usually make such judgement waste seem and can not accept to the requirement of real-time decoding, shorten such judgement waste particular importance that just seems effectively.
Fig. 2 is a judgement path profile of using the efficient branch jump instruction that is applicable to overlength redirect path, and this judgement path is to realize Fig. 1 identical functions, still is the situation that hypothesis I branch will carry out; I branch position is a true time in the A node, just can carry out I branch at once, after I branch is complete; Get into the B node and judge, after the B node determines a true value branch, get into this true value branch; After this true value branch is complete, gets into next node D again and judge, determine a true value branch at the D node; Get into this true value branch, after this true value branch is complete, gets into next node F again and judge; After the F node is judged next true value branch, be complete, get at last and withdraw from branch.Top A, B, D in the F node deterministic process, has any one node false, gets at once and withdraws from branch, and having has the true value position in any one node, get into this true value score value at once.In fact, in the above in the judgement of A node, once after getting into I branch and withdrawing from from I branch subsequently, the judgement that can not get into D, F node again is because can find that all node positions all for false, can get into immediately and withdraw from branch when getting into the B node.Therefore after having used the efficient branch jump instruction that is applicable to overlength redirect path; Though still have four node A, B, D and F node on the judgement path of program; But different with Fig. 1 is; Each node has two and above branch, and the judgement of each A, B, D and F node can both get into an effective branch, thereby has shortened the judgement that two branch instructions cause among Fig. 1 waste greatly; But in this path profile shown in Figure 2, the situation that still exists four nodes all to judge when I branch will carry out; Therefore, there is serious judgement waste in existing two branch instruction technology in overlength redirect path.
Summary of the invention
The technical matters that the present invention will solve provides branch's redirect treating apparatus, method and the processor in a kind of redirect path; Make each judgement all can get into an effective branch, can effectively reduce the judgement waste that the jump instruction of two branches causes in overlength redirect path.
For solving the problems of the technologies described above, embodiments of the invention provide branch's redirect treating apparatus in a kind of redirect path, comprising:
The node label register cell is used to preserve node and judges information;
Node prediction register cell is used for according to first instruction, loads the said node of preserving in the said node label register cell and judges information;
Search the unit, be used for searching first position that is set that said node is judged information at said node prediction register cell;
Performance element is used for that the redirect path is jumped to the corresponding branch in the said position that first is set and carries out;
The zero clearing unit is used for after the said corresponding branch in position that first is set is finished, according to second instruction, with the corresponding said position zero clearing that first is set of this branch in the said node prediction register cell.
Wherein, the said unit of searching specifically is used for, and in said node prediction register cell, according to the order from a high position to the low level, searches first position that is set that said node is judged information.
Wherein, said first instruction is the entry instruction in said path; Said branch redirect treating apparatus also comprises:
The entry instruction address register units is used to deposit the address of said first instruction;
Said performance element is with said address offset amount of searching the said position that first is set that the unit finds with respect to said first instruction; Address addition with said first instruction; Obtain the specific address of the corresponding branch in the said position that first is set, said redirect path is jumped to the corresponding said branch of said specific address carry out.
Wherein, said first instruction is the CASE instruction.
Wherein, said second instruction is the NEXT instruction, and said NEXT instruction is for searching the instruction of next branch in the said redirect path;
Said zero clearing unit is after the said corresponding branch in position that first is set is finished, according to said NEXT instruction, with the said position zero clearing that first is set of this branch's correspondence in the said node prediction register cell.
Embodiments of the invention also provide branch's redirect disposal route in a kind of redirect path, comprise the steps:
According to first instruction, the node that obtains in the redirect path is judged information;
Search first position that is set in the said node judgement information;
The redirect path is jumped to the corresponding branch in the said position that first is set carries out;
After the said corresponding branch in position that first is set is finished, according to second instruction, the said position zero clearing that first is set that the said branch that is finished is corresponding, and continue to search first position that is set in the said node judgement information.
The step of wherein, searching the position that in the said node judgement information first be set is specially:
According to the order from a high position to the low level, search first position that is set that said node is judged information.
Wherein, said first instruction is the entry instruction in said path;
Saidly the redirect path is jumped to the corresponding branch in the said position that first is set carry out and be specially:
With the address offset amount of the said position that first is set with respect to said first instruction; Address addition with said first instruction; Obtain the specific address of the corresponding branch in the said position that first is set, said redirect path is jumped to the corresponding said branch of said specific address carry out.
Wherein, said first instruction is the CASE instruction.
Wherein, said second instruction is the NEXT instruction, and said NEXT instruction is for searching the instruction of next branch in the said redirect path.
Wherein, said node judgement information is: the logical value that branch carries out, when said logical value is a true time, the corresponding position of said branch for first be set.
Embodiments of the invention also provide a kind of processor, and this processor comprises above-mentioned branch's redirect treating apparatus.
The beneficial effect of technique scheme of the present invention is following:
In the such scheme; Node prediction register cell is according to first instruction; Load the said node of preserving in the said node label register cell and judge information; Search said node then and judge first position that is set of information, and the redirect path is jumped to the corresponding branch's execution in the said position that first is set; In prior art, the scheme that each node all need participate in judging is compared; Scheme of the present invention can be in the light branch's redirect design in overlength road; Directly jumping to an effective branch carries out; Be that the corresponding branch in the above-mentioned position that first is set carries out; Make each judgement all can get into an effective branch, thereby effectively reduce the judgement waste that the jump instruction of two branches causes in overlength redirect path.
Description of drawings
Fig. 1 is first kind of form exemplary plot in redirect path;
Fig. 2 is second kind of form exemplary plot in redirect path;
Fig. 3 is branch's redirect treating apparatus structured flowchart in redirect of the present invention path;
Fig. 4 carries out frame diagram for branch shown in Figure 3 redirect treating apparatus is applicable to the efficient jump instruction CASE of branch in overlength redirect path and the program of NEXT instruction.
Embodiment
For technical matters, technical scheme and advantage that the present invention will be solved is clearer, will combine accompanying drawing and specific embodiment to be described in detail below.
The present invention is directed in the prior art; There is the problem of serious judgement waste in two branch instruction technology in overlength redirect path; Branch's redirect treating apparatus, method and the processor in a kind of redirect path are provided; Make each judgement all can get into an effective branch, can effectively reduce the judgement waste that the jump instruction of two branches causes in overlength redirect path.
As shown in Figure 3, branch's redirect treating apparatus in redirect of the present invention path comprises:
Node label register cell 11 is used to preserve node and judges information;
Node prediction register cell 12 is used for according to first instruction, loads the said node of preserving in the said node label register cell 11 and judges information;
Search unit 13, be used for searching first position that is set that said node is judged information at said node prediction register cell 12;
Performance element 16 is used for that the redirect path is jumped to the corresponding branch in the said position that first is set and carries out;
Zero clearing unit 14 is used for after the said corresponding branch in position that first is set is finished, according to second instruction, with the corresponding said position zero clearing that first is set of this branch in the said node prediction register cell 12.
This embodiment of the present invention; Instruct according to first through node prediction register cell 12; Load the said node of preserving in the said node label register cell 11 and judge information; And search first position that is set that said node is judged information, and the redirect path is jumped to the corresponding branch's execution in the said position that first is set; In prior art, the scheme that each node all need participate in judging is compared; This embodiment of the present invention can be in the light branch's redirect design in overlength road; Directly jumping to an effective branch carries out; Be that the corresponding branch in the above-mentioned position that first is set carries out; Make each judgement all can get into an effective branch, can effectively reduce the judgement waste that the jump instruction of two branches causes in overlength redirect path.
Specifically, the above-mentioned unit 13 of searching specifically is used for, and in said node prediction register cell 12, according to the order from a high position to the low level, searches first position that is set that said node is judged information.
Wherein, said first instruction is the entry instruction in said path; Said branch redirect treating apparatus also comprises:
Entry instruction address register units 15 is used to deposit the address of said first instruction;
Said performance element 16 is with said address offset amount of searching the said position that first is set that unit 13 finds with respect to said first instruction; Address addition with said first instruction; Obtain the specific address of the corresponding branch in the said position that first is set, said redirect path is jumped to the corresponding said branch of said specific address carry out.Wherein, first instruction here can be instructed for CASE when concrete the realization, and this moment, this entry instruction address register units 15 can be the CASE instruction address register unit shown in figure; Certainly when concrete the realization, can also adopt other instruction, like the BEGIN instruction etc., as long as can represent the entry instruction in path, and the initial base address that the address of this entry instruction can be used as entire path gets final product.
Said second instruction is the NEXT instruction, and said NEXT instruction is for searching the instruction of next branch in the said redirect path;
Said zero clearing unit 14 is after the said corresponding branch in position that first is set is finished, according to said NEXT instruction, with the said position zero clearing that first is set of this branch's correspondence in the said node prediction register cell 12.
This scheme is applicable to CASE, the design framework of NEXT instruction.
The concrete implementation procedure of above-mentioned device shown in Figure 3 is described below in conjunction with concrete embodiment:
As shown in Figure 4; Be the efficient jump instruction CASE of branch in overlength redirect path and the program execution frame diagram of NEXT instruction; Wherein, This program redirect branch inlet is organized as the vector table form, unified next bar instruction address place 42 of leaving CASE instruction 41 in, and redirect branch carries out body and is placed on position 43 subsequently in proper order according to the form that redirect branch enters the mouth.
Above-mentioned each unit practical implementation step is following:
(1) send the CASE instruction, the node in this CASE instruction load node label register cell 11 judges that information is in node prediction register cell 12;
(2) search unit 13 and from a high position to the low level, search first position that is set in the node prediction register cell 12 successively; If find; Provide this first side-play amount of position in node prediction register cell 12 of being set; That is: the corresponding branch in this first position of being set is with respect to the address offset amount of path entry instruction (CASE instruction) and the address addition of the instruction of the CASE in the CASE instruction address register unit 15, is the specific address of the branch of this first correspondence of being set;
(3) jumping to this first the corresponding branch in position that is set according to this specific address handles; By zero clearing unit 14 node is predicted the said position zero clearing that first is set in the register cell 12 simultaneously; After branch process is accomplished; Carry out the NEXT instruction, find next target branch (the promptly next corresponding branch in position that first is set)
(4) repeat above-mentioned (2)-(3) step, other position (except that the 0th) in node prediction register cell 12 is all by 14 zero clearings of zero clearing unit; Go to outlet branch, node is judged end.
The detailed process of judging through branch below specifies the efficient branch redirect that how realizes being adapted to overlength redirect path through such scheme of the present invention:
Example 1: suppose four node A among Fig. 1, B, D, F is following in the true and false situation of certain its logic determines at quarter:
{A,B,D,F?}?=?{0110}
Be A, F is a logical falsehood, and B, D are logical truth, and the sequencing of four nodes in program is arranged as A, B, D, F.So with high four [n-1, n-2, n-3 in the node label register cell 11; N-4, exit] be initialized as { 0110}, all the other position (except that lowest order) [n-5; ... 1] initialization 0, and be changed to 1 to lowest order [0], program can be undertaken by framework shown in Figure 4 so:
(1) at first carries out CASE instruction 41; Be actually content { 011000 with node label register cell 11 ... 01} is loaded in the node prediction register cell 12; CASE instruction meeting is simultaneously judged the position that first is set through searching unit 13 according to the content of node prediction register cell 12; It is the corresponding position of first redirect branch; First position work of 1 that is set of this judgement is searched unit 13 and is accomplished by looking for, and searching unit 13 only needs an instruction cycle just can find the position 1 that first is set, determine the 2nd from a high position to the low level in the node prediction register cell 12 and be B_entry branch corresponding be 1; Need to prove: be true time with node judgement information here, the corresponding position of the branch that the path can redirect is set to 1, otherwise is set to 0; This set mode only describes as a kind of instance; And be not used in the scheme of the present invention that limits, and can be true time also with this node judgement information, the corresponding position of branch that the path can transfer is set to other value; As long as can represent this branch is true time in this node judgement information, can be performed and gets final product.
(2) search unit 13 output B_entry finger offsets amounts 2; This B_entry side-play amount is that the address with the entry address CASE in path instruction is the side-play amount of base address; Address like CASE instruction is 0, and then this B_entry is that the side-play amount of base address just is 2 with the address of this CASE instruction; With the side-play amount of this B_entry and the address addition of the instruction of the CASE in the CASE address register, obtain the specific address of B_entry branch;
(3) performance element 16 is according to the specific address of this B_entry branch.; Get into B_entry 42 and carry out, complete after, carry out NEXT instruction 43; This NEXT instruction notification zero clearing unit 14 falls node clearly and predicts that the 2nd from a high position to the low level is the corresponding position of B_entry branch in the register cell 12; For follow-up judgement is prepared, simultaneously judge the next position that is set according to the content in the node prediction register cell 12, promptly next true value branch by searching unit 13.The work of first position 1 that is set of current judgement is searched unit 13 by the NEXT instruction notification and is accomplished; Searching unit 13 only needs an instruction cycle just can find the position that first is set; Certainly this time can find the 3rd to be the corresponding position of D_entry branch, next instruction will get into D_entry and carry out;
(4) search unit 13 output D_entry finger offsets amounts 3, performance element 16 obtains the specific address of D_entry branch with the address addition of the instruction of the CASE in this D_entry side-play amount and the CASE instruction address register unit 15;
(5) performance element 16 is according to the specific address of this D_entry branch; Get into D_entry and carry out, complete after, carry out the NEXT instruction; This NEXT instruction notification zero clearing unit 14 falls node clearly and predicts that the 3rd from a high position to the low level is the corresponding position of D_entry branch in the register cell 12; For follow-up judgement is prepared, simultaneously judge the position that the next one is set according to the content in the node prediction register cell 12, promptly next true value branch by searching unit 13.The work of first position 1 that is set of current judgement is searched unit 13 by the NEXT instruction notification and is accomplished; Searching unit 13 only needs an instruction cycle just can find the position 1 that first is set; Certainly the lowest order that can find node prediction register cell 12 specifically is 1; This corresponding EXIT branch, next instruction will get into EXIT_entry and carry out;
(6) get into EXIT_entry and carry out, wherein, EXIT_entry is outlet branch, and whole judgement flow process finishes.
Example 2: suppose four node A among Fig. 2, B, D, F. is following in the true and false situation of certain its logic determines at quarter:
{A,B,D,F?}?=?{0001}
Be A, B, D are logical falsehood, and F is a logical truth.The sequencing of four nodes in program is arranged as A, B, D, F.So high four [n-1, n-2, n-3, n-4] in the node label register cell 11 is initialized as 0001}, and all the other positions [n-5 ... 1] initialization 0, and be changed to 1 to lowest order [0].Program can be undertaken by framework shown in Figure 4 so:
(1) at first carries out CASE instruction 41; Be actually content { 000100 with node label register cell 11 ... 01} is loaded in the node prediction register cell 12; CASE instruction meeting is simultaneously judged the position that first is set, i.e. first redirect branch through searching unit 13 according to the content in the node prediction register cell 12; Certainly this can determine that the 4th from a high position to the low level is 1 in the node prediction register cell 12, this corresponding F_entry branch;
(2) search unit 13 output F_entry finger offsets amounts 5, performance element 16 obtains the specific address of F_entry branch with the address addition of the instruction of the CASE in this F_entry side-play amount and the CASE instruction address register unit 15;
(3) performance element 16 gets into the execution of F_entry 42 branches according to the specific address of F_entry branch; After complete; Carry out NEXT instruction 43, this NEXT instruction notification zero clearing unit 14 falls node clearly and predicts that the 4th from a high position to the low level is the corresponding position of F_entry branch in the register cell 12, for follow-up judgement is prepared; Simultaneously judge the next position that is set according to the content in the node prediction register cell 12, promptly next true value branch by searching unit 13.The work of first position 1 that is set of current judgement is searched unit 13 by the NEXT instruction notification and is accomplished; Searching unit 13 only needs an instruction cycle just can find the position 1 that first is set; Certainly the lowest order that can find node prediction register cell 12 is 1; This corresponding EXIT branch, next instruction will get into EXIT_entry and carry out;
(4) get into EXIT_entry and carry out, in fact, EXIT_entry will continue the follow-up of program like this and carry out for outlet branch.
In sum; The above embodiment of the present invention; Overcome traditional two branch instructions and judged the deficiency in the path, made each judgement all can get into one and effectively carry out branch, in overlength redirect path, can effectively reduce the judgement waste that the jump instruction of two branches causes in overlength; Branch's judging efficiency obviously improves, and feasibility is good.
Need to prove: the realization instance shown in above-mentioned routine 1, the example 2 only is used for the principle of explaining that device of the present invention is handled in branch's redirect; And be not used in the scheme of the present invention that limits; In branch's redirect of ultra-long route is handled; Can also enumerate some similar realization instances, in this explanation no longer one by one.
Corresponding with branch's redirect treating apparatus in above-mentioned transfer path, embodiments of the invention also provide branch's redirect disposal route in a kind of redirect path, comprise the steps:
Step S1, according to first instruction, the node that obtains in the redirect path is judged information;
Step S2 searches first position that is set in the said node judgement information;
Step S3 jumps to the corresponding branch in the said position that first is set with the redirect path and carries out;
Step S4; After the said corresponding branch in position that first is set is finished; According to second instruction, the said position zero clearing that first is set that the said branch that is finished is corresponding, and continue to search first position that is set in the said node judgement information.
Wherein, above-mentioned steps S1-S4 can be carried out by relevant register respectively, also can be carried out by corresponding functional modules, can design according to actual conditions.
Wherein, above-mentioned steps S2 can be specially:
According to the order from a high position to the low level, search first position that is set that said node is judged information.
Further, in CASE instruction and NEXT instruction Frame Design, said first instruction is the CASE instruction, and said CASE instruction is the entry instruction in said path;
The redirect path is jumped to the corresponding branch's execution in the said position that first is set to be specially:
With the address offset amount of the said position that first is set with respect to said CASE instruction; Address addition with said CASE instruction; Obtain the specific address of the corresponding branch in the said position that first is set, said redirect path is jumped to the corresponding said branch of said specific address carry out.When concrete the realization, first instruction can also be adopted other instruction certainly, and like the BEGIN instruction etc., as long as can represent the entry instruction in path, and the initial base address that the address of this entry instruction can be used as entire path gets final product.
Said second instruction is the NEXT instruction, and said NEXT instruction is for searching the instruction of next branch in the said redirect path.
Said node judgement information is: the logical value that branch carries out, when said logical value is a true time, the corresponding position of said branch for first be set.
Need to prove: the concrete implementation method of said apparatus and instance all are applicable among this method embodiment, also can reach identical technique effect, repeat no more at this.
Meanwhile; Embodiments of the invention also provide a kind of processor; This processor can comprise branch's redirect treating apparatus in the redirect path of above-mentioned Fig. 3-shown in Figure 4, and wherein, all implementations of above-mentioned branch's redirect treating apparatus relevant for the redirect path all are applicable among the embodiment of this processor; Also can reach identical technique effect, repeat no more at this.
The above is a preferred implementation of the present invention; Should be pointed out that for those skilled in the art, under the prerequisite that does not break away from principle according to the invention; Can also make some improvement and retouching, these improvement and retouching also should be regarded as protection scope of the present invention.

Claims (12)

1. branch's redirect treating apparatus in a redirect path is characterized in that, comprising:
The node label register cell is used to preserve node and judges information;
Node prediction register cell is used for according to first instruction, loads the said node of preserving in the said node label register cell and judges information;
Search the unit, be used for searching first position that is set that said node is judged information at said node prediction register cell;
Performance element is used for that the redirect path is jumped to the corresponding branch in the said position that first is set and carries out;
The zero clearing unit is used for after the said corresponding branch in position that first is set is finished, according to second instruction, with the corresponding said position zero clearing that first is set of this branch in the said node prediction register cell.
2. branch according to claim 1 redirect treating apparatus; It is characterized in that the said unit of searching specifically is used for, in said node prediction register cell; According to the order from a high position to the low level, search first position that is set that said node is judged information.
3. branch according to claim 1 redirect treating apparatus is characterized in that, said first instruction is the entry instruction in said path; Said branch redirect treating apparatus also comprises:
The entry instruction address register units is used to deposit the address of said first instruction;
Said performance element is with said address offset amount of searching the said position that first is set that the unit finds with respect to said first instruction; Address addition with said first instruction; Obtain the specific address of the corresponding branch in the said position that first is set, said redirect path is jumped to the corresponding said branch of said specific address carry out.
4. branch according to claim 3 redirect treating apparatus is characterized in that, said first instruction is the CASE instruction.
5. according to claim 3 or 4 described branch redirect treating apparatus, it is characterized in that said second instruction is the NEXT instruction, said NEXT instruction is for searching the instruction of next branch in the said redirect path;
Said zero clearing unit is after the said corresponding branch in position that first is set is finished, according to said NEXT instruction, with the said position zero clearing that first is set of this branch's correspondence in the said node prediction register cell.
6. branch's redirect disposal route in a redirect path is characterized in that, comprises the steps:
According to first instruction, the node that obtains in the redirect path is judged information;
Search first position that is set in the said node judgement information;
The redirect path is jumped to the corresponding branch in the said position that first is set carries out;
After the said corresponding branch in position that first is set is finished, according to second instruction, the said position zero clearing that first is set that the said branch that is finished is corresponding, and continue to search first position that is set in the said node judgement information.
7. branch according to claim 6 redirect disposal route is characterized in that, the step of searching first position that is set in the said node judgement information is specially:
According to the order from a high position to the low level, search first position that is set that said node is judged information.
8. according to claim 6 or 7 described branch redirect disposal routes, it is characterized in that said first instruction is the entry instruction in said path;
Saidly the redirect path is jumped to the corresponding branch in the said position that first is set carry out and be specially:
With the address offset amount of the said position that first is set with respect to said first instruction; Address addition with said first instruction; Obtain the specific address of the corresponding branch in the said position that first is set, said redirect path is jumped to the corresponding said branch of said specific address carry out.
9. branch according to claim 8 redirect disposal route is characterized in that, said first instruction is the CASE instruction.
10. branch according to claim 9 redirect disposal route is characterized in that, said second instruction is the NEXT instruction, and said NEXT instruction is for searching the instruction of next branch in the said redirect path.
11. branch according to claim 6 redirect disposal route is characterized in that, said node judgement information is: the logical value that branch carries out, when said logical value is a true time, the corresponding position of said branch for first be set.
12. a processor is characterized in that, comprises each described branch redirect treating apparatus like claim 1-5.
CN2010106072166A 2010-12-27 2010-12-27 Device, method and processor for processing branch skipping of skipping path Pending CN102566975A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010106072166A CN102566975A (en) 2010-12-27 2010-12-27 Device, method and processor for processing branch skipping of skipping path

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010106072166A CN102566975A (en) 2010-12-27 2010-12-27 Device, method and processor for processing branch skipping of skipping path

Publications (1)

Publication Number Publication Date
CN102566975A true CN102566975A (en) 2012-07-11

Family

ID=46412494

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010106072166A Pending CN102566975A (en) 2010-12-27 2010-12-27 Device, method and processor for processing branch skipping of skipping path

Country Status (1)

Country Link
CN (1) CN102566975A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103984531B (en) * 2014-05-30 2016-09-28 龙芯中科技术有限公司 Overlength branch redirects processing method and processing device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1627253A (en) * 2003-12-12 2005-06-15 上海奇码数字信息有限公司 Conditioned control management device and method
US20080091991A1 (en) * 2006-09-21 2008-04-17 Rajiv Kapoor Method and apparatus for performing logical compare operation
CN101859325A (en) * 2010-06-07 2010-10-13 华为技术有限公司 Method and device for searching and processing data table items

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1627253A (en) * 2003-12-12 2005-06-15 上海奇码数字信息有限公司 Conditioned control management device and method
US20080091991A1 (en) * 2006-09-21 2008-04-17 Rajiv Kapoor Method and apparatus for performing logical compare operation
CN101859325A (en) * 2010-06-07 2010-10-13 华为技术有限公司 Method and device for searching and processing data table items

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103984531B (en) * 2014-05-30 2016-09-28 龙芯中科技术有限公司 Overlength branch redirects processing method and processing device

Similar Documents

Publication Publication Date Title
CN103377037B (en) Optimize initialization of register operation
TWI599949B (en) Method and apparatus for implementing a dynamic out-of-order processor pipeline
TWI550413B (en) Application scheduling in heterogeneous multiprocessor computing platforms for maximal predicted performance gains
CN102981807B (en) Graphics processing unit (GPU) program optimization method based on compute unified device architecture (CUDA) parallel environment
CN105512088B (en) A kind of restructural processor architecture and its reconstructing method
CN1328664A (en) Method and apparatus for branch prediction using second level branch prediction table
CN104471529B (en) To the method and apparatus of extended software branch target prompting
CN102298352B (en) Specific processor system structure for high-performance programmable controller and implementation method of dedicated processor system structure
CN106104481A (en) Certainty and opportunistic multithreading
CN102662640B (en) Double-branch target buffer and branch target processing system and processing method
CN1692331A (en) Method and apparatus for clearing hazards using jump instructions
CN101799750A (en) Data processing method and device
CN103488536B (en) Method for scheduling task, device and operating system
CN102057357A (en) Multiprocessor system
US7747992B2 (en) Methods and apparatus for creating software basic block layouts
CN100573500C (en) Stream handle IP kernel based on the Avalon bus
CN1523496A (en) Method and system for stopping unnecessary processing conditional instructions of processor
CN105404635B (en) Method, equipment and the heterogeneous computing system of string matching
CN102566975A (en) Device, method and processor for processing branch skipping of skipping path
CN103235715B (en) Method, device and the chip of a kind of SOC(system on a chip) SoC command process
CN115374914B (en) Distributed training method, parallel deep learning framework and electronic equipment
CN105094750B (en) A kind of the return address prediction technique and device of multiline procedure processor
CN1144124C (en) Program execution method and device using the same
CN100409180C (en) Method and system for processing a loop of instructions
CN110069671A (en) Object collecting method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20120711