git-svn-id: trunk@43988 -
@@ -18,6 +18,7 @@ function fpc_setjmp(var S : jmp_buf) : shortint;assembler;[Public, alias : 'FPC_
asm
mov r26,r24
mov r27,r25
+{$ifndef CPUAVR_16_REGS}
st x+,r1
st x+,r2
st x+,r3
@@ -33,8 +34,13 @@ function fpc_setjmp(var S : jmp_buf) : shortint;assembler;[Public, alias : 'FPC_
st x+,r13
st x+,r14
st x+,r15
+{$endif CPUAVR_16_REGS}
st x+,r16
st x+,r17
+{$ifdef CPUAVR_16_REGS}
+ st x+,r18
+ st x+,r19
st x+,r28
st x+,r29
@@ -65,6 +71,7 @@ procedure fpc_longjmp(var S : jmp_buf;value : shortint);assembler;[Public, alias
ld r1,x+
ld r2,x+
ld r3,x+
@@ -80,8 +87,13 @@ procedure fpc_longjmp(var S : jmp_buf;value : shortint);assembler;[Public, alias
ld r13,x+
ld r14,x+
ld r15,x+
ld r16,x+
ld r17,x+
+ ld r18,x+
+ ld r19,x+
ld r28,x+
ld r29,x+
@@ -16,7 +16,14 @@
type
jmp_buf = packed record
- r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,r13,r14,r15,r16,r17,r28,r29,splo,sphi,pclo,pchi : byte;
+ r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,r13,r14,r15,
+ r16,r17,
+ r18,r19,
+ r28,r29,splo,sphi,pclo,pchi : byte;
{$ifdef CPUAVR_3_BYTE_PC}
pchighest : byte
{$endif CPUAVR_3_BYTE_PC}
@@ -385,6 +385,10 @@ endif
endif
ifeq ($(ARCH),avr)
CPU_SPECIFIC_COMMON_UNITS=intrinsics
+ifeq ($(SUBARCH),avrtiny)
+CPU_UNITS=attiny4 attiny5 attiny9 attiny10 attiny20 attiny40
+CPU_UNITS_DEFINED=1
+endif
ifeq ($(SUBARCH),avr25)
CPU_UNITS=attiny44a attiny26 attiny48 attiny10 attiny84a attiny2313 attiny461 attiny43u \
attiny24a attiny88 attiny40 attiny861 attiny85 attiny20 attiny24 attiny9 \
@@ -101,6 +101,10 @@ endif
@@ -1,5 +1,9 @@
_start:
+ clr r17
+{$else CPUAVR_16_REGS}
clr r1
// load stack pointer
ldi r30,lo8(_stack_top)
@@ -16,8 +20,13 @@
rjmp .LCopyDataLoopEntry
.LCopyDataLoop:
- lpm r0, Z+
- st X+, r0
+ //!!!! FIXME? lpm r0, Z+
+ //!!!! FIXME? st X+, r0
+ lpm r16, Z+
+ st X+, r16
.LCopyDataLoopEntry:
cpi XL, lo8(_edata)
@@ -35,7 +44,11 @@
jmp .LZeroBssLoopEntry
{$endif RELBRANCHES}
.LZeroBssLoop:
+ st X+, r17
st X+, r1
.LZeroBssLoopEntry:
cpi XL, lo8(_bss_end)