Use backtick code blocks for syntax highlighting
This commit is contained in:
parent
8ed9dea394
commit
f658bfbb40
203 changed files with 26546 additions and 25801 deletions
26
19-02.md
26
19-02.md
|
|
@ -102,13 +102,15 @@ pipelines mean that an AGI can now slow down execution of an instruction
|
|||
that's *three* instructions away from the AGI (because four instructions
|
||||
can execute in two cycles). So, for example, the code sequence
|
||||
|
||||
add edx,4 ;U-pipe cycle 1
|
||||
mov ecx,[ebx] ;V-pipe cycle 1
|
||||
add ebx,4 ;U-pipe cycle 2
|
||||
mov [edx],ecx ;V-pipe cycle 3
|
||||
; due to AGI
|
||||
; (would have been
|
||||
; V-pipe cycle 2)
|
||||
```nasm
|
||||
add edx,4 ;U-pipe cycle 1
|
||||
mov ecx,[ebx] ;V-pipe cycle 1
|
||||
add ebx,4 ;U-pipe cycle 2
|
||||
mov [edx],ecx ;V-pipe cycle 3
|
||||
; due to AGI
|
||||
; (would have been
|
||||
; V-pipe cycle 2)
|
||||
```
|
||||
|
||||
takes three cycles rather than the two cycles it should take, because
|
||||
EDX was modified on cycle 1 and an attempt was made to use it on cycle
|
||||
|
|
@ -116,10 +118,12 @@ two, before the AGI had time to clear—even though there are two
|
|||
instructions between the instructions that are actually involved in the
|
||||
AGI. Rearranging the code like
|
||||
|
||||
mov ecx,[ebx] ;U-pipe cycle 1
|
||||
add ebx,4 ;V-pipe cycle 1
|
||||
mov [edx+4],ecx ;U-pipe cycle 2
|
||||
add edx,4 ;V-pipe cycle 2
|
||||
```nasm
|
||||
mov ecx,[ebx] ;U-pipe cycle 1
|
||||
add ebx,4 ;V-pipe cycle 1
|
||||
mov [edx+4],ecx ;U-pipe cycle 2
|
||||
add edx,4 ;V-pipe cycle 2
|
||||
```
|
||||
|
||||
makes it functionally identical, but cuts the cycles to 2—a 50 percent
|
||||
improvement. Clearly, avoiding AGIs becomes a much more challenging and
|
||||
|
|
|
|||
Loading…
Reference in a new issue