www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2385] New: spec says all structs are returned via hidden pointer on linux, but it uses registers

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

           Summary: spec says all structs are returned via hidden pointer on
                    linux, but it uses registers
           Product: D
           Version: 1.034
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Keywords: spec
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: tomas famolsen.dk


the following test compiled with dmd 1.034 on linux should return via a hidden
pointer parameter, but is actually returned in registers:

struct S
{
    int x;
    int z;
    static S foo()
    {
        S s = {1,2};
        return s;
    }
}

becomes

_D4test1S3fooFZS4test1S:
                push    EBP
                mov     EBP,ESP
                sub     ESP,8
                mov     dword ptr -8[EBP],1
                mov     dword ptr -4[EBP],2
                mov     EDX,-4[EBP]
                mov     EAX,-8[EBP]
                leave
                ret


-- 
Oct 02 2008
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2385


bugzilla digitalmars.com changed:

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





Fixed dmd 1.036 and 2.020


-- 
Oct 20 2008
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2385


Tomas Lindquist Olsen <tomas famolsen.dk> changed:

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





12:30:04 PDT ---
the spec now says:



significant half.

passed as an argument to the function.

I don't think just removing the info on linux is a satisfactory fix, the asm is
still the same!

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 12 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2385


Tomas Lindquist Olsen <tomas famolsen.dk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |2648





12:33:23 PDT ---
Very much related to:

http://d.puremagic.com/issues/show_bug.cgi?id=2648

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 12 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2385


Walter Bright <bugzilla digitalmars.com> changed:

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



01:02:24 PST ---
http://www.dsource.org/projects/phobos/changeset/2132

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


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug yahoo.com.au

Bug 2385 depends on bug 2648, which changed state.

Bug 2648 Summary: Unnecessary struct ABI inconsistency
http://d.puremagic.com/issues/show_bug.cgi?id=2648

           What    |Old Value                   |New Value
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE


01:03:29 PST ---
*** Issue 2648 has been marked as a duplicate of this issue. ***

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