[newlib-cygwin/main] RISC-V: memmove() size optimized version: Use compressed register
Jeff Johnston
jjohnstn@sourceware.org
Fri Apr 11 20:49:14 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=d3d814dfc2031acafc47fac071a38506c28bdddf
commit d3d814dfc2031acafc47fac071a38506c28bdddf
Author: m fally <marlene.fally@gmail.com>
Date: Thu Apr 10 13:22:58 2025 +0200
RISC-V: memmove() size optimized version: Use compressed register
Replace register t2 with register a5, so that lb/sb instructions can be compressed.
Reviewed-by: Christian Herber <christian.herber@oss.nxp.com>
Signed-off-by: m fally <marlene.fally@gmail.com>
Diff:
---
newlib/libc/machine/riscv/memmove.S | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/newlib/libc/machine/riscv/memmove.S b/newlib/libc/machine/riscv/memmove.S
index 66d9cd494..0f7216a68 100644
--- a/newlib/libc/machine/riscv/memmove.S
+++ b/newlib/libc/machine/riscv/memmove.S
@@ -26,8 +26,8 @@ memmove:
add a1, a1, a4
1:
- lb t2, 0(a1)
- sb t2, 0(t1)
+ lb a5, 0(a1)
+ sb a5, 0(t1)
add a2, a2, -1
add t1, t1, a3
add a1, a1, a3
More information about the Newlib-cvs
mailing list