Professional Documents
Culture Documents
2. Some Typical Features of Current Programs Both RISC and CISC architectures have been
developed as an attempt to cover the semantic gap.
3. Main Characteristics of RISC Architectures
5. Examples
Machine language (machine architecture fully visible) 1. The CISC approach: design very complex
architectures including a large number of
instructions and addressing modes; include also
instructions close to those present in HLL.
• In order to improve the efficiency of software
development, new and powerful programming
2. The RISC approach: simplify the instruction set and
languages have been developed (Ada, C++, Java).
adapt it to the real requirements of user programs.
They provide: high level of abstraction,
conciseness, power.
• By this evolution the semantic gap grows.
Main Characteristics of RISC Architectures (cont’d) Main Characteristics of RISC Architectures (cont’d)
- Normally the registers have to be saved in Why is a large number of registers typical for RISC
memory (they contain values of variables and architectures?
parameters for the calling procedure); at return
to the calling procedure, the values have to be
again loaded from memory. This takes a lot of - Because of the reduced complexity of the proc-
time. essor there is enough space on the chip to be
allocated to a large number of registers. This,
- If a large number of registers is available, a new
usually, is not the case with CISCs.
set of registers can be allocated to the called
procedure and the register set assigned to the
calling one remains untouched.
Main Characteristics of RISC Architectures (cont’d) The delayed load problem (cont’d)
The delayed load problem (cont’d) Are RISCs Really Better than CISCs?
The following one is the correct sequence:
LOAD R1,X loads from address X into R1
ADD R4,R3 R4 ← R4 + R3
ADD R2,R1 R2 ← R2 + R1 • RISC architectures have several advantages and
they were discussed throughout this lecture.
SUB R2,R4 R2 ← R2 - R4 However, a definitive answer to the above question
is difficult to give.
LOAD R1,X FI DI CA TR • A lot of performance comparisons have shown that
ADD R4,R3 FI DI EI benchmark programs are really running faster on
RISC processors than on processors with CISC
ADD R2,R1 FI DI EI
characteristics.
SUB R2,R4 FI DI EI • However, it is difficult to identify which feature of a
processor produces the higher performance. Some
"CISC fans" argue that the higher speed is not
For the following sequence the compiler has generated a produced by the typical RISC features but because
NOP after the LOAD because there is no instruction to of technology, better compilers, etc.
fill the load-delay slot: • An argument in favour of the CISC: the simpler
LOAD R1,X loads from address X into R1 instruction set of RISC processors results in a
NOP larger memory requirement compared to the similar
ADD R2,R1 R2 ← R2 + R1 program compiled for a CISC architecture.
ADD R4,R2 R4 ← R4 + R2
STORE R4,X stores from R4 to address X
Most of the current processors are not typical RISCs
LOAD R1,X FI DI CA TR or CISCs but try to combine advantages of both
approaches
NOP
ADD R2,R1 FI DI EI
ADD R4,R2 FI DI EI
STORE R4,X FI DI CA TR