www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - /FA-like switch for dmd? ("generate assembly listing")

reply "Josh Dough" <dough mail.ru> writes:
Hello,

I was wondering, are there plans for a switch similar to /FA in cl.exe so we 
could look at the assembly generated? If D source would also be included in 
the asm comments, that would be even more awesome.

I know I'm daydreaming but... 
Mar 24 2008
next sibling parent Gregor Richards <Richards codu.org> writes:
Josh Dough wrote:
 Hello,
 
 I was wondering, are there plans for a switch similar to /FA in cl.exe so we 
 could look at the assembly generated? If D source would also be included in 
 the asm comments, that would be even more awesome.
 
 I know I'm daydreaming but... 
 
 

This is of course not the answer you want, but gdc, being based on gcc, has the -S switch to generate asm files instead of object files. - Gregor Richards
Mar 24 2008
prev sibling parent reply Walter Bright <newshound1 digitalmars.com> writes:
Josh Dough wrote:
 I was wondering, are there plans for a switch similar to /FA in cl.exe so we 
 could look at the assembly generated? If D source would also be included in 
 the asm comments, that would be even more awesome.

obj2asm is used to generate the assembler listings. http://www.digitalmars.com/ctg/obj2asm.html
Mar 24 2008
next sibling parent reply "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Walter Bright" <newshound1 digitalmars.com> wrote in message 
news:fs7s1t$1ej6$1 digitalmars.com...
 Josh Dough wrote:
 I was wondering, are there plans for a switch similar to /FA in cl.exe so 
 we could look at the assembly generated? If D source would also be 
 included in the asm comments, that would be even more awesome.

obj2asm is used to generate the assembler listings. http://www.digitalmars.com/ctg/obj2asm.html

I guess it should also be mentioned that you can only get obj2asm as part of a $15 tools package. http://www.digitalmars.com/eup.html
Mar 24 2008
parent reply Walter Bright <newshound1 digitalmars.com> writes:
Milke Wey wrote:
 On Mon, 2008-03-24 at 10:04 -0400, Jarrett Billingsley wrote:
 "Walter Bright" <newshound1 digitalmars.com> wrote in message 
 news:fs7s1t$1ej6$1 digitalmars.com...
 Josh Dough wrote:
 I was wondering, are there plans for a switch similar to /FA in cl.exe so 
 we could look at the assembly generated? If D source would also be 
 included in the asm comments, that would be even more awesome.

http://www.digitalmars.com/ctg/obj2asm.html

a $15 tools package. http://www.digitalmars.com/eup.html

I got my obj2asm from the dmd.zip ;)

That's the linux version of obj2asm. The windows version is in the tools package.
Mar 24 2008
parent reply houdw <hou.danwu gmail.com> writes:
Walter Bright 写道:
 Milke Wey wrote:
 On Mon, 2008-03-24 at 10:04 -0400, Jarrett Billingsley wrote:
 "Walter Bright" <newshound1 digitalmars.com> wrote in message 
 news:fs7s1t$1ej6$1 digitalmars.com...
 Josh Dough wrote:
 I was wondering, are there plans for a switch similar to /FA in 
 cl.exe so we could look at the assembly generated? If D source 
 would also be included in the asm comments, that would be even more 
 awesome.

http://www.digitalmars.com/ctg/obj2asm.html

part of a $15 tools package. http://www.digitalmars.com/eup.html

I got my obj2asm from the dmd.zip ;)

That's the linux version of obj2asm. The windows version is in the tools package.

Interestingly, these utilities can be found in update package for C/C++ compiler(say dm812util.zip), it's free! http://ftp.digitalmars.com/Digital_Mars_C++/Patch/
Mar 24 2008
parent Walter Bright <newshound1 digitalmars.com> writes:
houdw wrote:
 Interestingly, these utilities can be found in update package for C/C++ 
 compiler(say dm812util.zip), it's free!
 
 http://ftp.digitalmars.com/Digital_Mars_C++/Patch/

Those CD updates are really only for people who bought the CD. Digital Mars has been offering free updates to paying customers for a long time because I don't like people developing libraries for DMC to have to test against multiple old compilers - they can just test against the latest. I don't like CD purchasers to have to suffer with bugs that are already fixed.
Mar 27 2008
prev sibling parent Milke Wey <no.spam example.com> writes:
On Mon, 2008-03-24 at 10:04 -0400, Jarrett Billingsley wrote:
 "Walter Bright" <newshound1 digitalmars.com> wrote in message 
 news:fs7s1t$1ej6$1 digitalmars.com...
 Josh Dough wrote:
 I was wondering, are there plans for a switch similar to /FA in cl.exe so 
 we could look at the assembly generated? If D source would also be 
 included in the asm comments, that would be even more awesome.

obj2asm is used to generate the assembler listings. http://www.digitalmars.com/ctg/obj2asm.html

I guess it should also be mentioned that you can only get obj2asm as part of a $15 tools package. http://www.digitalmars.com/eup.html

I got my obj2asm from the dmd.zip ;) -- Mike Wey
Mar 24 2008