Article View: comp.arch
Article #8028Re: MINIMUM instruction set
From: Douglas W. Jones,201H MLH,319335...
Date: Fri, 13 Nov 1992 17:13
Date: Fri, 13 Nov 1992 17:13
50 lines
3055 bytes
3055 bytes
> So here is a challenge: design a machine that uses no more than 4 bits
> per instruction (including operand fields), is Turing complete, not
> terribly inefficient and which can be built using far less hardware
> than current microprocessors. The latter would make it suitable for
> massively parallel systems.
I proposed an idea that might help in my Computer Architecture News paper
entitled "the Minimal CISC" (June 1988). In that paper, I proposed a
not-too inefficient machine using only 3 bits per instruction (operand
fields included). Here's a 4 bit per instruction improvement that's not
half bad (you can do quite a bit better if you let some 4 bit instructions
interpret the next nibble as a 4 bit operand:
Notation: X = top word on stack
Y = word under top word on stack
push(t) -- push word with value T on stack
pop -- pop one word off stack
NOP 0000 No op \
ZERO 0001 X := X << 1 \
ONE 0010 X := (X << 1) + 1 | This much is exactly
DUP 0011 push(X) (duplicates top word on stack) \ my minimal CISC
STORE 0100 M[Y] := X; pop; pop; / instruction set.
LOAD 0101 X := M[X]; |
SUB 0110 Y := Y-X; pop; /
BNEG 0111 if Y<0 then PC := X; endif; pop; pop;/
ZZERO 0000 X := X << 2; \
OONE 0001 X := (X << 2) + 3; \
PUSHZ 0010 push(0); |
NEG 0011 X := -X; \
AND 0100 Y := Y & X; pop; /
CALL 0101 swap(PC,X); |
BZERO 0110 if Y=0 then PC := X; endif; pop; pop; /
BPOS 0111 if Y>0 then PC := X; endif; pop; pop;/
PUSHZ = DUP;DUP;SUB, but we add it for fast pushing of small constants;
ZZERO = ZERO;ZERO, but we add it for faster pushing of constants;
OONE = ONE;ONE, but we add it for the same reason.
NEG is added so that ADD can be done by the macro NEG;SUB;
NEG allows one's complement with the macro NEG;PUSHZ;ONE;SUB;
Unconditional branch is done with PUSHZ;{push address};BZERO;
If the word size is N bits, it takes N instructions, in the worst case,
to push an N bit constant. 101010... is the worst case.
Instructions are packed 2 per byte, and labels must be word aligned. NOP
instructions are used to align labels to a word boundary.
Doug Jones
jones@herky.cs.uiowa.edu
Technical Details
Message-ID:
<1992Nov13.171356.25166@news.uiowa.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!ukma!darwin.sura.net!zaphod.mps.ohio-state.edu!hobbes.physics.uiowa.edu!news.uiowa.edu!newsReferences:
<1992Nov13.113147.11856@odin.diku.dk>Show Full Headers
Complete Article Headers
Newsgroups: comp.arch Path: arc1-ca.pugleaf.net!sparky!uunet!ukma!darwin.sura.net!zaphod.mps.ohio-state.edu!hobbes.physics.uiowa.edu!news.uiowa.edu!news From: jones@pyrite.cs.uiowa.edu (Douglas W. Jones,201H MLH,3193350740,3193382879) Subject: Re: MINIMUM instruction set Sender: news@news.uiowa.edu (News) Message-ID: <1992Nov13.171356.25166@news.uiowa.edu> Date: Fri, 13 Nov 1992 17:13:56 GMT References: <1992Nov13.113147.11856@odin.diku.dk> Nntp-Posting-Host: pyrite.cs.uiowa.edu Organization: University of Iowa, Iowa City, IA, USA Lines: 51