I was wondering, does a 64-bit operating system and a x64-based processor mean that the word size (i.e. memory transfer size between processor and physical memory) is 64 bits? What if the operating system is a 32-bit and processor x64? And what about x86-based processors? How do these two specifications (XX-bit operating system and xXX-based processor) relate to the actual word size in the hardware?
1 Answers
No, it doesn't mean that. modern x86 CPUs have 64-byte cache lines, and can do accesses to cache at any power-of-2 width from 1 byte up to a 32 byte SIMD vector, or 64-byte in CPUs with AVX512. See also What Every Programmer Should Know About Memory?
"word size" is not really a meaningful term for x86; it's not a word-oriented ISA at all.
In Intel documentation a "word" is 16 bits, just to maintain consistency with documentation going back to 8086. The bus and register widths in hardware are unrelated to that.
x86-64 has 64-bit integer registers when running in long mode (64-bit mode). And supports 64-bit addresses. (Actually 48 bit virtual addresses, and up to 52-bit physical depending on the hardware, because of the page table format. Why in 64bit the virtual address are 4 bits short (48bit long) compared with the physical address (52 bit long)?)
x86 CPUs since 32-bit Pentium have been able to do 64-bit data transfers. Why is integer assignment on a naturally aligned variable atomic on x86?
- 286,368
- 41
- 520
- 731