Update year range in copyright notice of binutils files
[deliverable/binutils-gdb.git] / gas / config / tc-sparc.h
index 5671c1402ca628e7711ccdadff209b537bc3e0a8..7ff7613517ea8dd6ad7c378420c5c5ea1baa1796 100644 (file)
@@ -1,7 +1,5 @@
 /* tc-sparc.h - Macros and type defines for the sparc.
-   Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2010
-   Free Software Foundation, Inc.
+   Copyright (C) 1989-2018 Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
@@ -79,6 +77,8 @@ extern void sparc_handle_align (struct frag *);
 
 #define MAX_MEM_FOR_RS_ALIGN_CODE  (3 + 4 + 4)
 
+#define DIFF_EXPR_OK    /* foo-. gets turned into PC relative relocs */
+
 /* I know that "call 0" fails in sparc-coff if this doesn't return 1.  I
    don't know about other relocation types, or other formats, yet.  */
 #ifdef OBJ_COFF
@@ -96,10 +96,9 @@ extern void sparc_handle_align (struct frag *);
    the .o file.  */
 
 #define TC_FORCE_RELOCATION_LOCAL(FIX)         \
-  (!(FIX)->fx_pcrel                            \
+  (GENERIC_FORCE_RELOCATION_LOCAL (FIX)                \
    || (sparc_pic_code                          \
-       && S_IS_EXTERNAL ((FIX)->fx_addsy))     \
-   || TC_FORCE_RELOCATION (FIX))
+       && S_IS_EXTERNAL ((FIX)->fx_addsy)))
 #endif
 
 #ifdef OBJ_ELF
@@ -131,6 +130,15 @@ extern void sparc_handle_align (struct frag *);
 /* Finish up the entire symtab.  */
 #define tc_adjust_symtab() sparc_adjust_symtab ()
 extern void sparc_adjust_symtab (void);
+
+/* Don't allow the generic code to convert fixups involving the
+   subtraction of a label in the current section to pc-relative if we
+   don't have the necessary pc-relative relocation.  */
+#define TC_FORCE_RELOCATION_SUB_LOCAL(FIX, SEG)                \
+  (!((FIX)->fx_r_type == BFD_RELOC_64                  \
+     || (FIX)->fx_r_type == BFD_RELOC_32               \
+     || (FIX)->fx_r_type == BFD_RELOC_16               \
+     || (FIX)->fx_r_type == BFD_RELOC_8))
 #endif
 
 #ifdef OBJ_AOUT
@@ -157,14 +165,17 @@ extern void sparc_md_end (void);
 
 #endif
 
+#define TC_PARSE_CONS_RETURN_TYPE const char *
+#define TC_PARSE_CONS_RETURN_NONE NULL
+
 #ifdef OBJ_ELF
 #define TC_PARSE_CONS_EXPRESSION(EXP, NBYTES) sparc_cons (EXP, NBYTES)
-extern void sparc_cons (expressionS *, int);
+extern const char *sparc_cons (expressionS *, int);
 #endif
 
 #define TC_CONS_FIX_NEW cons_fix_new_sparc
 extern void cons_fix_new_sparc
-  (struct frag *, int, unsigned int, struct expressionS *);
+(struct frag *, int, unsigned int, struct expressionS *, const char *);
 
 #define TC_FIX_TYPE    valueT
 
@@ -200,4 +211,10 @@ extern int sparc_cie_data_alignment;
 #define DWARF2_DEFAULT_RETURN_COLUMN    15
 #define DWARF2_CIE_DATA_ALIGNMENT       sparc_cie_data_alignment
 
+/* cons_fix_new_sparc will chooose BFD_RELOC_SPARC_UA32 for the difference
+   expressions, but there is no corresponding PC-relative relocation; as this
+   is for debugging info though, alignment does not matter, so by disabling
+   this, BFD_RELOC_32_PCREL will be emitted directly instead.  */
+#define CFI_DIFF_EXPR_OK 0
+
 /* end of tc-sparc.h */
This page took 0.026822 seconds and 4 git commands to generate.