Various fixes for the Z80 support.
[deliverable/binutils-gdb.git] / gas / config / tc-rx.h
index 592eb35c0d82c3d1447c34a6f2c1f373dd2f1023..1448c64fdb59477c9d63b4cd16aaa4aa8429b1a1 100644 (file)
@@ -1,6 +1,5 @@
 /* tc-rx.h - header file for Renesas RX
-   Copyright 2008, 2009
-   Free Software Foundation, Inc.
+   Copyright (C) 2008-2020 Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
@@ -32,7 +31,11 @@ extern int target_big_endian;
 /* Instruction bytes are big endian, data bytes can be either.  */
 #define TARGET_BYTES_BIG_ENDIAN 0
 
+#ifndef TE_LINUX
 #define TARGET_FORMAT (target_big_endian ? "elf32-rx-be" : "elf32-rx-le")
+#else
+#define TARGET_FORMAT "elf32-rx-linux"
+#endif
 
 /* We don't need to handle .word strangely.  */
 #define WORKING_DOT_WORD
@@ -51,11 +54,18 @@ extern int target_big_endian;
 #define md_end rx_md_end
 extern void rx_md_end (void);
 
-#define md_relax_frag rx_relax_frag
-extern int rx_relax_frag (segT, fragS *, long);
+/* Note - the definition of MD_RELAX_FRAG here includes a reference to the
+   MAX_ITERATIONS variable which is defined locally in write.c:relax_segment()
+   but which is not normally passed to target specific relaxing code.  This
+   reference is needed however as the number of iterations of the RX relaxing
+   code needs to be constrained by the maximum number of iterations allowed
+   by relax_segment().  See PR 24464 for more details.  */
+#define md_relax_frag(SEG, FRAGP, STRETCH) \
+  rx_relax_frag ((SEG), (FRAGP), (STRETCH), max_iterations)
+extern int rx_relax_frag (segT, fragS *, long, unsigned long);
 
 #define TC_FRAG_TYPE struct rx_bytesT *
-#define TC_FRAG_INIT rx_frag_init
+#define TC_FRAG_INIT(fragp, max_bytes) rx_frag_init (fragp)
 extern void rx_frag_init (fragS *);
 
 /* Call md_pcrel_from_section(), not md_pcrel_from().  */
@@ -69,12 +79,25 @@ extern long md_pcrel_from_section (struct fix *, segT);
   rx_validate_fix_sub (FIX)
 extern int rx_validate_fix_sub (struct fix *);
 
-#define TC_CONS_FIX_NEW(FRAG, WHERE, NBYTES, EXP) \
-  rx_cons_fix_new (FRAG, WHERE, NBYTES, EXP)
-extern void rx_cons_fix_new (fragS *, int, int, expressionS *);
+#define TC_CONS_FIX_NEW(FRAG, WHERE, NBYTES, EXP, RELOC)       \
+  rx_cons_fix_new (FRAG, WHERE, NBYTES, EXP, RELOC)
+extern void rx_cons_fix_new (fragS *, int, int, expressionS *,
+                            bfd_reloc_code_real_type);
 
 #define tc_fix_adjustable(x) 0
 
+#define md_do_align(n, fill, len, max, around)                         \
+  if ((n)                                                              \
+      && !need_pass_2                                                  \
+      && (!(fill)                                                      \
+         || ((char)*(fill) == (char)0x03 && (len) == 1))               \
+      && subseg_text_p (now_seg))                                      \
+    {                                                                  \
+      frag_align_code ((n), (max));                                    \
+      goto around;                                                     \
+    }
+
+#define MAX_MEM_FOR_RS_ALIGN_CODE 8
 #define HANDLE_ALIGN(FRAG) rx_handle_align (FRAG)
 extern void rx_handle_align (fragS *);
 
This page took 0.024958 seconds and 4 git commands to generate.