OSDN Git Service

* config/m32r/m32r-protos.h: Remove m32r_finalize_pic.
authorkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 5 Jul 2005 14:16:06 +0000 (14:16 +0000)
committerkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 5 Jul 2005 14:16:06 +0000 (14:16 +0000)
* config/m32r/m32r.c (m32r_compute_frame_size,
m32r_expand_prologue): Take current_function_profile into
account whenever we reference
current_function_uses_pic_offset_table.
(m32r_finalize_pic): Remove.
* config/m32r/m32r.h (FINALIZE_PIC): Likewise.

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

gcc/ChangeLog
gcc/config/m32r/m32r-protos.h
gcc/config/m32r/m32r.c
gcc/config/m32r/m32r.h

index ddf5750..87268cd 100644 (file)
@@ -1,3 +1,13 @@
+2005-07-05  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
+
+       * config/m32r/m32r-protos.h: Remove m32r_finalize_pic.
+       * config/m32r/m32r.c (m32r_compute_frame_size,
+       m32r_expand_prologue): Take current_function_profile into
+       account whenever we reference
+       current_function_uses_pic_offset_table.
+       (m32r_finalize_pic): Remove.
+       * config/m32r/m32r.h (FINALIZE_PIC): Likewise.
+
 2005-07-05  Kazu Hirata  <kazu@codesourcery.com>
 
        * Makefile.in (stamp-as): Use $(ORIGINAL_AS_FOR_TARGET)
 2005-07-05  Kazu Hirata  <kazu@codesourcery.com>
 
        * Makefile.in (stamp-as): Use $(ORIGINAL_AS_FOR_TARGET)
index 29dbbc7..a847930 100644 (file)
@@ -29,7 +29,6 @@ extern void   m32r_init (void);
 extern void   m32r_init_expanders (void);
 extern unsigned m32r_compute_frame_size (int);
 extern void   m32r_expand_prologue (void);
 extern void   m32r_init_expanders (void);
 extern unsigned m32r_compute_frame_size (int);
 extern void   m32r_expand_prologue (void);
-extern void   m32r_finalize_pic (void);
 extern int    direct_return (void);
 extern void   m32r_load_pic_register (void);
 
 extern int    direct_return (void);
 extern void   m32r_load_pic_register (void);
 
index dae0f15..d772db0 100644 (file)
@@ -1276,7 +1276,8 @@ m32r_compute_frame_size (int size)        /* # of var. bytes allocated.  */
   unsigned int gmask;
   enum m32r_function_type fn_type;
   int interrupt_p;
   unsigned int gmask;
   enum m32r_function_type fn_type;
   int interrupt_p;
-  int pic_reg_used = flag_pic && (current_function_uses_pic_offset_table);
+  int pic_reg_used = flag_pic && (current_function_uses_pic_offset_table
+                                  | current_function_profile);
 
   var_size     = M32R_STACK_ALIGN (size);
   args_size    = M32R_STACK_ALIGN (current_function_outgoing_args_size);
 
   var_size     = M32R_STACK_ALIGN (size);
   args_size    = M32R_STACK_ALIGN (current_function_outgoing_args_size);
@@ -1375,7 +1376,8 @@ m32r_expand_prologue (void)
   int regno;
   int frame_size;
   unsigned int gmask;
   int regno;
   int frame_size;
   unsigned int gmask;
-  int pic_reg_used = flag_pic && (current_function_uses_pic_offset_table);
+  int pic_reg_used = flag_pic && (current_function_uses_pic_offset_table
+                                  | current_function_profile);
 
   if (! current_frame_info.initialized)
     m32r_compute_frame_size (get_frame_size ());
 
   if (! current_frame_info.initialized)
     m32r_compute_frame_size (get_frame_size ());
@@ -1709,14 +1711,6 @@ m32r_legitimize_pic_address (rtx orig, rtx reg)
 
   return orig;
 }
 
   return orig;
 }
-
-/* Emit special PIC prologues and epilogues.  */
-
-void
-m32r_finalize_pic (void)
-{
-  current_function_uses_pic_offset_table |= current_function_profile;
-}
 \f
 /* Nested function support.  */
 
 \f
 /* Nested function support.  */
 
index 8bb1908..ca6e86f 100644 (file)
@@ -1344,22 +1344,6 @@ L2:     .word STATIC
 /* This register is call-saved on the M32R.  */
 /*#define PIC_OFFSET_TABLE_REG_CALL_CLOBBERED*/
 
 /* This register is call-saved on the M32R.  */
 /*#define PIC_OFFSET_TABLE_REG_CALL_CLOBBERED*/
 
-/* By generating position-independent code, when two different programs (A
-   and B) share a common library (libC.a), the text of the library can be
-   shared whether or not the library is linked at the same address for both
-   programs.  In some of these environments, position-independent code
-   requires not only the use of different addressing modes, but also
-   special code to enable the use of these addressing modes.
-
-   The FINALIZE_PIC macro serves as a hook to emit these special
-   codes once the function is being compiled into assembly code, but not
-   before.  (It is not done before, because in the case of compiling an
-   inline function, it would lead to multiple PIC prologues being
-   included in functions which used inline functions and were compiled to
-   assembly language.)  */
-
-#define FINALIZE_PIC m32r_finalize_pic ()
-
 /* A C expression that is nonzero if X is a legitimate immediate
    operand on the target machine when generating position independent code.
    You can assume that X satisfies CONSTANT_P, so you need not
 /* A C expression that is nonzero if X is a legitimate immediate
    operand on the target machine when generating position independent code.
    You can assume that X satisfies CONSTANT_P, so you need not