5,394,529 2/1995 Brown, III et al 395/587
5,428,779 6/1995 Allegracci et al 395/678
5,454,087 9/1995 Narita et al 395/587
5,522,053 5/1996 Yoshida et al 711/213
5,530,825 6/1996 Black et al 711/213
5,535,397 7/1996 Durante et al 395/740
5,550,993 8/1996 Ehlig et al 395/570
5,598,546 1/1997 Blomgren 395/385
OTHER PUBLICATIONS
IBM Technical Disclosure Bulletin, vol. 31, No. 4, Sep. 1988, "Fast Parallel Processor Notification".
Primary Examiner—Kenneth S. Kim
Attorney, Agent, or Firm—Casimer K. Salys; Antony P. Ng;
Andrew J. Dillon
[57] ABSTRACT
A method and system for executing a context-altering instruction within a processor are disclosed. The processor has a superscalar architecture that includes multiple pipelines, buffers, registers, and execution units. The processor also includes a machine state register for identifying a context of the processor, and a shadow machine state register in conjunction with the machine state register. During operation, a first state of the machine state register is copied to the shadow machine state register. Instructions are executed in accordance with a context identified by the first state of the machine state register. The first state of the shadow machine state register is subsequently altered to a second state in response to decoding a context-altering instruction. The context-altering instruction and subsequent instructions are then executed in accordance with the second state of the shadow machine state register. Finally, the first state of the machine state register is altered to the second state in response to a completion of the context-altering instruction. As a result context synchronization operations are avoided.
12 Claims, 6 Drawing Sheets
COPY A FIRST
STATE OF MSR
TO SHADOW MSR
EXECUTE INSTRUCTIONS
ACCORDING TO A
CONTEXT IDENTIFIED
BY FIRST STATE
OF SHADOW MSR
ALTER FIRST STATE OF SHADOW MSR TO A SECOND STATE IN RESPONSE TO DECODING A CONTEXT- ALTERING INSTRUCTION
Is"
EXECUTE CONTEXTALTERING INSTRUCTION AND SUBSEQUENT INSTRUCTION ACCORDING TO SECOND STATE OF SHADOW MSR
i S56
ALTER FIRST STATE OF MSR TO A SECOND STATE IN RESPONSE TO A COMPLETION OF CONTEXT-ALTERING INSTRUCTION