re PR target/15130 ([3.3/3.4][sh4-linux] miscompilation with -O2)
authorKaz Kojima <kkojima@gcc.gnu.org>
Mon, 10 May 2004 23:25:13 +0000 (23:25 +0000)
committerKaz Kojima <kkojima@gcc.gnu.org>
Mon, 10 May 2004 23:25:13 +0000 (23:25 +0000)
commit726d4cb79ca4a963491a2faeb74641e6ae716b74
treeaeb2d5e436b16aa338bd7429b2513cc5e20811c8
parent0c196bf9d84c1d3b638bb4cd5f9e088b861afa08
re PR target/15130 ([3.3/3.4][sh4-linux] miscompilation with -O2)

PR target/15130
* config/sh/sh-protos.h (sh_expand_epilogue): Change prototype.
* config/sh/sh.c (output_stack_adjust): Take the sibcall epilogue
into account.  Compute the correct number of general registers
for the return value.  Generate a special push/pop sequence when
failing to get a temporary register for non SHmedia epilogue.
(sh_expand_epilogue): Add an argument to show whether it's for
sibcall or not.  Set the 3rd argument of output_stack_adjust to
-1 if needed.
(sh_need_epilogue): Call sh_expand_epilogue with 0.
* config/sh/sh.md (sibcall_epilogue): Call sh_expand_epilogue
with 1.
(epilogue): Call sh_expand_epilogue with 0.

From-SVN: r81683
gcc/ChangeLog
gcc/config/sh/sh-protos.h
gcc/config/sh/sh.c
gcc/config/sh/sh.md