From: pinskia Date: Tue, 24 Jun 2008 22:42:10 +0000 (+0000) Subject: 2008-06-24 Andrew Pinski X-Git-Tag: upstream/4.9.2~41413 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=51adbc8a0429fa1bfea0f745cb480a1bdeb882b6;p=platform%2Fupstream%2Flinaro-gcc.git 2008-06-24 Andrew Pinski PR middle-end/36594 * builtins.c (expand_builtin_nonlocal_goto): Stabilize the address of the memory instead of the memory itself for the save area. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137089 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1ee4650..c68706e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2008-06-24 Andrew Pinski + + PR middle-end/36594 + * builtins.c (expand_builtin_nonlocal_goto): Stabilize the address of + the memory instead of the memory itself for the save area. + 2008-06-24 Olivier Hainque Nicolas Roche diff --git a/gcc/builtins.c b/gcc/builtins.c index cdc5ab3..06ae07a 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -873,6 +873,9 @@ expand_builtin_nonlocal_goto (tree exp) r_label = convert_memory_address (Pmode, r_label); r_save_area = expand_normal (t_save_area); r_save_area = convert_memory_address (Pmode, r_save_area); + /* Copy the address of the save location to a register just in case it was based + on the frame pointer. */ + r_save_area = copy_to_reg (r_save_area); r_fp = gen_rtx_MEM (Pmode, r_save_area); r_sp = gen_rtx_MEM (STACK_SAVEAREA_MODE (SAVE_NONLOCAL), plus_constant (r_save_area, GET_MODE_SIZE (Pmode))); @@ -887,7 +890,6 @@ expand_builtin_nonlocal_goto (tree exp) #endif { r_label = copy_to_reg (r_label); - r_sp = copy_to_reg (r_sp); emit_clobber (gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (VOIDmode))); emit_clobber (gen_rtx_MEM (BLKmode, hard_frame_pointer_rtx));