Apparatus and method for optimizing execution of push...

Electrical computers and digital processing systems: processing – Processing control – Processing control for data transfer

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C712S226000, C712S228000

Reexamination Certificate

active

06209082

ABSTRACT:

BACKGROUND OF THE INVENTION
1. Field of the Invention
This invention relates in general to the field of data processing in computers, and more particularly to an apparatus and method for performing push all/pop all stack access operations.
2. Description of the Related Art
An application program for execution on a microprocessor typically is divided into a number of subroutines. Each subroutine performs a particular function such as retrieving contents of an address in memory, adding two operands together, or outputting an operand to an address mapped to, say, a video display device. And, in today's desktop computer systems, applications and their constituent subroutines are designed so as to give the impression that they are executing at the same time on the microprocessor. For example, an operator desires to immediately view on a video monitor what is being input to the computer from a keyboard. Although a subroutine for reading keystrokes on the keyboard does not run on the microprocessor at the same instant as a subroutine to display characters on the video monitor, the two subroutines are designed to time share resources in the microprocessor so that it appears to the operator that the two events, input and display, happen simultaneously.
Additionally, a significant number of subroutines that are executed on a desktop computer system utilize the same microprocessor resources, such as general purpose registers in the microprocessor. Because most subroutines are designed to time share these resources, microprocessors provide certain instructions and associated logic to insure that transfer of microprocessor control from one subroutine to the next is convenient and effective.
Most often, subroutines utilize a stack structure in memory to temporarily store the contents of their associated registers prior to transferring control of the microprocessor. A stack is simply a block of memory at a designated address. Hence, prior to transferring control to Subroutine B, Subroutine A would first copy the contents of all of its working registers to the stack. As a result, Subroutine B is free to use the same registers without corrupting register contents associated with Subroutine A. When control is returned to Subroutine A, it would then retrieve contents of its working registers from the stack and continue execution.
Present day stacks are architecturally configured to store successive operands in adjacent memory locations. Hence, four successive store operations to a stack would result in operands being placed in four adjacent stack addresses. Additionally, three successive stack retrievals would result in operands being retrieved from three adjacent stack addresses. Stack usage is so prevalent today that most microprocessors provide dedicated instructions, i.e., stack access instructions, for storing data in a stack and retrieving data from the stack. One particular pair of stack access instructions is used to store/retrieve all of a microprocessor's general purpose registers to/from the stack. This instructions are commonly known as a push all instructions (PUSHA) and pop all instructions (POPA).
When a push all instruction is executed by a microprocessor, it is decoded by logic in the microprocessor into a sequence of push micro instructions, each push micro instruction directing the microprocessor to store one of the general purpose registers in the stack. A number of push micro instructions are generated equal to the number of general purpose registers. For instance, in an x86-compatible microprocessor, there are eight general purpose registers. Hence, a push all operation would result in the generation and execution of eight push micro instructions, each push micro instruction directing the microprocessor to store a different register. A pop all instruction is similarly executed, with the exception that the operands are retrieved from the stack and placed in all the general purpose registers rather than stored in the stack.
Although a microprocessor's registers are individually stored to or retrieved from the stack by the push/pop micro instructions, the microprocessor does not store/retrieve a number of bytes to/from the stack equal to the size of a general purpose register. Rather, the microprocessor is designed to store/retrieve data in larger-sized blocks. For example, in a typical microprocessor, an instruction to retrieve a 2-byte operand from memory would result in the microprocessor retrieving, say, and 8-byte block of data which contains the 2-byte operand.
For many types of instructions, accessing a larger-sized block of data than what is really required does not impose a burden on microprocessor performance. Yet, microprocessor designers continue to be challenged to increase the overall performance of a design by improving the efficiency of certain fundamental operations. Push all and pop all instructions are ripe for improvement, primarily because these instructions direct the microprocessor to perform multiple accesses to the stack to access multiple operands in adjacent addresses. It is highly probable, then, that a number of the multiple operands would be contained within the same larger-size block of data. Yet to have to repeatedly access the same larger-size block of data to access different operands is inefficient. A given operand in a larger-sized data block may conceivably be accessed a number of times during execution of a push all/pop all instruction. This is because the larger-sized data block, in addition to containing the given operand, contains other operands which are also prescribed for access by the push all/pop all instruction. And, because present day microprocessors do not provide the capability to combine accesses to a group of operands contained within the same larger-sized data block into a single access, the given operand is accessed each time the other operands in the larger-sized data block are accessed by the microprocessor. One skilled in the art will observe from the above that execution of push all/pop all instructions in a present day microprocessor wastes a great deal of valuable execution time.
Therefore, what is needed is a microprocessor which can store/retrieve two operands to/from a stack within a single access.
In addition, what is needed is an apparatus in a microprocessor to perform a push all/pop all operation wherein pairs of operands are accessed in a combined access.
Moreover, what is needed is a method for executing a push all/pop all instruction on a microprocessor that eliminates redundant memory accesses by combining accesses to a group of operands into a single access.
SUMMARY
To address the above-detailed deficiencies, it is an object of the present invention to provide a microprocessor which can access two stack operands a within a single combined access to a stack. Accordingly, in the attainment of the aforementioned object, it is a feature of the present invention to provide a microprocessor for accessing a stack. The microprocessor has an instruction buffer, a translator, and access alignment logic. The instruction buffer execution of the push all instruction or the pop all instruction; ii) estimating a new top of stack address based upon successful execution of the push all instruction or the pop all instruction; and iii) ascertaining alignment of a pair of the multiple operands using the new top of stack address provided by said estimating.
Yet another advantage of the present invention is program control transfers in a microprocessor require less time to complete.


REFERENCES:
patent: 5142635 (1992-08-01), Saini
patent: 5416911 (1995-05-01), Dinkjian et al.
patent: 5481734 (1996-01-01), Yoshida
patent: 5497468 (1996-03-01), Tani et al.
patent: 5687336 (1997-11-01), Shen et al.
Farrell et al.,Dynamic Boundary Algorithm for a Data Movement Mechanism, IBM Technical Disclosure Bulletin, vol. 27, No. 1A, Jun. 1984, pp. 95-100.
Intel,Intel Architecture Software Developer's Manual, vol. 2: Instruction Set Reference, 1997, pp. 3-354 to 3-355, and 3-388 to 3-389.

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Apparatus and method for optimizing execution of push... does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Apparatus and method for optimizing execution of push..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Apparatus and method for optimizing execution of push... will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-2454097

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.