diff options
author | DJ Delorie <dj@redhat.com> | 2015-10-20 21:37:06 -0400 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2015-10-20 21:37:06 -0400 |
commit | 9e8f75612433be5719b029e8175b2100d97df1db (patch) | |
tree | 60fb60280954c8c15508a92687ba3c9c92612d87 /libgloss/rl78 | |
parent | 67364cbfd92058a32e11331702255e8bec835e37 (diff) | |
download | cygnal-9e8f75612433be5719b029e8175b2100d97df1db.tar.gz cygnal-9e8f75612433be5719b029e8175b2100d97df1db.tar.bz2 cygnal-9e8f75612433be5719b029e8175b2100d97df1db.zip |
* rl78/crt0.S (_start): Fixed code that clears .bss
Diffstat (limited to 'libgloss/rl78')
-rw-r--r-- | libgloss/rl78/crt0.S | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/libgloss/rl78/crt0.S b/libgloss/rl78/crt0.S index fbba093a3..649178c46 100644 --- a/libgloss/rl78/crt0.S +++ b/libgloss/rl78/crt0.S @@ -176,16 +176,18 @@ _start: ;; block fill to .bss - movw bc, #__bsssize - movw ax, #0 -1: - cmpw ax, bc - bz $1f - movw __bssstart[bc], ax - decw bc - decw bc - br $1b -1: + movw bc, #__bsssize + movw ax, #0 + cmpw ax, bc + bz $_bss_zero_done +1: + decw bc + decw bc + movw __bssstart[bc], ax + cmpw ax, bc + bnz $1b + +_bss_zero_done: call !!__rl78_init |