diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.9/0052-Add-target-hook-to-override-DWARF2-frame-register-si.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.9/0052-Add-target-hook-to-override-DWARF2-frame-register-si.patch | 138 |
1 files changed, 0 insertions, 138 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.9/0052-Add-target-hook-to-override-DWARF2-frame-register-si.patch b/meta/recipes-devtools/gcc/gcc-4.9/0052-Add-target-hook-to-override-DWARF2-frame-register-si.patch deleted file mode 100644 index f6958b32c9..0000000000 --- a/meta/recipes-devtools/gcc/gcc-4.9/0052-Add-target-hook-to-override-DWARF2-frame-register-si.patch +++ /dev/null | |||
@@ -1,138 +0,0 @@ | |||
1 | From d626297e87e19251a284ea1e9360e831b48999ca Mon Sep 17 00:00:00 2001 | ||
2 | From: mpf <mpf@138bc75d-0d04-0410-961f-82ee72b054a4> | ||
3 | Date: Thu, 4 Sep 2014 08:32:05 +0000 | ||
4 | Subject: [PATCH] Add target hook to override DWARF2 frame register size | ||
5 | |||
6 | gcc/ | ||
7 | |||
8 | * target.def (TARGET_DWARF_FRAME_REG_MODE): New target hook. | ||
9 | * targhooks.c (default_dwarf_frame_reg_mode): New function. | ||
10 | * targhooks.h (default_dwarf_frame_reg_mode): New prototype. | ||
11 | * doc/tm.texi.in (TARGET_DWARF_FRAME_REG_MODE): Document. | ||
12 | * doc/tm.texi: Regenerate. | ||
13 | * dwarf2cfi.c (expand_builtin_init_dwarf_reg_sizes): Abstract mode | ||
14 | selection logic to default_dwarf_frame_reg_mode. | ||
15 | |||
16 | |||
17 | |||
18 | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214898 138bc75d-0d04-0410-961f-82ee72b054a4 | ||
19 | |||
20 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
21 | Upstream-Status: Backport [gcc 5.0] | ||
22 | |||
23 | --- | ||
24 | gcc/ChangeLog | 10 ++++++++++ | ||
25 | gcc/doc/tm.texi | 7 +++++++ | ||
26 | gcc/doc/tm.texi.in | 2 ++ | ||
27 | gcc/dwarf2cfi.c | 4 +--- | ||
28 | gcc/target.def | 11 +++++++++++ | ||
29 | gcc/targhooks.c | 13 +++++++++++++ | ||
30 | gcc/targhooks.h | 1 + | ||
31 | 7 files changed, 45 insertions(+), 3 deletions(-) | ||
32 | |||
33 | Index: gcc-4.9.2/gcc/doc/tm.texi | ||
34 | =================================================================== | ||
35 | --- gcc-4.9.2.orig/gcc/doc/tm.texi | ||
36 | +++ gcc-4.9.2/gcc/doc/tm.texi | ||
37 | @@ -9017,6 +9017,13 @@ register in Dwarf. Otherwise, this hook | ||
38 | If not defined, the default is to return @code{NULL_RTX}. | ||
39 | @end deftypefn | ||
40 | |||
41 | +@deftypefn {Target Hook} {enum machine_mode} TARGET_DWARF_FRAME_REG_MODE (int @var{regno}) | ||
42 | +Given a register, this hook should return the mode which the | ||
43 | +corresponding Dwarf frame register should have. This is normally | ||
44 | +used to return a smaller mode than the raw mode to prevent call | ||
45 | +clobbered parts of a register altering the frame register size | ||
46 | +@end deftypefn | ||
47 | + | ||
48 | @deftypefn {Target Hook} void TARGET_INIT_DWARF_REG_SIZES_EXTRA (tree @var{address}) | ||
49 | If some registers are represented in Dwarf-2 unwind information in | ||
50 | multiple pieces, define this hook to fill in information about the | ||
51 | Index: gcc-4.9.2/gcc/doc/tm.texi.in | ||
52 | =================================================================== | ||
53 | --- gcc-4.9.2.orig/gcc/doc/tm.texi.in | ||
54 | +++ gcc-4.9.2/gcc/doc/tm.texi.in | ||
55 | @@ -6745,6 +6745,8 @@ the target supports DWARF 2 frame unwind | ||
56 | |||
57 | @hook TARGET_DWARF_REGISTER_SPAN | ||
58 | |||
59 | +@hook TARGET_DWARF_FRAME_REG_MODE | ||
60 | + | ||
61 | @hook TARGET_INIT_DWARF_REG_SIZES_EXTRA | ||
62 | |||
63 | @hook TARGET_ASM_TTYPE | ||
64 | Index: gcc-4.9.2/gcc/dwarf2cfi.c | ||
65 | =================================================================== | ||
66 | --- gcc-4.9.2.orig/gcc/dwarf2cfi.c | ||
67 | +++ gcc-4.9.2/gcc/dwarf2cfi.c | ||
68 | @@ -271,11 +271,9 @@ expand_builtin_init_dwarf_reg_sizes (tre | ||
69 | if (rnum < DWARF_FRAME_REGISTERS) | ||
70 | { | ||
71 | HOST_WIDE_INT offset = rnum * GET_MODE_SIZE (mode); | ||
72 | - enum machine_mode save_mode = reg_raw_mode[i]; | ||
73 | HOST_WIDE_INT size; | ||
74 | + enum machine_mode save_mode = targetm.dwarf_frame_reg_mode (i); | ||
75 | |||
76 | - if (HARD_REGNO_CALL_PART_CLOBBERED (i, save_mode)) | ||
77 | - save_mode = choose_hard_reg_mode (i, 1, true); | ||
78 | if (dnum == DWARF_FRAME_RETURN_COLUMN) | ||
79 | { | ||
80 | if (save_mode == VOIDmode) | ||
81 | Index: gcc-4.9.2/gcc/target.def | ||
82 | =================================================================== | ||
83 | --- gcc-4.9.2.orig/gcc/target.def | ||
84 | +++ gcc-4.9.2/gcc/target.def | ||
85 | @@ -3218,6 +3218,17 @@ If not defined, the default is to return | ||
86 | rtx, (rtx reg), | ||
87 | hook_rtx_rtx_null) | ||
88 | |||
89 | +/* Given a register return the mode of the corresponding DWARF frame | ||
90 | + register. */ | ||
91 | +DEFHOOK | ||
92 | +(dwarf_frame_reg_mode, | ||
93 | + "Given a register, this hook should return the mode which the\n\ | ||
94 | +corresponding Dwarf frame register should have. This is normally\n\ | ||
95 | +used to return a smaller mode than the raw mode to prevent call\n\ | ||
96 | +clobbered parts of a register altering the frame register size", | ||
97 | + enum machine_mode, (int regno), | ||
98 | + default_dwarf_frame_reg_mode) | ||
99 | + | ||
100 | /* If expand_builtin_init_dwarf_reg_sizes needs to fill in table | ||
101 | entries not corresponding directly to registers below | ||
102 | FIRST_PSEUDO_REGISTER, this hook should generate the necessary | ||
103 | Index: gcc-4.9.2/gcc/targhooks.c | ||
104 | =================================================================== | ||
105 | --- gcc-4.9.2.orig/gcc/targhooks.c | ||
106 | +++ gcc-4.9.2/gcc/targhooks.c | ||
107 | @@ -1438,6 +1438,19 @@ default_debug_unwind_info (void) | ||
108 | return UI_NONE; | ||
109 | } | ||
110 | |||
111 | +/* Determine the correct mode for a Dwarf frame register that represents | ||
112 | + register REGNO. */ | ||
113 | + | ||
114 | +enum machine_mode | ||
115 | +default_dwarf_frame_reg_mode (int regno) | ||
116 | +{ | ||
117 | + enum machine_mode save_mode = reg_raw_mode[regno]; | ||
118 | + | ||
119 | + if (HARD_REGNO_CALL_PART_CLOBBERED (regno, save_mode)) | ||
120 | + save_mode = choose_hard_reg_mode (regno, 1, true); | ||
121 | + return save_mode; | ||
122 | +} | ||
123 | + | ||
124 | /* To be used by targets where reg_raw_mode doesn't return the right | ||
125 | mode for registers used in apply_builtin_return and apply_builtin_arg. */ | ||
126 | |||
127 | Index: gcc-4.9.2/gcc/targhooks.h | ||
128 | =================================================================== | ||
129 | --- gcc-4.9.2.orig/gcc/targhooks.h | ||
130 | +++ gcc-4.9.2/gcc/targhooks.h | ||
131 | @@ -194,6 +194,7 @@ extern int default_label_align_max_skip | ||
132 | extern int default_jump_align_max_skip (rtx); | ||
133 | extern section * default_function_section(tree decl, enum node_frequency freq, | ||
134 | bool startup, bool exit); | ||
135 | +extern enum machine_mode default_dwarf_frame_reg_mode (int); | ||
136 | extern enum machine_mode default_get_reg_raw_mode (int); | ||
137 | |||
138 | extern void *default_get_pch_validity (size_t *); | ||