Invalid(?) assembler generated to reference a procedure parameter on AVR
Original Reporter info from Mantis: ccrause @ccrause
-
Reporter name: Christo Crause
Original Reporter info from Mantis: ccrause @ccrause
- Reporter name: Christo Crause
Description:
When compiling the attached test.pas file, the generated test.s file contains a line:
mov r27,r24+1
which causes avr-as to generate the following error:
[0.051] Executing "/usr/bin/avr-as" with command line "-mmcu=avr5 -o test.o test.s"
test.s: Assembler messages:
test.s:7: Error: garbage at end of line
This line seems to correspond to the assembler code:
mov XH, TMyUint16(counter).h
from line 18 in test.pas.
Steps to reproduce:
Compile attached test.pas file with:
path/to/ppcrossavr -Tembedded -Wpatmega328 -Cpavr5 -Pavr -va -a -n @./.fpc.cfg test.pas
Additional information:
AVR cross compiler compiled from trunc (33130) using fpc 3.0 as starting compiler with command line:
make clean crossall OS_TARGET=embedded CPU_TARGET=avr SUBARCH=avr5 BINUTILSPREFIX=avr- CROSSOPT="-O3 -XX -CX" FPC=~/fpc/compiler/ppc386
Host: Debian Linux
avr-as version 2.24