Tutorial: 10 March 1998
- Starting with any high-level language, and then producing machine
code, what are the 10 most common (generic) instructions found in the
resulting executable file?
Justify your choices.
- Discuss the benefits of a RISC processor having the following
features:
- 32 registers (compared to 8 or 16 in a CISC processor)
- three-address instructions such as:
ADD Rs1, Rs2, Rd
where Rs is a source operand and
Rd is the destination.
Examples from tutorial
Part 1.
- The following instructions were selected:
- Branch
- Load/Store
- Move (registers)
- ADD
- JSR
- RTS
- AND
- OR
- COM
- MUL
- and the justification is based on:
- Frequency of occurrence
- Utility/uniqueness
- Performance
Part 2.
- Many registers will allow variables to be stored in the processor
rather than in memory.
-
3-address instructions improve processing speed as they require
fewer instruction fetches, they can retain the source variables
(one of which would be overwritten in a 2-address format) and
the destination register can be chosen to be useful in following
instructions. All these factors improve efficiency and reduce
the dependency on external memory.
Back