简体   繁体   English

为什么32位mips指令存储在64位空间中?

[英]Why are 32-bit mips instructions stored in 64-bit space?

MIPS 32 uses instructions of 32 bits. MIPS 32使用32位指令。 But when almost all instructions are done, the CPU adds +4 to the PC. 但是,当几乎所有指令完成后,CPU会将+4加到PC上。 As far as I know, 4 words means 64 bits, so, how can this be possible? 据我所知,4字意味着64位,那么,这怎么可能呢? Am I forgetting something or does mips32 wastes 2 empty words every instruction? 我是否忘记了某些内容?或者mips32在每条指令中浪费2个空字?

MIPS is a Von Neumann architecture processes, and both instructions and data in it are addressed on byte and not word boundary. MIPS是冯·诺依曼(Von Neumann)架构的过程,其中的指令和数据都在字节而非字边界上寻址。 So the PC value is advanced by four bytes - the size of the instruction. 因此,PC值将增加四个字节-指令的大小。

BTW, MIPS64 instructions are still 32-bit in size. 顺便说一句,MIPS64指令的大小仍为32位。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM