Re: [PATCH 03/12] RISC-V: memmove() size optimized version: Rename local labels
Kito Cheng <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <CA+yXCZB_K-nmXxK=ybL5E3cz3_qDyz_7-0iy3=sK8a61kP0Wsw@mail.gmail.com> |
LGTM On Wed, Apr 9, 2025 at 2:48 PM m fally <[email protected]> wrote: > > Rename local lables so that the structure of the function is clearer. > > Reviewed-by: Christian Herber <[email protected]> > Signed-off-by: m fally <[email protected]> > --- > newlib/libc/machine/riscv/memmove.S | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/newlib/libc/machine/riscv/memmove.S b/newlib/libc/machine/riscv/memmove.S > index 123ab3834..a77ac44be 100644 > --- a/newlib/libc/machine/riscv/memmove.S > +++ b/newlib/libc/machine/riscv/memmove.S > @@ -14,26 +14,26 @@ > .global memmove > .type memmove, @function > memmove: > - beqz a2, 2f > + beqz a2, .Ldone > > mv a4, a0 > li a3, 1 > - bgtu a1, a0, 1f > + bgtu a1, a0, .Lcopy > > li a3, -1 > add a4, a4, a2 > add a1, a1, a2 > > -3: > +.Lincrement: > add a4, a4, a3 > add a1, a1, a3 > -1: > +.Lcopy: > lb a5, 0(a1) > sb a5, 0(a4) > add a2, a2, -1 > - bnez a2, 3b > + bnez a2, .Lincrement > > -2: > +.Ldone: > ret > > .size memmove, .-memmove > -- > 2.49.0 >