/sys$common/syshlp/helplib.hlb
MACRO, /MIGRATION, Compiler Directives, .BRANCH UNLIKELY, Example

 *Conan The Librarian (sorry for the slow response - running on an old VAX)

          MOVL    #QUEUE,R0            ;Get queue header
  10$:    MOVL    (R0),R0              ;Get entry from queue
          BEQL    20$                  ;Forward branch assumed unlikely
          .
          .                            ;Process queue entry
          .
          TSTL    (R0)                 ;More than one entry (unlikely)
          .BRANCH_UNLIKELY
          BNEQ    10$                  ;This branch made into forward
  20$:                                 ;conditional branch

      The .BRANCH_UNLIKELY directive is used here because the Alpha
      hardware would predict a backward branch to 10$ as likely to be
      taken. The programmer knows it is a rare case, so the directive
      is used to change the branch to a forward branch, which is
      predicted not taken.
  Close     HLB-list     TLB-list     Help  

[legal] [privacy] [GNU] [policy] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.