From: wei.guo.si...@gmail.com > Sent: 19 September 2017 11:04 > Currently memcmp() in powerpc will fall back to .Lshort (compare per byte > mode) if either src or dst address is not 8 bytes aligned. It can be > opmitized if both addresses are with the same offset with 8 bytes boundary. > > memcmp() can align the src/dst address with 8 bytes firstly and then > compare with .Llong mode.
Why not mask both addresses with ~7 and mask/shift the read value to ignore the unwanted high (BE) or low (LE) bits. The same can be done at the end of the compare with any final, partial word. David