summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>1999-05-08 01:58:39 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>1999-05-08 01:58:39 +0000
commita133c27dc5d56dbf6b3fdeb0de13ab8a6fa61e4f (patch)
tree8a7708519c521e82775f1776d4f648ca7462541f
parent432819788ba562d28ba7c73ddc39b8b44e141d89 (diff)
downloadppe42-gcc-a133c27dc5d56dbf6b3fdeb0de13ab8a6fa61e4f.tar.gz
ppe42-gcc-a133c27dc5d56dbf6b3fdeb0de13ab8a6fa61e4f.zip
Donn Terry (donn@interix.com)
* calls.c (rtx_for_function_call): Extend function pointer being passed to chkr_check_exec_libfunc, if needed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26838 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/calls.c18
2 files changed, 19 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3db908541fc..e5f28311099 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+Sat May 8 01:57:58 1999 Donn Terry (donn@interix.com)
+
+ * calls.c (rtx_for_function_call): Extend function pointer being
+ passed to chkr_check_exec_libfunc, if needed.
+
Sat May 8 01:51:50 1999 David Edelsohn <edelsohn@gnu.org>
* ginclude/stdarg.h (__va_rounded_size): Use long type for
diff --git a/gcc/calls.c b/gcc/calls.c
index 03bac91251b..d0153a3d124 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -1407,15 +1407,25 @@ rtx_for_function_call (fndecl, exp)
else
/* Generate an rtx (probably a pseudo-register) for the address. */
{
+ rtx funaddr;
push_temp_slots ();
- funexp = expand_expr (TREE_OPERAND (exp, 0), NULL_RTX, VOIDmode, 0);
+ funaddr = funexp =
+ expand_expr (TREE_OPERAND (exp, 0), NULL_RTX, VOIDmode, 0);
pop_temp_slots (); /* FUNEXP can't be BLKmode */
/* Check the function is executable. */
if (current_function_check_memory_usage)
- emit_library_call (chkr_check_exec_libfunc, 1,
- VOIDmode, 1,
- funexp, Pmode);
+ {
+#ifdef POINTERS_EXTEND_UNSIGNED
+ /* It might be OK to convert funexp in place, but there's
+ a lot going on between here and when it happens naturally
+ that this seems safer. */
+ funaddr = convert_memory_address (Pmode, funexp);
+#endif
+ emit_library_call (chkr_check_exec_libfunc, 1,
+ VOIDmode, 1,
+ funaddr, Pmode);
+ }
emit_queue ();
}
return funexp;
OpenPOWER on IntegriCloud