www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Cod generation for different targets ( x386, x486 etc )

reply "Timofei Bolshakoc" <tbolsh gmail.com> writes:
I am using D ver. 2 for more then a year - since version 2.051. 
My target architecture is Linux on Vortex DX SoC - 
http://www.vortex86sx.com/?page_id=197
It is compatible with x586 architecture. Till version 2.057 
everything was OK, but when I recompiled my working code with 
2.057 VERY strange behaviour was observed - I can't even describe 
it correctly. I think that something was broken in floating point 
support. I returned to version 2.056.

So, the question is - can I generate code for different x86 
targets - x486, x586, x686 etc using dmd. I like dmd and do not 
want to switch to gdc if it will be possible to stay on dmd. I 
did not tried 2.058 yet - please tell me if I should.
Apr 10 2012
next sibling parent "Timofei Bolshakoc" <tbolsh gmail.com> writes:
Sorry -
Code generation ....
Apr 10 2012
prev sibling next sibling parent Iain Buclaw <ibuclaw ubuntu.com> writes:
On 10 April 2012 17:08, Timofei Bolshakoc <tbolsh gmail.com> wrote:
 Sorry -
 Code generation ....

Join the dark side! :) On the offhand note, do you have an example of this weirdness? Have you tried compiling with -nofloat ? -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0';
Apr 10 2012
prev sibling next sibling parent Walter Bright <newshound2 digitalmars.com> writes:
On 4/10/2012 9:05 AM, Timofei Bolshakoc wrote:
 I am using D ver. 2 for more then a year - since version 2.051. My target
 architecture is Linux on Vortex DX SoC - http://www.vortex86sx.com/?page_id=197
 It is compatible with x586 architecture. Till version 2.057 everything was OK,
 but when I recompiled my working code with 2.057 VERY strange behaviour was
 observed - I can't even describe it correctly. I think that something was
broken
 in floating point support. I returned to version 2.056.

 So, the question is - can I generate code for different x86 targets - x486,
 x586, x686 etc using dmd. I like dmd and do not want to switch to gdc if it
will
 be possible to stay on dmd. I did not tried 2.058 yet - please tell me if I
should.

With the 64 bit support there was support added for the SIMD instructions. But these shouldn't be generated for 32 bit targets. So I don't know what is happening for you. Please track it down so we can have a look! Also, you can use obj2asm to look at the assembler output of a suspicious file.
Apr 10 2012
prev sibling parent "Timofei Bolshakoc" <tbolsh gmail.com> writes:
I will try my best to track it down and report.
First I will try 2.058 to see if problem persist.
Then - with -no-float.

On Tuesday, 10 April 2012 at 19:23:02 UTC, Walter Bright wrote:
 On 4/10/2012 9:05 AM, Timofei Bolshakoc wrote:
 I am using D ver. 2 for more then a year - since version 
 2.051. My target
 architecture is Linux on Vortex DX SoC - 
 http://www.vortex86sx.com/?page_id=197
 It is compatible with x586 architecture. Till version 2.057 
 everything was OK,
 but when I recompiled my working code with 2.057 VERY strange 
 behaviour was
 observed - I can't even describe it correctly. I think that 
 something was broken
 in floating point support. I returned to version 2.056.

 So, the question is - can I generate code for different x86 
 targets - x486,
 x586, x686 etc using dmd. I like dmd and do not want to switch 
 to gdc if it will
 be possible to stay on dmd. I did not tried 2.058 yet - please 
 tell me if I should.

With the 64 bit support there was support added for the SIMD instructions. But these shouldn't be generated for 32 bit targets. So I don't know what is happening for you. Please track it down so we can have a look! Also, you can use obj2asm to look at the assembler output of a suspicious file.

Apr 11 2012