Software hints embedded in branch instructions direct selection of one of
a plurality of branch predictors to use when processing the branch
instructions, leading to improved branch prediction (i.e. fewer
mis-predictions) over conventional schemes. A software agent assembles
branch instructions having associated respective branch predictor control
fields compatible with a branch predictor selector and a plurality of
branch predictors. Each branch predictor control field is used to perform
branch predictor selection, branch predictor control, or both. Branch
predictor selection enables selective branch prediction according to an
appropriate one of the branch predictors as determined by the software
agent by examining context surrounding the branch instruction. Branch
predictor control enables control of operation of one or more of the
branch predictors. For example, a history-based branch predictor may be
instructed to provide branch prediction according to a history-depth
specified by the branch predictor control.