d
Size: a a a
d
d
E
E
d
E
mov [cur + size - 2], ax ; read ecx, edi
lea size, [size - 2] ; write ecx, only after the ecx has already been read
shr size, 2
rep stos [cur], eax ; wait ecx
d
E
; Example 2.4. Register renaming
mov eax, [mem1]
mov ebx, [mem2]
add ebx, eax
imul eax, 6
mov [mem3], eax
mov [mem4], ebx
Тут будут использоваться два временных регистра для EAX - ввод, вывод"The first instruction in the above example will
assign one temporary register to EAX. The second instruction is putting a new value into
EAX, so a new temporary register will be assigned here. In other words, the multiplication
instruction will use two different registers, one for input and another one for output.
Assume, now, that [MEM1] is in the cache, while [MEM2] is not. This means that the
multiplication can start before the addition. The advantage of using a new temporary
register for the result of the multiplication is that we still have the old value of EAX, which
has to be kept until EBX is ready for the addition. If we had used the same register for the
input and output of the multiplication, then the multiplication would have
to wait until the.
After all the operations are finished, the value in the temporary register that represents the
last value of EAX in the code sequence is written to a permanent EAX register. This process
is called retirement."
Поэтому зависимость будет убрана, процессор сделал всё самd
d
E
d
E
d
E
d
E
d
E
d