Liste des Groupes | Revenir à c arch |
MitchAlsup1 <mitchalsup@aol.com> schrieb:Probably.
>For example: The classical way to do dense switches is a LD of the>
target
address and a jump to the target. This requires verifying the address of
the target. Whereas if you predict as JTT does, you verify by matching
the index number (which is known earlier and since the table is
read-only
you don't need to verify the target address.
>
So, it is not that you don't predict, it is that the data used to
verify the prediction is more precise and available earlier.
Hmm... just wondering.
>
How does this handle
>
switch(a)
{
case 1:
case 3:
case 4:
case 7:
/* Do something */
break;
case 2:
case 5:
case 11:
/* Do something else */
break;
default:
/* Something else entirely */
}
>
Would the values 1,3,4 and 7 be considered different for
prediciton purposes?
Les messages affichés proviennent d'usenet.