Re: [PATCH 10/12] RISC-V: memset() size optimized version: Rename local labels

Kito Cheng <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <CA+yXCZAYsRy5YafKWw1je3Dar8Z2RMgV7ZAVUw5jWU43kapm+Q@mail.gmail.com>
LGTM, thanks, that made the code more readable :)

On Wed, Apr 9, 2025 at 2:52 PM m fally <[email protected]> wrote:
>
> Rename local labels to improve readability.
>
> Reviewed-by: Christian Herber <[email protected]>
> Signed-off-by: m fally <[email protected]>
> ---
>  newlib/libc/machine/riscv/memset.S | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/newlib/libc/machine/riscv/memset.S b/newlib/libc/machine/riscv/memset.S
> index fac0f73a2..943835dc5 100644
> --- a/newlib/libc/machine/riscv/memset.S
> +++ b/newlib/libc/machine/riscv/memset.S
> @@ -15,15 +15,15 @@
>  memset:
>  #if defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__)
>    mv a3, a0
> -  beqz a2, 2f
> +  beqz a2, .Ldone
>
> -1:
> +.Lset:
>    sb a1, 0(a3)
>    add   a2, a2, -1
>    add   a3, a3, 1
> -  bnez a2, 1b
> +  bnez a2, .Lset
>
> -2:
> +.Ldone:
>    ret
>
>  #else
> --
> 2.49.0
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.