Skip to content

Commit 440dcd8

Browse files
author
krebbel
committed
S/390: Fix cfi for GPR 2 FPR saves
gcc/ChangeLog: 2016-01-21 Andreas Krebbel <[email protected]> Backported from mainline 2015-07-24 Andreas Krebbel <[email protected]> * config/s390/s390.c (s390_save_gprs_to_fprs): Add CFA_REGISTER reg note to the GPR -> FPR save instructions. gcc/testsuite/ChangeLog: 2016-01-21 Andreas Krebbel <[email protected]> Backported from mainline 2015-07-24 Andreas Krebbel <[email protected]> * gcc.target/s390/gpr2fprsavecfi.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@232665 138bc75d-0d04-0410-961f-82ee72b054a4
1 parent c7afd8d commit 440dcd8

File tree

4 files changed

+42
-0
lines changed

4 files changed

+42
-0
lines changed

gcc/ChangeLog

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
2016-01-21 Andreas Krebbel <[email protected]>
2+
3+
Backported from mainline
4+
2015-07-24 Andreas Krebbel <[email protected]>
5+
6+
* config/s390/s390.c (s390_save_gprs_to_fprs): Add CFA_REGISTER
7+
reg note to the GPR -> FPR save instructions.
8+
19
2016-01-21 Thomas Preud'homme <[email protected]>
210

311
Backport from mainline

gcc/config/s390/s390.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10149,6 +10149,10 @@ s390_save_gprs_to_fprs (void)
1014910149
emit_move_insn (gen_rtx_REG (DImode, cfun_gpr_save_slot (i)),
1015010150
gen_rtx_REG (DImode, i));
1015110151
RTX_FRAME_RELATED_P (insn) = 1;
10152+
/* This prevents dwarf2cfi from interpreting the set. Doing
10153+
so it might emit def_cfa_register infos setting an FPR as
10154+
new CFA. */
10155+
add_reg_note (insn, REG_CFA_REGISTER, PATTERN (insn));
1015210156
}
1015310157
}
1015410158
}

gcc/testsuite/ChangeLog

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
2016-01-21 Andreas Krebbel <[email protected]>
2+
3+
Backported from mainline
4+
2015-07-24 Andreas Krebbel <[email protected]>
5+
6+
* gcc.target/s390/gpr2fprsavecfi.c: New test.
7+
18
2016-01-21 Thomas Preud'homme <[email protected]>
29

310
Backport from mainline
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/* { dg-do compile } */
2+
/* { dg-options "-O3 -march=z10 -mzarch -fdwarf2-cfi-asm" } */
3+
4+
char *gl[100];
5+
6+
long
7+
foo ()
8+
{
9+
long r = 0;
10+
char bla[100];
11+
int i;
12+
13+
__builtin_memcpy (bla, gl, 100);
14+
15+
for (i = 0; i < 100; i++)
16+
r += bla[i];
17+
18+
return r;
19+
}
20+
21+
/* { dg-final { scan-assembler-not "cfi_def_cfa_register" } } */
22+
/* { dg-final { scan-assembler "cfi_register" } } */
23+
/* { dg-final { scan-assembler "cfi_def_cfa_offset" } } */

0 commit comments

Comments
 (0)