Search code examples
assemblymipsmips32

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


MIPS 32 uses instructions of 32 bits. But when almost all instructions are done, the CPU adds +4 to the PC. As far as I know, 4 words means 64 bits, so, how can this be possible? Am I forgetting something or does mips32 wastes 2 empty words every instruction?


Solution

  • MIPS is a Von Neumann architecture processes, and both instructions and data in it are addressed on byte and not word boundary. So the PC value is advanced by four bytes - the size of the instruction.

    BTW, MIPS64 instructions are still 32-bit in size.