The processor is configured to predecode instruction bytes prior to their
storage within an instruction cache. During the predecoding, relative
branch instructions are detected. The displacement included within the
relative branch instruction is added to the address corresponding to the
relative branch instruction, thereby generating the target address. The
processor replaces the displacement field of the relative branch
instruction with an encoding of the target address, and stores the
modified relative branch instruction in the instruction cache. The branch
prediction mechanism may select the target address from the displacement
field of the relative branch instruction instead of performing an addition
to generate the target address. In one embodiment, relative branch
instructions having eight bit and 32-bit displacement fields are included
in the instruction set executed by the processor. Additionally, the
processor employs predecode information (stored in the instruction cache
with the corresponding instruction bytes) including a start bit and a
control transfer bit corresponding to each instruction byte. The
combination of the start bit indicating that the byte is the start of an
instruction and the corresponding control transfer bit identifies the
instruction as either a branch instruction or a non-branch instruction.
For relative branch instructions including an eight bit displacement, the
control transfer bit corresponding to the displacement field is used in
conjunction with the displacement field to store the encoded target
address. Thirty-two bit displacement fields store the entirety of the
target address, and hence the encoded target address comprises the target
address.
O processador é configurarado aos bytes da instrução do predecode antes de seu armazenamento dentro de um esconderijo da instrução. Durante predecoding, as instruções de filial relativas são detectadas. O deslocamento incluído dentro da instrução de filial relativa é adicionado ao endereço que corresponde à instrução de filial relativa, gerando desse modo o endereço do alvo. O processador substitui o campo do deslocamento da instrução de filial relativa com um encoding do endereço do alvo, e armazena a instrução de filial relativa modificada no esconderijo da instrução. O mecanismo da predição da filial pode selecionar o endereço do alvo do campo do deslocamento da instrução de filial relativa em vez de executar uma adição para gerar o endereço do alvo. Em uma incorporação, as instruções de filial relativas que têm oito bocado e campos 32-bit do deslocamento são incluídas no jogo de instrução executado pelo processador. Adicionalmente, o processador emprega a informação do predecode (armazenada no esconderijo da instrução com os bytes correspondentes da instrução) including um bocado de começo e corresponder mordido de transferência de controle a cada byte da instrução. A combinação do bocado de começo que indica que o byte é o começo de uma instrução e do bocado correspondente de transferência de controle identifica a instrução como uma instrução de filial ou uma instrução da non-filial. Para instruções de filial relativas including um deslocamento de oito bocados, corresponder mordido de transferência de controle ao campo do deslocamento é usado conjuntamente com o campo do deslocamento armazenar o endereço codificado do alvo. Os campos do deslocamento do bocado de Thirty-two armazenam a totalidade do endereço do alvo, e daqui o endereço codificado do alvo compreende o endereço do alvo.