Skip to content
  • Rupert Swarbrick's avatar
    Avoid UB from misaligned loads in selfguided_sse4.c · 84ffea31
    Rupert Swarbrick authored
    This follows on from the previous patch, which corrects xx_loadl_32
    for misaligned addresses. Calls to xx_loadl_32 in selfguided_sse4.c
    are all followed by a zero-extend, so this patch packages the two into
    the inlinable functions xx_load_extend_8_16 and xx_load_extend_8_32.
    
    There were also some hand-rolled loads (which matched the old body of
    xx_loadl_32 and weren't strictly correct when the pointer was
    misaligned). This patch fixes them up to use xx_load_extend_8_32.
    
    BUG=aomedia:912
    
    Change-Id: I9c76dd4f41baa1343149aa9c432218a17df8b415
    84ffea31