What happens when you use a memory override prefix, but all operands are registers?

What happens if you use a memory override prefix, but all operands are registers?

So, let's say you are mov eax, ebx or add eax, ebx code, and the default is 32-bit, but you use 67h override.

How does the processor handle this situation?

+3
source share
1 answer

Intel Software Developer *, Volume 2, Section 2.1, describes the behavior of each instruction prefix. He says that using an address size prefix (67h) with an instruction that does not have a memory operand is reserved and can cause unpredictable behavior.

The operand size prefix (66h) can be used to switch between 16 and 32-bit operand sizes, as well as a mandatory prefix with specific instructions SSE2 / SSE3 / SSSE3 / SSE4. Other uses are reserved and may cause unpredictable behavior.

The segment override prefix is ​​reserved with any branch command.

* https://software.intel.com/en-us/articles/intel-sdm

+5
source

Source: https://habr.com/ru/post/1201889/


All Articles