DMD 2.090.1: SIGILL, Illegal instruction on (ahem) intel Pentium III
kdevel
kdevel at vogtner.de
Wed Mar 11 22:18:04 UTC 2020
On Thursday, 27 February 2020 at 19:24:39 UTC, Johan wrote:
> LDC will work fine if told what processor you have:
> https://d.godbolt.org/z/5hrzgm
> -m32 -mcpu=pentium3 (-mcpu=native should also work).
When I "cross compile" on an AMD 64 Bit machine for pentium3
[AMD 64 bit] $ ldc2 -m32 -mcpu=pentium3 --linker=bfd vec.d
and execute the binary on the Pentium-III I get
[PIII] $ gdb ./vec
[...]
This GDB was configured as "i586-suse-linux".
For bug reporting instructions, please see:
<http://bugs.opensuse.org/>...
Dwarf Error: wrong version in compilation unit header (is 4,
should be 2) [in module /[...]/tmp/vec]
(gdb) r
Starting program: /[...]/tmp/vec
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
Program received signal SIGILL, Illegal instruction.
0x08051baa in ?? ()
Disassembly on the AMD 64 it reveals that ldc also emits the
movds instructions:
0x08051ba2 <+434>: call 0x804f680
<_D2rt5minfo11ModuleGroup6__ctorMFNbNcNiAyPS6object10ModuleInfoZSQCkQCkQCh>
0x08051ba7 <+439>: sub $0x8,%esp
0x08051baa <+442>: movsd 0x30(%esp),%xmm0
0x08051bb0 <+448>: movsd 0x38(%esp),%xmm1
More information about the Digitalmars-d-learn
mailing list