复旦大学:《计算机原理 Computer System》课程PPT课件_Machine-Level Representation of Programs I

Machine-Level Representation of Programs I
1 Machine-Level Representation of Programs I

Outline Compiler drivers History of the intel IA-32 architecture Assembly code and object code Memory and Registers Addressing Mode Data Formats Suggested reading -chap1.2,1.4.1.1.7.3.3.1,3.2,3.3,3.4.1
2 Outline • Compiler drivers • History of the Intel IA-32 architecture • Assembly code and object code • Memory and Registers • Addressing Mode • Data Formats • Suggested reading – Chap 1.2, 1.4.1, 1.7.3, 3.1, 3.2, 3.3, 3.4.1

The hello program It begins life as a high-level C program Can be read and understand by human beings The individual c statements must be translated by compiler drivers So that the hello program can run on a computer system Compiler:编译器
3 The Hello Program • It begins life as a high-level C program – Can be read and understand by human beings • The individual C statements must be translated by compiler drivers – So that the hello program can run on a computer system – Compiler:编译器

The hello program The C programs are translated into A sequence of low-level machine-language instructions These instructions are then packaged in a form called an object program Object program are stored as a binary disk file Also referred to as executable object files
4 The Hello Program • The C programs are translated into – A sequence of low-level machine-language instructions • These instructions are then packaged in a form – called an object program • Object program are stored as a binary disk file – Also referred to as executable object files

The Context of a Compiler (gcc)Figure 1.3P5 hello.c Source program(text) Preprocessor(cpp hello. i Modified source program(text) Compiler(cc1) hello.s Assembly program(text) Assembler(as) hello. o Relocatable object program(binary Linker(Id) Compiler:编译器 hello Executable object program(binary) Assembler:汇编器 Linker:连接器
5 The Context of a Compiler (gcc) hello.c Source program (text) Preprocessor (cpp) hello.i Modified source program (text) Assembly program (text) Compiler (cc1) hello.s Assembler (as) hello.o Relocatable object program (binary) Linker (ld) hello Executable object program (binary) Figure 1.3 P5 Compiler:编译器 Assembler:汇编器 Linker:连接器

Characteristics of the high level programming languages Abstraction Productive reliable Type checking As efficient as hand written code Can be compiled and executed on a number of different machines, whereas assembly code is highly machine specific Productive:多产的 Reliab|e:可靠的
6 Characteristics of the high level programming languages • Abstraction – Productive – reliable • Type checking • As efficient as hand written code • Can be compiled and executed on a number of different machines, whereas assembly code is highly machine specific Productive:多产的 Reliable: 可靠的

Characteristics of the assembly programming languages Managing memory Low level instructions to carry out the computation Highly machine specif ic
7 Characteristics of the assembly programming languages • Managing memory • Low level instructions to carry out the computation • Highly machine specific

Why should we understand the assembly code Understand the optimization capabilities of the compiler Analyze the underlying inefficiencies in the code Sometimes the run-time behavior of a program is needed
8 Why should we understand the assembly code • Understand the optimization capabilities of the compiler • Analyze the underlying inefficiencies in the code • Sometimes the run-time behavior of a program is needed

From writing assembly code to understand assembly code Different set of skills Transformations Relation between source code and assembly code Reverse engineering Trying to understand the process by which a system was created By studying the system and By working backward Backward:回溯
9 From writing assembly code to understand assembly code • Different set of skills – Transformations – Relation between source code and assembly code • Reverse engineering – Trying to understand the process by which a system was created • By studying the system and • By working backward Backward:回溯

A Historical Perspective Long evolutionary development Started from rather primitive 16-bit processors Added more features Take the advantage of the technology improvements Satisfy the demands for higher performance and for supporting more advanced operating systems Laden with features providing backward compatibility that are obsolete | aden with:承载 compatibility;:兼容性 大 obsolete:陈旧的
10 A Historical Perspective • Long evolutionary development – Started from rather primitive 16-bit processors – Added more features • Take the advantage of the technology improvements • Satisfy the demands for higher performance and for supporting more advanced operating systems – Laden with features providing backward compatibility that are obsolete * laden with:承载 * compatibility: 兼容性 * obsolete:陈旧的
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 复旦大学:《计算机原理 Computer System》课程PPT课件_Integer Operations; Floating Points.ppt
- 复旦大学:《计算机原理 Computer System》课程PPT课件_Integer Representations.ppt
- 复旦大学:《计算机原理 Computer System》课程PPT课件_Introduction to Computer Systems; Information is Bits+Context; Information Storage.ppt
- 复旦大学:《计算机原理 Computer System》课程资源_2006年期中考试题目.doc
- 复旦大学:《计算机原理 Computer System》课程资源_2006年期中考试答案.doc
- 复旦大学:《计算机原理 Computer System》课程资源_教学大纲.pdf
- 复旦大学:《计算机图形学》课后习题答案_7.docx
- 复旦大学:《计算机图形学》课后习题答案_6.docx
- 复旦大学:《计算机图形学》课后习题答案_5.docx
- 复旦大学:《计算机图形学》课后习题答案_4.docx
- 复旦大学:《计算机图形学》课后习题答案_3.docx
- 复旦大学:《计算机图形学》课后习题答案_2.docx
- 复旦大学:《计算机图形学》课后习题答案_1.docx
- 复旦大学:《电子商务》课程PPT课件_第十次课 社会化电子商务——Hold住社会化媒体营销.ppt
- 复旦大学:《电子商务》课程PPT课件_第六次课 电子商务运营与管理 Operating Your E-Business.ppt
- 复旦大学:《电子商务》课程PPT课件_第六次课 电子商务运营与管理 Getting Your E-Business Off The Ground.ppt
- 复旦大学:《电子商务》课程PPT课件_第八次课 电子商务模式与应用课程主题案例分析与展示——电子商务团购.ppt
- 复旦大学:《电子商务》课程PPT课件_第五次课 商业模式的概念与内涵(发现商业模式).ppt
- 复旦大学:《电子商务》课程PPT课件_第九次课 B2B电子商务(B2B行业平台).ppt
- 复旦大学:《电子商务》课程PPT课件_第七次课 B2C电子商务——网上零售.pptx
- 复旦大学:《计算机原理 Computer System》课程PPT课件_Machine-Level Representation of Programs Ⅱ.ppt
- 复旦大学:《计算机原理 Computer System》课程PPT课件_Procedure Call and Array.ppt
- 复旦大学:《计算机原理 Computer System》课程PPT课件_Heterogeneous Data Structures & Alignment; Putting it Together; Floating Point.ppt
- 复旦大学:《计算机原理 Computer System》课程PPT课件_Processor Architecture.ppt
- 复旦大学:《计算机原理 Computer System》课程PPT课件_09、10 Sequential CPU Implementation.ppt
- 复旦大学:《计算机原理 Computer System》课程PPT课件_Pipelined Implementation Part I.ppt
- 复旦大学:《计算机原理 Computer System》课程PPT课件_Pipelined Implementation Part II.ppt
- 复旦大学:《计算机原理 Computer System》课程PPT课件_12b Code Optimization(• Machine-Independent Optimization – Code motion – Memory optimization • Suggested reading).ppt
- 复旦大学:《计算机原理 Computer System》课程PPT课件_13 Code Optimization(• Optimizing Blockers • Understanding Modern Processor • More Code Optimization techniques • Performance Tuning).ppt
- 复旦大学:《计算机原理 Computer System》课程PPT课件_Hardware Organization.ppt
- 复旦大学:《计算机原理 Computer System》课程PPT课件_Memory Hierarchy(• Random-Access Memory(RAM)• Nonvolatile Memory • Disk Storage • Locality • Memory hierarchy).ppt
- 复旦大学:《计算机原理 Computer System》课程PPT课件_Cache Memory(• General concepts • 3 ways to organize cache memory • Issues with writes • Write cache friendly codes • Cache mountain).ppt
- 复旦大学:《计算机原理 Computer System》课程PPT课件_Cache Memory(• Cache mountain • Matrix multiplication).ppt
- 复旦大学:《计算机原理 Computer System》课程PPT课件_Virtual Memory(• Virtual Space• Address translation • Accelerating translation• Different points of view).ppt
- 复旦大学:《计算机原理 Computer System》课程PPT课件_Virtual Memory(• Multilevel page tables • Different points of view • Pentium/Linux Memory System • Memory Mapping).ppt
- 复旦大学:《计算机原理 Computer System》课程PPT课件_Dynamic Memory Allocation(• Implementation of a simple allocator • Explicit Free List • Segregated Free List).ppt
- 复旦大学:《计算机原理 Computer System》课程PPT课件_Linking II(• Static linking • Symbols & Symbol Table • Relocation • Executable Object Files • Loading).ppt
- 复旦大学:《计算机原理 Computer System》习题PPT课件_chapter2.pptx
- 复旦大学:《计算机原理 Computer System》习题PPT课件_Chapter 3 Machine-Level Representation of Programs.pptx
- 复旦大学:《计算机原理 Computer System》习题PPT课件_Chapter 3 Machine-Level Representation of Programs.pptx