文章目录[隐藏]
Clarifications
Project 1 RISC-v emulator
- Risc-v isa does not define assembly syntax
behave exactly like Venus - All I-Type instructions (including
sltiu
)- do sign-extension
- (in venus) input number is signed, even if hex
Interpretation
- any good reason to interpret machine language in software? debbuger Venus
- translated/compiled code almost always more efficitent and therfore higher performance:
- important for many applications, particularly operating systems.
Steps in compiling a C program
Psuedo-instruciton Replacement
Producing Machine Language
- simple case
- arithmetic, logical, shifts and so on
- All necessary info is within the instruction already
- branches can be optimized