Running a Program - CALL(Compiling, Assembling, Linking, and Loading)

Clarifications

Project 1 RISC-v emulator

  1. Risc-v isa does not define assembly syntax
    behave exactly like Venus
  2. All I-Type instructions (including sltiu)
    • do sign-extension
    • (in venus) input number is signed, even if hex

a good tool

Interpretation

  1. any good reason to interpret machine language in software? debbuger Venus
  2. 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