# US 2010/0169606 A1 · Processor and method for using an instruction hint to prevent hardware prefetch from using certain memory accesses in prefetch calculations

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

- Number: US 2010/0169606 A1
- Document ID: US20100169606A1
- Status: Published application
- Kind: A1
- Application number: 12/346,154
- Filed: 2008-12-30
- Published: 2010-07-01
- Earliest claimed: 2008-12-30
- Assignees: Advanced Micro Devices, Inc.
- Inventors: Thomas M. Deneau
- Web page: https://patentgrep.com/patent/US20100169606A1

## CPC

- G06F 12/0862: with prefetch
- G06F 2212/6028: Prefetching based on hints or prefetch instructions
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A microprocessor includes a cache memory, a prefetch unit, and detection logic. The prefetch unit may be configured to monitor memory accesses that miss in the cache and to determine whether to prefetch one or more blocks of memory from a system memory based upon previous memory accesses. The prefetch unit may be further configured to use addresses of the memory accesses that miss to calculate each next memory block to prefetch. The detection logic may be configured to provide a notification to the prefetch unit in response to detecting a memory access instruction including a particular hint. In response to receiving the notification, the prefetch unit may be configured to inhibit using an address associated with the memory access instruction including the particular hint, when calculating subsequent memory blocks to prefetch.

## Claims

### Claim 1

A microprocessor comprising:
a cache memory;
a prefetch unit coupled to the cache memory and configured to monitor memory accesses and to determine whether to prefetch one or more blocks of memory from a system memory based upon previous memory accesses, wherein the prefetch unit is further configured to use addresses of the memory accesses to calculate each next memory block to prefetch;
detection logic configured to provide a notification in response to detecting a memory access instruction including a particular hint;
wherein in response to receiving the notification, the prefetch unit is configured to inhibit using an address associated with the memory access instruction including the particular hint, to calculate subsequent memory blocks to prefetch.

### Claim 2 (depends on 1)

The microprocessor as recited in claim 1, wherein the memory access instruction including the particular hint comprises a non-standard memory access instruction.

### Claim 3 (depends on 1)

The microprocessor as recited in claim 1, wherein the memory access instruction including the particular hint comprises a modified standard memory access instruction with one or more bits having a particular encoding.

### Claim 4 (depends on 1)

The microprocessor as recited in claim 1, wherein the prefetch unit is further configured to discard the address associated with the memory access instruction including the particular hint in response to receiving the notification.

### Claim 5 (depends on 1)

The microprocessor as recited in claim 1, wherein the notification comprises a tag appended to a memory operation corresponding to the memory access instruction including the particular hint.

### Claim 6 (depends on 1)

The microprocessor as recited in claim 1, wherein a standard memory access instruction is replaced by the memory access instruction including the particular hint within an instruction sequence automatically by a compiler.

### Claim 7 (depends on 1)

The microprocessor as recited in claim 1, wherein a standard memory access instruction is replaced by the memory access instruction including the particular hint within an instruction sequence manually by a programmer user.

### Claim 8

A method comprising:
a prefetch unit monitoring memory accesses and determining whether to prefetch one or more blocks of memory from a system memory based upon previous memory accesses;
calculating each next memory block to prefetch using addresses of the memory accesses;
in response to detecting a memory access instruction including a particular hint, providing a notification;
in response to receiving the notification, the prefetch unit discarding an address associated with the memory access instruction including the particular hint so that calculations of subsequent memory blocks to prefetch do not include the discarded address.

### Claim 9 (depends on 8)

The method as recited in claim 8, wherein the memory access instruction including a the particular hint comprises a non-standard memory access instruction.

### Claim 10 (depends on 8)

The method as recited in claim 8, further comprising creating the memory access instruction including a the particular hint by modifying a standard memory access instruction to have one or more bits include a particular encoding.

### Claim 11 (depends on 8)

The method as recited in claim 8, further comprising the prefetch unit discarding the address associated with the memory access instruction including the particular hint in response to receiving the notification.

### Claim 12 (depends on 8)

The method as recited in claim 8, wherein providing a notification further comprises appending a tag to a memory operation corresponding to the memory access instruction including the particular hint.

### Claim 13 (depends on 8)

The method as recited in claim 8, further comprising a compiler automatically replacing a standard memory access instruction with the memory access instruction including the particular hint within an instruction sequence.

### Claim 14 (depends on 8)

The method as recited in claim 8, further comprising a programmer user manually replacing a standard memory access instruction with the memory access instruction including the particular hint within an instruction sequence.

### Claim 15

A computer system comprising:
a system memory;
a microprocessor coupled to the system memory, wherein the microprocessor includes:
a cache memory;
a prefetch unit coupled to the cache memory and configured to monitor memory accesses and to determine whether to prefetch one or more blocks of memory from the system memory based upon previous memory accesses, wherein the prefetch unit is further configured to use addresses of the memory accesses to calculate each next memory block to prefetch;
detection logic configured to provide a notification in response to detecting a memory access instruction including a particular hint;
wherein in response to receiving the notification, the prefetch unit is configured to inhibit using an address associated with the memory access instruction including the particular hint to calculate subsequent memory blocks to prefetch.

### Claim 16 (depends on 15)

The system as recited in claim 15, wherein the memory access instruction including the particular hint comprises a non-standard memory access instruction.

### Claim 17 (depends on 15)

The system as recited in claim 15, wherein the memory access instruction including the particular hint comprises a modified standard memory access instruction with one or more bits having a particular encoding.

### Claim 18 (depends on 15)

The system as recited in claim 15, wherein the prefetch unit is further configured to discard the address associated with the memory access instruction including the particular hint in response to receiving the notification.

### Claim 19 (depends on 15)

The system as recited in claim 15, wherein the prefetch unit is further configured to use addresses of memory accesses that miss within the cache memory to calculate subsequent memory blocks to prefetch.

### Claim 20 (depends on 15)

The system as recited in claim 15, wherein a standard memory access instruction is replaced by the memory access instruction including the particular hint within an instruction sequence automatically by a compiler.
