Closed glaubitz closed 6 years ago
Could you run the binary with logs: QEMU_LOG_FILENAME=qemu.log QEMU_LOG=in_asm,op,unimp ./usr/lib/fpc/3.1.1/ppc68k and attach the resulting file qemu.log?
I don't know how to attach files to a github issue, so here's the link:
"rtd" is not implemented:
Illegal instruction: 4e74 @ 800071e2---------------- IN: 0x800071d8: movel %fp@(-12),%d0 0x800071dc: movel %fp@(-16),%d2 0x800071e0: unlk %fp 0x800071e2: rtd #4
I prepare a fix.
Great. Then I can fully bootstrap fpc
;).
Works:
(sid-m68k-sbuild)root@ikarus:/# ./ppc68k
Free Pascal Compiler version 3.1.1 [2017/05/28] for m68k
Copyright (c) 1993-2017 by Florian Klaempfl and others
/ppc68k [options] <inputfile> [options]
Put + after a boolean switch option to enable it, - to disable it.
@<x> Read compiler options from <x> in addition to the default fpc.cfg
-a The compiler does not delete the generated assembler file
-a5 Don't generate Big Obj COFF files for GNU Binutils older than 2.25 (Windows, NativeNT)
-al List sourcecode lines in assembler file
-an List node info in assembler file (-dEXTDEBUG compiler)
-ao Add an extra option to external assembler call (ignored for internal)
-ap Use pipes instead of creating temporary assembler files
-ar List register allocation/release info in assembler file
-at List temp allocation/release info in assembler file
-A<x> Output format:
-Adefault Use default assembler
-Aas Unix o-file using GNU AS
-Agas GNU Motorola assembler
-Amit MIT Syntax (old GAS)
-Amot Standard Motorola assembler
*** press enter ***
(...)
(sid-m68k-sbuild)root@ikarus:/#
Hi,
I also needed to manually apply the patch above to be able to run any Free Pascal executable compiled for m68k-linux.
Did you commit this fix to github, and, if yes, to which branch?
Pierre Muller member of the Free Pascal Core development team
This fix can be found on the master branch of QEMU repo as it has been merged. You can also find it in my m68k-dev branch (with a more complete m68k FPU emulation)
FPC has been building fine for a while now:
We can therefore close this issue.
After a fresh bootstrap of
fpc
for m68k, trying to runppc68k
in qemu-m68k:The binary works fine on Aranym:
The offending binary can be found here:
https://people.debian.org/~glaubitz/ppc68k
fpc
for m68k can be built on Debian with: