The present invention relates to a data processor for use by two types of software instruction groups.
When one processing routine for realizing one function of a data processor is to be shared between a plurality of programmers or processes, the processing routine is usually defined as one macroinstruction and used as such.
In order to realize this with software, a subroutine procedure is excuted, which is a self-consistent series of instructions for solving some of the problems to be processed by a part of one program. Thus, when a program is to call this procedure, the caller program temporarily saves, in a memory, the values of registers so far used and remaining in use after the execution of this procedure. Afterwards, hardware units for operating a subroutine procedure on the callee side, for instance registers, are placed under the control of the subroutine procedure on the callee side.
When a return to the caller program is to take place in response to the completion of the execution of this procedure, a recovery action is taken to return the values saved in the memory to hardware units, such as registers. These saving/recovery actions of registers deteriorate the performance of the data processor.
To prevent this performance deterioration, development of a new technique is demanded in order to realize the processing routine of the subroutine procedure as a software instruction and to achieve its detailed operation with hardware functions.
The most flexible technique to meet this demand is a microprogram control technique, which is used as much more of a flexible means than, and free from the complexity of, hardware control realized by wired logic. For instance, for adding a new instruction or altering an existing instruction, it is sufficient to modify the pertinent microprogram in the control memory.
Another benefit of this microprogram control technique is that it dispenses with the aforementioned saving/recovery actions of registers and prevents performance deterioration by using work registers, which are not visible from the user of software instructions.
To take advantage of these benefits, early routines realized by a microprogram covered basic instruction processing, interruption processing and exception processing, but it later became possible to realize with the use of a microprogram such functions as process control, interprocess synchronization, procedure calling and partial support to a virtual machine monitor.
The increase of routines to be covered by a microprogram, however, entails increases in the number of steps in the microprogram and in the dimensions of the control memory for storing the microprogram.
The operation of the microprogram is performed using a control memory. However, an instruction control circuit and an instruction register for controlling the execution of each instruction are not used during the microprogram operation.
A serious problem involved in the microprogram control technique, furthermore, lies in the tight subordination of this program to hardware. Thus, the positions and sizes of the control memory for storing a microprogram, the size of the hardware unit to be controlled by one word in that control memory, the command repertoire, and the interface between the hardware and the microprogram concerning the timing of command issues and so forth are usually determined by the hardware's circumstances. Therefore, the coverage of a microprogram, developed at an enormous cost and spending many manhours, is limited to a single developed hardware machine, and is incompatible with other hardware machines. Consequently, a microprogram has to be developed anew every time a new hardware machine is developed, resulting in the disadvantage of not permitting accumulation of hardware and microprogram assets.
From another aspect of the present invention, the following problem is noted. Even if the basic architecture of the data processor currently in operation is 10 years or even more than 20 years old, a newly developed unit may be designed to be compatible with the old machine's software assets accumulated over the years. For instance, the current level of technology readily permits doubling of the number of registers. However, to make all the doubled registers software-visible is impossible without sacrificing compatibility.
Meanwhile, software has to write or read data into or out of the memory frequently because of the small number of registers. Therefore, however fast the hardware may execute a given instruction, the overall performance of the whole system cannot be improved.