- Aug 12, 2014
- 522
- 3
- 81
Hello everyone,
I used to think that when a 64-bit CPU fetched an instruction, after translating the virtual address to a physical address in the MMU, it just grabbed 8 consecutive bytes from RAM starting at some base address and that one big 64-bit instruction was sent down an instruction bus.
Though, after reading the first chapters of Intel's 64 and IA-32 Architectures Software Developer’s Manual Volume 2, I realize that instructions can be of varied length.
Further, some instructions with prefixes, etc. are much longer than 64 bits long.
So, how exactly does an instruction make its way from RAM to the CPU?
Thanks.
I used to think that when a 64-bit CPU fetched an instruction, after translating the virtual address to a physical address in the MMU, it just grabbed 8 consecutive bytes from RAM starting at some base address and that one big 64-bit instruction was sent down an instruction bus.
Though, after reading the first chapters of Intel's 64 and IA-32 Architectures Software Developer’s Manual Volume 2, I realize that instructions can be of varied length.
Further, some instructions with prefixes, etc. are much longer than 64 bits long.
So, how exactly does an instruction make its way from RAM to the CPU?
Thanks.