From: Mike Stump Date: Fri, 8 Apr 2005 23:30:23 +0000 (+0000) Subject: rs6000.c (rs6000_emit_prologue): Use 5 nops, instead of 4. X-Git-Tag: misc/cutover-cvs2svn~4236 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=de2ab0ca8b09521af6a0d0fb8b13029e119fba58;p=thirdparty%2Fgcc.git rs6000.c (rs6000_emit_prologue): Use 5 nops, instead of 4. * config/rs6000/rs6000.c (rs6000_emit_prologue): Use 5 nops, instead of 4. From-SVN: r97871 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 73ec69f286d1..3f99ac1b2030 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -8,6 +8,9 @@ 2005-04-08 Mike Stump * config/darwin.c (indirect_data): Fix typo in strncmp logic. + + * config/rs6000/rs6000.c (rs6000_emit_prologue): Use 5 nops, + instead of 4. 2005-04-08 Kazu Hirata diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index 0b2ddc3677aa..d3cafb165e46 100644 --- a/gcc/config/darwin.c +++ b/gcc/config/darwin.c @@ -59,8 +59,8 @@ Boston, MA 02111-1307, USA. */ existed in the unit to be replaced, and from the new translation unit, for new data. - The changes are to insert 4 nops at the beginning of all functions - and to use indirection to get at static duration data. The 4 nops + The changes are to insert 5 nops at the beginning of all functions + and to use indirection to get at static duration data. The 5 nops are required by consumers of the generated code. Currently, gdb uses this to patch in a jump to the overriding function, this allows all uses of the old name to forward to the replacement, diff --git a/gcc/config/rs6000/darwin.h b/gcc/config/rs6000/darwin.h index a6e3fde79661..3d646043ab14 100644 --- a/gcc/config/rs6000/darwin.h +++ b/gcc/config/rs6000/darwin.h @@ -406,7 +406,7 @@ extern const char *darwin_one_byte_bool; #define HAS_MD_FALLBACK_FRAME_STATE_FOR 1 /* True, iff we're generating fast turn around debugging code. When - true, we arrange for function prologues to start with 4 nops so + true, we arrange for function prologues to start with 5 nops so that gdb may insert code to redirect them, and for data to be accessed indirectly. The runtime uses this indirection to forward references for data to the original instance of that data. */ diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 8ca07a242115..c75c272abc3a 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -12565,7 +12565,7 @@ rs6000_emit_prologue (void) if (TARGET_FIX_AND_CONTINUE) { /* gdb on darwin arranges to forward a function from the old - address by modifying the first 4 instructions of the function + address by modifying the first 5 instructions of the function to branch to the overriding function. This is necessary to permit function pointers that point to the old function to actually forward to the new function. */ @@ -12573,6 +12573,7 @@ rs6000_emit_prologue (void) emit_insn (gen_nop ()); emit_insn (gen_nop ()); emit_insn (gen_nop ()); + emit_insn (gen_nop ()); } if (TARGET_SPE_ABI && info->spe_64bit_regs_used != 0)