Prog machine language object code data assembler sys

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Data) Assembler (Sys. Prog.) Machine Language Executable Code (Data) Linker (Sys. Prog.) Subroutine Library Machine Language Object Code (Data) Loader (Sys. Prog.) Program in Computer Memory Spring 2014, Feb 10 . . . Spring ELEC 5200-001/6200-001 Lecture 4 Assembly Language Code (Data) 6 Compiler System program Inputs: Programming language code, e.g., a C program Instruction set (including pseudoinstructions) Memory and register organization Output: Assembly language code Compiler’s function Specific to ISA and machine organization Assigns variables to registers Translates C into assembly language Saves and restores registers $s0 through $s7 when compiling a Saves subroutine (or procedure) that uses them subroutine Spring 2014, Feb 10 . . . Spring ELEC 5200-001/6200-001 Lecture 4 7 Decreasing program dependence C or Java Code Spring 2014, Feb 10 . . . Spring Programming language specific, machine-independent processing Intermediate representation High-level optimization (loop transformation, procedure integration) Global optimization (register allocation, code optimization) Code generator ELEC 5200-001/6200-001 Lecture 4 Increasing machine dependence Compiler is a Multi-Pass Program MIPS Code 8 Compiler Optimizes Code Minimize number of machine instructions Example: x[i] = x[i] + 4, memory address for x[i] is Example: generated only once, saved in a register, and used by lw and sw – Common subexpression elimination. Common Local optimization within a block of...
View Full Document

This document was uploaded on 02/23/2014 for the course COMUPER AR 6200 at Auburn University.

Ask a homework question - tutors are online