flat assembler
Message board for the users of flat assembler.
  
       
      Index
      > Compiler Internals > [requests] Branching Hint Prefix | 
  
| Author | 
  | 
              
| 
                  
                   LocoDelAssembly 16 Apr 2006, 15:24 
                  http://www.sandpile.org/ia32/opc_1.htm
 
                  
                CS: Hint Not Taken for Jcc (P4+) DS: Hint Taken for Jcc (P4+)  | 
              |||
                  
  | 
              
| 
                  
                   Tomasz Grysztar 18 Apr 2006, 18:50 
                  
                  
                 | 
              |||
                  
  | 
              
| 
                  
                   chris 02 May 2006, 07:09 
                  Thanks, locodelassembly and Tomasz. It seems using cs and ds is enought here.  
                  
                Code: ; ------------------------------------------------------- ... cinvoke __getmainargs,argc,argv,envp,0,sinf cmp dword[argc],1 cs jz,print_usage ; <-- not likely to take this branch ... ;-------------------------------------------------------- ... cmp [wmsg],WM_COMMAND ds je wmcommand ; <-- likely to take this branch cmp [wmsg],WM_CREATE je wmcreate cmp [wmsg],WM_DESTROY je wmdestroy ...  | 
              |||
                  
  | 
              
| 
                  
                   Tomasz Grysztar 08 Jun 2006, 09:32 
                  I have just found out in the Agner Fog's Optimization Manual, that FS prefix also has an effect on branches:
 
                  
                Anger Fog wrote: [...]I discovered an undocumented prefix, 64H, which does the trick on the Of course with fasm you can write it just as: Code: FS JNZ X1  | 
              |||
                  
  | 
              
< Last Thread | Next Thread >  | 
    
Forum Rules: 
  | 
    
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.