MSCP SCSI * HIGH VIVIDITY * FULL RANGE * W86 * READINGS

The Wintersweet W86 CPU ISA

I am interested in instruction set design mainly because of my dream of being a historian (well, one that does not need to worry about money). I imagine if I would go back to the end of 60's with my knowledge of the computer history, what I would say to Ken Olsen to get the instruction set design right, and to get the strategy of implementing it right?

I have studied various ISA designs and their levels of success in history. I imagine that the desirable ISA should be expandable and shrinkable, down to 8 bit to compete with micros, and up to 64bit for the new millenium, with a focus on 16 bit in the 70's and 32 bit in the 80's, that all be backward compatible on machine code level. It should be able to survive the RISC hey days and regain speed crown in the 90's. It should not introduce features that are difficult to implement with pipelines or superscalar execution. It should be prepared for the cache bottleneck. When searching the internet about ISA's I found this post to be most interesting.

I think the X86 ISA is attractive regarding to my requirements. I twick it a little bit to avoid some if its historical mistakes, and call the result W86 ISA. I imagine DEC would implement its 16 bit version instead of PDP11, get out its 8 bit version to compete with micros, and implement its 32 bit version instead of VAX. The history would have been vastly different.

8 bit guide lines: 64KB address range; 16 bit base registers, 8 bit index registers and accumulater. Computation is done between register and memory.

16 bit guide lines: 1MB address range; 24 bit base registers, 16 bit index registers and accumulator. Binary level backward compatibility is important.

32 bit guide lines: 4GB address range; 16 general purpose 32bit registers. Backward compatibility. Assembly level backward compatibility is important.

64 bit guide lines: 16 general purpose 64 bit registers.

Instruction Guide Lines
Instruction Design

Register sets, 8bit-16bit-32bit-64bit

One Byte Opcodes
Needs some b/w/dw/qw pack/unpack instructions
XXHX0HX1HX2HX3HX4HX5HX6HX7HX8HX9HXAHXBHXCHXDHXEHXFH
0XHADD
Eb,Gb
ADD
Ev,Gv
ADD
Gb,Eb
ADD
Gv,Ev
SHL
Eb,Gb
SHL
Ev,Gb
SHR
Eb,Gb
SHR
Ev,Gb
OR
Eb,Gb
OR
Ev,Gv
OR
Gb,Eb
OR
Gv,Ev
MOV
Eb,Gb
MOV
Ev,Gv
MOV
Gb,Eb
MOV
Gv,Ev
1XHADC
Eb,Gb
ADC
Ev,Gv
ADC
Gb,Eb
AD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
JLE
Jv
JNLE
Jv
7XHJO
Jb
JNO
Jb
JB
Jb
JNB
Jb
JZ
Jb
JNZ
Jb
JBE
Jb
JNBE
Jb
JO
Jv
JNO
Jv
JB
Jv
JNB
Jv
JZ
Jv
JNZ
Jv
JBE
Jv
JNBE
Jv
8XHPUSH
EAX
PUSH
ECX
PUSH
EDX
PUSH
EBX
PUSH
ESP
PUSH
EBP
PUSH
ESI
PUSH
EDI
POP
EAX
POP
ECX
POP
EDX
POP
EBX
POP
ESP
POP
EBP
POP
ESI
POP
EDI
9XHINC
EAX
INC
ECX
INC
EDX
INC
EBX
INC
ESP
INC
EBP
INC
ESI
INC
EDI
CLR
EAX
CLR
ECX
CLR
EDX
CLR
EBX
CLR
ESP
CLR
EBP
CLR
ESI
CLR
EDI
AXHCMP
EAX,Ib
CMP
ECX,Ib
CMP
EDX,Ib
CMP
EBX,Ib
CMP
ESP,Ib
CMP
EBP,Ib
CMP
ESI,Ib
CMP
EDI,Ib
CMP
EAX,Iv
CMP
ECX,Iv
CMP
EDX,Iv
CMP
EBX,Iv
CMP
ESP,Iv
CMP
EBP,Iv
CMP
ESI,Iv
CMP
EDI,Iv
BXHREXREXREXREXREXREXREXREXREXREXREXREXREXREXREXREX
CXHESCESCESCESCESCESCESCESCESCESCESCESCESCESCESCESC
DXHESCESCESCESCESCESCESCESCESCESCESCESCESCESCESCESC
EXHINT3INT
Ib
INTOIRETJMPJMPJMPCALLCALLRETRETRET
Iw
RET
Iw
FXHPRE-
COND
PRE-
NNR
INOUTCLCSTCCLISTICLDSTDLOCKNOP

PRE-NNR: NEG if ADD,ADC,SUB,SBB; NOT if AND,OR,NOR; With C if shift/roll
PRE-COND: Updates BRANCH state bits (Test,CMP updates BRANCH state bits by default)
REX: XXXXWRXB; extension bits for operandSize,REG,indexREG,baseREG
GRP#1: ADD,ADC,SUB,SBB,AND,OR,IMUL,CMP
GRP#2: SHL,SHR,SAL,SAR,ROL,ROR
GRP#3: MOV,CVT,TEST,MVZX,XCHG,MVSX
GRP#4: INC,DEC,NOT,NEG,JUMP,CALL,PUSH
GRP#5: IMUL,MUL,IDIV,DIV,BT,BTC,BTR,BTS
0XH-3XH: Operations with two operands; REG--R/M or R/M--REG
4XH: REX prefix
5XH: Operations with R/M and immediates
6XH-7XH: Branches
8XH-BXH: PUSH,POP and short cuts operations
CXH-DXH: Floating point instructions
EXH-FXH: Misc instructions
Need: BT,BTC,BTR,BTS using register index