The Phobos unit tests are reported to fail. Seems to be a problem with the asm routines.
Created attachment 709 [details] 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.
Created attachment 710 [details] Disassembly of osxbug
It prints "13131325 56161622 8A8A8A94" using both Mac OS X 10.5 and 10.6 with dmd v2.047
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
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.
http://www.dsource.org/projects/dmd/changeset/612