public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Optimize epilogue sequence for architectures with POP interworking.
@ 2019-10-07 14:27 Richard Earnshaw
0 siblings, 0 replies; only message in thread
From: Richard Earnshaw @ 2019-10-07 14:27 UTC (permalink / raw)
To: newlib-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=175b215e054a8cee50d91317f3af22a3b2c3d320
commit 175b215e054a8cee50d91317f3af22a3b2c3d320
Author: Christos Gentsos <christos.gentsos@cern.ch>
Date: Mon Oct 7 14:38:14 2019 +0100
Optimize epilogue sequence for architectures with POP interworking.
ARMv5 and above supports arm/thumb interworking using POP, so we can
improve the exit sequence in this case.
Diff:
---
newlib/libc/machine/arm/aeabi_memmove-thumb.S | 6 ++++++
newlib/libc/machine/arm/aeabi_memset-thumb.S | 6 ++++++
2 files changed, 12 insertions(+)
diff --git a/newlib/libc/machine/arm/aeabi_memmove-thumb.S b/newlib/libc/machine/arm/aeabi_memmove-thumb.S
index 61a7258..fadeb9a 100644
--- a/newlib/libc/machine/arm/aeabi_memmove-thumb.S
+++ b/newlib/libc/machine/arm/aeabi_memmove-thumb.S
@@ -26,6 +26,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "acle-compat.h"
+
.thumb
.syntax unified
.global __aeabi_memmove
@@ -49,9 +51,13 @@ __aeabi_memmove:
subs r3, r3, #1
bcs 1b
2:
+#if __ARM_ARCH >= 5
+ pop {r4, pc}
+#else
pop {r4}
pop {r1}
bx r1
+#endif
3:
movs r3, #0
cmp r2, #0
diff --git a/newlib/libc/machine/arm/aeabi_memset-thumb.S b/newlib/libc/machine/arm/aeabi_memset-thumb.S
index aa8f271..ed6ce88 100644
--- a/newlib/libc/machine/arm/aeabi_memset-thumb.S
+++ b/newlib/libc/machine/arm/aeabi_memset-thumb.S
@@ -26,6 +26,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "acle-compat.h"
+
.thumb
.syntax unified
.global __aeabi_memset
@@ -110,9 +112,13 @@ __aeabi_memset:
cmp r4, r3
bne 8b
9:
+#if __ARM_ARCH >= 5
+ pop {r4, r5, r6, pc}
+#else
pop {r4, r5, r6}
pop {r1}
bx r1
+#endif
10:
movs r3, r0
movs r4, r1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-10-07 14:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-07 14:27 [newlib-cygwin] Optimize epilogue sequence for architectures with POP interworking Richard Earnshaw
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).