# US 2008/0082807 A1 · Effective Use of a BHT in Processor Having Variable Length Instruction Set Execution Modes

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2008/0082807 A1
- Document ID: US20080082807A1
- Status: Published application
- Kind: A1
- Application number: 11/536,743
- Filed: 2006-09-29
- Published: 2008-04-03
- Earliest claimed: 2006-09-29
- Assignees: QUALCOMM Incorporated
- Inventors: Brian Michael Stempel; Rodney Wayne Smith
- Web page: https://patentgrep.com/patent/US20080082807A1

## CPC

- G06F 9/30149: {of variable length instructions}
- G06F 9/30181: {Instruction operation extension or modification}
- G06F 9/30189: {according to execution mode, e.g. mode flag}
- G06F 9/3806: {using address prediction, e.g. return stack, branch history buffer}
- G06F 9/3844: {using dynamic branch prediction, e.g. using branch history tables}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

In a processor executing instructions in at least a first instruction set execution mode having a first minimum instruction length and a second instruction set execution mode having a smaller, second minimum instruction length, line and counter index addresses are formed that access every counter in a branch history table (BHT), and reduce the number of index address bits that are multiplexed based on the current instruction set execution mode. In one embodiment, counters within a BHT line are arranged and indexed in such a manner that half of the BHT can be powered down for each access in one instruction set execution mode.

## Claims

### Claim 1

A method of forming an address to index every line in a branch history table (BHT) in a variable length instruction set processor executing instructions in at least a first instruction set execution mode having a first minimum instruction length and a second instruction set execution mode having a smaller, second minimum instruction length, whereby each instruction set execution mode has a different native index address, comprising:
identifying the common native line index address bits of the first and second instruction set execution modes,
multiplexing between the most significant native line index address bits exclusive to the first instruction set execution mode and the least significant native line index address bits exclusive to the second instruction set execution mode, based on an instruction set execution mode indicator;
concatenating the common and multiplexed address bits; and
indexing lines in the BHT using the concatenated address.

### Claim 2 (depends on 1)

The method of claim 1 further comprising hashing the concatenated address with a global branch history value prior to indexing lines in the BHT.

### Claim 3 (depends on 2)

The method of claim 2 wherein hashing the concatenated address with the global branch history value comprises performing a logical exclusive-or between the concatenated address and the global branch history value.

### Claim 4 (depends on 1)

The method of claim 1 wherein a counter index address for an indexed line is formed by multiplexing between the native counter index address of the first instruction set execution mode and the native counter index address of the second instruction set execution mode

### Claim 5 (depends on 1)

The method of claim 1 wherein the first minimum instruction length is 32 bits and the second minimum instruction length is 16 bits.

### Claim 6 (depends on 4)

The method of claim 4 wherein the BHT comprises 512 lines of 8 counters each, and wherein:
the common native line index address bits comprise bits [12:5];
the most significant native line index address bits exclusive to the first instruction set execution mode comprise bit 13; and
the least significant native line index address bits exclusive to the second instruction set execution mode comprise bit 4.

### Claim 7 (depends on 5)

The method of claim 5 wherein a counter index address for an indexed line is formed by multiplexing between address bits [4:2] in the first instruction set execution mode and address bits [3:1] in the second instruction set execution mode.

### Claim 8

A method of forming line and counter index addresses to access every counter in a branch history table (BHT) in a variable length instruction set processor executing instructions in at least a first instruction set execution mode having a first minimum instruction length and a second instruction set execution mode having a smaller, second minimum instruction length, comprising:
indexing lines in the BHT using the native line index address of the second instruction set execution mode;
multiplexing between the most significant native line index address bits exclusive to the first instruction set execution mode and the least significant native counter index address bits exclusive to the second instruction set execution mode, based on an instruction set execution mode indicator; and
indexing counters in each BHT line using all but the least significant native counter index address bits of the second instruction set execution mode, concatenated with the multiplexed bits.

### Claim 9 (depends on 8)

The method of claim 8 further comprising:
separately powering two halves of the BHT;
ordering the counters in each line such that counters having an odd counter index address are grouped in one half and counters having an even counter index address are grouped in the other half; and
powering only half of the BHT in the first instruction set execution mode based on the value of the most significant native line index address bit exclusive to the first instruction set execution mode.

### Claim 10 (depends on 9)

The method of claim 9 further comprising ordering the counters in each line such that counter values that cannot be simultaneously read from the BHT are adjacent.

### Claim 11 (depends on 8)

The method of claim 8 wherein the first minimum instruction length is 32 bits and the second minimum instruction length is 16 bits.

### Claim 12 (depends on 11)

The method of claim 11 wherein the BHT comprises 512 lines of 8 counters each, and wherein:
the native line index address bits of the second instruction set execution mode comprise bits [12:4];
the most significant native line index address bits exclusive to the first instruction set execution mode comprise bit 13 and the least significant native counter index address bits exclusive to the second instruction set execution mode comprise bit 1; and
all but the least significant native counter index address bits of the second instruction set execution mode comprise bits [3:2].

### Claim 13

A method of operating a branch history table (BHT) comprising a plurality of counters in a variable length instruction set processor executing instructions in at least a first instruction set execution mode having a first minimum instruction length and a second instruction set execution mode having a smaller, second minimum instruction length, comprising:
powering the full BHT during BHT accesses in the second instruction set execution mode; and
powering only half of the BHT during BHT accesses in the first instruction set execution mode.

### Claim 14 (depends on 13)

The method of claim 13 further comprising arranging the plurality of counters into a plurality of lines, each line containing a plurality of counters, such that all of the counters having an even counter index address are in one half of the their respective lines, and all of the counters having an odd counter index address are in the other half of their respective lines.

### Claim 15 (depends on 14)

The method of claim 14 wherein counters that cannot be simultaneously accessed are juxtaposed adjacent each other in their respective lines.

### Claim 16

A processor, comprising:
an instruction execution pipeline having a fetch stage and operative to execute instructions in at least a first instruction set execution mode having a first minimum instruction length and a second instruction set execution mode having a smaller, second minimum instruction length; and
a branch history table (BHT) comprising a plurality of counters arranged and indexed by instruction addresses in the fetch pipeline stage such that, in the first instruction set execution mode, only half of the BHT is powered.

### Claim 17 (depends on 16)

The processor of claim 16 wherein the plurality of counters in the BHT are arranged into a plurality of lines, each line containing a plurality of counters, such that all of the counters having an even counter index address are in one half of the their respective lines, and all of the counters having an odd counter index address are in the other half of their respective lines.

### Claim 18 (depends on 17)

The processor of claim 17 wherein counters in the BHT that cannot be simultaneously accessed are juxtaposed adjacent each other in their respective lines.
