| CompOrg Fall 2005 Lab |
|   CompOrg Home     Existing Y86 Instructions     New Y86 Instructions |
The Y86 Instruction Set includes 12
instructions (recall that add,sub,and & xor are all OP
instructions
and we treat all jump instructions as one instruction).
We have gone over the details of what must happen in each stage of
execution
for many of these instructions. Today's lab involves determining what
needs to happen for some other instructions, and for some new
instructions we might want to add to the Y86 instruction set.
Below is a template for listing the computation(s) that need to happen during each stage of the execution of a single Y86 instruction. Each stage includes the names of the values (intermeediate values, memory locations registers, etc) that can be set during the stage. Each instruction will have different things happening during different stages (if any two instructions had identical stage computations, they would be the same instruction since they do the same thing!).

Dave has blank stage computation forms for you to fill in for each of the instructions described below - you need to determine what needs to happen during each stage in order to describe how the instruction works. Later we will see how we can turn a collection of these stage diagrams into HCL expressions that specify the design of a Y86 computer.
In all cases, your stage computations must be based on the datapath shown below (figure 4.21 from the textbook).

Fill out a stage computation form for each of the following instructions. You may want to refer to the lecture notes titled y86 Sequential Implementaion for a look at the stage computation forms we went over in class.
mrmovl D(rB),rA
irmovl V,rB
pushl rA
Fill out a stage computation form for each of the instructions described below. These are not really part of the Y86 instruction set, the idea is to determine whether (and how) they could be added to the instruction set.
incl rB This instruction will add 1 to any register,
storing the result back in the same register.
dbl rB This instruction will double a register
(add the register to itself and store the result in the
same register).
leave
leave instruction does: basically the same as the
sequence:
rrmovl %ebp,%esp pop %ebp
This one is much harder than the others. You basically need to
establish what the end result of the two instruction sequence
(rrmovl %ebp,%esp, pop %ebp) is, and make this happen
in a single Y86 instruction!