MMIX

MMIX

:"MMIX may also refer to the year 2009, in Roman numerals."

MMIX (pronounced "em-mix") is a 64-bit RISC instruction set architecture (ISA) designed by Donald Knuth, with significant contributions by John L. Hennessy (who contributed to the design of the MIPS processor) and Richard L. Sites (who was an architect of the DEC Alpha processor). In Knuth’s own words:

Its purpose for education is quite similar to John L. Hennessy's and David A. Patterson's DLX architecture, from "Computer Architecture: A Quantitative Approach".

Architecture

MMIX is a 64-bit RISC computer, with 256 64-bit general-purpose registers and 32 64-bit special-purpose registers. MMIX is a big-endian machine with 32-bit instructions and a 64-bit virtual address space. The MMIX instruction set comprises 256 opcodes, one of which is reserved for future expansion.

Instructions

All instructions have an associated mnemonic. For example instruction 32 is associated to ADD. Most instructions have the symbolic form "OP X,Y,Z", where OP specifies the sort of instruction, X specifies the register used to store the result of the instruction and the rest specify the operands of the instruction. Each of these fields is eight bits wide. For example, the instruction "ADD $0,$1,3", will add the contents of register 1 and the immediate value 3 and store the result in register 0.

Most instructions can take either immediate values or register contents; thus a single instruction mnemonic may correspond to one of two opcodes.

MMIX programs are typically constructed using the MMIXAL assembly language. For an example see .

Registers

There are 256 general purpose architectural registers in an MMIX chip, designated by $0 through $255 and 32 special physical architectural registers. They are implemented by 256-32=224 global physical registers and 512 local physical registers. If X is a number from 0 to 255 inclusive, then special registers rL and rG determine whether register $X refers to a local or a global physical register.

Local register stack

The local register stack provides each subroutine with its own rL local registers, designated by $0 through $(rL−1). Whenever a subroutine is called, a number of local registers is pushed down the stack. The arguments of the called subroutine are left in the remaining local registers. When a subroutine finishes it pops the previously pushed registers. Because there are only 512 local physical registers, it may be necessary to store a part of the stack in memory. This is implemented with the special registers rO and rS which record which part of the local register stack is in memory and which part is still in local physical registers. The register stack provides for fast subroutine linkage.

pecial registers

The 32 special physical architectural registers are as follows:
#;rB, the bootstrap register (trip)
#: When tripping, rB <- $255 and $255 <- rJ. Thus saving rJ in a general register.
#rD, the dividend register
#: Unsigned integer divide uses this as the left half of the 128-bit input that is to be divided by the other operand.
#rE, the epsilon register
#: Used for floating comparisons with respect to epsilon.
#rH, the himult register
#: Used to store the left half of the 128-bit result of unsigned integer multiplication.
#rJ, the return-jump register
#: Used to save the address of the next instruction by PUSHes and by POP to return from a PUSH.
#rM, the multiplex mask register
#: Used by the multiplex instruction.
#rR, the remainder register
#:Is set to the remainder of integer division.
#rBB, the bootstrap register (trap)
#: When trapping, rBB <- $255 and $255 <- rJ. Thus saving rJ in a general register
#rC, the cycle counter
#: Incremented every cycle.
#rN, the serial number
#: A constant identifying this particular MMIX processor.
#rO, the register stack offset
#: Used to implement the register stack.
#rS, the register stack pointer
#: Used to implement the register stack.
#rI, the interval counter
#: Decremented every cycle. Causes an interrupt when zero.
#rT, the trap address register
#: Used to store the address of the trip vector.
#rTT, the dynamic trap address register
#: Used to store the address of the trap vector.
#rK, the interrupt mask register
#: Used to enable and disable specific interrupts.
#rQ, the interrupt request register
#: Used to record interrupts as they occur.
#rU, the usage counter
#: Used to keep a count of executed instructions.
#rV, the virtual translation register
#: Used to translate virtual addresses to physical addresses. Contains the size and number of segments, the root location of the page table and the address space number.
#rG, the global threshold register
#: All general registers references with a number greater or equal to rG refer to global registers.
#rL, the local threshold register
#: All general registers references with a number smaller than rL refer to local registers.
#rA, the arithmetic status register
#: Used to record, enable and disable arithmetic exception like overflow and divide by zero.
#rF, the failure location register
#: Used to store the address of the instruction that caused a failure.
#rP, the prediction register
#: Used by conditional swap (CSWAP).
#rW, the where-interrupted register (trip)
#: Used, when tripping, to store the address of the instruction after the one that was interrupted.
#rX, the execution register (trip)
#: Used, when tripping, to store the instruction that was interrupted.
#rY, the Y operand (trip)
#: Used, when tripping, to store the Y operand of the interrupted instruction.
#rZ, the Z operand (trip)
#: Used, when tripping, to store the Z operand of the interrupted instruction.
#rWW, the where-interrupted register (trap)
#: Used, when trapping, to store the address of the instruction after the one that was interrupted.
#rXX, the execution register (trap)
#: Used, when trapping, to store the instruction that was interrupted.
#rYY, the Y operand (trap)
#: Used, when trapping, to store the Y operand of the interrupted instruction.
#rZZ, the Z operand (trap)
#: Used, when trapping, to store the Z operand of the interrupted instruction.

Hardware implementations

As of 2008, the MMIX instruction set architecture has not yet been implemented in hardware.

oftware tools

The MMIX instruction set architecture is supported by a number of software tools for computer architecture research and software development.

imulators and assembler

* [http://www-cs-faculty.stanford.edu/~knuth/programs/mmix-20060918.tar.gz MMIXware (version 20060918)] &ndash; Donald Knuth’s MMIX-SIM simple (behavioral) simulator, MMIXAL assembler, test suite, sample programs, full documentation, and MMMIX architectural (pipeline) simulator. (gzipped tar file.)
* [http://www.malgil.com/mmix/graphics/ MMIXX] &ndash; An X11-based graphics package contributed by Andrew Pochinsky of MIT’s Center for Theoretical Physics which, when combined with the MMIXware sources above, augments the MMIX virtual machine with a VGA-resolution, true-color ‘virtual display.’ (For UNIX/Linux.)

Compiler

The GNU Compiler Collection includes an MMIX back-end for its C/C++ compilers, contributed by Hans-Peter Nilsson and part of the main GCC distribution since late 2001.
* [http://bitrange.com/mmix/install.html Installation instructions for GCC + MMIX tools] by Hans-Peter Nilsson.

References

* [http://www-cs-faculty.stanford.edu/~knuth/mmixware.html Errata to above book.]
*Donald E. Knuth (2005). "The Art of Computer Programming Volume 1 Fascicle 1: MMIX A RISC Computer for the New Millennium". Addison-Wesley. ISBN 0-201-85392-2 [http://www-cs-staff.stanford.edu/~uno/taocp.html#err1f1 (errata)]

External links

* [http://www-cs-faculty.stanford.edu/~knuth/mmix.html Donald Knuth's MMIX page] &mdash; A brief introduction to MMIX, and Knuth's reasons for using a hypothetical assembly language in TAoCP.
* [http://www-cs-faculty.stanford.edu/~knuth/mmix-news.html Donald Knuth's MMIX news page] &mdash; An open-source simulator written in CWEB, a programmer's manual, and example programs.
* [http://mmixmasters.sourceforge.net/ MMIXmasters web site] A web site for the volunteers (MMIXmasters) who are converting all of the programs in TAOCP, Volumes 1 - 3, from the old language MIX to the new language MMIX.


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • MMIX — [ˌɛmɪks] ist ein 64 Bit Modellcomputer (engl: abstract machine) mit einem RISC Befehlssatz. Donald Knuth benutzt ihn in seinem mehrbändigen Standardwerk The Art of Computer Programming, um die vorgestellten Algorithmen zu beschreiben. MMIX… …   Deutsch Wikipedia

  • MMIX — est à la fois un jeu d instructions 64 bit RISC et un architecture informatique conçu par Donald Knuth, avec une aide importante de John L. Hennessy (qui a conçu l architecture logicielle MIPS) et de Richard L. Sites (un architecte logiciel pour… …   Wikipédia en Français

  • MMIX — MMIX: MMIX  запись римскими цифрами числа 2009. MMIX (компьютер)  64 битная RISC архитектура компьютера, предложенная и используемая Дональдом Кнутом в своих книгах для кодирования алгоритмов …   Википедия

  • MMIX — es una arquitectura de 64 bits, provista de 256 registros de propósito general de tipo RISC y 32 registros de 64 bits de propósito especial. Es una maquina de tipo Big endian con instrucciones de 32 bits y 64 bits de espacio de memoria virtual.… …   Wikipedia Español

  • MMIX (компьютер) — Эта статья  о архитектуре компьютера. О годе (MMIX в записи римскими цифрами) см. 2009. MMIX (произносится эм микс)  64 битная RISC архитектура компьютера, разработанная Дональдом Кнутом с существенным вкладом Джона… …   Википедия

  • MMIX — матем. • Запись числа 2009 римскими цифрами …   Словарь обозначений

  • Lateinische Zahlen — MMIX (2009) Die Römischen Zahlen haben ihren Ursprung im antiken Römischen Reich. Das auf den römischen Ziffern beruhende Zahlensystem stellt natürliche Zahlen in einem Additionssystem zur Basis 10 mit der Hilfsbasis 5 dar. Ein Zeichen für die… …   Deutsch Wikipedia

  • Römische Zahl — MMIX (2009) Die Römischen Zahlen haben ihren Ursprung im antiken Römischen Reich. Das auf den römischen Ziffern beruhende Zahlensystem stellt natürliche Zahlen in einem Additionssystem zur Basis 10 mit der Hilfsbasis 5 dar. Ein Zeichen für die… …   Deutsch Wikipedia

  • Römische Zahlen — MMIX (2009) Die Römischen Zahlen haben ihren Ursprung im antiken Römischen Reich. Das auf den römischen Ziffern beruhende Zahlensystem stellt natürliche Zahlen in einem Additionssystem zur Basis 10 mit der Hilfsbasis 5 dar. Ein Zeichen für die… …   Deutsch Wikipedia

  • Römische Ziffer — MMIX (2009) Die Römischen Zahlen haben ihren Ursprung im antiken Römischen Reich. Das auf den römischen Ziffern beruhende Zahlensystem stellt natürliche Zahlen in einem Additionssystem zur Basis 10 mit der Hilfsbasis 5 dar. Ein Zeichen für die… …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”