aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Smith <dannysmith@users.sourceforge.net>2005-01-31 05:49:07 +0000
committerDanny Smith <dannysmith@gcc.gnu.org>2005-01-31 05:49:07 +0000
commit6cc37e7e24bb91d009d0a0c9ae9f37dd3c329d74 (patch)
treed9cbcffdee35ec5e86d7d6b8c881da4d84f948f9
parente3016344b3c8ca1ede6b31a8b9949998e5274cf7 (diff)
downloadgcc-6cc37e7e24bb91d009d0a0c9ae9f37dd3c329d74.zip
gcc-6cc37e7e24bb91d009d0a0c9ae9f37dd3c329d74.tar.gz
gcc-6cc37e7e24bb91d009d0a0c9ae9f37dd3c329d74.tar.bz2
re PR target/19704 (ICE for tail call of regparm 3 and dllimport)
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
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/i386/i386.c7
2 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 218a95a..e66f1f8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 4b6b3f2..f72bd3d 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -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;
}