OSDN Git Service

Word wrap comment
[pf3gnuchains/gcc-fork.git] / gcc / halfpic.c
index 53ba12f..fabc73b 100644 (file)
@@ -1,5 +1,5 @@
 /* OSF/rose half-pic support functions.
-   Copyright (C) 1992 Free Software Foundation, Inc.
+   Copyright (C) 1992, 1997, 1998, 1999 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -15,7 +15,8 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with GNU CC; see the file COPYING.  If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
 
 /* The OSF/rose half-pic model assumes that the non-library code does
    not need to have full PIC (position independent code), but rather,
@@ -31,16 +32,14 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #ifdef HALF_PIC_INIT
 
+#include "system.h"
 #include "tree.h"
 #include "rtl.h"
-#include <stdio.h>
 #include "obstack.h"
 
 #define obstack_chunk_alloc xmalloc
 #define obstack_chunk_free free
 
-extern char *xmalloc ();
-extern void  free ();
 extern rtx eliminate_constant_term ();
 extern void assemble_name ();
 extern void output_addr_const ();
@@ -134,7 +133,7 @@ half_pic_hash (name, len, create_p)
 
   /* name not in hash table.  */
   if (!create_p)
-    return (struct all_refs *)0;
+    return (struct all_refs *) 0;
 
   ptr = (struct all_refs *) obstack_alloc (&half_pic_obstack, sizeof (struct all_refs));
   *ptr = zero_all_refs;
@@ -143,7 +142,7 @@ half_pic_hash (name, len, create_p)
   ptr->real_len  = len;
 
   /* Update circular links.  */
-  if (first == (struct all_refs *)0)
+  if (first == (struct all_refs *) 0)
     ptr->hash_next = ptr;
 
   else
@@ -187,7 +186,7 @@ half_pic_finish (stream)
       if (p->pointer_p)
        {
          ASM_OUTPUT_LABEL (stream, p->ref_name);
-         ASM_OUTPUT_INT (stream, gen_rtx (SYMBOL_REF, Pmode, p->real_name));
+         ASM_OUTPUT_INT (stream, gen_rtx_SYMBOL_REF (Pmode, p->real_name));
        }
     }
 }
@@ -217,10 +216,9 @@ half_pic_encode (decl)
 #ifdef HALF_PIC_DEBUG
   if (HALF_PIC_DEBUG)
     {
-      if (HALF_PIC_DEBUG)
-       fprintf (stderr, "\n========== Half_pic_encode %.*s\n",
-                IDENTIFIER_LENGTH (asm_name),
-                IDENTIFIER_POINTER (asm_name));
+      fprintf (stderr, "\n========== Half_pic_encode %.*s\n",
+              IDENTIFIER_LENGTH (asm_name),
+              IDENTIFIER_POINTER (asm_name));
       debug_tree (decl);
     }
 #endif
@@ -341,7 +339,7 @@ half_pic_address_p (addr)
        return FALSE;
 
       ptr = half_pic_hash (name, len, FALSE);
-      if (ptr == (struct all_refs *)0)
+      if (ptr == (struct all_refs *) 0)
        return FALSE;
 
       if (ptr->external_p)
@@ -375,7 +373,7 @@ half_pic_ptr (operand)
   name = XSTR (operand, 0);
   len = strlen (name);
   p = half_pic_hash (name, len, FALSE);
-  if (p == (struct all_refs *)0 || !p->external_p)
+  if (p == (struct all_refs *) 0 || !p->external_p)
     return operand;
 
   if (!p->pointer_p)
@@ -393,7 +391,7 @@ half_pic_ptr (operand)
     }
 
   half_pic_number_refs++;
-  return gen_rtx (SYMBOL_REF, Pmode, p->ref_name);
+  return gen_rtx_SYMBOL_REF (Pmode, p->ref_name);
 }
 
 #endif /* HALF_PIC_INIT */