On Tue, Sep 30, 2025 at 12:41 PM Michael Stone <[email protected]> wrote: > > On Tue, Sep 30, 2025 at 04:08:56PM -0000, Greg wrote: > > In computing, a word is any processor design's natural unit of data. A word > > is > > a fixed-sized datum handled as a unit by the instruction set or the > > hardware of > > the processor. > > It has that definition (among others), one which mapped cleanly to > historic processors, but which is much messier when dealing with modern > CPUs. E.g., amd64 mostly has 64bit instruction operands and types, but > there's also an 80 bit floating point type and with AVX-512 extensions > has 512 bit registers and can transfer data to/from memory 512 bits at a > time in a single instruction. So is the word size 512? 80? 64?
Maybe a small nit: when someone says a 32-bit or 64-bit machine, they are usually talking about the size of a register in the register file for the main CPU. The 80-bit, 128-bit, 256-bit, 512-bit and friends are the size of registers in coprocessors, like the x87 math coprocessor, the SSE coprocessor, the AVX coprocessor, etc. There is also a CHERI architecture (https://www.cl.cam.ac.uk/research/security/ctsrd/cheri/cheri-morello.html). They have 64-bit registers, 20 bits of bounds, 16 bits of object type, and 18 bits of permissions. Effectively, pointers are 128-bit (64-bit pointer, and 64-bits of capability describing the pointer). The GCC Compile Farm offers a CHERI machine at cfarm240 (https://portal.cfarm.net/machines/list/). There's also a memory word size on occasion. For example, Crays are 64-bit, but have 72-bit memory word size for error correction. And based on OP's original question of "How do I discover the CPU's bus width?", he probably should have asked how to determine the register size of the CPU. I think that was closer to what he wanted to know. Jeff

