diff options
author | Juro Bystricky <juro.bystricky@intel.com> | 2018-03-01 10:32:43 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-03-14 07:55:02 -0700 |
commit | dc786f9841ea687fa46ee3f03a1a39da441336b3 (patch) | |
tree | 8153d5168ab784023eeb26c1e6e363826d300b19 /meta/recipes-devtools/gcc/gcc-6.4/backport/0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch | |
parent | aa072d0162e51340b065092a440b775061911699 (diff) | |
download | poky-dc786f9841ea687fa46ee3f03a1a39da441336b3.tar.gz |
gcc6: Backport few more patches
Backported series of patches from https://github.com/hjl-tools/gcc.git
branch /hjl/indirect/gcc-6-branch/master which contains
an IA patch series for security related issues
(From OE-Core rev: 8283b4ee5290843b1033ca496759fce6229b8f91)
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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.patch | 74 |
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 @@ | |||
1 | From fe2b3be3f4b6ec6b3a6f89c26016a3983b7cb351 Mon Sep 17 00:00:00 2001 | ||
2 | From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | ||
3 | Date: Mon, 15 Jan 2018 11:28:44 +0000 | ||
4 | Subject: [PATCH 02/12] i386: Use reference of struct ix86_frame to avoid copy | ||
5 | |||
6 | When there is no need to make a copy of ix86_frame, we can use reference | ||
7 | of 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 | |||
17 | Upstream-Status: Pending | ||
18 | |||
19 | Signed-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 | |||
25 | diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c | ||
26 | index 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 | -- | ||
73 | 2.7.4 | ||
74 | |||