HomeFreeBSD

amd64: tidy up copying backwards in memmove

Description

amd64: tidy up copying backwards in memmove

For non-ERMS case the code used handle possible trailing bytes with
movsb first and then followed it up with movsq. This also happened
to alter how calculations were done for other cases.

Handle the tail with regular movs, just like when copying forward.
Use leaq to calculate the right offset from the get go, instead of
doing separate add and sub.

This adjusts the offset for non-rep cases so that they can be used
to handle the tail.

The routine is still a work in progress.

Sponsored by: The FreeBSD Foundation

Details

Provenance
mjgAuthored on
Parents
rS341271: Update releng/12.0 from RC2 to RC3 as part of the 12.0-RELEASE
Branches
Unknown
Tags
Unknown