For SOM, don't force relocs on out-of-range 12 bit branches.
[deliverable/binutils-gdb.git] / gas / frags.h
index 2628d2a07144fddd856968346f6d9fc32a15395a..5543136717d17b234afc3ca8f27f8e4c9330a24f 100644 (file)
@@ -1,5 +1,6 @@
 /* frags.h - Header file for the frag concept.
-   Copyright (C) 1987, 92, 93, 94, 95, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1987, 92, 93, 94, 95, 97, 98, 99, 2000
+   Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
@@ -18,6 +19,9 @@
    Software Foundation, 59 Temple Place - Suite 330, Boston, MA
    02111-1307, USA.  */
 
+#ifndef FRAGS_H
+#define FRAGS_H
+
 #ifdef ANSI_PROTOTYPES
 struct obstack;
 #endif
@@ -40,18 +44,19 @@ struct obstack;
 
 struct frag
 {
-  /* Object file address. */
+  /* Object file address (as an octet offset).  */
   addressT fr_address;
-  /* Chain forward; ascending address order.  Rooted in frch_root. */
+  /* Chain forward; ascending address order.  Rooted in frch_root.  */
   struct frag *fr_next;
 
-  /* (Fixed) number of chars we know we have.  May be 0. */
+  /* (Fixed) number of octets we know we have.  May be 0.  */
   offsetT fr_fix;
-  /* (Variable) number of chars after above.  May be 0. */
+  /* May be used for (Variable) number of octets after above.
+     The generic frag handling code no longer makes any use of fr_var.  */
   offsetT fr_var;
-  /* For variable-length tail. */
-  struct symbol *fr_symbol;
-  /* For variable-length tail. */
+  /* For variable-length tail.  */
+  symbolS *fr_symbol;
+  /* For variable-length tail.  */
   offsetT fr_offset;
   /* Points to opcode low addr byte, for relaxation.  */
   char *fr_opcode;
@@ -67,8 +72,12 @@ struct frag
 #ifdef USING_CGEN
   /* Don't include this unless using CGEN to keep frag size down.  */
   struct {
+    /* CGEN_INSN entry for this instruction.  */
     const struct cgen_insn *insn;
-    unsigned char opindex, opinfo;
+    /* Index into operand table.  */
+    int opindex;
+    /* Target specific data, usually reloc number.  */
+    int opinfo;
   } fr_cgen;
 #endif
 
@@ -86,17 +95,18 @@ struct frag
 
 #define SIZEOF_STRUCT_FRAG \
 ((char *)zero_address_frag.fr_literal-(char *)&zero_address_frag)
-/* We want to say fr_literal[0] above. */
+/* We want to say fr_literal[0] above.  */
 
 /* Current frag we are building.  This frag is incomplete.  It is,
    however, included in frchain_now.  The fr_fix field is bogus;
    instead, use frag_now_fix ().  */
 COMMON fragS *frag_now;
-extern int frag_now_fix PARAMS ((void));
+extern addressT frag_now_fix PARAMS ((void));
+extern addressT frag_now_fix_octets PARAMS ((void));
 
-/* For foreign-segment symbol fixups. */
+/* For foreign-segment symbol fixups.  */
 COMMON fragS zero_address_frag;
-/* For local common (N_BSS segment) fixups. */
+/* For local common (N_BSS segment) fixups.  */
 COMMON fragS bss_address_frag;
 
 #if 0
@@ -118,7 +128,6 @@ extern void frag_append_1_char PARAMS ((int));
 #define FRAG_APPEND_1_CHAR(X) frag_append_1_char (X)
 #endif
 
-
 void frag_init PARAMS ((void));
 fragS *frag_alloc PARAMS ((struct obstack *));
 void frag_grow PARAMS ((unsigned int nchars));
@@ -147,4 +156,4 @@ char *frag_var PARAMS ((relax_stateT type,
                        offsetT offset,
                        char *opcode));
 
-/* end of frags.h */
+#endif /* FRAGS_H */
This page took 0.024651 seconds and 4 git commands to generate.