US5748951A - Specialized millicode instructions which reduce cycle time and number of instructions necessary to perform complex operations - Google Patents

Specialized millicode instructions which reduce cycle time and number of instructions necessary to perform complex operations Download PDF

Info

Publication number
US5748951A
US5748951A US08/829,267 US82926797A US5748951A US 5748951 A US5748951 A US 5748951A US 82926797 A US82926797 A US 82926797A US 5748951 A US5748951 A US 5748951A
Authority
US
United States
Prior art keywords
millicode
instruction
translate
instructions
test
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
US08/829,267
Inventor
Charles Franklin Webb
Mark Steven Farrell
Mark Anthony Check
John Stephen Liptay
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
International Business Machines Corp
Original Assignee
International Business Machines Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by International Business Machines Corp filed Critical International Business Machines Corp
Priority to US08/829,267 priority Critical patent/US5748951A/en
Application granted granted Critical
Publication of US5748951A publication Critical patent/US5748951A/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline, look ahead
    • G06F9/3861Recovery, e.g. branch miss-prediction, exception handling
    • G06F9/3865Recovery, e.g. branch miss-prediction, exception handling using deferred exception handling, e.g. exception flags
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/0721Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment within a central processing unit [CPU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/30007Arrangements for executing specific machine instructions to perform operations on data operands
    • G06F9/30029Logical and Boolean instructions, e.g. XOR, NOT
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/30076Arrangements for executing specific machine instructions to perform miscellaneous control operations, e.g. NOP
    • G06F9/30087Synchronisation or serialisation instructions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30145Instruction analysis, e.g. decoding, instruction word fields
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/3017Runtime instruction translation, e.g. macros
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30181Instruction operation extension or modification
    • G06F9/30189Instruction operation extension or modification according to execution mode, e.g. mode flag

Definitions

  • This invention relates to improvements in pipelined computer processors that execute relatively simple instructions in hardware controlled execution units and execute relatively complex instructions in a milli-mode architected state with vertical microcode (i.e. millicode) routines executing in the same hardware controlled execution units. More particularly, this invention relates to a set of specialized millicode instructions which reduce the number of millicode instructions and machine cycles required to perform certain complex operations that are called relatively frequently.
  • vertical microcode i.e. millicode
  • Instruction sets used in computer systems employing so-called Complex Instruction Set Computing (CISC) architecture include both simple instructions (e.g. Load, or Add) and complex instructions (e.g. Program Call, or Load Address Space Parameters).
  • simple instructions e.g. Load, or Add
  • complex instructions e.g. Program Call, or Load Address Space Parameters
  • IBM Enterprise Systems Architecture/390 Principles of Operation Publication Number SA22-7201-02, available from IBM Corporation, Armonk, N.Y.
  • IBM System 390 have become more powerful, larger percentages of the instruction set have been implemented using hardware execution units to increase the systems performance.
  • the complex functions are implemented in microcode because building hardware execution units to execute them is expensive and error prone.
  • a milli-mode operation enables implementation of complex functions in a large, hardware controlled, pipelined, general purpose digital computer without a microprocessor. Milli-mode implements these complex functions with the flexibility provided by firmware and avoids a packaging problem introduced by the inclusion of microprocessor hardware. Rather than a microprocessor, milli-mode uses the preexisting dataflow and hardware controlled execution units of a pipelined processor to accomplish complex functions. Additional hardware controlled instructions (private milli-mode only instructions) are added to provide control functions or to improve performance. These private milli-mode instructions augment the architected instruction set. Milli-mode routines can intermingle the milli-mode only instructions with architected instructions to implement complex functions.
  • Milli-mode detection logic in the instruction decode logic detects the requirement to enter milli-mode, and this causes millicode routines to be fetched.
  • the millicode routines are decoded by the decoder hardware and dispatched for execution in the same way as the architected macro-instructions (system-mode instructions).
  • milli-mode Practically all of the architected macro-instructions that are implemented as hardware controlled instructions can be executed in milli-mode.
  • the set of instructions available in milli-mode can be considered to be an alternate architecture that the processor can execute.
  • the hardware-executed instructions which are valid only for millicode are generally of a format and a function similar to those of ESA/390 instructions. In this way, the unique hardware required to implement these instructions is minimized, and the simplicity of the hardware design is maintained. This simplicity of hardware controls is a chief advantage of millicode over other forms of internal code (e.g. microcode) which require considerably more unique hardware.
  • a disadvantage of a millicoded design is that some complex operations require more internal code instructions and/or more machine cycles than with some forms of microcode. In some cases, this is due to the inefficiency of the base instruction set (e.g. the hardware-executed ESA/390 instructions) when used to perform these complex operations. Depending on the frequency with which these operations are performed, the impact on overall system performance may be significant.
  • the base instruction set e.g. the hardware-executed ESA/390 instructions
  • An object of this invention is the provision of a specialized millicode instruction set which reduces the number of millicode instructions and machine cycles required to perform a certain complex operation that is called relatively frequently.
  • Another object of this invention Is the provision of a specialized millicode instruction set which conforms to an instruction format for normal (i.e. non-millicode) operation and which requires a minimum of hardware unique to the specialized set.
  • this invention contemplates the provision of the following specialized millicode instruction sets:
  • PSW Program Status Word
  • This ESA/390 test is executed by a special PSW Validity Test millicode routine, which tests the validity of the PSW with three simple millicode instructions, including a special PSW Validity Test instruction. Each of the three instructions can be performed in a single machine cycle.
  • ESA/390 operation requires testing for access exceptions without taking a program interrupt.
  • This ESA/390 test is executed by a special millicode instruction "Load With Access Test", which explicitly detects access exceptions for storage operands while retaining control in the current millicode routine to insure exceptions are handled correctly and with the right priority.
  • the millicode Load With Access Test instruction operates the same way as the ESA/390 Load instruction except that access exceptions set a condition code rather than cause an interrupt.
  • the ESA/390 instructions Translate (TR) and Translate and Test (TRT) use a table of 256 bytes to translate a string of bytes. For each of these ESA/390 instructions, each string byte is used as an index into the table, and the selected table byte is fetched. For Translate, the selected table bytes replace the original string in storage. For Translate and Test, the selected bytes are tested, and the first non-zero table byte selected is returned to the program in a general register along with the address of the string byte which selected it; translate and test also sets the condition code, and does not update storage.
  • a millicode instruction Translate Fetch (TRFET) is provided specifically for use in execution of the ESA/390 Translate and Translate and Test instructions.
  • This Translate Fetch millicode instruction uses an RX format, but modifies the interpretation of the X 2 and D 2 fields. Instead of designating a byte offset, the D 2 field is used as a 3-bit mask (M 2 ), the remaining bits of D 2 being ignored. The low-order 2 bits of this mask select one of the four bytes of the X 2 register to use as the actual index (rather than the entire X 2 register being used).
  • the 3-bit mask selects one of the eight bytes of the Millicode General Register (MGR) pair designated by R 1 to receive the byte of storage accessed by the operand 2 address.
  • MGR Millicode General Register
  • the resulting contents of MGR pair R 1 are tested for a non-zero value and the condition code is set accordingly.
  • the only dataflow hardware specifically required for this millicode Translate Fetch instruction is a 4-to-1 byte multiplexer for the X 2 input to the address adder.
  • FIG. 1 is a block diagram illustrating the components of a millicode system in accordance with a preferred specific embodiment of the invention.
  • FIG. 2 is a pictorial representation of the millicode instruction "Test PSW Validity.”
  • FIG. 3 is a flow chart of the millicode program status word validity test operation.
  • FIG. 4 is a pictorial representation of the millicode instruction "Load With Access Test.”
  • FIG. 5 is a pictorial representation of the millicode instruction "Character Translation Assist.”
  • elements of a system relevant to this invention include a system storage 11, and a cache memory unit 12.
  • the system storage 11 contains the instructions that the processor is executing as well as the data those instructions are manipulating.
  • the cache memory unit 12, which includes a copy of the data and instructions the processor is presently executing, in this preferred embodiment is a cache providing interleaved double word addressing.
  • the cache memory 12 logically includes a contiguously addressable read only store 13, in which code for executing certain frequently invoked milli-mode routines is stored.
  • An instruction unit subsystem 16 includes an instruction buffer (not shown in FIG. 1), instruction registers 18 and an instruction decoder 20.
  • the instruction unit subsystem receives macro-instructions, millicode instructions, and data from the cache memory unit 12. Instructions are parsed and placed into the instruction registers 18.
  • the decoder 20 reads the contents of the instruction registers 18, decodes the instruction (or causes an operation exception), and passes the instruction to an instruction queue for sequential execution by a hardware execution unit 24.
  • Each hardware execution unit 24 has access to a set of general purpose registers and access registers 21 for normal macro-code instruction execution and to a set of general purpose registers and access registers 23 for millicode instruction execution. Control logic controls the exchange of data between the two sets of registers when beginning or terminating a millicode routine.
  • Milli-mode detection logic 26 is coupled to the instruction registers and detects when a macro-instruction, which is being decoded, is of a type that is to be interpreted in a milli-mode operation. When this occurs, the milli-mode detection logic 26 generates an entry point address and passes this address along to the instruction fetch control logic 25 and places the decoder 20 into a milli-mode operating state. In this state the decoder is enabled to decode milli-mode instructions. Milli-mode instructions are vertical microcode, consisting of a mixture of regular microcode instructions and special milli-mode only instructions, all of which can be executed in the execution unit 24. The special instructions provide control functions needed by the millicode routines. The set of millicode routines reside outside of the program addressable storage.
  • the system effects of an executed instruction are architecturally visible in the completion logic 30. Signal lines between the completion logic 30 and the decoder 20 allow the decoder 20 to keep track of instruction completion.
  • a program status word (PSW) in register 31 controls execution of the macro-program.
  • the system also includes a milli-PSW register 33, which controls execution of the milli-routine.
  • Both the execution unit 24 and the completion logic 30 are connected to read from/write to the PSW and the milli-PSW registers.
  • the execution units or the completion logic can read or update the appropriate one of the PSW and/or milli-PSW registers.
  • a processor state unit 40 maintains the entire updated status of the architected system both in regular mode and milli-mode operation. In the event of a detected error, the processor state unit 40 provides a resource to recreate the status of the system from a check point state in order to allow a retry of the error causing operation.
  • Milli-mode is enabled when the milli-mode detection logic 26 recognizes that the macro-instruction being decoded is to be implemented with millicode.
  • the detection logic 26 signals the decoder 20, the instruction fetch controls 35 and register controls in the execution unit 24.
  • the decoder 20 suspends macro-mode decoding, the execution unit register control copies the contents of the GPRs 21 to the milli-registers 23 and causes the system to subsequently use the milli-registers 23.
  • the milli-mode detection logic 26 generates a millicode entry point address.
  • the entry point address (generated by the milli-mode detection logic 26) is used by the control logic 35 to address the cache 12. Milli-instructions from the cache are sent to the instruction registers 18 where the decoder 20 decodes them and schedules them for execution.
  • the processor When the processor enters milli-mode, it executes and completes the macro-instructions already in the pipeline conceptually prior to the instruction that caused entry into milli-mode. As the processor completes the macro-instructions, it updates the appropriate GPRs. At the same time, the processor decodes and executes the milli-instructions that implement the macro-instruction that caused entry into milli-mode.
  • the detection logic 26 recognizes a millicode END (MEND) milli-instruction.
  • MEND millicode END
  • the detection logic 26 detects a MEND milli-instruction, it causes the processor to cease fetching milli-instructions.
  • the detection logic puts the decoder in macro-mode and causes the processor to begin fetching macro-instructions.
  • Millicode explicitly updates all registers, so there is no transfer of register content when going from milli-mode operation to regular operation.
  • Completion of a MEND milli-instruction causes the processor completion logic to begin completing macro-instructions.
  • the processor can also enter milli-mode in response to an interrupt.
  • the interrupt priority logic 45 determines that an interrupt is to be serviced and it signals the instruction fetch unit, causing the decoder to initiate milli-mode.
  • the recognition of an interruption condition causes the processor to halt macro-mode execution at the next interruptible point.
  • the interrupt priority logic 45 also generates control inputs which are used by the milli-mode detection logic to generate an entry point address with which to address the cache. These milli-instructions are sent to the instruction registers where the decoder decodes them and schedules them for execution at the appropriate hardware execution elements.
  • the processor proceeds to decode, execute and complete the milli-instruction in the milli-routine for interrupts.
  • the decoder recognizes a MEND milli-instruction. This causes the decoder to stop decoding in milli-mode.
  • the decoder hardware will either redo the interrupt process or return to decoding macro-instructions from the cache.
  • millicode must load a new value into the PSW or otherwise alter the PSW value.
  • the processor may be required to execute program statements other than the ones immediately following the macro instruction before the processor entered the millicode routine.
  • the ESA/390 architecture requires that the new PSW value be checked for validity. If the new PSW value is not valid, the ESA/390 architecture further requires that a specification exception be reported.
  • Bit 12 is set to 1.
  • Bit 63 is set to 0 (instruction address must be even).
  • Bit 32 is set to 1 (31-bit addressing mode).
  • Bits 32:39 are all 0 (valid 24-bit instruction address).
  • a millicode instruction TEST PSW
  • TEST PSW a millicode instruction
  • the instruction tests bits 0:31 of the PSW using a mask which, the millicode supplies.
  • the instruction separately tests bit 12 and bits 32:63 (the instruction address) using hardware controls.
  • the instruction can use hardware controls for these latter tests since these bits are independent of operational modes.
  • a special test is performed using the specified processor state unit register, the MGR specified by R 1 and the program instruction address, and the result of the test is indicated in the condition code. Neither the specified processor state unit register nor MGR R 1 is modified by this instruction.
  • the operand 2 address (specified by D 2 (B 2 )) is not used to address storage. Instead, bits 24:31 of the address are used to select one register from the processor state unit. Bits 0:23 of the operand 2 address are ignored.
  • This instruction is intended for use with 32-bit processor state unit registers. The expected use of this instruction is with a register containing the current ESA/390 PSW specified as the processor state unit register.
  • the test performed is designed to check the ESA/390 PSW for validity, under control of millicode.
  • the 32-bit value contained in MGR R 1 is used as a mask to indicate which bits in the specified processor state unit register are required to be zeros. Note that the appropriate value for the mask is affected by various operational modes, including those associated with multiple-controlled data spaces and the expedited SIE subset. If the bitwise logical AND of MGR R 1 and the specified processor state unit register is not all zeros, then condition code 1 is set to indicate an invalid PSW format. Independently of the mask value in MGR R 1 , if bit 12 of the specified processor state unit register is zero, condition code 1 is set, since this cannot be a valid 370/XA or ESA/390 PSW.
  • condition code 1 is set. If bit 31 of the address is 1 (odd instruction address), and no conditions exist to set condition code 1, then condition code 2 is set.
  • condition code 0 is set.
  • This instruction is provided to accomplish in one execution cycle what would otherwise require several millicode instructions. It remains the responsibility of millicode to load the correct mask value in MGR R 1 and to take the appropriate action if the PSW is indeed invalid.
  • condition code is set as follows:
  • the millicode instruction references the PSW from the special register (a Millicode Control Register) in which the PSW is maintained, block 70. This avoids any need to access the PSW separately from the TEST PSW instruction.
  • millicode computes the mask for the TEST PSW instruction whenever the operational mode changes. The processor maintains this mask in a register or storage to allow fast access when needed for TEST PSW. Prior to execution of TEST PSW, this mask is loaded into an MGR, from which the TEST PSW obtains the mask value, block 72. The processor defines the mask such that it contains a 1 in every bit position required to be a 0 in the PSW.
  • TEST PSW consists of a logical AND of the mask with bits 0:31 of the PSW, block 74, and a hardware check of bits 12, 32:39, block 75, and bit 64, block 76.
  • the processor sets the condition code to 1 if any of these conditions exist: (1) the result of this logical AND is not all zeros indicating that a PSW bit required to be 0 is in fact a 1, blocks 78 and 80; (2) PSW bit 12 is 0; or (3) PSW bits 32:39 contain an invalid combination, blocks 82 and 84.
  • PSW bit 63 is set to 1, and the instruction finds no other invalid PSW condition, then the instruction sets the condition code to 2, blocks 86, 88 and 90. If none of the preceding occurs, the instruction sets the condition code to 0 to indicate a valid PSW, block 92.
  • Millicode statements just like hardware executed ESA/390 macrocode instructions, are subject to access exception tests. That is, if millicode accesses a storage operand and an exception occurs, the interrupt logic interrupts the millicode routine and passes control to the program exception interrupt handler.
  • millicode must explicitly detect access exceptions for storage operands while at the same time retaining control in the current millicode routine to ensure that exceptions are handled correctly and with the right priority.
  • the system has a LOAD AND TEST ACCESS millicode instruction illustrated in FIG. 4 to meet this requirement with the addition of minimal unique hardware.
  • the MGR specified by R 1 is loaded with the word of storage addressed by D 2 (B 2 ). Access exceptions associated with the storage access for the second operand are blocked in the hardware, and do not result in a program interrupt, but instead set the condition code. In addition, the value loaded in the MGR is unpredictable when an access exception other than a protection exception is detected. In all other respects this operates like the ESA/390 LOAD instruction.
  • test modifier tag is set in the operand access control register used with LOAD AND TEST ACCESS, the processor will check for store access exceptions as well as for fetch access exceptions. The accessed data is still returned and the condition code set as for an unmodified LOAD AND TEST ACCESS instruction.
  • the millicode condition code is set to indicate whether any access exception conditions were present for the second-operand storage access, as follows:
  • This instruction operates similarly to the ESA/390 LOAD instruction.
  • the difference between the ESA/390 LOAD instruction and the LOAD AND TEST ACCESS instruction is that with the LOAD AND TEST ACCESS instruction, the access exceptions do not cause an interrupt but instead set a condition code.
  • the instruction sets the condition code to 0 if no access exception is detected, and sets it to either 1 or 3 if the instruction detects an access exception.
  • the instruction sets the condition to 3 when the program is executing in emulation and the access exception is associated with the host program.
  • the instruction sets the condition code to 1 for all other access exceptions.
  • Hardware suppresses reporting of these access exceptions and uses the access exception information to set the condition code.
  • the additional hardware introduces no timing or performance constraints since access exception information is available with the same timing as the data being retrieved.
  • the LOAD AND TEST instruction does not affect the hardware controls associated with storage accesses and access exceptions.
  • the interrupt controls will force a serialization interrupt if a non-zero code is set for LOAD AND TEST ACCESS.
  • This serialization interrupt purges the instruction pipeline and resets the pipeline controls, but does not cause any redirection of the instruction stream and thus is completely transparent to the millicode being executed. Since this serialization interrupt occurs only in the access exception case, which should be relatively infrequent, the performance impact of this is negligible.
  • TRANSLATE and TRANSLATE AND TEST use a table of 256 bytes to translate a string of bytes.
  • the instruction uses each string byte as an index into the table and then selects and fetches a table byte.
  • the table bytes selected by TRANSLATE replaced the original string in storage.
  • TRANSLATE AND TEST the selected bytes are tested, and the first non-zero table byte selected is returned to the program in a general register along with the address of the string byte which selected it.
  • TRANSLATE AND TEST also sets the condition code, but it does not update storage.
  • Millicode can implement these instructions using only standard ESA/390 instructions, but the sequence of extracting a string byte, accessing the table using that byte as an index, and either testing the table byte or storing it back to the string would require several machine cycles per byte processed. Since these instructions are used extensively in many applications, the implementing of these instructions in only standard ESA/390 instructions would significantly impact performance. A hardware implementation of these instructions would require complex controls.
  • the millicode instruction TRANSLATE FETCH helps provide reasonable performance to TRANSLATE and TRANSLATE AND TEST instructions while maintaining the flexibility and simplicity of a millicoded design.
  • the TRANSLATE FETCH instruction uses an RX format, but modifies the interpretation of the X 2 and D 2 fields (base and displacement). Instead of designating a bit offset, bits 29 to 31 of the instruction are used as a 3-bit mask and the remaining bits of what is normally the D 2 field in an RX format instruction are ignored. The low order 2 bits of this mask select one of the four bytes of the X 2 register to use as an actual index.
  • the 3-byte mask selects one of the 8 bytes of the millicode general register pair designated by R1 to receive the byte of storage accessed by the operand 2 address.
  • the resulting contents of MGR Pair R 1 are tested for a non-zero value and a condition code is set accordingly.
  • the only unique data flow hardware required for TRANSLATE FETCH is the 4-to-1 bit multiplexer for the X 2 input to the address adder.
  • a single byte is fetched from storage at the operand 2 address and inserted into the even/odd MGR pair specified by R 1 .
  • the operand 2 address is not formed by the normal B 2 +X 2 +D 2 process; instead, bits 30:31 of the instruction select one of four bytes from MGR X 2 , and that byte is added to the contents of MGR B 2 to form the operand address. Similarly, bits 29:31 of the instruction select which byte of the MGR pair (R 1 , R 1 +1) is loaded with the byte fetched from storage.
  • the effect of the M 3 field (bits 29:31 of the instruction) is summarized in Table 1.

Abstract

A special Program Status Word (PSW) millicode routine, tests the validity of the PSW with three simple millicode instructions. Testing for access exceptions is executed by a special millicode instruction "Load With Access Test", which explicitly detects access exceptions for storage operands while retaining control in the current millicode routine. A Translate and Test (TRT) routine uses a table of 256 bytes to translate a string of bytes. Each string is used as an index into the table, and the selected table byte is fetched. For Translate and Test, the selected bytes are tested, and the first non-zero table byte selected is returned to the program in a general register along with the address of the string byte which selected it; translate and test also sets the condition code, and does not update storage. To provide reasonable performance on Translate and Translate and Test, while maintaining flexibility and simplicity of a millicoded design, a millicode instruction Translate Fetch (TRFET) is provided specifically for use in execution of the Translate and Translate and Test instructions. This Translate Fetch millicode instruction uses an RX format, but modifies the interpretation of the certain fields.

Description

BACKGROUND OF THE INVENTION
This application is a division of application Ser. No. 08/414,154 of Charles F. Webb et al., filed Mar. 31, 1995, now U.S. Pat. No. 5,694,587 entitled "Specialized Millicode Instruction."
FIELD OF THE INVENTION
This invention relates to improvements in pipelined computer processors that execute relatively simple instructions in hardware controlled execution units and execute relatively complex instructions in a milli-mode architected state with vertical microcode (i.e. millicode) routines executing in the same hardware controlled execution units. More particularly, this invention relates to a set of specialized millicode instructions which reduce the number of millicode instructions and machine cycles required to perform certain complex operations that are called relatively frequently.
CROSS REFERENCE TO RELATED APPLICATIONS
The present United States patent application is related to the following co-pending United States patent applications which are assigned to the assignee of the present application.
Application Ser. No. 08/414,821, filed Mar. 31, 1995, entitled "Millicode Read-Only Storage With Entry Point Patch Control."
Application Ser. No. 08/414,977, filed Mar. 31, 1995, now U.S. Pat. No. 5,673,391 entitled "Hardware Retry Trap for Millicoded Processor"
Application Ser. No. 08/414,158, filed Mar. 31, 1995, now U.S. Pat. No. 5,680,598 entitled "Addressing Extended Memory Using Millicode."
Application Ser. No. 08/414,812, filed Mar. 31, 1995, now abandoned, entitled "Mapping Processor State Into A Millicode Addressable Processor State Register Array."
Application Ser. No. 08/414,164, filed Mar. 31, 1995, entitled "Linking Program Access Register Number With Millicode Operand Access."
Application Ser. No. 08/414,975, filed Mar. 31, 1995, now U.S. Pat. No. 5,694,617 entitled "Priority and Recovery Method For System Serialization (Quiesce)."
DESCRIPTION OF THE PRIOR ART
Instruction sets used in computer systems employing so-called Complex Instruction Set Computing (CISC) architecture include both simple instructions (e.g. Load, or Add) and complex instructions (e.g. Program Call, or Load Address Space Parameters). As an example to which the invention has particular relevance, see "IBM Enterprise Systems Architecture/390 Principles of Operation" (Publication Number SA22-7201-02, available from IBM Corporation, Armonk, N.Y.), which is incorporated herein by reference in its entirety. As these computer systems (e.g. IBM System 390) have become more powerful, larger percentages of the instruction set have been implemented using hardware execution units to increase the systems performance. Conventionally, the complex functions are implemented in microcode because building hardware execution units to execute them is expensive and error prone.
Implementing complex functions in microcode provides flexibility to fix problems and expandability in that additional functions can be included later. In certain prior art machines, where much of the processor is hardware controlled, a dedicated microprocessor based execution unit is often provided in order to implement the complex functions. This unit can be microprogrammed to execute complex instructions and complex functions such as handling interrupt conditions.
More recently, prior art proposals have been advanced for machines with a so-called milli-mode operating capability; see, for example, IBM Technical Disclosure Bulletin Vol. 35, No. 4A of September 1992, incorporated herein by reference, and U.S. Pat. Nos. 5,280,593 and 5,226,164 assigned to the assignee of this invention and also incorporated herein by reference.
A milli-mode operation enables implementation of complex functions in a large, hardware controlled, pipelined, general purpose digital computer without a microprocessor. Milli-mode implements these complex functions with the flexibility provided by firmware and avoids a packaging problem introduced by the inclusion of microprocessor hardware. Rather than a microprocessor, milli-mode uses the preexisting dataflow and hardware controlled execution units of a pipelined processor to accomplish complex functions. Additional hardware controlled instructions (private milli-mode only instructions) are added to provide control functions or to improve performance. These private milli-mode instructions augment the architected instruction set. Milli-mode routines can intermingle the milli-mode only instructions with architected instructions to implement complex functions.
Milli-mode detection logic in the instruction decode logic detects the requirement to enter milli-mode, and this causes millicode routines to be fetched. The millicode routines are decoded by the decoder hardware and dispatched for execution in the same way as the architected macro-instructions (system-mode instructions).
Practically all of the architected macro-instructions that are implemented as hardware controlled instructions can be executed in milli-mode. The set of instructions available in milli-mode can be considered to be an alternate architecture that the processor can execute.
The hardware-executed instructions which are valid only for millicode are generally of a format and a function similar to those of ESA/390 instructions. In this way, the unique hardware required to implement these instructions is minimized, and the simplicity of the hardware design is maintained. This simplicity of hardware controls is a chief advantage of millicode over other forms of internal code (e.g. microcode) which require considerably more unique hardware.
A disadvantage of a millicoded design is that some complex operations require more internal code instructions and/or more machine cycles than with some forms of microcode. In some cases, this is due to the inefficiency of the base instruction set (e.g. the hardware-executed ESA/390 instructions) when used to perform these complex operations. Depending on the frequency with which these operations are performed, the impact on overall system performance may be significant.
An object of this invention is the provision of a specialized millicode instruction set which reduces the number of millicode instructions and machine cycles required to perform a certain complex operation that is called relatively frequently.
Another object of this invention Is the provision of a specialized millicode instruction set which conforms to an instruction format for normal (i.e. non-millicode) operation and which requires a minimum of hardware unique to the specialized set.
Briefly, this invention contemplates the provision of the following specialized millicode instruction sets:
ESA/390 operation requires testing the validity of the Program Status Word (PSW). This ESA/390 test is executed by a special PSW Validity Test millicode routine, which tests the validity of the PSW with three simple millicode instructions, including a special PSW Validity Test instruction. Each of the three instructions can be performed in a single machine cycle.
ESA/390 operation requires testing for access exceptions without taking a program interrupt. This ESA/390 test is executed by a special millicode instruction "Load With Access Test", which explicitly detects access exceptions for storage operands while retaining control in the current millicode routine to insure exceptions are handled correctly and with the right priority. The millicode Load With Access Test instruction operates the same way as the ESA/390 Load instruction except that access exceptions set a condition code rather than cause an interrupt.
The ESA/390 instructions Translate (TR) and Translate and Test (TRT) use a table of 256 bytes to translate a string of bytes. For each of these ESA/390 instructions, each string byte is used as an index into the table, and the selected table byte is fetched. For Translate, the selected table bytes replace the original string in storage. For Translate and Test, the selected bytes are tested, and the first non-zero table byte selected is returned to the program in a general register along with the address of the string byte which selected it; translate and test also sets the condition code, and does not update storage.
To provide reasonable performance on Translate and Translate and Test, while maintaining flexibility and simplicity of a millicoded design, a millicode instruction Translate Fetch (TRFET) is provided specifically for use in execution of the ESA/390 Translate and Translate and Test instructions. This Translate Fetch millicode instruction uses an RX format, but modifies the interpretation of the X2 and D2 fields. Instead of designating a byte offset, the D2 field is used as a 3-bit mask (M2), the remaining bits of D2 being ignored. The low-order 2 bits of this mask select one of the four bytes of the X2 register to use as the actual index (rather than the entire X2 register being used). In addition, the 3-bit mask selects one of the eight bytes of the Millicode General Register (MGR) pair designated by R1 to receive the byte of storage accessed by the operand 2 address. The resulting contents of MGR pair R1 are tested for a non-zero value and the condition code is set accordingly. The only dataflow hardware specifically required for this millicode Translate Fetch instruction is a 4-to-1 byte multiplexer for the X2 input to the address adder.
BRIEF DESCRIPTION OF THE DRAWINGS
The foregoing and other objects, aspects and advantages will be better understood from the following detailed description of a preferred embodiment of the invention with reference to the drawings, in which:
FIG. 1 is a block diagram illustrating the components of a millicode system in accordance with a preferred specific embodiment of the invention.
FIG. 2 is a pictorial representation of the millicode instruction "Test PSW Validity."
FIG. 3 is a flow chart of the millicode program status word validity test operation.
FIG. 4 is a pictorial representation of the millicode instruction "Load With Access Test."
FIG. 5 is a pictorial representation of the millicode instruction "Character Translation Assist."
DETAILED DESCRIPTION OF A PREFERRED EMBODIMENT OF THE INVENTION
This following exemplary embodiment of the invention is applicable in the overall context of a system generally conforming to IBM 390 system architecture. A more detailed description of the conventional elements of such a 390 system processor can be found, for example, in U.S. Pat. No. 4,901,233 to John S. Liptay, assigned to the same assignee as the present invention, and incorporated by reference, in its entirety, as if printed in full below. While the System 390 environment will be used as an example, it should be understood the-present invention is also readily applicable to other IBM (e.g. IBM System 370) and non-IBM architectures as well.
While not limited thereto, the invention is particularly well suited for use in conjunction with the enhanced error recovery system described in copending application Ser. No. 08/149,260, filed Nov. 9, 1993, now U.S. Pat. No. 5,504,859 assigned to the assignee of this application, and also incorporated herein by reference.
Referring now to FIG. 1, elements of a system relevant to this invention include a system storage 11, and a cache memory unit 12. The system storage 11 contains the instructions that the processor is executing as well as the data those instructions are manipulating. The cache memory unit 12, which includes a copy of the data and instructions the processor is presently executing, in this preferred embodiment is a cache providing interleaved double word addressing. The cache memory 12 logically includes a contiguously addressable read only store 13, in which code for executing certain frequently invoked milli-mode routines is stored.
An instruction unit subsystem 16 includes an instruction buffer (not shown in FIG. 1), instruction registers 18 and an instruction decoder 20. The instruction unit subsystem receives macro-instructions, millicode instructions, and data from the cache memory unit 12. Instructions are parsed and placed into the instruction registers 18. The decoder 20 reads the contents of the instruction registers 18, decodes the instruction (or causes an operation exception), and passes the instruction to an instruction queue for sequential execution by a hardware execution unit 24. Each hardware execution unit 24 has access to a set of general purpose registers and access registers 21 for normal macro-code instruction execution and to a set of general purpose registers and access registers 23 for millicode instruction execution. Control logic controls the exchange of data between the two sets of registers when beginning or terminating a millicode routine.
Milli-mode detection logic 26 is coupled to the instruction registers and detects when a macro-instruction, which is being decoded, is of a type that is to be interpreted in a milli-mode operation. When this occurs, the milli-mode detection logic 26 generates an entry point address and passes this address along to the instruction fetch control logic 25 and places the decoder 20 into a milli-mode operating state. In this state the decoder is enabled to decode milli-mode instructions. Milli-mode instructions are vertical microcode, consisting of a mixture of regular microcode instructions and special milli-mode only instructions, all of which can be executed in the execution unit 24. The special instructions provide control functions needed by the millicode routines. The set of millicode routines reside outside of the program addressable storage.
The system effects of an executed instruction are architecturally visible in the completion logic 30. Signal lines between the completion logic 30 and the decoder 20 allow the decoder 20 to keep track of instruction completion. A program status word (PSW) in register 31 controls execution of the macro-program. Similarly, the system also includes a milli-PSW register 33, which controls execution of the milli-routine. Both the execution unit 24 and the completion logic 30 are connected to read from/write to the PSW and the milli-PSW registers. Thus, at any given point the execution units or the completion logic can read or update the appropriate one of the PSW and/or milli-PSW registers. A processor state unit 40 maintains the entire updated status of the architected system both in regular mode and milli-mode operation. In the event of a detected error, the processor state unit 40 provides a resource to recreate the status of the system from a check point state in order to allow a retry of the error causing operation.
Milli-mode is enabled when the milli-mode detection logic 26 recognizes that the macro-instruction being decoded is to be implemented with millicode. In response to this recognition, the detection logic 26 signals the decoder 20, the instruction fetch controls 35 and register controls in the execution unit 24. In response to the milli-mode recognition signal from the detection logic 26, the decoder 20 suspends macro-mode decoding, the execution unit register control copies the contents of the GPRs 21 to the milli-registers 23 and causes the system to subsequently use the milli-registers 23. The milli-mode detection logic 26 generates a millicode entry point address.
The entry point address (generated by the milli-mode detection logic 26) is used by the control logic 35 to address the cache 12. Milli-instructions from the cache are sent to the instruction registers 18 where the decoder 20 decodes them and schedules them for execution.
When the processor enters milli-mode, it executes and completes the macro-instructions already in the pipeline conceptually prior to the instruction that caused entry into milli-mode. As the processor completes the macro-instructions, it updates the appropriate GPRs. At the same time, the processor decodes and executes the milli-instructions that implement the macro-instruction that caused entry into milli-mode.
At some point the macro-instruction immediately prior to the instruction that caused entry to milli-mode will be indicated completed in the completion logic 30. Only then does the processor begin to complete the milli-instructions. The processor then continues decoding, executing and completing the milli-instructions.
Eventually, the detection logic 26 recognizes a millicode END (MEND) milli-instruction. When the detection logic 26 detects a MEND milli-instruction, it causes the processor to cease fetching milli-instructions. Further, when MEND is detected, the detection logic puts the decoder in macro-mode and causes the processor to begin fetching macro-instructions. Millicode explicitly updates all registers, so there is no transfer of register content when going from milli-mode operation to regular operation.
Completion of a MEND milli-instruction causes the processor completion logic to begin completing macro-instructions.
The processor can also enter milli-mode in response to an interrupt. When the completion logic detects an interrupt, the interrupt priority logic 45 determines that an interrupt is to be serviced and it signals the instruction fetch unit, causing the decoder to initiate milli-mode. The recognition of an interruption condition causes the processor to halt macro-mode execution at the next interruptible point. The interrupt priority logic 45 also generates control inputs which are used by the milli-mode detection logic to generate an entry point address with which to address the cache. These milli-instructions are sent to the instruction registers where the decoder decodes them and schedules them for execution at the appropriate hardware execution elements.
The processor proceeds to decode, execute and complete the milli-instruction in the milli-routine for interrupts. Eventually, the decoder recognizes a MEND milli-instruction. This causes the decoder to stop decoding in milli-mode. Depending on whether or not there are additional interrupts that require servicing, the decoder hardware will either redo the interrupt process or return to decoding macro-instructions from the cache.
PSW Validity Test
In many cases, millicode must load a new value into the PSW or otherwise alter the PSW value. For example after the execution of a millicode routine, the processor may be required to execute program statements other than the ones immediately following the macro instruction before the processor entered the millicode routine. When this happens, the ESA/390 architecture requires that the new PSW value be checked for validity. If the new PSW value is not valid, the ESA/390 architecture further requires that a specification exception be reported.
For an ESA/390 PSW to be valid, all of the following must be true:
1. Bit 12 is set to 1.
2. Bit 63 is set to 0 (instruction address must be even).
3. Bit 32 is set to 1 (31-bit addressing mode).
OR
Bits 32:39 are all 0 (valid 24-bit instruction address).
4. Bits 0, 2:4, and 24:31 are all set to 0.
Additionally, some operational modes further restrict the PSW. For example, some modes require that the Dynamic Address Translation Control (bit 5) is set to 0 Or that the Address Space Control 15 is set to Primary or Access Register Mode (i.e. bit 16 is set to 0). The overall complexity of PSW validity testing, along with the possibility of architecture changes, argue against a strictly hardware implementation of PSW validity testing. However, a millicoded check of PSW validity, with no special millicode instructions, would require several tests and branches, resulting in a significant performance impact.
Referring now to FIG. 2, to avoid these problems, a millicode instruction, TEST PSW, is defined as illustrated to support efficient PSW validity checking under millicode control. The instruction tests bits 0:31 of the PSW using a mask which, the millicode supplies. The instruction separately tests bit 12 and bits 32:63 (the instruction address) using hardware controls. The instruction can use hardware controls for these latter tests since these bits are independent of operational modes.
A special test is performed using the specified processor state unit register, the MGR specified by R1 and the program instruction address, and the result of the test is indicated in the condition code. Neither the specified processor state unit register nor MGR R1 is modified by this instruction. The operand 2 address (specified by D2 (B2)) is not used to address storage. Instead, bits 24:31 of the address are used to select one register from the processor state unit. Bits 0:23 of the operand 2 address are ignored. This instruction is intended for use with 32-bit processor state unit registers. The expected use of this instruction is with a register containing the current ESA/390 PSW specified as the processor state unit register.
The test performed is designed to check the ESA/390 PSW for validity, under control of millicode. The 32-bit value contained in MGR R1 is used as a mask to indicate which bits in the specified processor state unit register are required to be zeros. Note that the appropriate value for the mask is affected by various operational modes, including those associated with multiple-controlled data spaces and the expedited SIE subset. If the bitwise logical AND of MGR R1 and the specified processor state unit register is not all zeros, then condition code 1 is set to indicate an invalid PSW format. Independently of the mask value in MGR R1, if bit 12 of the specified processor state unit register is zero, condition code 1 is set, since this cannot be a valid 370/XA or ESA/390 PSW.
The program instruction address is also examined by the hardware. If the bit 0 of the address is zero (indicating 24-bit addressing mode) and bits 1:7 are not all zeros, condition code 1 is set. If bit 31 of the address is 1 (odd instruction address), and no conditions exist to set condition code 1, then condition code 2 is set.
If no conditions exist to set condition code 1 or 2, then condition code 0 is set.
This instruction is provided to accomplish in one execution cycle what would otherwise require several millicode instructions. It remains the responsibility of millicode to load the correct mask value in MGR R1 and to take the appropriate action if the PSW is indeed invalid.
The condition code is set as follows:
______________________________________                                    
Code        Condition                                                     
______________________________________                                    
0           Valid PSW value                                               
1           Invalid PSW (word 0 or addressing mode)                       
2           Odd instruction address                                       
______________________________________                                    
Referring now to FIG. 3, in operation, the millicode instruction references the PSW from the special register (a Millicode Control Register) in which the PSW is maintained, block 70. This avoids any need to access the PSW separately from the TEST PSW instruction. Independently of the TEST PSW operation, millicode computes the mask for the TEST PSW instruction whenever the operational mode changes. The processor maintains this mask in a register or storage to allow fast access when needed for TEST PSW. Prior to execution of TEST PSW, this mask is loaded into an MGR, from which the TEST PSW obtains the mask value, block 72. The processor defines the mask such that it contains a 1 in every bit position required to be a 0 in the PSW.
TEST PSW consists of a logical AND of the mask with bits 0:31 of the PSW, block 74, and a hardware check of bits 12, 32:39, block 75, and bit 64, block 76. The processor sets the condition code to 1 if any of these conditions exist: (1) the result of this logical AND is not all zeros indicating that a PSW bit required to be 0 is in fact a 1, blocks 78 and 80; (2) PSW bit 12 is 0; or (3) PSW bits 32:39 contain an invalid combination, blocks 82 and 84. Furthermore, if PSW bit 63 is set to 1, and the instruction finds no other invalid PSW condition, then the instruction sets the condition code to 2, blocks 86, 88 and 90. If none of the preceding occurs, the instruction sets the condition code to 0 to indicate a valid PSW, block 92.
Load With Access Test
Millicode statements, just like hardware executed ESA/390 macrocode instructions, are subject to access exception tests. That is, if millicode accesses a storage operand and an exception occurs, the interrupt logic interrupts the millicode routine and passes control to the program exception interrupt handler.
In many cases, millicode must explicitly detect access exceptions for storage operands while at the same time retaining control in the current millicode routine to ensure that exceptions are handled correctly and with the right priority. The system has a LOAD AND TEST ACCESS millicode instruction illustrated in FIG. 4 to meet this requirement with the addition of minimal unique hardware.
The MGR specified by R1 is loaded with the word of storage addressed by D2 (B2). Access exceptions associated with the storage access for the second operand are blocked in the hardware, and do not result in a program interrupt, but instead set the condition code. In addition, the value loaded in the MGR is unpredictable when an access exception other than a protection exception is detected. In all other respects this operates like the ESA/390 LOAD instruction.
If the test modifier tag is set in the operand access control register used with LOAD AND TEST ACCESS, the processor will check for store access exceptions as well as for fetch access exceptions. The accessed data is still returned and the condition code set as for an unmodified LOAD AND TEST ACCESS instruction.
The millicode condition code is set to indicate whether any access exception conditions were present for the second-operand storage access, as follows:
______________________________________                                    
Code        Condition                                                     
______________________________________                                    
0           No access exceptions found                                    
1           Access exception found and blocked                            
2           <not used>                                                    
3           Host access exception found and blocked                       
______________________________________                                    
This instruction operates similarly to the ESA/390 LOAD instruction. The difference between the ESA/390 LOAD instruction and the LOAD AND TEST ACCESS instruction is that with the LOAD AND TEST ACCESS instruction, the access exceptions do not cause an interrupt but instead set a condition code. In particular, the instruction sets the condition code to 0 if no access exception is detected, and sets it to either 1 or 3 if the instruction detects an access exception. The instruction sets the condition to 3 when the program is executing in emulation and the access exception is associated with the host program. The instruction sets the condition code to 1 for all other access exceptions.
Hardware suppresses reporting of these access exceptions and uses the access exception information to set the condition code. The additional hardware introduces no timing or performance constraints since access exception information is available with the same timing as the data being retrieved.
Except for the interrupt controls, to which the storage access controls transfer access information, and the condition code controls, the LOAD AND TEST instruction does not affect the hardware controls associated with storage accesses and access exceptions. In order to ensure that these controls are not left in a state that expects a program interruption due to the access exception, the interrupt controls will force a serialization interrupt if a non-zero code is set for LOAD AND TEST ACCESS. This serialization interrupt purges the instruction pipeline and resets the pipeline controls, but does not cause any redirection of the instruction stream and thus is completely transparent to the millicode being executed. Since this serialization interrupt occurs only in the access exception case, which should be relatively infrequent, the performance impact of this is negligible.
Character Translation Assist
The ESA/390 instructions TRANSLATE and TRANSLATE AND TEST use a table of 256 bytes to translate a string of bytes. The instruction uses each string byte as an index into the table and then selects and fetches a table byte. The table bytes selected by TRANSLATE replaced the original string in storage. For TRANSLATE AND TEST, the selected bytes are tested, and the first non-zero table byte selected is returned to the program in a general register along with the address of the string byte which selected it. TRANSLATE AND TEST also sets the condition code, but it does not update storage.
Millicode can implement these instructions using only standard ESA/390 instructions, but the sequence of extracting a string byte, accessing the table using that byte as an index, and either testing the table byte or storing it back to the string would require several machine cycles per byte processed. Since these instructions are used extensively in many applications, the implementing of these instructions in only standard ESA/390 instructions would significantly impact performance. A hardware implementation of these instructions would require complex controls.
The millicode instruction TRANSLATE FETCH, illustrated in FIG. 5, helps provide reasonable performance to TRANSLATE and TRANSLATE AND TEST instructions while maintaining the flexibility and simplicity of a millicoded design. The TRANSLATE FETCH instruction uses an RX format, but modifies the interpretation of the X2 and D2 fields (base and displacement). Instead of designating a bit offset, bits 29 to 31 of the instruction are used as a 3-bit mask and the remaining bits of what is normally the D2 field in an RX format instruction are ignored. The low order 2 bits of this mask select one of the four bytes of the X2 register to use as an actual index. Additionally, the 3-byte mask selects one of the 8 bytes of the millicode general register pair designated by R1 to receive the byte of storage accessed by the operand 2 address. The resulting contents of MGR Pair R1 are tested for a non-zero value and a condition code is set accordingly. The only unique data flow hardware required for TRANSLATE FETCH is the 4-to-1 bit multiplexer for the X2 input to the address adder.
A single byte is fetched from storage at the operand 2 address and inserted into the even/odd MGR pair specified by R1.
The operand 2 address is not formed by the normal B2 +X2 +D2 process; instead, bits 30:31 of the instruction select one of four bytes from MGR X2, and that byte is added to the contents of MGR B2 to form the operand address. Similarly, bits 29:31 of the instruction select which byte of the MGR pair (R1, R1 +1) is loaded with the byte fetched from storage. The effect of the M3 field (bits 29:31 of the instruction) is summarized in Table 1.
              TABLE 1                                                     
______________________________________                                    
Effect of M.sub.3 field in TRFET instruction                              
M.sub.3    Operand 2 address                                              
                          Register byte loaded                            
______________________________________                                    
`000`b     B.sub.2 + X.sub.2.0:7                                          
                          R.sub.1.0:7                                     
`001`b     B.sub.2 + X.sub.2.8:15                                         
                          R.sub.1.8:15                                    
`010`b     B.sub.2 + X.sub.2.16:23                                        
                          R.sub.1.16:23                                   
`011`b     B.sub.2 + X.sub.2.24:31                                        
                          R.sub.1.24:31                                   
`100`b     B.sub.2 + X.sub.2.0:7                                          
                          (R.sub.1 + 1).0:7                               
`101`b     B.sub.2 + X.sub.2.8:15                                         
                          (R.sub.1 + 1).8:15                              
`110`b     B.sub.2 + X.sub.2.16:23                                        
                          (R.sub.1 + 1).16:23                             
`111`b     B.sub.2 + X.sub.2.24:31                                        
                          (R.sub.1 + 1).24:31                             
______________________________________                                    
Bits 20:28 of the instruction are not used.
While the invention has been described in terms of a single preferred embodiment, those skilled in the art will recognize that the invention can be practiced with modification within the spirit and scope of the appended claims.

Claims (1)

Having thus described our invention, what we claim as new and desire to secure by letters patent is as follows:
1. In a pipelined computer processor, which executes a relatively simple instruction set in a hardware controlled execution unit and executes a relatively complex instruction set in a milli-mode architected state with a millicode sequence of simple instructions in said hardware controlled execution unit, a method of operation including the steps of:
storing a millicode instruction that includes a field specifying a processor state unit register in which said program status word is stored and a field specifying a millicode general register in which a mask is stored indicating those bits in the program status word which are to be zeros if the program status word is valid;
fetching said millicode instruction from storage;
performing a logical AND operation between correspondingly positioned bits in said program status word and bits in said mask;
storing a millicode load and test access instruction that includes a field specifying a millicode register address and a field specifying a storage address for an access exception to a second operand fetch access exception;
fetching said millicode load and test access instruction;
executing said millicode load and test access instruction including testing a load operand operation, setting one condition code when no access exception is found, and blocking an interrupt when an access exception is found and setting another condition code;
storing a millicode instruction to facilitate translation of string bytes which includes a field that specifies a first millicode general register, a field that specifies a second millicode general register, a field that selects one byte from the first register to be added to the content of the second millicode general register to form an operand address of a byte to be fetched from storage, and a field that specifies a register pair into which said byte to be fetched from storage is to be stored; and
fetching said millicode instruction to facilitate translation of string bytes, and executing said millicode instruction to facilitate translation of string bytes.
US08/829,267 1995-03-31 1997-03-31 Specialized millicode instructions which reduce cycle time and number of instructions necessary to perform complex operations Expired - Lifetime US5748951A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US08/829,267 US5748951A (en) 1995-03-31 1997-03-31 Specialized millicode instructions which reduce cycle time and number of instructions necessary to perform complex operations

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US08/414,154 US5694587A (en) 1995-03-31 1995-03-31 Specialized millicode instructions for test PSW validity, load with access test, and character translation assist
US08/829,267 US5748951A (en) 1995-03-31 1997-03-31 Specialized millicode instructions which reduce cycle time and number of instructions necessary to perform complex operations

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
US08/414,154 Division US5694587A (en) 1995-03-31 1995-03-31 Specialized millicode instructions for test PSW validity, load with access test, and character translation assist

Publications (1)

Publication Number Publication Date
US5748951A true US5748951A (en) 1998-05-05

Family

ID=23640178

Family Applications (3)

Application Number Title Priority Date Filing Date
US08/414,154 Expired - Fee Related US5694587A (en) 1995-03-31 1995-03-31 Specialized millicode instructions for test PSW validity, load with access test, and character translation assist
US08/829,268 Expired - Fee Related US5790844A (en) 1995-03-31 1997-03-31 Millicode load and test access instruction that blocks interrupts in response to access exceptions
US08/829,267 Expired - Lifetime US5748951A (en) 1995-03-31 1997-03-31 Specialized millicode instructions which reduce cycle time and number of instructions necessary to perform complex operations

Family Applications Before (2)

Application Number Title Priority Date Filing Date
US08/414,154 Expired - Fee Related US5694587A (en) 1995-03-31 1995-03-31 Specialized millicode instructions for test PSW validity, load with access test, and character translation assist
US08/829,268 Expired - Fee Related US5790844A (en) 1995-03-31 1997-03-31 Millicode load and test access instruction that blocks interrupts in response to access exceptions

Country Status (1)

Country Link
US (3) US5694587A (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5841998A (en) * 1996-12-31 1998-11-24 Metaflow Technologies, Inc. System and method of processing instructions for a processor
US6055624A (en) * 1998-04-07 2000-04-25 International Business Machines Corporation Millicode flags with specialized update and branch instructions
US6055623A (en) * 1998-04-07 2000-04-25 International Business Machine Corporation Specialized millicode instruction for editing functions
US6058470A (en) * 1998-04-07 2000-05-02 International Business Machines Corporation Specialized millicode instruction for translate and test
US6067617A (en) * 1998-04-07 2000-05-23 International Business Machines Corporation Specialized millicode instructions for packed decimal division
US6088792A (en) * 1998-04-30 2000-07-11 International Business Machines Corporation Avoiding processor serialization after an S/390 SPKA instruction
US6496975B1 (en) 1999-10-15 2002-12-17 International Business Machines Corporation Method, system, and program for performing conditional program operations
US6513110B1 (en) * 1999-12-15 2003-01-28 Transmeta Corporation Check instruction and method
US20030131199A1 (en) * 2002-01-09 2003-07-10 International Business Machines Corporation Method for ensuring that a line is present in an instruction cache
US20090210680A1 (en) * 2008-02-15 2009-08-20 International Business Machines Corporation Method, system and computer program product for millicode store access checking instructions
US20090217009A1 (en) * 2008-02-25 2009-08-27 International Business Machines Corporation System, method and computer program product for translating storage elements
US7685403B1 (en) 1999-10-20 2010-03-23 Brett Coon Pipeline replay support for multi-cycle operations
US7886135B1 (en) 1999-10-20 2011-02-08 Brett Coon Pipeline replay support for unaligned memory operations
US20110202748A1 (en) * 2010-02-18 2011-08-18 International Business Machines Corporation Load pair disjoint facility and instruction therefore

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6141740A (en) * 1997-03-03 2000-10-31 Advanced Micro Devices, Inc. Apparatus and method for microcode patching for generating a next address
US5983337A (en) * 1997-06-12 1999-11-09 Advanced Micro Devices, Inc. Apparatus and method for patching an instruction by providing a substitute instruction or instructions from an external memory responsive to detecting an opcode of the instruction
US6105109A (en) * 1998-02-19 2000-08-15 International Business Machines Corporation System speed loading of a writable cache code array
US6178495B1 (en) * 1998-04-30 2001-01-23 International Business Machines Corporation Processor E-unit to I-unit interface instruction modification with E-unit opcode computer logic in the unit
US8127121B2 (en) 1999-01-28 2012-02-28 Ati Technologies Ulc Apparatus for executing programs for a first computer architechture on a computer of a second architechture
US8074055B1 (en) 1999-01-28 2011-12-06 Ati Technologies Ulc Altering data storage conventions of a processor when execution flows from first architecture code to second architecture code
US8121828B2 (en) 1999-01-28 2012-02-21 Ati Technologies Ulc Detecting conditions for transfer of execution from one computer instruction stream to another and executing transfer on satisfaction of the conditions
US7941647B2 (en) 1999-01-28 2011-05-10 Ati Technologies Ulc Computer for executing two instruction sets and adds a macroinstruction end marker for performing iterations after loop termination
US6438664B1 (en) 1999-10-27 2002-08-20 Advanced Micro Devices, Inc. Microcode patch device and method for patching microcode using match registers and patch routines
US6671793B1 (en) 2000-10-02 2003-12-30 International Business Machines Corporation Method and system for managing the result from a translator co-processor in a pipelined processor
US6662296B1 (en) 2000-10-02 2003-12-09 International Business Machines Corporation Method and system for testing millicode branch points
GB2392998B (en) * 2002-09-16 2005-07-27 Advanced Risc Mach Ltd Handling interrupts during multiple access program instructions
KR100934215B1 (en) * 2007-10-29 2009-12-29 한국전자통신연구원 Microprocessor based on event handling instruction set and event processing method using the same
US9164761B2 (en) * 2008-02-19 2015-10-20 International Business Machines Corporation Obtaining data in a pipelined processor
US7975182B2 (en) * 2008-02-25 2011-07-05 International Business Machines Corporation Method, system and computer program product for generating trace data
US8250336B2 (en) * 2008-02-25 2012-08-21 International Business Machines Corporation Method, system and computer program product for storing external device result data

Family Cites Families (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US3990054A (en) * 1974-11-05 1976-11-02 Honeywell Inc. Microprogram organization techniques
US4366537A (en) * 1980-05-23 1982-12-28 International Business Machines Corp. Authorization mechanism for transfer of program control or data between different address spaces having different storage protect keys
US4589065A (en) * 1983-06-30 1986-05-13 International Business Machines Corporation Mechanism for implementing one machine cycle executable trap instructions in a primitive instruction set computing system
US4809157A (en) * 1985-09-30 1989-02-28 International Business Machines Corp. Dynamic assignment of affinity for vector tasks
US5341482A (en) * 1987-03-20 1994-08-23 Digital Equipment Corporation Method for synchronization of arithmetic exceptions in central processing units having pipelined execution units simultaneously executing instructions
JPH0810437B2 (en) * 1987-05-11 1996-01-31 株式会社日立製作所 Guest execution control method for virtual machine system
US4901233A (en) * 1987-07-20 1990-02-13 International Business Machines Corporation Computer system with logic for writing instruction identifying data into array control lists for precise post-branch recoveries
US5261084A (en) * 1988-05-06 1993-11-09 Nec Corporation Error judgment method
US5136696A (en) * 1988-06-27 1992-08-04 Prime Computer, Inc. High-performance pipelined central processor for predicting the occurrence of executing single-cycle instructions and multicycle instructions
US5333287A (en) * 1988-12-21 1994-07-26 International Business Machines Corporation System for executing microinstruction routines by using hardware to calculate initialization parameters required therefore based upon processor status and control parameters
US5335334A (en) * 1990-08-31 1994-08-02 Hitachi, Ltd. Data processing apparatus having a real memory region with a corresponding fixed memory protection key value and method for allocating memories therefor
US5307504A (en) * 1991-03-07 1994-04-26 Digital Equipment Corporation System and method for preserving instruction granularity when translating program code from a computer having a first architecture to a computer having a second reduced architecture during the occurrence of interrupts due to asynchronous events
CA2060555A1 (en) * 1991-04-24 1992-10-25 Robert J. Bullions, Iii System and method for draining an instruction pipeline
US5226164A (en) * 1991-04-24 1993-07-06 International Business Machines Corporation Millicode register management and pipeline reset
US5345567A (en) * 1991-06-10 1994-09-06 International Business Machines Corporation System and method for modifying program status word system mask, system access key, and address space code with overlap enabled
US5479616A (en) * 1992-04-03 1995-12-26 Cyrix Corporation Exception handling for prefetched instruction bytes using valid bits to identify instructions that will cause an exception
DE4434895C2 (en) * 1993-12-23 1998-12-24 Hewlett Packard Co Method and device for handling exceptional conditions
US5596739A (en) * 1994-02-08 1997-01-21 Meridian Semiconductor, Inc. Method and apparatus for detecting memory segment violations in a microprocessor-based system
US5537559A (en) * 1994-02-08 1996-07-16 Meridian Semiconductor, Inc. Exception handling circuit and method

Non-Patent Citations (9)

* Cited by examiner, † Cited by third party
Title
"Structured Computer Organization" Andrew S. Tanenbaum pp. 235-236 & 267-269, 1984.
Digital VAX11 Architecture Handbook p. 236, 1979. *
Intel "Intel Processor Indentification with the CPUID Instruction" AP-485 pp. 1-18, Oct. 1993.
Intel Intel Processor Indentification with the CPUID Instruction AP 485 pp. 1 18, Oct. 1993. *
Motorola "Enhanced 32-bit microprocessor user's manual" pp. 3-66, 1989.
Motorola Enhanced 32 bit microprocessor user s manual pp. 3 66, 1989. *
Structured Computer Organization Andrew S. Tanenbaum pp. 235 236 & 267 269, 1984. *
Texas Instruments "Digital Signal Processor Products" pp. 3-7, 1983.
Texas Instruments Digital Signal Processor Products pp. 3 7, 1983. *

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5841998A (en) * 1996-12-31 1998-11-24 Metaflow Technologies, Inc. System and method of processing instructions for a processor
US6055624A (en) * 1998-04-07 2000-04-25 International Business Machines Corporation Millicode flags with specialized update and branch instructions
US6055623A (en) * 1998-04-07 2000-04-25 International Business Machine Corporation Specialized millicode instruction for editing functions
US6058470A (en) * 1998-04-07 2000-05-02 International Business Machines Corporation Specialized millicode instruction for translate and test
US6067617A (en) * 1998-04-07 2000-05-23 International Business Machines Corporation Specialized millicode instructions for packed decimal division
US6088792A (en) * 1998-04-30 2000-07-11 International Business Machines Corporation Avoiding processor serialization after an S/390 SPKA instruction
US6496975B1 (en) 1999-10-15 2002-12-17 International Business Machines Corporation Method, system, and program for performing conditional program operations
US8117423B1 (en) 1999-10-20 2012-02-14 Brett Coon Pipeline replay support for multicycle operations
US8516224B2 (en) 1999-10-20 2013-08-20 Brett Coon Pipeline replay support for multicycle operations
US7685403B1 (en) 1999-10-20 2010-03-23 Brett Coon Pipeline replay support for multi-cycle operations
US7886135B1 (en) 1999-10-20 2011-02-08 Brett Coon Pipeline replay support for unaligned memory operations
US6513110B1 (en) * 1999-12-15 2003-01-28 Transmeta Corporation Check instruction and method
US20030131199A1 (en) * 2002-01-09 2003-07-10 International Business Machines Corporation Method for ensuring that a line is present in an instruction cache
US6751708B2 (en) * 2002-01-09 2004-06-15 International Business Machines Corporation Method for ensuring that a line is present in an instruction cache
US20090210680A1 (en) * 2008-02-15 2009-08-20 International Business Machines Corporation Method, system and computer program product for millicode store access checking instructions
US8176301B2 (en) * 2008-02-15 2012-05-08 International Business Machines Corporation Millicode assist instructions for millicode store access exception checking
US7966474B2 (en) 2008-02-25 2011-06-21 International Business Machines Corporation System, method and computer program product for translating storage elements
US20090217009A1 (en) * 2008-02-25 2009-08-27 International Business Machines Corporation System, method and computer program product for translating storage elements
US20110202748A1 (en) * 2010-02-18 2011-08-18 International Business Machines Corporation Load pair disjoint facility and instruction therefore
US8850166B2 (en) * 2010-02-18 2014-09-30 International Business Machines Corporation Load pair disjoint facility and instruction therefore
US9052889B2 (en) 2010-02-18 2015-06-09 International Business Machines Corporation Load pair disjoint facility and instruction therefor

Also Published As

Publication number Publication date
US5790844A (en) 1998-08-04
US5694587A (en) 1997-12-02

Similar Documents

Publication Publication Date Title
US5748951A (en) Specialized millicode instructions which reduce cycle time and number of instructions necessary to perform complex operations
US5345567A (en) System and method for modifying program status word system mask, system access key, and address space code with overlap enabled
US5537559A (en) Exception handling circuit and method
US5926646A (en) Context-dependent memory-mapped registers for transparent expansion of a register file
EP0071028B1 (en) Instructionshandling unit in a data processing system with instruction substitution and method of operation
US5517651A (en) Method and apparatus for loading a segment register in a microprocessor capable of operating in multiple modes
US5694617A (en) System for prioritizing quiesce requests and recovering from a quiescent state in a multiprocessing system with a milli-mode operation
US4591972A (en) Data processing system with unique microcode control
US4569018A (en) Digital data processing system having dual-purpose scratchpad and address translation memory
US5802359A (en) Mapping processor state into a millicode addressable processor state register array
US4597041A (en) Method and apparatus for enhancing the operation of a data processing system
US5713035A (en) Linking program access register number with millicode operand access
US6055623A (en) Specialized millicode instruction for editing functions
US5819078A (en) Addressing extended memory using millicode by concatenating a small millicode address and address extension data
US6058470A (en) Specialized millicode instruction for translate and test
KR100317769B1 (en) Specialized millicode instructions for packed decimal division
US5611062A (en) Specialized millicode instruction for string operations
US5881279A (en) Method and apparatus for handling invalid opcode faults via execution of an event-signaling micro-operation
US6513110B1 (en) Check instruction and method
US5625808A (en) Read only store as part of cache store for storing frequently used millicode instructions
US5621909A (en) Specialized millicode instruction for range checking
US6055624A (en) Millicode flags with specialized update and branch instructions
US5278840A (en) Apparatus and method for data induced condition signalling
US5673391A (en) Hardware retry trap for millicoded processor
US6088792A (en) Avoiding processor serialization after an S/390 SPKA instruction

Legal Events

Date Code Title Description
FEPP Fee payment procedure

Free format text: PAYOR NUMBER ASSIGNED (ORIGINAL EVENT CODE: ASPN); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

STCF Information on status: patent grant

Free format text: PATENTED CASE

FEPP Fee payment procedure

Free format text: PAYER NUMBER DE-ASSIGNED (ORIGINAL EVENT CODE: RMPN); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

Free format text: PAYOR NUMBER ASSIGNED (ORIGINAL EVENT CODE: ASPN); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

FPAY Fee payment

Year of fee payment: 4

FPAY Fee payment

Year of fee payment: 8

FPAY Fee payment

Year of fee payment: 12