re PR target/10907 ([IA64] gcc violates the ia64 ABI)
PR target/10907 * config/ia64/ia64.c (ia64_epilogue_uses): GP is live at end even with !TARGET_CONST_GP. (ia64_function_ok_for_sibcall): Reject non-local functions. From-SVN: r69515
This commit is contained in:
parent
2a39bedbed
commit
b23ba0b898
2 changed files with 15 additions and 14 deletions
|
@ -1,3 +1,10 @@
|
|||
2003-07-17 Richard Henderson <rth@redhat.com>
|
||||
|
||||
PR target/10907
|
||||
* config/ia64/ia64.c (ia64_epilogue_uses): GP is live at end
|
||||
even with !TARGET_CONST_GP.
|
||||
(ia64_function_ok_for_sibcall): Reject non-local functions.
|
||||
|
||||
2003-07-17 Steven Bosscher <steven@gcc.gnu.org>
|
||||
|
||||
* c-common.c (c_estimate_num_insns_1): Don't handle
|
||||
|
|
|
@ -3642,14 +3642,9 @@ ia64_function_ok_for_sibcall (decl, exp)
|
|||
tree decl;
|
||||
tree exp ATTRIBUTE_UNUSED;
|
||||
{
|
||||
/* Direct calls are always ok. */
|
||||
if (decl)
|
||||
return true;
|
||||
|
||||
/* If TARGET_CONST_GP is in effect, then our caller expects us to
|
||||
return with our current GP. This means that we'll always have
|
||||
a GP reload after an indirect call. */
|
||||
return !ia64_epilogue_uses (R_GR (1));
|
||||
/* 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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -7356,12 +7351,11 @@ ia64_epilogue_uses (regno)
|
|||
switch (regno)
|
||||
{
|
||||
case R_GR (1):
|
||||
/* When a function makes a call through a function descriptor, we
|
||||
will write a (potentially) new value to "gp". After returning
|
||||
from such a call, we need to make sure the function restores the
|
||||
original gp-value, even if the function itself does not use the
|
||||
gp anymore. */
|
||||
return (TARGET_CONST_GP && !(TARGET_AUTO_PIC || TARGET_NO_PIC));
|
||||
/* With a call to a function in another module, we will write a new
|
||||
value to "gp". After returning from such a call, we need to make
|
||||
sure the function restores the original gp-value, even if the
|
||||
function itself does not use the gp anymore. */
|
||||
return !(TARGET_AUTO_PIC || TARGET_NO_PIC);
|
||||
|
||||
case IN_REG (0): case IN_REG (1): case IN_REG (2): case IN_REG (3):
|
||||
case IN_REG (4): case IN_REG (5): case IN_REG (6): case IN_REG (7):
|
||||
|
|
Loading…
Add table
Reference in a new issue