diff options
author | 2006-08-26 06:38:52 +0000 | |
---|---|---|
committer | 2006-08-26 06:38:52 +0000 | |
commit | 984a5623b9335338b7ba2b875506e376e39687fe (patch) | |
tree | 38e73ba18de2bc045b1325e8cf59977ecde412ce /4.1.1 | |
parent | comment (diff) | |
download | gcc-patches-984a5623b9335338b7ba2b875506e376e39687fe.tar.gz gcc-patches-984a5623b9335338b7ba2b875506e376e39687fe.tar.bz2 gcc-patches-984a5623b9335338b7ba2b875506e376e39687fe.zip |
fix from upstream
Diffstat (limited to '4.1.1')
-rw-r--r-- | 4.1.1/gentoo/15_all_gcc42-builtin-frame-address.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/4.1.1/gentoo/15_all_gcc42-builtin-frame-address.patch b/4.1.1/gentoo/15_all_gcc42-builtin-frame-address.patch new file mode 100644 index 0000000..52426de --- /dev/null +++ b/4.1.1/gentoo/15_all_gcc42-builtin-frame-address.patch @@ -0,0 +1,34 @@ +http://gcc.gnu.org/ml/gcc-patches/2006-06/msg00357.html + +2006-06-12 Mark Shinwell <shinwell@codesourcery.com> + + * builtins.c (expand_builtin_return_addr): Only use + frame_pointer_rtx when count == 0 and we are expanding + __builtin_return_address. + +Index: trunk/gcc/builtins.c +=================================================================== +--- trunk/gcc/builtins.c (revision 114566) ++++ trunk/gcc/builtins.c (revision 114567) +@@ -509,12 +509,16 @@ expand_builtin_return_addr (enum built_i + #else + rtx tem; + +- /* For a zero count, we don't care what frame address we return, so frame +- pointer elimination is OK, and using the soft frame pointer is OK. +- For a nonzero count, we require a stable offset from the current frame +- pointer to the previous one, so we must use the hard frame pointer, and ++ /* For a zero count with __builtin_return_address, we don't care what ++ frame address we return, because target-specific definitions will ++ override us. Therefore frame pointer elimination is OK, and using ++ the soft frame pointer is OK. ++ ++ For a non-zero count, or a zero count with __builtin_frame_address, ++ we require a stable offset from the current frame pointer to the ++ previous one, so we must use the hard frame pointer, and + we must disable frame pointer elimination. */ +- if (count == 0) ++ if (count == 0 && fndecl_code == BUILT_IN_RETURN_ADDRESS) + tem = frame_pointer_rtx; + else + { |