Add support for the Z80 processor family
[deliverable/binutils-gdb.git] / gas / config / tc-xtensa.h
index 47436176f83956c634f50a67555b6e00bf7cd636..35717f0af63c15c8bcbecbf2dae7baae4d4d475d 100644 (file)
@@ -1,5 +1,5 @@
 /* tc-xtensa.h -- Header file for tc-xtensa.c.
-   Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
 
    You should have received a copy of the GNU General Public License
    along with GAS; see the file COPYING.  If not, write to the Free
-   Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-   02111-1307, USA.  */
+   Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+   02110-1301, USA.  */
 
 #ifndef TC_XTENSA
 #define TC_XTENSA 1
 
-#ifdef ANSI_PROTOTYPES
 struct fix;
-#endif
-
-#ifndef BFD_ASSEMBLER
-#error Xtensa support requires BFD_ASSEMBLER
-#endif
 
 #ifndef OBJ_ELF
 #error Xtensa support requires ELF object format
@@ -141,7 +135,7 @@ enum xtensa_relax_statesE
      does not fit, use the specified expansion.  This is similar to
      "NARROW", except that these may not be expanded in order to align
      code.  */
-  
+
   RELAX_IMMED_STEP1,
   /* The last instruction in this fragment (at->fr_opcode) contains a
      literal.  It has already been expanded at least 1 step.  */
@@ -170,7 +164,7 @@ enum xtensa_relax_statesE
   RELAX_MAYBE_UNREACHABLE,
   /* This marks the location as possibly unreachable.  These are placed
      after a branch that may be relaxed into a branch and jump. If the
-     branch is relaxed, then this frag will be converted to a 
+     branch is relaxed, then this frag will be converted to a
      RELAX_UNREACHABLE frag.  */
 
   RELAX_NONE
@@ -195,6 +189,7 @@ struct xtensa_frag_type
   unsigned int is_assembly_state_set : 1;
   unsigned int is_no_density : 1;
   unsigned int is_no_transform : 1;
+  unsigned int use_longcalls : 1;
   unsigned int use_absolute_literals : 1;
 
   /* Inhibits relaxation of machine-dependent alignment frags the
@@ -226,9 +221,13 @@ struct xtensa_frag_type
   fragS *literal_frag;
 
   /* The destination segment for literal frags.  (Note that this is only
-     valid after xtensa_move_literals.  */
+     valid after xtensa_move_literals.)  This field is also used for
+     LITERAL_POOL_END frags.  */
   segT lit_seg;
 
+  /* Frag chain for LITERAL_POOL_BEGIN frags.  */
+  struct frchain *lit_frchain;
+
   /* For the relaxation scheme, some literal fragments can have their
      expansions modified by an instruction that relaxes.  */
   int text_expansion[MAX_SLOTS];
@@ -291,6 +290,7 @@ extern const char *xtensa_target_format (void);
 extern void xtensa_init_fix_data (struct fix *);
 extern void xtensa_frag_init (fragS *);
 extern int xtensa_force_relocation (struct fix *);
+extern int xtensa_validate_fix_sub (struct fix *);
 extern void xtensa_frob_label (struct symbol *);
 extern void xtensa_end (void);
 extern void xtensa_post_relax_hook (void);
@@ -314,6 +314,9 @@ extern char *xtensa_section_rename (char *);
 #define TC_FRAG_TYPE                   struct xtensa_frag_type
 #define TC_FRAG_INIT(frag)             xtensa_frag_init (frag)
 #define TC_FORCE_RELOCATION(fix)       xtensa_force_relocation (fix)
+#define TC_FORCE_RELOCATION_SUB_SAME(fix, seg) \
+  (! SEG_NORMAL (seg) || xtensa_force_relocation (fix))
+#define        TC_VALIDATE_FIX_SUB(fix)        xtensa_validate_fix_sub (fix)
 #define NO_PSEUDO_DOT                  xtensa_check_inside_bundle ()
 #define tc_canonicalize_symbol_name(s) xtensa_section_rename (s)
 #define tc_canonicalize_section_name(s)        xtensa_section_rename (s)
@@ -373,27 +376,27 @@ typedef int (*unit_num_copies_func) (void *, xtensa_funcUnit);
 /* Returns the number of units the opcode uses.  */
 typedef int (*opcode_num_units_func) (void *, xtensa_opcode);
 
-/* Given an opcode and an index into the opcode's funcUnit list, 
+/* Given an opcode and an index into the opcode's funcUnit list,
    returns the unit used for the index.  */
 typedef int (*opcode_funcUnit_use_unit_func) (void *, xtensa_opcode, int);
 
-/* Given an opcode and an index into the opcode's funcUnit list, 
+/* Given an opcode and an index into the opcode's funcUnit list,
    returns the cycle during which the unit is used.  */
 typedef int (*opcode_funcUnit_use_stage_func) (void *, xtensa_opcode, int);
 
-/* The above typedefs parameterize the resource_table so that the 
+/* The above typedefs parameterize the resource_table so that the
    optional scheduler doesn't need its own resource reservation system.
-   
-   For simple resource checking, which is all that happens normally, 
-   the functions will be as follows (with some wrapping to make the 
-   interface more convenient): 
+
+   For simple resource checking, which is all that happens normally,
+   the functions will be as follows (with some wrapping to make the
+   interface more convenient):
 
    unit_num_copies_func = xtensa_funcUnit_num_copies
    opcode_num_units_func = xtensa_opcode_num_funcUnit_uses
    opcode_funcUnit_use_unit_func = xtensa_opcode_funcUnit_use->unit
    opcode_funcUnit_use_stage_func = xtensa_opcode_funcUnit_use->stage
 
-   Of course the optional scheduler has its own reservation table 
+   Of course the optional scheduler has its own reservation table
    and functions.  */
 
 int opcode_funcUnit_use_unit (void *, xtensa_opcode, int);
@@ -409,11 +412,11 @@ typedef struct
   opcode_num_units_func opcode_num_units;
   opcode_funcUnit_use_unit_func opcode_unit_use;
   opcode_funcUnit_use_stage_func opcode_unit_stage;
-  char **units;
+  unsigned char **units;
 } resource_table;
 
-resource_table *new_resource_table 
-  (void *, int, int, unit_num_copies_func, opcode_num_units_func, 
+resource_table *new_resource_table
+  (void *, int, int, unit_num_copies_func, opcode_num_units_func,
    opcode_funcUnit_use_unit_func, opcode_funcUnit_use_stage_func);
 void resize_resource_table (resource_table *, int);
 void clear_resource_table (resource_table *);
This page took 0.024833 seconds and 4 git commands to generate.