생성일: 2021년 9월 21일 오후 5:42
A Basic MIPS Instruction
- C Code : a=b+c;
- Assembly code : (human-friendly machine instructions)
add a, b, c # a is the sum of b and c
- Machine code : (hardware-friendly machine instructions)
00000010001100100100000000100000
ISA
Instruction Set Architecture
- A well-define hardware/software interface
- The "Contract" between software and hardware
A Language Analogy(유사점) for ISAs
- ISA is analogous to a human language
- Allows communication (hardware to software)
- Need to speak the same language
- Key differences : ISAs must be unambiguous
RISC vs CISC Foreshadowing(예고)
- Recall performance equation
- (instructions/program) (cycles/instruction) (seconds/cycle)
- CISC (Complex Instruction Set Computing)
- Improve “instructions/program” with “complex” instructions
- Easy for assembly-level programmers, good code density
- RISC (Reduced Instruction Set Computing)
- Improve “cycles/instruction” with many single-cycle instructions
- Increases “instruction/program” , but hopefully not as much
- Perhaps improve clock cycle time (seconds/cycle)
Good ISA
- Programmability
- Implement-ability
- Compatibility
Assembly Language vs. Machine Language
- Assembly provides convenient symbolic representation
- Machine language is the underlying reality
- Assembly can provide 'Pseudoinstructions'
- 32 bits wide
- very structured, no unnecessary baggage
- three instruction formats