[PATCH 03/12] RISC-V: memmove() size optimized version: Rename local labels
m fally
marlene.fally@gmail.com
Wed Apr 9 06:46:52 GMT 2025
Rename local lables so that the structure of the function is clearer.
Reviewed-by: Christian Herber <christian.herber@oss.nxp.com>
Signed-off-by: m fally <marlene.fally@gmail.com>
---
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
More information about the Newlib
mailing list