Patent ID: 7634638

Claim:
A method for atomically setting or clearing a bit field within a privileged architecture register of a microprocessor without first reading the contents of the privileged architecture register, the method comprising: providing a privileged instruction which instructs the microprocessor to set or clear the bit field within the privileged architecture register, the privileged instruction comprising: a first operand not stored in a register for specifying which one of a plurality of privileged architecture registers contains the bit field to be set or cleared, and a designator for specifying whether the bit field is to be set or cleared; when the microprocessor is in privileged mode, decoding the privileged instruction by examining the first operand to determine which one of the plurality of privileged architecture registers contains the bit field without accessing a register containing a bit mask of bits to set or clear in the privileged architecture register, and by examining the designator to determine whether the bit field is to be set or cleared; and executing the privileged instruction thereby causing the bit field to be atomically set or cleared according to the designator.