×

Method for maintaining a branch prediction history table

  • US 10,423,418 B2
  • Filed: 11/30/2015
  • Issued: 09/24/2019
  • Est. Priority Date: 11/30/2015
  • Status: Active Grant
First Claim
Patent Images

1. A computer system having a processor and a memory, the processor being configured for executing tasks, the tasks comprising task-relating branch instructions and task-independent branch instructions, and being configured for executing a branch prediction method for predicting the behavior of the task-relating branch instructions and the task-independent branch instructions and determining branch prediction data for the task-relating branch instructions and the task-independent branch instructions,the processor comprising a control register for controlling the tasks to be executed and a branch prediction history table for storing branch prediction data determined with the branch prediction method,the memory comprising a memory area for storing a task structure of each of the tasks, the task structure being configured for storing branch prediction data,the processor is configured to:

  • identify the task-independent branch instructions by identifying the task-independent branch instructions as being tagged with a processor state indicating user or privileged mode or by identifying an address range of the task-independent branch instructions as the address range of standard libraries, wherein the task-independent branch instructions produce task-independent branch prediction data;

    perform a first task by the processor, the first task comprising task-relating branch instructions and the task-independent branch instructions,execute the branch prediction method, resulting in branch prediction data, including task-independent branch prediction data produced by the task independent branch instructions in the branch prediction history table,in response to determining that the first task is to be interrupted or terminated, store task-relating branch prediction data of the first task in the task structure of the first task,in response to determining that a second task is to be continued or started, read task-relating branch prediction data of the second task from the task structure of the second task, store the task-relating branch prediction data of the second task in the branch prediction history table, and ensure that the task-independent branch prediction data produced by the task independent branch instruction is maintained in the branch prediction history table; and

    provide a first marking to the task-relating branch prediction data of the second task in the branch prediction history table, the first marking indicating that the task-independent branch prediction data produced by the task independent branch instructions is exempt from replacement in the branch prediction history table while the second task is executing.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×