Re: get size of function

2011-08-31 Thread maarten van damme
substracting the pointers to two sequential functions didn't work out. the following snippet: // auto first=function void(){ asm{ naked; nop; } }; auto next=function void(){ asm{ naked; nop; } }; writeln(cast(int)next-cast(int)first,/,cast(int)next,/,next,/,cast(int)first,/,first); // outputs

Re: get size of function

2011-08-31 Thread Johannes Pfau
maarten van damme wrote: substracting the pointers to two sequential functions didn't work out. the following snippet: // auto first=function void(){ asm{ naked; nop; } }; auto next=function void(){ asm{ naked; nop; } };

Re: get size of function

2011-08-31 Thread maarten van damme
I always cast everything to ints that I use in calculations, a (bad) habit of me.size_t makes more sense. your example seems to work great, thank you. I forgot I was using function pointers. Am I sure those functions aren't shift around during optimization? for now the function is working like a

Re: get size of function

2011-08-31 Thread Trass3r
Am 31.08.2011, 12:05 Uhr, schrieb maarten van damme maartenvd1...@gmail.com: Am I sure those functions aren't shift around during optimization? No. It's just an ugly hack and likely to go up in flames. Also what you try could only work with PIC but even then... for now the function is

Re: get size of function

2011-08-31 Thread Simon
On 31/08/2011 15:42, Johannes Pfau wrote: Trass3r wrote: Am 31.08.2011, 12:05 Uhr, schrieb maarten van damme maartenvd1...@gmail.com: Am I sure those functions aren't shift around during optimization? No. It's just an ugly hack and likely to go up in flames. Also what you try could only

Re: d2 file input performance

2011-08-31 Thread David Nadlinger
On 9/1/11 7:12 AM, Christian Köstlin wrote: Update: I added performance tests for ldc and gdc with the same programs. The results are interesting (please see the github page for the details). Oh wow, LDC must accidentally call some druntime functions for the ubyte[1] case, or something

gdc setup without gcc

2011-08-31 Thread %u
is there a way to install gdc without gcc because I already have gcc install in archlunix?

Re: gdc setup without gcc

2011-08-31 Thread Andrew Wiley
On Thu, Sep 1, 2011 at 12:31 AM, %u asm...@hotmail.com wrote: is there a way to install gdc without gcc because I already have gcc install in archlunix? Use the gdc2-hg PKGBUILD in the AUR.