This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
[Patch, moxie] minor newlib/libgloss changes
- From: Anthony Green <green at moxielogic dot com>
- To: newlib at sourceware dot org
- Date: Sat, 27 Oct 2012 11:55:28 -0400
- Subject: [Patch, moxie] minor newlib/libgloss changes
Hello,
I'm checking in the following minor changes to newlib and libgloss
for the moxie port.
Anthony Green
Newlib...
2012-10-27 Anthony Green <green@moxielogic.com>
* libc/machine/moxie/setjmp.S (setjmp): Minor optimization.
Libglos...
2012-10-27 Anthony Green <green@moxielogic.com>
* moxie/crt0.S (_start): Call memset with correct
ABI.
Index: newlib/libc/machine/moxie/setjmp.S
===================================================================
RCS file: /cvs/src/src/newlib/libc/machine/moxie/setjmp.S,v
retrieving revision 1.1
diff -u -p -u -r1.1 setjmp.S
--- newlib/libc/machine/moxie/setjmp.S 22 Apr 2009 19:52:49 -0000 1.1
+++ newlib/libc/machine/moxie/setjmp.S 27 Oct 2012 15:29:45 -0000
@@ -51,7 +51,7 @@ setjmp:
sto.l 0x34($r0), $r13
sto.l 0x38($r0), $sp
sto.l 0x3c($r0), $fp
- ldi.l $r0, 0x00
+ xor $r0, $r0
ret
.Lend1:
.size setjmp,.Lend1-setjmp
Index: libgloss/moxie/crt0.S
===================================================================
RCS file: /cvs/src/src/libgloss/moxie/crt0.S,v
retrieving revision 1.3
diff -u -p -u -r1.3 crt0.S
--- libgloss/moxie/crt0.S 2 Oct 2010 19:34:25 -0000 1.3
+++ libgloss/moxie/crt0.S 27 Oct 2012 15:29:55 -0000
@@ -19,18 +19,15 @@
.type __start,@function
__start:
_start:
- ldi.l $sp, (_stack-12)/* load up stack pointer with space
- for stack frame. */
+ ldi.l $sp, _stack /* set the top of stack */
xor $fp, $fp /* zero fp to allow unwinders to stop */
/* zero the bss area */
ldi.l $r0, __bss_start__
- ldi.l $r1, __bss_end__
- sub.l $r1, $r0
- sto.l 8($sp), $r1
- ldi.l $r1, 0
+ xor $r1, $r1
+ ldi.l $r2, __bss_end__
+ sub.l $r2, $r0
jsra memset
- inc $sp, 12
/* Call _init to invoke static constructors, etc. */
jsra _init