版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年车辆挂靠协议
- 少儿光影摄影启蒙教学合同
- 医疗器械清洗技术操作指南
- 2025年重庆开州高新技术产业开发区工作委员会选调真题
- 2025年浙江省文物考古研究所招聘考试真题
- 2025年梅州市嘉应学院招聘考试真题
- 2026湖南岳阳市临湘市教育体育局所属公办学校招聘教师10人考试模拟试题及答案解析
- 2026中国农业科学院农产品加工研究所郭芹研究员招收博士后2人笔试备考题库及答案解析
- 2026年万年县公安局招聘留置看护辅警5人考试备考试题及答案解析
- 2026河北省农林科学院经济作物研究所功能合成与改良研究室招聘科研助理1人考试备考试题及答案解析
- 年产2万吨电子专用高纯石英砂生产线建设项目环评报告表
- 生产管理晋升转正述职
- 成考专升本英语词汇必背3500词
- 疝气病人出院宣教
- 第15课《水果的时间魔法-自制水果酵素》(课件)-三年级下册劳动种植自制校本
- 2025年恒丰银行校园招聘笔试模拟试题及答案解析
- 第12课 辽宋夏金元时期经济的繁荣(说课稿)七年级历史下册同步高效课堂(统编版2024)
- 教改项目答辩课件
- 版画艺术鉴赏课件
- 【新课标】水平四(七年级)体育《田径:快速起动加速跑》教学设计及教案(附大单元教学计划18课时)
- 电力交易员基础知识培训课件
评论
0/150
提交评论