Messages in this thread | | | From | Nick Desaulniers <> | Date | Fri, 30 Sep 2022 09:43:27 -0700 | Subject | Re: [PATCH v4] x86, mem: move memmove to out of line assembler |
| |
On Fri, Sep 30, 2022 at 2:55 AM David Laight <David.Laight@aculab.com> wrote: > > Oh - and why do all the labels have 'byteswap' in them?
.Lbyteswap is swapping single bytes at a time. .L4_byteswap is swapping 4 bytes at a time. .L8_byteswap is swapping 8 bytes at a time. .L16_byteswap, .L16_byteswap_backwards_loop, and .L16_byteswap_forwards_loop are swapping 16 bytes at a time.
When doing a move that has to be delicate with respect to overlap, I thought it was helpful to know how many bytes are being swapped in a given run of instructions. The names were chosen were based on the comparison/guards/conditional jmps.
---
Linus pointed out that this 32b memmove looks similar to 64b memcpy_orig. Would you prefer me use those labels?
s/.Lbyteswap/.Lstore_1byte/ s/.L4_byteswap/.Lless_3bytes/ s/.L8_byteswap/.Lless_8bytes/ s/.L16_byteswap/.Lless_16bytes/ s/.L16_byteswap_backwards_loop/.Lcopy_backward_loop/ s/.L16_byteswap_forwards_loop/.Lcopy_forward_loop/
or something else? -- Thanks, ~Nick Desaulniers
| |