This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
"Danny Smith" <dansmister@gmail.com> wrote on 28.03.2008 05:14:42:
> > > Hallo,
> > >
> > > This patch corrects the implementation of the calling abi of
> > > x86_64-pc-mingw32 target. There were several mistakes about return
> > > value and parameter handling. For more details about Win64 calling
abi
> > > see link in mingw-w64 Wiki
> > >
'http://mingw-w64.wiki.sourceforge.net/MinGW+x64+Software+convention'.
> > >
> > > Additionally it fixes a problem for dwarf23 output in in cygming.h
> > > ASM_OUTPUT_DWARF_OFFSET, which didn't handled 64-bit input sizes.
> > >
> > > ChangeLog
> > >
> > > 2008-03-24 Kai Tietz <kai.tietz@onevision.com>
> > >
> > > * gcc/config/i386/cygming.h (ASM_OUTPUT_DWARF_OFFSET): Add 8
byte
> > offsets
> > > for 64-bit mingw.
> > > * gcc/config/i386/i386.c (ix86_pass_by_reference): Corect
calling abi
> > > for 64-bit mingw.
> > > (ix86_pass_by_reference): Likewise.
> >
> Pasto in Changelog? Should be (return_in_memory_ms_64): Likewise
Ups, thanks for mentioning
> This is OK for trunk,
> Thanks, Danny
"Thanks for reviewing, I found some additional issues wirh win64 abi. I
updated therefore the patch file
for function function_value_ms_64() to handle 128 bit value returns
correctly."
Additionally the BLKmode wasn't treated at all in function '
function_arg_ms_64()'. This results the ICE's when trying to do the
emit_move_insn on it. The win64 abi passes structures and types in
aggregate in register, when size is 1, 2, 4, or 8.
"For function_value_ms_64(), I have a question: Why is this function
called with values different to byte sizes 1,2,4,8, and 16? I put in the
default statement an abort() and it was reached? Is this the BLKmode?"
Yes, it is the BLKmode. Sorry for the question, now I see :}
2008-03-31 Kai Tietz <kai.tietz@onevision.com>
* gcc/config/i386/cygming.h (ASM_OUTPUT_DWARF_OFFSET): Add 8 byte
offsets for 64-bit mingw.
* gcc/config/i386/i386.c (ix86_pass_by_reference): Corect calling
abi
for 64-bit mingw.
(return_in_memory_ms_64): Likewise.
(function_value_ms_64): Likewise.
(function_arg_ms_64): Treat BLKmode.
(ix86_file_end): Enable linkonce code for win64 abi, too.
I did tests on cygwin and on x86_64-pc-mingw32 without regressions.
Is this patch Ok for apply?
Thanks,
Kai
| (\_/) This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.
Attachment:
mingw64_callapi.txt
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |