Re: [PATCH] cmd/mem.c: use memmove in do_mem_cp()

2023-12-26 Thread Simon Glass
Hi Rasmus, On Tue, Dec 19, 2023 at 11:57 AM Rasmus Villemoes wrote: > > There's no 'mv' shell command for handling overlapping src and dst > regions, and there's no point introducing one, when we can just make > the existing 'cp' command DTRT in all cases. memmove() should at most > be a few

[PATCH] cmd/mem.c: use memmove in do_mem_cp()

2023-12-19 Thread Rasmus Villemoes
There's no 'mv' shell command for handling overlapping src and dst regions, and there's no point introducing one, when we can just make the existing 'cp' command DTRT in all cases. memmove() should at most be a few instructions more then memcpy() (to detect the appropriate direction to do the