diff options
author | James E Wilson <wilson@specifixinc.com> | 2004-09-15 23:26:33 +0000 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 2004-09-15 16:26:33 -0700 |
commit | 097f3d486a63f934e76229d47857478b40c76748 (patch) | |
tree | df7b4fe58d003da0d2b5471df3c9405350f30d32 | |
parent | 04a751889435ce14f2aca6880add30c2ff3319e3 (diff) | |
download | gcc-097f3d486a63f934e76229d47857478b40c76748.zip gcc-097f3d486a63f934e76229d47857478b40c76748.tar.gz gcc-097f3d486a63f934e76229d47857478b40c76748.tar.bz2 |
Fix linux kernel miscompilation.
PR target/17455
* config/ia64/ia64.c (ia64_function_ok_for_sibcall): Return false
if current_function_decl is a sibcall.
From-SVN: r87574
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/ia64/ia64.c | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d962016..3923876 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2004-09-15 James E Wilson <wilson@specifixinc.com> + + PR target/17455 + * config/ia64/ia64.c (ia64_function_ok_for_sibcall): Return false + if current_function_decl is a sibcall. + 2004-09-15 Mark Mitchell <mark@codesourcery.com> * varasm.c (default_function_rdodata_section): Make sure to pass diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index b85e1c2..871c52d 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -3367,6 +3367,12 @@ ia64_pass_by_reference (CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED, static bool ia64_function_ok_for_sibcall (tree decl, tree exp ATTRIBUTE_UNUSED) { + /* We can't perform a sibcall if the current function has the syscall_linkage + attribute. */ + if (lookup_attribute ("syscall_linkage", + TYPE_ATTRIBUTES (TREE_TYPE (current_function_decl)))) + return false; + /* We must always return with our current GP. This means we can only sibcall to functions defined in the current module. */ return decl && (*targetm.binds_local_p) (decl); |