OSDN Git Service

(FUNCTION_PROFILER): Use trap #33 instead of trap #5.
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 30 Nov 1995 20:01:53 +0000 (20:01 +0000)
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 30 Nov 1995 20:01:53 +0000 (20:01 +0000)
Put additional .align before trapa instruction.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@10647 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/config/sh/sh.h

index 3b67014..4456c27 100644 (file)
@@ -688,11 +688,15 @@ extern int current_function_anonymous_args;
 #define SETUP_INCOMING_VARARGS(ASF, MODE, TYPE, PAS, ST) \
   current_function_anonymous_args = 1;
 
-/* Call the function profiler with a given profile label.  */
+/* Call the function profiler with a given profile label.
+   We use two .aligns, so as to make sure that both the .long is aligned
+   on a 4 byte boundary, and that the .long is a fixed distance (2 bytes)
+   from the trapa instruction.  */
 
 #define FUNCTION_PROFILER(STREAM,LABELNO)                      \
 {                                                              \
-       fprintf(STREAM, "       trapa   #5\n");                 \
+       fprintf(STREAM, "       .align  2\n");                  \
+       fprintf(STREAM, "       trapa   #33\n");                \
        fprintf(STREAM, "       .align  2\n");                  \
        fprintf(STREAM, "       .long   LP%d\n", (LABELNO));    \
 }