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] |
2009/7/6 Richard Henderson <rth@redhat.com>: > On 07/06/2009 10:11 AM, Kai Tietz wrote: >> >> Hello, >> >> the first patch I posted just cured the ICE but produces wrong code. >> So I modified patch and add an additional testcase for dllimport'ed >> fastcall method with more then one argument to my patch. The problem >> is that ecx and edx are used by fastcall functions for register >> passing, This patch makes sure that for the case that ecx and edx are >> used for argument passing to sibcalled function, eax is used as call >> register. > > This doesn't fix the problem either, it merely moves it around. > You'll now see the same problem for regparm functions instead. > > You need to figure out why ecx and edx weren't already live, > which should have forced the register allocator to chose eax > without these changed annotations. > > > r~ > So, I tried to solve this by adding to FUNCTION_ARG_REGNO_P an additional function type argument to make better choices about call used registers (which is in fact an issue for df-scan.c and rtlanal.c, but this had no effect on this spilling issue. So for the first, I would like to avoid this ICE and afterward to investigate in more detail why register allocator fails to see that ecx and edx are in use. ChangeLog for gcc 2009-07-06 Kai Tietz <kai.tietz@onevision.com> * config/i386/i386.c (ix86_function_ok_for_sibcall): Disable . sibcalling for fastcall methods, which are dllimported. ChangeLog for gcc/testsuite 2009-07-07 Kai Tietz <kai.tietz@onevision.com> *gcc.dg/pr38900.c: New testcase. *gcc.dg/pr38900-1.c: New testcase. Tested bootstrap for i686-pc-mingw32. Ok to apply to 4.5, and to 4.3 and 4.4 branches? Cheers, Kai -- | (\_/) This is Bunny. Copy and paste | (='.'=) Bunny into your signature to help | (")_(") him gain world domination
Attachment:
disable_fastcall_dllimport_sibcall.diff
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |