版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、1,William Stallings Computer Organization and Architecture7th Edition,Chapter 11 Instruction Sets: Addressing Modes and Formats,2/40,Key terms (1),immediate addressing direct addressing indirect addressing register addressing register indirect addressing displacement (indexed) addressing stack,3/40,
2、Key terms (2),autoindexing base-register addressing effective address relative addressing preindexing postindexing instruction format,4/40,Addressing Modes,Immediate Direct Indirect Register Register Indirect Displacement (Indexed) Stack,5/40,Immediate Addressing,Operand is part of instruction Opera
3、nd = address field e.g. ADD 5 Add 5 to contents of accumulator 5 is operand No memory reference to fetch data Fast Limited range,6/40,Immediate Addressing Diagram,7/40,Direct Addressing,Address field contains address of operand Effective address (EA) = address field (A) e.g. ADD A Add contents of ce
4、ll A to accumulator Look in memory at address A for operand Single memory reference to access data No additional calculations to work out effective address Limited address space,8/40,Direct Addressing Diagram,9/40,Indirect Addressing (1),Memory cell pointed to by address field contains the address o
5、f (pointer to) the operand EA = (A) Look in A, find address (A) and look there for operand e.g. ADD (A) Add contents of cell pointed to by contents of A to accumulator,10/40,Indirect Addressing (2),Large address space 2n where n = word length May be nested, multilevel, cascaded e.g. EA = (A) Draw th
6、e diagram yourself Multiple memory accesses to find operand Hence slower cascade 英音:kskeid 层叠(的) 重叠排列,11/40,Indirect Addressing Diagram,Address A,Opcode,Instruction,Memory,Operand,Pointer to operand,12/40,Register Addressing (1),Operand is held in register named in address filed EA = R Limited numbe
7、r of registers Very small address field needed Shorter instructions Faster instruction fetch,13/40,Register Addressing (2),No memory access Very fast execution Very limited address space Multiple registers helps performance Requires good assembly programming or compiler writing N.B. C programming re
8、gister int a; c.f. Direct addressing N.B.=nota bene(=note well) 【拉】(处方)注意 c.f. 【拉】=compare,14/40,Register Addressing Diagram,15/40,Register Indirect Addressing,C.f. indirect addressing EA = (R) Operand is in memory cell pointed to by contents of register R Large address space (2n) One fewer memory a
9、ccess than indirect addressing,16/40,Register Indirect Addressing Diagram,17/40,Displacement Addressing,EA = A + (R) Address field hold two values A = base value R = register that holds displacement or vice versa Displacement 位移;变位 vice versa 【拉】反之亦然,18/40,Displacement Addressing Diagram,19/40,Relat
10、ive Addressing,A version of displacement addressing R = Program counter, PC EA = A + (PC) i.e. get operand from A cells from current location pointed to by PC c.f locality of reference & cache usage,20/40,Base-Register Addressing,A holds displacement R holds pointer to base address R may be explicit
11、 or implicit e.g. segment registers in 80 x86,21/40,Indexed Addressing,A = base R = displacement EA = A + R Good for accessing arrays EA = A + R R+,22/40,Combinations,Postindex EA = (A) + (R) Preindex EA = (A+(R) (Draw the diagrams),23/40,Stack Addressing,Operand is (implicitly) on top of stack e.g.
12、 ADDPop top two items from stackand add,24/40,Pentium Addressing Modes,Virtual or effective address is offset into segment Starting address plus offset gives linear address This goes through page translation if paging enabled 12 addressing modes available Immediate Register operand Displacement Base
13、 Base with displacement Scaled index with displacement Base with index and displacement Base scaled index with displacement Relative,25/40,Pentium Addressing Mode Calculation,26/40,PowerPC Addressing Modes,Load/store architecture Indirect Instruction includes 16 bit displacement to be added to base
14、register (may be GP register) Can replace base register content with new address Indirect indexed Instruction references base register and index register (both may be GP) EA is sum of contents Branch address Absolute Relative Indirect Arithmetic Operands in registers or part of instruction Floating
15、point is register only,27/40,PowerPC Memory Operand Addressing Modes,28/40,Instruction Formats,Layout of bits in an instruction Includes opcode Includes (implicit or explicit) operand(s) Usually more than one instruction format in an instruction set,29/40,Instruction Length,Affected by and affects:
16、Memory size Memory organization Bus structure CPU complexity CPU speed Trade off between powerful instruction repertoire and saving space Trade off 平衡,30/40,Allocation of Bits,Number of addressing modes Number of operands Register versus memory Number of register sets Address range Address granularity versus 英音:v:ss 与.相对 granularity 间隔尺寸,31/40,PDP-8 Instruction Format,32/40,PDP-10 Instruct
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- GB/T 47131.1-2026老龄化社会认知症包容性社群要求与指南第1部分:居住社区
- 沈阳音乐学院《马克思主义经典著作导读》2025-2026学年期末试卷
- 山西国际商务职业学院《女性文学》2025-2026学年期末试卷
- 太原师范学院《电视栏目与节目策划》2025-2026学年期末试卷
- 太原理工大学《人体运动学》2025-2026学年期末试卷
- 山西农业大学《广播电视学概论》2025-2026学年期末试卷
- 苏州工学院《材料与科学基础》2025-2026学年期末试卷
- 石家庄经济职业学院《病理生理学》2025-2026学年期末试卷
- 石家庄经济职业学院《工程监理》2025-2026学年期末试卷
- 齐齐哈尔高等师范专科学校《英语教学法教程》2025-2026学年期末试卷
- SHA1-42(01)-2025 上海市市政工程养护维修估算指标 第一册 城市道路
- 2025年广东省中考数学真题卷含答案解析
- DBJ-T13-186-2025建筑排水聚丙烯静音管道工程技术标准
- 2025年11月济南轨道交通集团运营有限公司社会招聘笔试参考题库附带答案详解(10套)
- 员工停车申请管理办法
- 家校合作教育促进学生健康成长
- 坚持班会活动方案
- 《数智时代下的供应链管理:理论与实践》课件 第1-7章 理解供应链- 供应链经典的生产计划
- 猪场日常巡视管理制度
- 名著导读:《经典常谈》
- 牵引挂车租赁协议书
评论
0/150
提交评论