summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-6.4/backport/0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-6.4/backport/0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.4/backport/0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch74
1 files changed, 74 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-6.4/backport/0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch b/meta/recipes-devtools/gcc/gcc-6.4/backport/0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch
new file mode 100644
index 0000000000..df65b08f93
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-6.4/backport/0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch
@@ -0,0 +1,74 @@
1From fe2b3be3f4b6ec6b3a6f89c26016a3983b7cb351 Mon Sep 17 00:00:00 2001
2From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
3Date: Mon, 15 Jan 2018 11:28:44 +0000
4Subject: [PATCH 02/12] i386: Use reference of struct ix86_frame to avoid copy
5
6When there is no need to make a copy of ix86_frame, we can use reference
7of struct ix86_frame to avoid copy.
8
9 Backport from mainline
10 2017-11-06 H.J. Lu <hongjiu.lu@intel.com>
11
12 * config/i386/i386.c (ix86_can_use_return_insn_p): Use reference
13 of struct ix86_frame.
14 (ix86_initial_elimination_offset): Likewise.
15 (ix86_expand_split_stack_prologue): Likewise.
16
17Upstream-Status: Pending
18
19Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
20
21---
22 gcc/config/i386/i386.c | 8 +++-----
23 1 file changed, 3 insertions(+), 5 deletions(-)
24
25diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
26index a1ff32b..13ebf10 100644
27--- a/gcc/config/i386/i386.c
28+++ b/gcc/config/i386/i386.c
29@@ -10887,7 +10887,6 @@ symbolic_reference_mentioned_p (rtx op)
30 bool
31 ix86_can_use_return_insn_p (void)
32 {
33- struct ix86_frame frame;
34
35 if (! reload_completed || frame_pointer_needed)
36 return 0;
37@@ -10898,7 +10897,7 @@ ix86_can_use_return_insn_p (void)
38 return 0;
39
40 ix86_compute_frame_layout ();
41- frame = cfun->machine->frame;
42+ struct ix86_frame &frame = cfun->machine->frame;
43 return (frame.stack_pointer_offset == UNITS_PER_WORD
44 && (frame.nregs + frame.nsseregs) == 0);
45 }
46@@ -11310,7 +11309,7 @@ HOST_WIDE_INT
47 ix86_initial_elimination_offset (int from, int to)
48 {
49 ix86_compute_frame_layout ();
50- struct ix86_frame frame = cfun->machine->frame;
51+ struct ix86_frame &frame = cfun->machine->frame;
52
53 if (from == ARG_POINTER_REGNUM && to == HARD_FRAME_POINTER_REGNUM)
54 return frame.hard_frame_pointer_offset;
55@@ -13821,7 +13820,6 @@ static GTY(()) rtx split_stack_fn_large;
56 void
57 ix86_expand_split_stack_prologue (void)
58 {
59- struct ix86_frame frame;
60 HOST_WIDE_INT allocate;
61 unsigned HOST_WIDE_INT args_size;
62 rtx_code_label *label;
63@@ -13834,7 +13832,7 @@ ix86_expand_split_stack_prologue (void)
64
65 ix86_finalize_stack_realign_flags ();
66 ix86_compute_frame_layout ();
67- frame = cfun->machine->frame;
68+ struct ix86_frame &frame = cfun->machine->frame;
69 allocate = frame.stack_pointer_offset - INCOMING_FRAME_SP_OFFSET;
70
71 /* This is the label we will branch to if we have enough stack
72--
732.7.4
74