S/390: Fix 16 bit pc relative relocs.
[deliverable/binutils-gdb.git] / gas / config / tc-cris.h
index 2f969c6a3b64cd57167627d3da4231bf0a4d78fd..ce16e97c521c5b10531c7edaef6a0f8851644d6e 100644 (file)
@@ -1,5 +1,5 @@
 /* tc-cris.h -- Header file for tc-cris.c, the CRIS GAS port.
 /* tc-cris.h -- Header file for tc-cris.c, the CRIS GAS port.
-   Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 2000-2016 Free Software Foundation, Inc.
 
    Contributed by Axis Communications AB, Lund, Sweden.
    Originally written for GAS 1.38.1 by Mikael Asker.
 
    Contributed by Axis Communications AB, Lund, Sweden.
    Originally written for GAS 1.38.1 by Mikael Asker.
@@ -9,7 +9,7 @@
 
    GAS is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
    GAS is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
+   the Free Software Foundation; either version 3, or (at your option)
    any later version.
 
    GAS is distributed in the hope that it will be useful,
    any later version.
 
    GAS is distributed in the hope that it will be useful,
@@ -19,8 +19,8 @@
 
    You should have received a copy of the GNU General Public License
    along with GAS; see the file COPYING.  If not, write to the
 
    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.  */
+   Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 /* See the GAS "internal" document for general documentation on this.
    It is called internals.texi (internals.info when makeinfo:d), but is
 
 /* See the GAS "internal" document for general documentation on this.
    It is called internals.texi (internals.info when makeinfo:d), but is
 #define TC_CRIS
 
 /* Multi-target support is always on.  */
 #define TC_CRIS
 
 /* Multi-target support is always on.  */
-extern const char *cris_target_format PARAMS ((void));
+extern const char *cris_target_format (void);
 #define TARGET_FORMAT cris_target_format ()
 
 #define TARGET_ARCH bfd_arch_cris
 
 #define TARGET_FORMAT cris_target_format ()
 
 #define TARGET_ARCH bfd_arch_cris
 
-extern unsigned int cris_mach PARAMS ((void));
+extern unsigned int cris_mach (void);
 #define TARGET_MACH (cris_mach ())
 
 #define TARGET_BYTES_BIG_ENDIAN 0
 #define TARGET_MACH (cris_mach ())
 
 #define TARGET_BYTES_BIG_ENDIAN 0
@@ -54,8 +54,6 @@ extern const pseudo_typeS md_pseudo_table[];
 extern const char cris_comment_chars[];
 extern const char line_comment_chars[];
 extern const char line_separator_chars[];
 extern const char cris_comment_chars[];
 extern const char line_comment_chars[];
 extern const char line_separator_chars[];
-extern const char EXP_CHARS[];
-extern const char FLT_CHARS[];
 
 /* This should be optional, since it is ignored as an escape (assumed to
    be itself) if it is not recognized.  */
 
 /* This should be optional, since it is ignored as an escape (assumed to
    be itself) if it is not recognized.  */
@@ -67,15 +65,10 @@ extern const char FLT_CHARS[];
 #define md_operand(x)
 
 #define md_number_to_chars number_to_chars_littleendian
 #define md_operand(x)
 
 #define md_number_to_chars number_to_chars_littleendian
-
-/* There's no use having different functions for this; the sizes are the
-   same.  Note that we can't #define md_short_jump_size here.  */
-#define md_create_short_jump md_create_long_jump
-
 extern const struct relax_type md_cris_relax_table[];
 #define TC_GENERIC_RELAX_TABLE md_cris_relax_table
 
 extern const struct relax_type md_cris_relax_table[];
 #define TC_GENERIC_RELAX_TABLE md_cris_relax_table
 
-long cris_relax_frag PARAMS ((segT, fragS *, long));
+long cris_relax_frag (segT, fragS *, long);
 
 /* GAS only handles relaxations for pc-relative data targeting addresses
    in the same segment, so we have to handle the rest on our own.  */
 
 /* GAS only handles relaxations for pc-relative data targeting addresses
    in the same segment, so we have to handle the rest on our own.  */
@@ -86,7 +79,7 @@ long cris_relax_frag PARAMS ((segT, fragS *, long));
   : cris_relax_frag (SEG, FRAGP, STRETCH))
 
 #define TC_FORCE_RELOCATION(FIX) md_cris_force_relocation (FIX)
   : cris_relax_frag (SEG, FRAGP, STRETCH))
 
 #define TC_FORCE_RELOCATION(FIX) md_cris_force_relocation (FIX)
-extern int md_cris_force_relocation PARAMS ((struct fix *));
+extern int md_cris_force_relocation (struct fix *);
 
 #define IS_CRIS_PIC_RELOC(RTYPE)                       \
   ((RTYPE) == BFD_RELOC_CRIS_16_GOT                    \
 
 #define IS_CRIS_PIC_RELOC(RTYPE)                       \
   ((RTYPE) == BFD_RELOC_CRIS_16_GOT                    \
@@ -98,10 +91,9 @@ extern int md_cris_force_relocation PARAMS ((struct fix *));
    || (RTYPE) == BFD_RELOC_CRIS_32_PLT_PCREL)
 
 /* Make sure we don't resolve fixups for which we want to emit dynamic
    || (RTYPE) == BFD_RELOC_CRIS_32_PLT_PCREL)
 
 /* Make sure we don't resolve fixups for which we want to emit dynamic
-   relocations.  FIXME: Set fx_plt instead of using IS_CRIS_PIC_RELOC.  */
+   relocations.  */
 #define TC_FORCE_RELOCATION_LOCAL(FIX)                 \
   (!(FIX)->fx_pcrel                                    \
 #define TC_FORCE_RELOCATION_LOCAL(FIX)                 \
   (!(FIX)->fx_pcrel                                    \
-   || (FIX)->fx_plt                                    \
    || IS_CRIS_PIC_RELOC ((FIX)->fx_r_type)             \
    || TC_FORCE_RELOCATION (FIX))
 
    || IS_CRIS_PIC_RELOC ((FIX)->fx_r_type)             \
    || TC_FORCE_RELOCATION (FIX))
 
@@ -113,6 +105,13 @@ extern int md_cris_force_relocation PARAMS ((struct fix *));
   && (! IS_CRIS_PIC_RELOC ((FIX)->fx_r_type)           \
       || (FIX)->fx_r_type == BFD_RELOC_CRIS_32_GOTREL))
 
   && (! IS_CRIS_PIC_RELOC ((FIX)->fx_r_type)           \
       || (FIX)->fx_r_type == BFD_RELOC_CRIS_32_GOTREL))
 
+/* FIXME: This *should* be a redundant definition, as the
+   TC_FORCE_RELOCATION* definitions already told about the cases where
+   we *don't* want the symbol value calculated.  Here we seem to answer
+   the "are you sure" question.  It certainly has very little to do with
+   whether the symbol value is passed to md_apply_fix.  */
+#define MD_APPLY_SYM_VALUE(FIX) 0
+
 /* When we have fixups against constant expressions, we get a GAS-specific
    section symbol at no extra charge for obscure reasons in
    adjust_reloc_syms.  Since ELF outputs section symbols, it gladly
 /* When we have fixups against constant expressions, we get a GAS-specific
    section symbol at no extra charge for obscure reasons in
    adjust_reloc_syms.  Since ELF outputs section symbols, it gladly
@@ -145,14 +144,13 @@ extern int md_cris_force_relocation PARAMS ((struct fix *));
    it is only for use with WORKING_DOT_WORD and warns about most stuff.
    (still in 2.9.1).  */
 struct broken_word;
    it is only for use with WORKING_DOT_WORD and warns about most stuff.
    (still in 2.9.1).  */
 struct broken_word;
-extern void tc_cris_check_adjusted_broken_word PARAMS ((offsetT,
-                                                       struct
-                                                       broken_word *));
+extern void tc_cris_check_adjusted_broken_word (offsetT,
+                                               struct broken_word *);
 #define TC_CHECK_ADJUSTED_BROKEN_DOT_WORD(new_offset, brokw) \
  tc_cris_check_adjusted_broken_word ((offsetT) (new_offset), brokw)
 
 /* We don't want any implicit alignment, so we do nothing.  */
 #define TC_CHECK_ADJUSTED_BROKEN_DOT_WORD(new_offset, brokw) \
  tc_cris_check_adjusted_broken_word ((offsetT) (new_offset), brokw)
 
 /* We don't want any implicit alignment, so we do nothing.  */
-#define TC_IMPLICIT_LCOMM_ALIGNMENT(SIZE, P2VAR)
+#define TC_IMPLICIT_LCOMM_ALIGNMENT(SIZE, P2VAR) do { } while (0)
 
 /* CRIS instructions, with operands and prefixes included, are a multiple
    of two bytes long.  */
 
 /* CRIS instructions, with operands and prefixes included, are a multiple
    of two bytes long.  */
This page took 0.02513 seconds and 4 git commands to generate.