(THUMB_FUNCTION_PROFILER): Remove.
authorAdam Nemet <anemet@lnxw.com>
Tue, 24 Sep 2002 16:51:33 +0000 (16:51 +0000)
committerNick Clifton <nickc@gcc.gnu.org>
Tue, 24 Sep 2002 16:51:33 +0000 (16:51 +0000)
(FUNCTION_PROFILER): Only invoke THUMB_FUNCTION_PROFILER if it is defined.

Co-Authored-By: Nick Clifton <nickc@redhat.com>
From-SVN: r57475

gcc/ChangeLog
gcc/config/arm/arm.h

index 6b3090263fecd1991902586667c703ae93a5b583..0aad8c8ab83089aaa041c3c87fc460f2fa4b595b 100644 (file)
@@ -1,3 +1,10 @@
+2002-09-24  Adam Nemet  <anemet@lnxw.com>
+            Nick Clifton  <nickc@redhat.com>
+
+       * config/arm/arm.h (THUMB_FUNCTION_PROFILER): Remove.
+       (FUNCTION_PROFILER): Only invoke THUMB_FUNCTION_PROFILER if it
+       is defined.
+
 2002-09-24  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * config/s390/s390.c (preferred_la_operand_p): New function.
index ffc04591b78f5acc2659c8efd7200fba802785eb..9c0ce4437abc0ed1edbc1c05b8b6518e68949294 100644 (file)
@@ -1547,7 +1547,10 @@ typedef struct
    will output the .text section.
 
    The ``mov ip,lr'' seems like a good idea to stick with cc convention.
-   ``prof'' doesn't seem to mind about this!  */
+   ``prof'' doesn't seem to mind about this!
+
+   Note - this version of the code is designed to work in both ARM and
+   Thumb modes.  */
 #ifndef ARM_FUNCTION_PROFILER
 #define ARM_FUNCTION_PROFILER(STREAM, LABELNO)         \
 {                                                      \
@@ -1564,20 +1567,16 @@ typedef struct
 }
 #endif
 
-#ifndef THUMB_FUNCTION_PROFILER
-#define THUMB_FUNCTION_PROFILER(STREAM, LABELNO)       \
-{                                                      \
-  fprintf (STREAM, "\tmov\tip, lr\n");                 \
-  fprintf (STREAM, "\tbl\tmcount\n");                  \
-  fprintf (STREAM, "\t.word\tLP%d\n", LABELNO);                \
-}
-#endif
-
+#ifdef THUMB_FUNCTION_PROFILER
 #define FUNCTION_PROFILER(STREAM, LABELNO)             \
   if (TARGET_ARM)                                      \
     ARM_FUNCTION_PROFILER (STREAM, LABELNO)            \
   else                                                 \
     THUMB_FUNCTION_PROFILER (STREAM, LABELNO)
+#else
+#define FUNCTION_PROFILER(STREAM, LABELNO)             \
+    ARM_FUNCTION_PROFILER (STREAM, LABELNO)
+#endif
 
 /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
    the stack pointer does not matter.  The value is tested only in