summaryrefslogtreecommitdiffstats
path: root/libgloss
diff options
context:
space:
mode:
authorAnthony Green <green@moxielogic.com>2012-10-27 15:57:12 +0000
committerAnthony Green <green@moxielogic.com>2012-10-27 15:57:12 +0000
commitffa2dd6787abb5393f9b77c0fcaa6b690a45d907 (patch)
tree7bcbb94a5bf40ce0498d8dbad2eea3ecdea3a896 /libgloss
parentf71f133bda3077c835de51e76e83f674d45297ae (diff)
downloadcygnal-ffa2dd6787abb5393f9b77c0fcaa6b690a45d907.tar.gz
cygnal-ffa2dd6787abb5393f9b77c0fcaa6b690a45d907.tar.bz2
cygnal-ffa2dd6787abb5393f9b77c0fcaa6b690a45d907.zip
Minor optimization and bug fix for moxie.
Diffstat (limited to 'libgloss')
-rw-r--r--libgloss/ChangeLog5
-rw-r--r--libgloss/moxie/crt0.S11
2 files changed, 9 insertions, 7 deletions
diff --git a/libgloss/ChangeLog b/libgloss/ChangeLog
index c04d9c710..9ea622f58 100644
--- a/libgloss/ChangeLog
+++ b/libgloss/ChangeLog
@@ -1,3 +1,8 @@
+2012-10-27 Anthony Green <green@moxielogic.com>
+
+ * moxie/crt0.S (_start): Call memset with correct
+ ABI.
+
2012-10-03 DJ Delorie <dj@redhat.com>
* rl78/crt0.S (_interrupt_vector_table): Convert from CPP macros
diff --git a/libgloss/moxie/crt0.S b/libgloss/moxie/crt0.S
index e166895ac..44616a82e 100644
--- a/libgloss/moxie/crt0.S
+++ b/libgloss/moxie/crt0.S
@@ -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