I read a book by Andrei Alexandrescu about the programming language D. He is an excellent writer and does a good job explaining aspects of the language D. However, I find it difficult to understand some constructs when I cannot imagine the ASM output or the consequences of certain keywords (for example, in, out etc. Or other designs). Despite the fact that my ASM is pretty bad and I never use it, it helps me understand how certain keywords work on my computer and execute.
The DMD compiler has many interesting functions (code coverage, interface generation (header files), documentation generation, profiling, ...), but I did not see the switch for ASM code output. The compiler creates the .obj files and reads the following link: http://www.digitalmars.com/ctg/obj2asm.html I suspect that I need a tool to manually convert object files. I would prefer a compiler, is there one?
At the bottom of this page I will link to a page where I can pay for mentioning products containing this tool. Based on the GNU background, I frowned a lot. Is this only for C / C ++, or is it also related to the D compiler?
Is there any other way to convert these .obj files into readable ASM code, or should I resort to other D compilers (like GDC or LDC) to get the ASM output? I prefer not to do this. DMD is created by the founder himself, I am sure that he implemented most of the functions correctly / largely optimized.
So, how can I look into the ASM code?
Thanks.
compiler-construction d dmd
Taco de wolff
source share