The clflush description in Intel document says that "Flushes cache line containing m8.". Also, m8 means "a byte from memory" from Intel document.
I'm confused about why it is only m8, which is only one byte. Because for a 32-bit or 64-bit system, we should have 32 bits or 64 bits address, which is 4 or 8 byte. I must misunderstand something. Can anyone help me?
Thank you very much!
If it took a wider operand, then it could span two cache lines.
If it could optionally flush two cache lines, the microcoded implementation would be more complicated, so they chose to only affect just the given address, not a range of addresses.
clflush
always flushes exactly one cache line: the one containing the byte referred to by the effective address you use. m8
is just the easiest way to describe this.
If it still only flushed one cache line, that would be dumb, and it wouldn't make sense to call it an m64 operand. They could have made it require an 8B-aligned address, but it's trivial for hardware to mask off the low n bits of the address to figure out which cache line.