From: Richard Earnshaw Date: Sat, 14 Jun 2003 17:11:57 +0000 (+0000) Subject: re PR target/3724 ([ARM]Illegal instruction when profiling optimized code on arm... X-Git-Tag: releases/gcc-3.4.0~5832 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2fbe6bc2ba00c56ea66269ba842278764bd89c8e;p=thirdparty%2Fgcc.git re PR target/3724 ([ARM]Illegal instruction when profiling optimized code on arm-linux) PR target/3724 * arm/linux-elf.h (PROFILE_HOOK): Define. From-SVN: r67950 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4713756af4cd..480e734e86f1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2003-06-14 Richard Earnshaw + + PR target/3724 + * arm/linux-elf.h (PROFILE_HOOK): Define. + 2003-06-14 Richard Earnshaw PR target/11183 diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h index 5da2b2420707..1a86e458927f 100644 --- a/gcc/config/arm/linux-elf.h +++ b/gcc/config/arm/linux-elf.h @@ -120,5 +120,10 @@ fprintf (STREAM, "\tbl\tmcount%s\n", NEED_PLT_RELOC ? "(PLT)" : ""); \ } +/* The linux profiler clobbers the link register. Make sure the + prologue knows to save it. */ +#define PROFILE_HOOK(X) \ + emit_insn (gen_rtx_CLOBBER (VOIDmode, gen_rtx_REG (SImode, LR_REGNUM))) + #undef CC1_SPEC #define CC1_SPEC "%{profile:-p}"