[PATCH 10/12] RISC-V: memset() size optimized version: Rename local labels
Kito Cheng
kito.cheng@gmail.com
Wed Apr 9 07:22:38 GMT 2025
LGTM, thanks, that made the code more readable :)
On Wed, Apr 9, 2025 at 2:52 PM m fally <marlene.fally@gmail.com> wrote:
>
> Rename local labels to improve readability.
>
> Reviewed-by: Christian Herber <christian.herber@oss.nxp.com>
> Signed-off-by: m fally <marlene.fally@gmail.com>
> ---
> 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
>
More information about the Newlib
mailing list