D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 13955 - 64 bit C ABI not followed for passing structs with mixed floating types
Summary: 64 bit C ABI not followed for passing structs with mixed floating types
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 Linux
: P1 major
Assignee: yebblies
URL:
Keywords: pull, wrong-code
Depends on:
Blocks:
 
Reported: 2015-01-08 15:49 UTC by yebblies
Modified: 2015-02-18 03:42 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description yebblies 2015-01-08 15:49:02 UTC
Both of these structs are passed in memory, when they should be passed via xmm regs.

struct S
{
    float a;
    double b;
};
struct S
{
    double a;
    float b;
};
Comment 2 github-bugzilla 2015-01-08 18:46:48 UTC
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/5dea1855f04a9e51839c33575d52139032437fc9
Fix Issue 13955 - 64 bit C ABI not followed for passing structs with mixed floating types

Check code in argtypes.c should be checking that both types can be passed in xmm registers.

https://github.com/D-Programming-Language/dmd/commit/ccec6fb22bce0e4ea351f14f1a2d472a883ae2f2
Merge pull request #4265 from yebblies/issue13955

Issue 13955 - 64 bit C ABI not followed for passing structs with mixed floating types
Comment 3 github-bugzilla 2015-02-18 03:42:08 UTC
Commits pushed to 2.067 at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/5dea1855f04a9e51839c33575d52139032437fc9
Fix Issue 13955 - 64 bit C ABI not followed for passing structs with mixed floating types

https://github.com/D-Programming-Language/dmd/commit/ccec6fb22bce0e4ea351f14f1a2d472a883ae2f2
Merge pull request #4265 from yebblies/issue13955