Skip to content
  • Nicolai Hähnle's avatar
    gallium/radeon: clean left-shift undefined behavior · 60d2fc23
    Nicolai Hähnle authored
    
    
    Shifting into the sign bit of a signed int is undefined behavior.
    Unfortunately, there are potentially many places where this happens using
    the register macros.
    
    This commit is the result of running
    
    sed -ie "s/(((\(\w\+\)) & 0x\(\w\+\)) << \(\w\+\))/(((unsigned)(\1) \& 0x\2) << \3)/g"
    
    on all header files in gallium/{r600,radeon,radeonsi}.
    
    Reviewed-by: default avatarMarek Olšák <marek.olsak@amd.com>
    60d2fc23