The Phobos unit tests are reported to fail.
Seems to be a problem with the asm routines.
Comment #1 by clugdbug — 2010-08-10T00:20:12Z
Created attachment 709
Test case for osx
It's impossible for me to fix this without help, as I don't have access to OSX.
If you have access to OSX, please compile the attachment with
$ dmd osxbug
$ osxbug
It should print:
13131325 56161622 8A8A8A94
Please report the output on OSX. Please also provide a disassembly of osxbug.obj, if possible.
Comment #2 by doob — 2010-08-10T02:32:44Z
Created attachment 710
Disassembly of osxbug
Comment #3 by doob — 2010-08-10T02:33:54Z
It prints "13131325 56161622 8A8A8A94" using both Mac OS X 10.5 and 10.6 with dmd v2.047
Comment #4 by clugdbug — 2010-08-10T03:00:38Z
Thanks! Looks like the compiler is not respecting 'naked'.
It's inserting some kind of garbage at the top of the function!
asm {
naked;
push ESI;
push EDI;
push EBX;
push EBP;
_D6osxbug25__T15multibyteMulAddVa43Z15multibyteMulAddFAkxAkkkZk:
call L12D // ????
L12D: pop ECX // ????
mov -010h[EBP],ECX // WHAT ON EARTH WILL THIS DO???
push ESI
push EDI
push EBX
push EBP
Comment #5 by bugzilla — 2010-08-10T12:23:19Z
The call/pop sequence is how the base address for static data is computed. Why it's there for naked functions, I don't know yet.