DMD Backend: Deciding instructions to use/avoid?

Johann MacDonagh johann.macdonagh..no at spam..gmail.com
Wed Jun 8 18:50:39 PDT 2011


On 6/4/2011 5:36 AM, Nick Sabalausky wrote:
> I'm working with Jacob to try to resolve an issue where D programs compiled
> on his Ubuntu box (in 32-bit/32-bit) error out on my Ubuntu box with
> "Illegal instruction". At first we thought it was because my OS was an older
> version than his. But he tried compiling on an older OS than mine and it
> still didn't work. So now I'm wondering if it may really be just like the
> message seems to imply: an illegal CPU instruction.
>
> So my main question: Does DMD do anything like, say, detecting the CPU at
> compile time and then enabling instructions only available on that CPU and
> up? Or does it do anything like always assuming the target CPU has SSE2?
> Anything like that that could cause differences between our CPUs to result
> in object code that will work on one of the CPUs, but not the other? FWIW,
> the CPU on my linux box is i686, so it's not like I'm on some
> super-ultra-old i586, or anything like that.
>
>

Couldn't you run it in GDB and find the instruction it doesn't like? I'm 
assuming it's a FPU instruction. Might help you discover where the 
missing check should be.



More information about the Digitalmars-d-learn mailing list