flat assembler
Message board for the users of flat assembler.
  
       
      Index
      > Main > floating point cmp, bit twiddling expertise needed | 
  
| Author | 
  | 
              
| 
                  
                   cod3b453 01 Dec 2013, 13:38 
                  I don't have a processor with AVX to try this but maybe:
 
                  
                Code: vptest ymm0,ymm1 j[c/z] ...  | 
              |||
                  
  | 
              
| 
                  
                   tthsqe 01 Dec 2013, 14:03 
                  ah, this is very good! Thanks, cod3b453! I completely forgot about ptest.
 
                  
                Actually, I think the following are correct Code: ; zero test ; if (ymm0=0), then a, else b vptest ymm0,qqword[mask] jz a b: a: ; another zero test ; if (ymm0=0), then a, else b vxorps ymm1,ymm1,ymm1 vptest ymm1,ymm0 jc a b: a: ; equality test ; if (ymm0=ymm1), then a, else b vxorps ymm2,ymm0,ymm1 vptest ymm2,qqword[mask] jz a b: a: align 32 mask: dq -1,-1,-1,-1  | 
              |||
                  
  | 
              
< Last Thread | Next Thread >  | 
    
Forum Rules: 
  | 
    
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.