X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Fstring%2Fi386%2Fmemmove.s;fp=src%2Fstring%2Fi386%2Fmemmove.s;h=6e6cc8e36da2779f30f2c6fbafd728989bb4d765;hp=0000000000000000000000000000000000000000;hb=2bf469310de6793228c103691859ed4d3158b117;hpb=a9555a995cea8aa67da571c95af61109140f2c8d diff --git a/src/string/i386/memmove.s b/src/string/i386/memmove.s new file mode 100644 index 00000000..6e6cc8e3 --- /dev/null +++ b/src/string/i386/memmove.s @@ -0,0 +1,21 @@ +.global memmove +.type memmove,@function +memmove: + mov 4(%esp),%eax + sub 8(%esp),%eax + cmp 12(%esp),%eax + jae memcpy + push %esi + push %edi + mov 12(%esp),%edi + mov 16(%esp),%esi + mov 20(%esp),%ecx + lea -1(%edi,%ecx),%edi + lea -1(%esi,%ecx),%esi + std + rep movsb + cld + lea 1(%edi),%eax + pop %edi + pop %esi + ret