1 / 8

ISA is a Contract

ISA is a Contract. Compilers != Compilation. Compilation has multiple steps pre-processing (non-existent for java) finalizing the actual source listing typically used for includes in a C/C++ program translating (half-way done for java) from high-level or assembly language

Download Presentation

ISA is a Contract

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ISA is a Contract

  2. Compilers != Compilation • Compilation has multiple steps • pre-processing (non-existent for java) • finalizing the actual source listing • typically used for includes in a C/C++ program • translating (half-way done for java) • from high-level or assembly language • to machine instructions • building • combine your parts and system parts

  3. Essential Compilation Steps

  4. A Simple Translation Step • Most basic: two passes • first: collect and interpret symbols • second: line-by-line generation of instructions • Symbol = anything requiring interpretation • variable names • procedure/method names • your names and system names • opcodes and pseudo-instructions (in assembler)

  5. An Object File

  6. Typical Translation • Most compilers today have 3 or 4 passes • Extra passes enable a compiler to • do extended error checking • do extra optimization of resulting code • Most projects have many pieces • each piece (e.g. .c or .cc) translated individually • files ending in .o on Unix • files ending in .obj on Windows

  7. Linking • Once pieces translated, combine them • Each piece designed as relocatable module • External references get resolved • Complete executable built with parts • System parts often manifested as libraries • e.g. C library for unix applications • Shared libraries • Dynamically linked libraries

  8. Total Workflow Loader Linker Assembler Compiler Preprocessor Editor or Code Generator

More Related