[fpc-pascal] inline asm in fpc progran
Nataraj S Narayan
natarajsn at gmail.com
Thu Aug 26 07:10:31 CEST 2010
I tried a very elementary code on arm-linux-uclibc, compiled using
"ppcrossarm -TLinux -darm ttt3.pas -CfSOFT -XParm-linux- -XR/cdrom"
The asm listing using -al is here: - http://pastebin.com/CG9i0x3z
It dont work in the normal EABI kernel but works on OABI compat one.
I got ppcrossarm using :-
gmake distclean crosszipinstall CPU_TARGET=arm OS_TARGET=linux
CROSSOPT='-CfSOFT -darm -dFPC-ARMEL -gl' FPC=/usr/local/lib/fpc/2.5.1/ppc386
On Fri, Aug 20, 2010 at 6:51 PM, Jonas Maebe <jonas.maebe at elis.ugent.be>wrote:
> On 20 Aug 2010, at 15:00, Nataraj S Narayan wrote:
>> On Fri, Aug 20, 2010 at 2:38 PM, Jonas Maebe <jonas.maebe at elis.ugent.be
>>> You probably need the "nostackframe" directive, or remove the "mov pc,lr"
>>> at the end.
>>> Compile the code with -al, compile equivalent Pascal code with -al and
>>> at the differences in the generated ".s" files.
>> I changed the kernel to old 2.6.30 and the code works on the Arm target!
>> That kernel has been compiled with CONFIG_OABI_COMPAT=y. Newer kernels
>> show this option, only EABI.
>> Also my ppcrossarm is :-
>> Free Pascal Compiler version 2.5.1 [2010/07/28] for arm
>> Copyright (c) 1993-2009 by Florian Klaempfl
>> What do you make of it?
> That you did not reply to the suggestions I made in my previous message.
> Please say what you did and what happened, even if it didn't work. It's not
> nice to spend time on trying to help someone, if that person then simply
> ignores what you write and replies with something completely different.
> The EABI requires that the stack is always aligned to 8 bytes on entry/exit
> of subroutines, and you probably mess up the alignment with the manually
> inserted return instruction.
> Also, make sure that you compiled an EABI cross-compiler (ensure that
> -dFPC_ARMEL is part of the OPT setting of the "make" invocation used to
> compile FPC).
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal