]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/19704 (ICE for tail call of regparm 3 and dllimport)
authorDanny Smith <dannysmith@users.sourceforge.net>
Mon, 31 Jan 2005 05:49:07 +0000 (05:49 +0000)
committerDanny Smith <dannysmith@gcc.gnu.org>
Mon, 31 Jan 2005 05:49:07 +0000 (05:49 +0000)
PR target/19704
* config/i386/i386.c (ix86_function_ok_for_sibcall):  Also check
that dllimport'd functions do not use all call-clobbered registers
to pass parameters.

From-SVN: r94467

gcc/ChangeLog
gcc/config/i386/i386.c

index 218a95aa7cd0f1d17a87e44b5124e675b0c503e8..e66f1f8a768d6a80c4c28166794825ae721f9697 100644 (file)
@@ -1,3 +1,10 @@
+2005-01-31  Danny Smith  <dannysmith@users.sourceforge.net>
+
+       PR target/19704
+       * config/i386/i386.c (ix86_function_ok_for_sibcall):  Also check
+       that dllimport'd functions do not use all call-clobbered registers
+       to pass parameters.
+
 2005-01-30  Richard Henderson  <rth@redhat.com>
 
        PR 19696
index 4b6b3f20db1211e4d2208ff7285273e5d8106982..f72bd3d67885f2df1e03205f424bb63b16217d5f 100644 (file)
@@ -1678,6 +1678,13 @@ ix86_function_ok_for_sibcall (tree decl, tree exp)
        }
     }
 
+#if TARGET_DLLIMPORT_DECL_ATTRIBUTES
+  /* Dllimport'd functions are also called indirectly.  */
+  if (decl && lookup_attribute ("dllimport", DECL_ATTRIBUTES (decl))
+      && ix86_function_regparm (TREE_TYPE (decl), NULL) >= 3)
+    return false;
+#endif
+
   /* Otherwise okay.  That also includes certain types of indirect calls.  */
   return true;
 }