MIPSCPU体系结构概述httpwwwxtrjorgmips.doc

MIPSCPU体系结构概述httpwwwxtrjorgmips.doc

  1. 1、本文档共44页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
MIPSCPU体系结构概述httpwwwxtrjorgmips

MIPS CPU 体系结构概述 /mips/ 陈怀临 1。序言 本文介绍MIPS体系结构,着重于其寄存器约定,MMU及存储管理,异常和中断处理等等。 通过本文,希望能提供一个基本的轮廓概念给对MIPS CPU及之上OS有兴趣的读者。 并能开始阅读更详细的归约(SPECIFICATION)资料。 MIPS是最早的,最成功的RISC(Reduced Instruction Set Computer)处理 器之一,起源于Stanford Univ的电机系. 其创始人 John L. Hennessy在1984年在硅谷创立 了MIPS INC. 公司()。John L. Hennessy目前是Stanford Univ. 的校长。在此之前,他是 Stanford电子工程学院的Dean。CS专业的学生都知道两本著名的书: “Computer Organization and Design : The Hardware/Software Interface” 和 ”Computer Architecture : A Quantitative Approach“。其Co-author就是Hennessy. MIPS的名字为“Microcomputer without interlocked pipeline stages的缩写。另外一个通常的非正式的说法是”Millions of instructions per second. MIPS 芯片在工业界目前用的比较多的是:MIPS INC。的R10000;QED(。1996年从MIPS INC。分(SPIN OFF)出来的)的R5000, R7000等。 指令集 详细的资料请参阅MIPS归约。 一般而言,MIPS指令系统有:MIPS I;MIPS II;MIPS III 和MIPS IV。可想而知,指令系统是向后兼容的。例如,基于MIPS II的代码可以在MIP III和MIPS IV的处理器上跑一跑:-) 下面是当我们用gcc时,如何指定指令和CPU的选项。 -mcpu=cpu type Assume the defaults for the machine type cpu type when scheduling instructions. The choices for cpu type are `r2000, `r3000, `r4000, `r4400, `r4600, and `r6000. While picking a specific cpu type will schedule things appropriately for that particular chip, the compiler will not generate any code that does not meet level 1 of the MIPS ISA (instruction set architecture) without the `-mips2 or `-mips3 switches being used. -mips1 Issue instructions from level 1 of the MIPS ISA. This is the default. `r3000 is the default cpu type at this ISA level. -mips2 Issue instructions from level 2 of the MIPS ISA (branch likely, square root instructions). `r6000 is the default cpu type at this ISA level. -mips3 Issue instructions from level 3 of the MIPS ISA (64 bit instructions). `r4000 is the default cpu type at this ISA level. This option does not change the sizes of any of the C data types. 读者可能发现,对于大多数而言,我们应该是用MIPS III或-mips3。要提醒的是R5000和R10000也都是R4000的延伸产品。 下面是几点补充: *MIPS指令是32位长,即使在64位的CPU上。这对于局部跳转指令的理解很有帮助。 比如:J (TARGET);JAL (TARGET)。J和JAL的OPERCODE是6位,剩下的26为存放跳转偏移量。由于任何一个指

文档评论(0)

chenchenc + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档