digitalmars.D - D -> ASM
- M <M_member pathlink.com> Sep 15 2004
- Deja Augustine <deja scratch-ware.net> Sep 15 2004
- "Ben Hinkle" <bhinkle mathworks.com> Sep 15 2004
- Deja Augustine <deja scratch-ware.net> Sep 15 2004
- John Reimer <brk_6502 NOSP_AM.yahoo.com> Sep 16 2004
- Charles <Charles_member pathlink.com> Sep 15 2004
- Ilya Minkov <minkov cs.tum.edu> Sep 24 2004
- John Reimer <brk_6502 NOSP_AM.yahoo.com> Sep 25 2004
Is it possible to tell the dmd comiler to output assembler code? Thank you!
Sep 15 2004
M wrote:Is it possible to tell the dmd comiler to output assembler code? Thank you!
Yes, use an asm block. Look in the D documentation under the Inline Assembler topic. -Deja
Sep 15 2004
The DMD compiler doesn't but one can run obj2asm (or dumpobj or something like that) on the object code to get some asm. The GDC compiler should have a flag to output asm - gcc works by generating assembly and then calling the assembler to generate the object code. "M" <M_member pathlink.com> wrote in message news:ci9glf$1a93$1 digitaldaemon.com...Is it possible to tell the dmd comiler to output assembler code? Thank you!
Sep 15 2004
Ben Hinkle wrote:The DMD compiler doesn't but one can run obj2asm (or dumpobj or something like that) on the object code to get some asm. The GDC compiler should have a flag to output asm - gcc works by generating assembly and then calling the assembler to generate the object code. "M" <M_member pathlink.com> wrote in message news:ci9glf$1a93$1 digitaldaemon.com...Is it possible to tell the dmd comiler to output assembler code? Thank you!
Ah, misunderstood the question :) -Deja
Sep 15 2004
Ben Hinkle wrote:The DMD compiler doesn't but one can run obj2asm (or dumpobj or something like that) on the object code to get some asm. The GDC compiler should have a flag to output asm - gcc works by generating assembly and then calling the assembler to generate the object code.
RE: gcc Really?! Isn't that a tremendous waste of time? Perhaps that's why gcc is so slow! :-(
Sep 16 2004
In article <ci9qil$1fdo$1 digitaldaemon.com>, John Reimer says...Ben Hinkle wrote:The DMD compiler doesn't but one can run obj2asm (or dumpobj or something like that) on the object code to get some asm. The GDC compiler should have a flag to output asm - gcc works by generating assembly and then calling the assembler to generate the object code.
RE: gcc Really?! Isn't that a tremendous waste of time? Perhaps that's why gcc is so slow! :-(
Its also probably why its so portable ;). GCC has a weird lisp looking intermediate code, not your traditonal asm. Charlie
Sep 15 2004
John Reimer schrieb:RE: gcc Really?! Isn't that a tremendous waste of time? Perhaps that's why gcc is so slow! :-(
Yes, it is a waste of time. But not as tremendous as one might think. It has been one of its basic decisions for portability. LCC also works this way, even the fairly fast LCC-Win32 internally generates a text assembly file and then parses it again. But parsing assembly is not very time consuming, especially if you know that it's well formed - and gcc uses that. Transferring an assembly file between the compiler and the assembler has a different overhead depending on the system. On Windows, it is a separate step, while on Unices it is just streamed through so it goes quite nicely. At every possible point GCC designers favored flexibility, target code performance and ultimate portability, to the disadvantage on compiling speed. So no wonder it is slow. :) Besides, it's single-pass - i don't know what it's good for these days, perhaps it becomes one of the problems. -eye
Sep 24 2004
Ilya Minkov wrote:John Reimer schrieb:RE: gcc Really?! Isn't that a tremendous waste of time? Perhaps that's why gcc is so slow! :-(
Yes, it is a waste of time. But not as tremendous as one might think. It has been one of its basic decisions for portability. LCC also works this way, even the fairly fast LCC-Win32 internally generates a text assembly file and then parses it again. But parsing assembly is not very time consuming, especially if you know that it's well formed - and gcc uses that. Transferring an assembly file between the compiler and the assembler has a different overhead depending on the system. On Windows, it is a separate step, while on Unices it is just streamed through so it goes quite nicely. At every possible point GCC designers favored flexibility, target code performance and ultimate portability, to the disadvantage on compiling speed. So no wonder it is slow. :) Besides, it's single-pass - i don't know what it's good for these days, perhaps it becomes one of the problems. -eye
Thanks! That explains it well.
Sep 25 2004









Deja Augustine <deja scratch-ware.net> 