This preview shows page 1. Sign up to view the full content.
Unformatted text preview: Data) Assembler
(Sys. Prog.) Machine Language
Executable Code (Data) Linker
(Sys. Prog.) Subroutine Library
Object Code (Data) Loader
(Sys. Prog.) Program in
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
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
subroutine (or procedure) that uses them
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,
(loop transformation, procedure
(register allocation, code
optimization) Code generator
ELEC 5200-001/6200-001 Lecture 4 Increasing machine dependence Compiler is a Multi-Pass Program MIPS
8 Compiler Optimizes Code
Minimize number of machine instructions
Example: x[i] = x[i] + 4, memory address for x[i] is
generated only once, saved in a register, and used by lw
and sw – Common subexpression elimination.
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.
- Spring '14