I'm using libdis
, the x86 disassembler library from the bastard, and I'm trying to find out which instructions access memory.
With reference to these two instructions:
mov eax, [ebx + 10]
lea eax, [ebx + 10]
In libdis
, both are listed with instruction type insn_mov
, and the address operands have the same flags in both cases. So the only way I can tell if memory is accessed is to look at the instruction mnemonic.
Hence my question: is LEA the only instruction using a memory operand that doesn't actually access memory? Any links to references would be nice.
The
prefetch
family of instructions (prefetcht1, prefetcht2, prefetcht3, prefetchnta) ask the processor to go and pull those memory lines into cache because they will be needed soon. But, Intel's documentation makes it clear that no faults can result from a bad address passed to prefetch. This is so that software can pass potentially out-of-bound addresses to prefetch without checking them first, so that the data can be in-flight while those checks are performed.Prefetches also don't have an 'output', unlike
LEA
.