diff options
author | Andreas Krebbel <krebbel@linux.vnet.ibm.com> | 2015-07-24 11:29:50 +0000 |
---|---|---|
committer | Andreas Krebbel <krebbel@gcc.gnu.org> | 2015-07-24 11:29:50 +0000 |
commit | b8fedf996be60ac2de2dcd0dbe39e9f258cf0c8e (patch) | |
tree | 4728ead18e2dd89bc3e6776b36773433d129a5e5 /gcc | |
parent | 3d44ff9919d50db3a67bee88235bbdb9735ba34b (diff) | |
download | gcc-b8fedf996be60ac2de2dcd0dbe39e9f258cf0c8e.zip gcc-b8fedf996be60ac2de2dcd0dbe39e9f258cf0c8e.tar.gz gcc-b8fedf996be60ac2de2dcd0dbe39e9f258cf0c8e.tar.bz2 |
S/390: Fix cfi for GPR 2 FPR saves
gcc/ChangeLog:
2015-07-24 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* config/s390/s390.c (s390_save_gprs_to_fprs): Add CFA_REGISTER
reg note to the GPR -> FPR save instructions.
gcc/testsuite/ChangeLog:
2015-07-24 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* gcc.target/s390/gpr2fprsavecfi.c: New test.
From-SVN: r226149
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/s390/s390.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/s390/gpr2fprsavecfi.c | 23 |
4 files changed, 36 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f375a3a..b613180 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2015-07-24 Andreas Krebbel <krebbel@linux.vnet.ibm.com> + * config/s390/s390.c (s390_save_gprs_to_fprs): Add CFA_REGISTER + reg note to the GPR -> FPR save instructions. + +2015-07-24 Andreas Krebbel <krebbel@linux.vnet.ibm.com> + * config/s390/s390.c (s390_rtx_costs): Make risbg patterns cheaper. (s390_expand_insv): Don't generate risbg pattern for constant zero diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index f421e88..7f609ba 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -10132,6 +10132,10 @@ s390_save_gprs_to_fprs (void) emit_move_insn (gen_rtx_REG (DImode, cfun_gpr_save_slot (i)), gen_rtx_REG (DImode, i)); RTX_FRAME_RELATED_P (insn) = 1; + /* This prevents dwarf2cfi from interpreting the set. Doing + so it might emit def_cfa_register infos setting an FPR as + new CFA. */ + add_reg_note (insn, REG_CFA_REGISTER, PATTERN (insn)); } } } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 27278a1..72955da 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,9 @@ 2015-07-24 Andreas Krebbel <krebbel@linux.vnet.ibm.com> + * gcc.target/s390/gpr2fprsavecfi.c: New test. + +2015-07-24 Andreas Krebbel <krebbel@linux.vnet.ibm.com> + * gcc.target/s390/insv-1.c: New test. * gcc.target/s390/insv-2.c: New test. * gcc.target/s390/insv-3.c: New test. diff --git a/gcc/testsuite/gcc.target/s390/gpr2fprsavecfi.c b/gcc/testsuite/gcc.target/s390/gpr2fprsavecfi.c new file mode 100644 index 0000000..92a0d3a --- /dev/null +++ b/gcc/testsuite/gcc.target/s390/gpr2fprsavecfi.c @@ -0,0 +1,23 @@ +/* { dg-do compile } */ +/* { dg-options "-O3 -march=z10 -mzarch -fdwarf2-cfi-asm" } */ + +char *gl[100]; + +long +foo () +{ + long r = 0; + char bla[100]; + int i; + + __builtin_memcpy (bla, gl, 100); + + for (i = 0; i < 100; i++) + r += bla[i]; + + return r; +} + +/* { dg-final { scan-assembler-not "cfi_def_cfa_register" } } */ +/* { dg-final { scan-assembler "cfi_register" } } */ +/* { dg-final { scan-assembler "cfi_def_cfa_offset" } } */ |