[Bug target/89952] S/390: Inconsistent CFI info when restoring frame pointer from fpr

2019-04-24 Thread krebbel at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89952

Andreas Krebbel  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Andreas Krebbel  ---
Fixed upstream with the patch from comment #2

[Bug target/89952] S/390: Inconsistent CFI info when restoring frame pointer from fpr

2019-04-24 Thread krebbel at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89952

--- Comment #2 from Andreas Krebbel  ---
Author: krebbel
Date: Wed Apr 24 13:40:38 2019
New Revision: 270544

URL: https://gcc.gnu.org/viewcvs?rev=270544&root=gcc&view=rev
Log:
S/390: Fix PR89952 incorrect CFI

This patch fixes a cases where inconsistent CFI is generated.

After restoring the hard frame pointer (r11) from an FPR we have to
set the CFA register.  In order to be able to set it back to the stack
pointer (r15) we have to make sure that r15 has been restored already.

The patch also adds a scheduler dependency to prevent the instruction
scheduler from swapping the r11 and r15 restore again.

gcc/ChangeLog:

2019-04-24  Andreas Krebbel  

PR target/89952
* config/s390/s390.c (s390_restore_gprs_from_fprs): Restore GPRs
from FPRs in reverse order.  Generate REG_CFA_DEF_CFA note also
for restored hard frame pointer.
(s390_sched_dependencies_evaluation): Implement new target hook.
(TARGET_SCHED_DEPENDENCIES_EVALUATION_HOOK): New macro definition.

gcc/testsuite/ChangeLog:

2019-04-24  Andreas Krebbel  

PR target/89952
* gcc.target/s390/pr89952.c: New test.


Added:
trunk/gcc/testsuite/gcc.target/s390/pr89952.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/s390/s390.c
trunk/gcc/testsuite/ChangeLog

[Bug target/89952] S/390: Inconsistent CFI info when restoring frame pointer from fpr

2019-04-03 Thread krebbel at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89952

--- Comment #1 from Andreas Krebbel  ---
Created attachment 46083
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46083&action=edit
Experimental patch