4.3. X86 encoding¶
An x86-64 architecture can run in 5 different execution modes, excluding System Management Mode (SMM).
Different flags from different registers are used to indicate the current mode.
We synthesize them into a virtual
4.3.2. Operation, address and stack sizes¶
126.96.36.199. Default size¶
The default operation size (DOS) and the default address size (DAS) depend on the execution mode (M) and on the D/B flag in the CS segment descriptor.
Similarly, the defaut stack size (DSS) depends on the execution mode and on the D/B flag in the SS segment descriptor.
188.8.131.52. Overridden size¶
The DOS and the DAS can be overridden per instruction with the 66 and 67 prefixes respectively, giving use the overridden operation size (OOS) and the overridden address size (OAS).
Finally, in 64-bit execution mode (M=4), some instructions defaults to a 64-bit
operation size and a new
W prefix can be used to enforce 64-bit operation size.
This gives us the overridden operation size 64 (OOS64).
OOS64 are sizes that can be
inferred from the execution context. They don’t correspond directly to actual
operation or operand sizes: it depends on each instruction.