Changes between Version 18 and Version 19 of PrimBool


Ignore:
Timestamp:
Jun 14, 2013 12:40:26 PM (2 years ago)
Author:
jstolarek
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PrimBool

    v18 v19  
    248248                      # negative then its sign bit must have been 1 and so %rax 
    249249                      # is now 1 
    250   cmpq   %rdi, %r14   # subtract width (in %rdi) from x (in %r14), discard the 
    251                       # result and set the flags. If width was greater than x 
    252                       # then SF is set to 1 and OF is set to 0. This is tricky 
    253                       # because combination of SF and OF is needed to decide 
    254                       # which argument is actually equal  
    255   setge  %cl          # if OF=SF it means that x was greater or equal to width 
    256                       # and we note that fact by setting LSB in %cl to 1 
     250  cmpq   %rdi, %r14   # compare width (in %rdi) with x (in %r14) and set the flags 
     251                      # in the flag register according to the result. 
     252  setge  %cl          # if, based on flags set by cmpq, x was greater or equal to  
     253                      # width then we set %cl to 1. Otherwise it is set to 0. 
    257254  movzbl %cl, %ecx    # zero the bits of %ecx register except the lowest 8 bits 
    258255                      # containg the result of previous operation