diff options
author | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2018-01-16 12:49:29 +0000 |
---|---|---|
committer | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2018-01-16 12:49:29 +0000 |
commit | c25b81ba01fa9ac0c1baa3aabd64190c47928f03 (patch) | |
tree | 9245c712a4d3a588abc3f26dbff4ee0b684000d8 | |
parent | 5d1c53c6fd593de2360c1a2ae44ebf5fa3c5263b (diff) |
i386: Don't use reference of struct ix86_frame
Use reference of struct ix86_frame in ix86_expand_prologue and
ix86_expand_epilogue caused:
raised STORAGE_ERROR : stack overflow or erroneous memory access
make[5]: *** [/export/gnu/import/git/sources/gcc/gcc/ada/Make-generated.in:45: ada/sinfo.h] Error 1
on trunk when bootstrapping GCC with ada on x86-64.
* config/i386/i386.c (ix86_expand_prologue): Don't use reference
of struct ix86_frame.
(ix86_expand_epilogue): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256742 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 6 |
2 files changed, 14 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1ef52541038d..8de7e8cf1889 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2018-01-16 H.J. Lu <hongjiu.lu@intel.com> + * config/i386/i386.c (ix86_expand_prologue): Don't use reference + of struct ix86_frame. + (ix86_expand_epilogue): Likewise. + +2018-01-16 H.J. Lu <hongjiu.lu@intel.com> + Backport from mainline 2018-01-14 H.J. Lu <hongjiu.lu@intel.com> @@ -214,6 +220,8 @@ 2018-01-15 H.J. Lu <hongjiu.lu@intel.com> Backport from mainline + 2017-11-06 H.J. Lu <hongjiu.lu@intel.com> + * config/i386/i386.c (ix86_can_use_return_insn_p): Use reference of struct ix86_frame. (ix86_initial_elimination_offset): Likewise. @@ -222,6 +230,8 @@ 2018-01-15 H.J. Lu <hongjiu.lu@intel.com> Backport from mainline + 2017-06-01 Bernd Edlinger <bernd.edlinger@hotmail.de> + * config/i386/i386.c (ix86_frame): Moved to ... * config/i386/i386.h (ix86_frame): Here. (machine_function): Add frame. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index e758387dacd0..ba2abc53ed16 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -14061,6 +14061,7 @@ ix86_expand_prologue (void) { struct machine_function *m = cfun->machine; rtx insn, t; + struct ix86_frame frame; HOST_WIDE_INT allocate; bool int_registers_saved; bool sse_registers_saved; @@ -14084,7 +14085,7 @@ ix86_expand_prologue (void) m->fs.sp_valid = true; ix86_compute_frame_layout (); - struct ix86_frame &frame = cfun->machine->frame; + frame = m->frame; if (!TARGET_64BIT && ix86_function_ms_hook_prologue (current_function_decl)) { @@ -14747,12 +14748,13 @@ ix86_expand_epilogue (int style) { struct machine_function *m = cfun->machine; struct machine_frame_state frame_state_save = m->fs; + struct ix86_frame frame; bool restore_regs_via_mov; bool using_drap; ix86_finalize_stack_realign_flags (); ix86_compute_frame_layout (); - struct ix86_frame &frame = cfun->machine->frame; + frame = m->frame; m->fs.sp_valid = (!frame_pointer_needed || (crtl->sp_is_unchanging |