Texas-instruments TMS320C3x Uživatelský manuál Strana 194

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 757
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 193
Delayed Branches
7-10
Example 7–6. Incorrectly Placed Delayed Branches
B1: BD L1
NOP
NOP
B2: B L2 ; This branch is incorrectly placed.
NOP
NOP
NOP
.
.
.
For faster execution, it might still be advantageous to use a delayed branch
followed by NOP instructions by trading increased program size for faster
speed. This is shown in Example 7–7 where a NOP takes the place of the third
unused instruction after the delayed branch.
Example 7–7. Delayed Branch Execution
* TITLE DELAYED BRANCH EXECUTION
.
.
.
.
LDF* +AR1(5),R2 ; Load contents of memory to R2
BGED SKIP ; If loaded number >=0, branch
; (delayed)
LDFN R2,R1 ; If loaded number <0, load it to R1
SUBF 3.0,R1 ; Subtract 3 from R1
NOP ; Dummy operation to complete delayed
; branch
MPYF 1.5,R1 ; Continue here if loaded number <0
.
.
.
SKIP LDF R1,R3 ; Continue here if loaded number >=0
Zobrazit stránku 193
1 2 ... 189 190 191 192 193 194 195 196 197 198 199 ... 756 757

Komentáře k této Příručce

Žádné komentáře