mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 20:49:09 +02:00
* patch by Christo Crause: fix startup code for avrtiny subarch, resolves #36650
git-svn-id: trunk@44100 -
(cherry picked from commit 7d283f530e
)
This commit is contained in:
parent
61c6c04f71
commit
be4c56a05c
@ -16,17 +16,20 @@
|
|||||||
ldi XH,hi8(_data)
|
ldi XH,hi8(_data)
|
||||||
ldi YH,hi8(_edata)
|
ldi YH,hi8(_edata)
|
||||||
ldi ZL,lo8(_etext)
|
ldi ZL,lo8(_etext)
|
||||||
|
{$ifdef CPUAVR_16_REGS}
|
||||||
|
ldi ZH,hi8(_etext)+(0x40) // program memory mapped to $4000 in data space
|
||||||
|
{$else CPUAVR_16_REGS}
|
||||||
ldi ZH,hi8(_etext)
|
ldi ZH,hi8(_etext)
|
||||||
|
{$endif CPUAVR_16_REGS}
|
||||||
|
|
||||||
rjmp .LCopyDataLoopEntry
|
rjmp .LCopyDataLoopEntry
|
||||||
.LCopyDataLoop:
|
.LCopyDataLoop:
|
||||||
{$ifdef CPUAVR_16_REGS}
|
{$ifdef CPUAVR_16_REGS}
|
||||||
//!!!! FIXME? lpm r0, Z+
|
ld r16, Z+
|
||||||
//!!!! FIXME? st X+, r0
|
|
||||||
{$else CPUAVR_16_REGS}
|
{$else CPUAVR_16_REGS}
|
||||||
lpm r16, Z+
|
lpm r16, Z+
|
||||||
st X+, r16
|
|
||||||
{$endif CPUAVR_16_REGS}
|
{$endif CPUAVR_16_REGS}
|
||||||
|
st X+, r16
|
||||||
|
|
||||||
.LCopyDataLoopEntry:
|
.LCopyDataLoopEntry:
|
||||||
cpi XL, lo8(_edata)
|
cpi XL, lo8(_edata)
|
||||||
|
Loading…
Reference in New Issue
Block a user