[fpc-pascal] FPC_ARMEL system calls

Henry Vermaak henry.vermaak at gmail.com
Wed Jun 4 00:03:41 CEST 2008


2008/6/3 Luca Olivetti <luca at ventoso.org>:
>
> the syscall number should be put in r7
> Also the alignment of the parameters in the registers is different.
> Of course I cannot make head or tails of syscall.inc, so it's possible that
> everything is already done as it should be.

mov r7, r0 puts the syscall nr into r7.  i haven't looked at the
alignment, though :-\

"With EABI, 64-bit function parameters passed in registers are aligned
to an even-numbered register instead of using the next available
pair."

what output does:

qemu-arm -strace hello

give? (run on your i386 after cross-compiling)

did you compile this with the 2.18 binutils?  my qemu-arm is happy
with my simple hello program.  even does writeln(2/3) properly.

henry



More information about the fpc-pascal mailing list