On 19/05/2020 12:51 AM, a beginner wrote:
@rikki cattermole
Dmd and ldc's codegen haven't stood still for 10 years. They both will be
emitting instructions your cpu cannot handle. Hence crashes.
So... was I wrong to assume it generates code for the cpu it's running on (a P4 Northwood in my case) by default? I will try the "-mpcu" command line option then, and see if it takes care of that crash.

Yes.

Compilers make assumptions, especially dmd which uses newer instructions than an XP era build of dmd did.

But because D is self hosted, this means that the compiler itself has now been compiled with such instructions in use. So it too can crash.

Unless you bootstrap compile ldc up to the latest version (which also means LLVM), what options you pass it may very well not matter.

Reply via email to