HOME

TheInfoList



OR:

In a computer instruction set architecture (ISA), an execute instruction is a machine language instruction which treats data as a machine instruction and executes it. It can be considered a fourth mode of instruction sequencing after ordinary sequential execution, branching, and
interrupt In digital computers, an interrupt (sometimes referred to as a trap) is a request for the processor to ''interrupt'' currently executing code (when permitted), so that the event can be processed in a timely manner. If the request is accepted ...
ing. Since it is an instruction that operates on other instructions like the
repeat instruction In computer instruction set architectures (ISA), a repeat instruction is a machine language instruction which repeatedly executes another instruction a fixed number of times, or until some condition is met. Since it is an instruction that opera ...
, it has also been classified as a meta-instruction.


Computer models

Many computer families introduced in the 1950s and 1960s include ''execute'' instructions: the
IBM 709 The IBM 709 was a computer system, initially announced by IBM in January 1957 and first installed during August 1958. The 709 was an improved version of its predecessor, the IBM 704, and was the third of the IBM 700/7000 series of scientific ...
and
IBM 7090 The IBM 7090 is a second-generation transistorized version of the earlier IBM 709 vacuum tube mainframe computer that was designed for "large-scale scientific and technological applications". The 7090 is the fourth member of the IBM 700/7000 s ...
( op code mnemonic: ), the
IBM 7030 Stretch The IBM 7030, also known as Stretch, was IBM's first transistorized supercomputer. It was the fastest computer in the world from 1961 until the first CDC 6600 became operational in 1964."Designed by Seymour Cray, the CDC 6600 was almost three t ...
(, ), the
PDP-1 The PDP-1 (''Programmed Data Processor-1'') is the first computer in Digital Equipment Corporation's PDP series and was first produced in 1959. It is famous for being the computer most important in the creation of hacker culture at Massachusett ...
/ -4/ -9/ -15 (), the UNIVAC 1100/2200 (), the CDC 924 (), the
PDP-6 The PDP-6, short for Programmed Data Processor model 6, is a computer developed by Digital Equipment Corporation (DEC) during 1963 and first delivered in the summer of 1964. It was an expansion of DEC's existing 18-bit systems to use a 36-bit ...
/ -10 (), the
IBM System/360 The IBM System/360 (S/360) is a family of mainframe computer systems that was announced by IBM on April 7, 1964, and delivered between 1965 and 1978. It was the first family of computers designed to cover both commercial and scientific applic ...
(), the GE-600/
Honeywell 6000 The Honeywell 6000 series computers were rebadged versions of General Electric's 600-series mainframes manufactured by Honeywell International, Inc. from 1970 to 1989. Honeywell acquired the line when it purchased GE's computer division in 19 ...
(, ), the SDS-9xx (). Fewer 1970s designs include ''execute'' instructions. An ''execute'' instruction was proposed for the
PDP-11 The PDP-11 is a series of 16-bit minicomputers sold by Digital Equipment Corporation (DEC) from 1970 into the 1990s, one of a set of products in the Programmed Data Processor (PDP) series. In total, around 600,000 PDP-11s of all models were so ...
in 1970, but never implemented for it or its successor, the
VAX VAX (an acronym for Virtual Address eXtension) is a series of computers featuring a 32-bit instruction set architecture (ISA) and virtual memory that was developed and sold by Digital Equipment Corporation (DEC) in the late 20th century. The V ...
. Architectures with an ''execute'' instruction include: the Nuclear Data 812 minicomputer (1971) (), the
HP 3000 The HP 3000 series is a family of 16-bit and 32-bit minicomputers from Hewlett-Packard. It was designed to be the first minicomputer with full support for time-sharing in the hardware and the operating system, features that had mostly been limit ...
(1972) (), and the Texas Instruments
TI-990 {{Short description, Series of 16-bit computers by Texas Instruments. The TI-990 was a series of 16-bit minicomputers sold by Texas Instruments (TI) in the 1970s and 1980s. The TI-990 was a replacement for TI's earlier minicomputer systems, the T ...
(1975) and its microprocessor version, the
TMS9900 Introduced in June 1976, the TMS9900 was one of the first commercially available, single-chip 16-bit microprocessors. It implemented Texas Instruments' TI-990 minicomputer architecture in a single-chip format, and was initially used for low-end m ...
(1976) (). Modern instruction sets do not include ''execute'' instructions because they interfere with
pipelining Pipelining may refer to: * Pipeline (computing), aka a data pipeline, a set of data processing elements connected in series ** HTTP pipelining, a technique in which multiple HTTP requests are sent on a single TCP connection ** Instruction pipeli ...
,
prefetching Prefetching in computer science is a technique for speeding up fetch operations by beginning a fetch operation whose result is expected to be needed soon. Usually this is before it is ''known'' to be needed, so there is a risk of wasting time by p ...
, and other optimizations.


Semantics

The instruction to be executed, the target instruction, may be in a register or fetched from memory. Some architectures allow the target instruction to itself be an ''execute'' instruction; others do not. The target instruction is executed as if it were in the memory location of the ''execute'' instruction. If, for example, it is a subroutine call instruction, execution is transferred to the subroutine, with the return location being the location after the ''execute'' instruction. However, some architectures implement variants of the ''execute'' instruction which inhibit branches. The System/360 supports variable-length target instructions. It also supports modifying the target instruction before executing it. The target instruction must start on an even-numbered byte. The GE-600 series supports execution of two-instruction sequences, which must be doubleword-aligned. Some architectures support an ''execute'' instruction which operates in a different protection and address relocation mode. For example, the ITS PDP-10 paging device supports a privileged-mode 'execute relocated' instruction which allows memory reads, writes, or both to use the user-mode page mappings. Similarly, the KL10 variant of the PDP-10 supports the privileged instruction 'previous context XCT'. The ''execute'' instruction can cause several problems when one ''execute'' instruction points to another one and so on: * the processor may be uninterruptable for multiple
clock cycles In electronics and especially synchronous digital circuits, a clock signal (historically also known as ''logic beat'') oscillates between a high and a low state and is used like a metronome to coordinate actions of digital circuits. A clock sign ...
if the ''execute'' instruction cannot be interrupted in the middle of execution; * similarly, the processor may go into an infinite loop if the series of ''execute'' instructions is circular and uninterruptable; * if the ''execute'' instructions are on different swap pages, all of the pages need to be swapped in for the instruction to complete, which can cause thrashing. Similar issues arise with multilevel indirect addressing modes.


Applications

The ''execute'' instruction has several applications: * Functioning as a single-instruction
subroutine In computer programming, a function or subroutine is a sequence of program instructions that performs a specific task, packaged as a unit. This unit can then be used in programs wherever that particular task should be performed. Functions ma ...
, which may call a full subroutine if necessary. *
Late binding In computing, late binding or dynamic linkage—though not an identical process to dynamically linking imported code libraries—is a computer programming mechanism in which the method being called upon an object, or the function being call ...
** Implementation of
call by name In a programming language, an evaluation strategy is a set of rules for evaluating expressions. The term is often used to refer to the more specific notion of a ''parameter-passing strategy'' that defines the kind of value that is passed to the ...
and other thunks. ** A table of execute targets may be used for
dynamic dispatch In computer science, dynamic dispatch is the process of selecting which implementation of a polymorphic operation ( method or function) to call at run time. It is commonly employed in, and considered a prime characteristic of, object-oriente ...
of the methods or
virtual function In object-oriented programming, in languages such as C++, and Object Pascal, a virtual function or virtual method is an inheritable and overridable function or method for which dynamic dispatch is facilitated. This concept is an important ...
s of an object or class, especially when the method or function may often be implementable as a single instruction. ** An execute target may contain a
hook A hook is a tool consisting of a length of material, typically metal, that contains a portion that is curved or indented, such that it can be used to grab onto, connect, or otherwise attach itself onto another object. In a number of uses, one e ...
for adding functionality or for debugging; it is normally initialized as a NOP which may be overridden dynamically. ** An execute target may change between a fast version of an operation and a fully traced version.{{cite manual, first=David A., last=Moon, author-link=David A. Moon, title=Maclisp Reference Manual, version=Revision 0, date=April 1974, page=181, url=http://www.softwarepreservation.com/projects/LISP/MIT/Moon-MACLISP_Reference_Manual-Apr_08_1974.pdf * Tracing, monitoring, and emulation ** This may maintain a pseudo-
program counter The program counter (PC), commonly called the instruction pointer (IP) in Intel x86 and Itanium microprocessors, and sometimes called the instruction address register (IAR), the instruction counter, or just part of the instruction sequencer, is ...
, leaving the normal program counter unchanged. * Executing dynamically generated code, especially when
memory protection Memory protection is a way to control memory access rights on a computer, and is a part of most modern instruction set architectures and operating systems. The main purpose of memory protection is to prevent a process from accessing memory that h ...
prevents executable code from being writable. * Emulating self-modifying code, especially when it must be reentrant or read-only. * In the IBM System/360, the ''execute'' instruction can modify bits 8-15 of the target instruction, effectively turning an instruction with a fixed argument (e.g., a length field) into an instruction with a variable argument. * Privileged-mode ''execute'' instructions as on the KL10 are used by
operating system kernels The kernel is a computer program at the core of a computer's operating system and generally has complete control over everything in the system. It is the portion of the operating system code that is always resident in memory and facilitates in ...
to execute operations such as block copies within the virtual space of user processes.


Notes

Central processing unit Instruction processing Instruction set architectures