On Saturday, 27 January 2018 at 19:43:50 UTC, Stefan Koch wrote:
On Saturday, 27 January 2018 at 19:42:01 UTC, Matt wrote:
Godbolt link: https://godbolt.org/g/t5S976
The actual code is :
 imul edi, edi
 mov eax, edi
 ret


The rest is runtime initialization.
which you can remove using an undocumented -betterC switch.

BTW as asm.dlang.org is dead, you can use run.dlang.io for these things, e.g.

DMD: https://run.dlang.io/is/lLL1aJ
LDC: https://run.dlang.io/is/sVn5tu

(-output-s / -asm are only added for extra convenience)

Since a couple of days, it even does demangling of the symbols.
Though, of course, if you want to look only at LDC's output, godbolt is still the better choice.

Reply via email to