www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4610] New: std.bigint not working on OSX

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4610

           Summary: std.bigint not working on OSX
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: clugdbug yahoo.com.au


--- Comment #0 from Don <clugdbug yahoo.com.au> 2010-08-09 21:37:28 PDT ---
The Phobos unit tests are reported to fail.
Seems to be a problem with the asm routines.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 09 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4610



--- Comment #1 from Don <clugdbug yahoo.com.au> 2010-08-10 00:20:12 PDT ---
Created an attachment (id=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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 10 2010
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4610



--- Comment #2 from Jacob Carlborg <doob me.com> 2010-08-10 02:32:44 PDT ---
Created an attachment (id=710)
Disassembly of osxbug

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 10 2010
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4610


Jacob Carlborg <doob me.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |doob me.com


--- Comment #3 from Jacob Carlborg <doob me.com> 2010-08-10 02:33:54 PDT ---
It prints "13131325 56161622 8A8A8A94" using both Mac OS X 10.5 and 10.6 with
dmd v2.047

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 10 2010
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4610


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
           Severity|normal                      |blocker


--- Comment #4 from Don <clugdbug yahoo.com.au> 2010-08-10 03:00:38 PDT ---
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

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 10 2010
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4610


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla digitalmars.com


--- Comment #5 from Walter Bright <bugzilla digitalmars.com> 2010-08-10
12:23:19 PDT ---
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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 10 2010
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4610


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


--- Comment #6 from Walter Bright <bugzilla digitalmars.com> 2010-08-10
13:34:03 PDT ---
http://www.dsource.org/projects/dmd/changeset/612

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 10 2010