EFFICIENT SAVING AND RESTORING STATE IN TASK SWITCHING
First Claim
1. A method comprising:
- decoding a single instruction by a processor, said processor operating under a plurality of operational modes and operand sizes;
in response to said decoding said single instruction moving contents of a plurality of registers associated with at least a functional unit in the processor to a memory;
arranging the contents in the memory according to a predetermined format into a plurality of groups, each group being aligned at an address boundary which corresponds to a multiple of 2N bytes, the predetermined format being constant for the plurality of operational modes and operand sizes; and
retaining the contents of the plurality of registers after moving.
1 Assignment
0 Petitions
Accused Products
Abstract
The present invention discloses a method and apparatus for saving and restoring registers. A single instruction is decoded. The single instruction moves contents of a plurality of registers associated with a functional unit in a processor to a memory; the processor operates under a plurality of operational modes and operand sizes. The single instruction arranges the contents in the memory according to a predetermined format into a plurality of groups, each group is aligned at an address boundary which corresponds to a multiple of 2N bytes. The predetermined format is constant for the plurality of operational modes and operand sizes. The single instruction retains the contents of the plurality of registers after moving.
27 Citations
20 Claims
-
1. A method comprising:
-
decoding a single instruction by a processor, said processor operating under a plurality of operational modes and operand sizes;
in response to said decoding said single instruction moving contents of a plurality of registers associated with at least a functional unit in the processor to a memory;
arranging the contents in the memory according to a predetermined format into a plurality of groups, each group being aligned at an address boundary which corresponds to a multiple of 2N bytes, the predetermined format being constant for the plurality of operational modes and operand sizes; and
retaining the contents of the plurality of registers after moving. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A method comprising decoding a single instruction by a processor, said processor operating under a plurality of operational modes and operand sizes;
- and
in response to said decoding said single instruction accessing a plurality of groups arranged in a predetermined format in a memory, each group being aligned at an address boundary which corresponds to a multiple of 2N bytes, the predetermined format being constant for the plurality of operational modes and operand sizes, and moving contents of the plurality of groups to a plurality of registers associated with at least a functional unit in the processor. - View Dependent Claims (9, 10, 11, 12, 13, 14)
- and
-
15. An apparatus for use in a computer system comprising:
-
a processor having at least a functional unit, said processor operating under a plurality of operational modes and operand sizes;
a plurality of registers associated with the functional unit; and
a memory coupled to the processor for storing contents of the plurality of registers according to a predetermined format into a plurality of groups, each group being aligned at an address boundary which corresponds to a multiple of 2N bytes, the predetermined format being constant for the plurality of operational modes and operand sizes. - View Dependent Claims (16, 17, 18, 19, 20)
-
Specification