public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin/main] arc: libgloss: Clean registers before any use
@ 2024-05-22 18:28 Jeff Johnston
0 siblings, 0 replies; only message in thread
From: Jeff Johnston @ 2024-05-22 18:28 UTC (permalink / raw)
To: newlib-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=13ae6cae44d6cc542eff3b945545749f4e38a856
commit 13ae6cae44d6cc542eff3b945545749f4e38a856
Author: Yuriy Kolerov <kolerov93@gmail.com>
Date: Tue May 21 10:56:51 2024 +0100
arc: libgloss: Clean registers before any use
Signed-off-by: Yuriy Kolerov <kolerov93@gmail.com>
Diff:
---
libgloss/arc/crt0.S | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/libgloss/arc/crt0.S b/libgloss/arc/crt0.S
index 1999e602b..0c2a2bd26 100644
--- a/libgloss/arc/crt0.S
+++ b/libgloss/arc/crt0.S
@@ -178,6 +178,47 @@ __start:
#endif /* !__ARC601__ */
+;;; Clear the registers.
+ mov_s r0,0
+ mov_s r1,0
+ mov_s r2,0
+ mov_s r3,0
+#ifndef __ARC_RF16__
+ mov r4,0
+ mov r5,0
+ mov r6,0
+ mov r7,0
+ mov r8,0
+ mov r9,0
+#endif
+ mov r10,0
+ mov r11,0
+ mov_s r12,0
+ mov_s r13,0
+ mov_s r14,0
+ mov_s r15,0
+#ifndef __ARC_RF16__
+ mov r16,0
+ mov r17,0
+ mov r18,0
+ mov r19,0
+ mov r20,0
+ mov r21,0
+ mov r22,0
+ mov r23,0
+ mov r24,0
+ mov r25,0
+#endif
+ mov r27,0
+ ;; SP (r28) is initialized
+#if defined (__ARCEM__) || defined (__ARCHS__)
+ mov ilink,0
+ mov r30,0
+#else
+ mov ilink1,0
+ mov ilink2,0
+#endif /* ARCv2 */
+
;; Call constructors
jl @_init
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-05-22 18:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-22 18:28 [newlib-cygwin/main] arc: libgloss: Clean registers before any use Jeff Johnston
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).