[Issue 9931] Mac OS X ABI not followed when returning structs for extern (C)
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Apr 27 07:15:32 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9931
--- Comment #28 from Jacob Carlborg <doob at me.com> 2013-04-27 07:15:30 PDT ---
(In reply to comment #27)
> Can you be a little more precise?
> Does it fail for the code in comment 22?
Yes, the code in comment 22.
> So everything in C or D?
The disassembly is in C. Below is the disassembly for the D version of the
"bar" function from comment 22:
_D4main3barFZS4main3Foo:
0000000100000b6c pushq %rbp
0000000100000b6d movq %rsp,%rbp
0000000100000b70 subq $0x20,%rsp
0000000100000b74 movq %rdi,0xf8(%rbp)
0000000100000b78 xorl %esi,%esi
0000000100000b7a leaq 0xe8(%rbp),%rdi
0000000100000b7e callq _foo
0000000100000b83 leaq 0xe8(%rbp),%rsi
0000000100000b87 movq 0xf8(%rbp),%rdi
0000000100000b8b movsq (%esi),(%edi)
0000000100000b8d movsb (%esi),(%edi)
0000000100000b8e movsb (%esi),(%edi)
0000000100000b8f movsb (%esi),(%edi)
0000000100000b90 movsb (%esi),(%edi)
0000000100000b91 movq 0xf8(%rbp),%rax
0000000100000b95 leave
0000000100000b96 ret
0000000100000b97 nopl 0x00(%rax,%rax)
--
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