[Issue 5570] 64 bit C ABI not followed for passing structs and complex numbers as function parameters

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jun 20 09:23:11 PDT 2012


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



--- Comment #22 from klickverbot <code at klickverbot.at> 2012-06-20 09:25:24 PDT ---
(In reply to comment #21)
> When fixing the remaining issues, please also consider treating dynamic D
> arrays as »struct Array(T) { T* ptr; size_t length; }« on x86_64, i.e. passing
> them in two integer registers (if available).

The fields of the struct should obviously have been swapped.

In any case, this has been addressed in
https://github.com/D-Programming-Language/dmd/commit/f50a339b86d9d2c141061d38f4f682211c3c07c3
and related commits – whether this was a coincidence or not, thanks a lot for
the quick fix!

--- Comment #23 from klickverbot <code at klickverbot.at> 2012-06-20 09:25:25 PDT ---
(In reply to comment #21)
> When fixing the remaining issues, please also consider treating dynamic D
> arrays as »struct Array(T) { T* ptr; size_t length; }« on x86_64, i.e. passing
> them in two integer registers (if available).

The fields of the struct should obviously have been swapped.

In any case, this has been addressed in
https://github.com/D-Programming-Language/dmd/commit/f50a339b86d9d2c141061d38f4f682211c3c07c3
and related commits – whether this was a coincidence or not, thanks a lot for
the quick fix!

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


More information about the Digitalmars-d-bugs mailing list