Thread overview | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
September 15, 2004 D -> ASM | ||||
---|---|---|---|---|
| ||||
Is it possible to tell the dmd comiler to output assembler code? Thank you! |
September 15, 2004 Re: D -> ASM | ||||
---|---|---|---|---|
| ||||
Posted in reply to M | 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
|
September 15, 2004 Re: D -> ASM | ||||
---|---|---|---|---|
| ||||
Posted in reply to M | 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! > > |
September 15, 2004 Re: D -> ASM | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ben Hinkle | 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
|
September 15, 2004 Re: D -> ASM | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ben Hinkle | 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! :-(
|
September 15, 2004 Re: D -> ASM | ||||
---|---|---|---|---|
| ||||
Posted in reply to John Reimer | 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 |
September 24, 2004 Re: D -> ASM | ||||
---|---|---|---|---|
| ||||
Posted in reply to John Reimer | 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
|
September 25, 2004 Re: D -> ASM | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ilya Minkov | 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.
|
Copyright © 1999-2021 by the D Language Foundation