/* tc-nds32.h -- Header file for tc-nds32.c.
- Copyright (C) 2012-2016 Free Software Foundation, Inc.
+ Copyright (C) 2012-2020 Free Software Foundation, Inc.
Contributed by Andes Technology Corporation.
This file is part of GAS.
#include "bfd_stdint.h"
+/* Enum mapping symbol. */
+enum mstate
+{
+ MAP_UNDEFINED = 0, /* Must be zero, for seginfo in new sections. */
+ MAP_DATA,
+ MAP_CODE,
+};
+#define TC_SEGMENT_INFO_TYPE struct nds32_segment_info_type
+
+/* For mapping symbol. */
+struct nds32_segment_info_type
+{
+ enum mstate mapstate;
+};
+
#define LISTING_HEADER \
(target_big_endian ? "NDS32 GAS" : "NDS32 GAS Little Endian")
/* as.c. */
/* Extend GAS command line option handling capability. */
-extern int nds32_parse_option (int, char *);
+extern int nds32_parse_option (int, const char *);
extern void nds32_after_parse_args (void);
/* The endianness of the target format may change based on command
line arguments. */
/* For DIFF relocations. The default behavior is inconsistent with the
asm internal document. */
#define TC_FORCE_RELOCATION_SUB_SAME(FIX, SEC) \
- (! SEG_NORMAL (SEC) || TC_FORCE_RELOCATION (FIX))
+ (GENERIC_FORCE_RELOCATION_SUB_SAME (FIX, SEC) \
+ || TC_FORCE_RELOCATION (FIX))
#define TC_FORCE_RELOCATION(fix) nds32_force_relocation (fix)
#define TC_VALIDATE_FIX_SUB(FIX,SEG) nds32_validate_fix_sub (FIX,SEG)
#define SET_SECTION_RELOCS(sec, relocs, n) nds32_set_section_relocs (sec, relocs, n)
relax_substateT flag;
struct nds32_opcode *opcode;
uint32_t insn;
- /* To Save previos label fixup if existence. */
+ /* To Save previous label fixup if existence. */
struct fix *fixup;
};
extern void nds32_frag_init (fragS *);
#define TC_FRAG_TYPE struct nds32_frag_type
-#define TC_FRAG_INIT(fragP) nds32_frag_init (fragP)
+#define TC_FRAG_INIT(fragP, max_bytes) nds32_frag_init (fragP)
/* CFI directive. */
extern void nds32_elf_frame_initial_instructions (void);
NDS32_FIX = (1 << 7),
NDS32_ADDEND = (1 << 8),
NDS32_SYM = (1 << 9),
- NDS32_PCREL = (1 << 10)
+ NDS32_PCREL = (1 << 10),
+ NDS32_PTR_PATTERN = (1 << 11),
+ NDS32_PTR_MULTIPLE = (1 << 12),
+ NDS32_GROUP = (1 << 13),
+ NDS32_SYM_DESC_MEM = (1 << 14)
};
typedef struct nds32_relax_fixup_info
/* The max relaxation pattern is 20-bytes including the nop. */
#define NDS32_MAXCHAR 20
-/* In current, the max entend number of instruction for one pseudo instruction
- is 4, but its number of relocation may be 12. */
-#define MAX_RELAX_NUM 4
+/* In current, the max extended number of instruction for one pseudo instruction
+ is 6, but its number of relocation may be 12. */
+#define MAX_RELAX_NUM 6
#define MAX_RELAX_FIX 12
typedef struct nds32_relax_info
enum nds32_relax_hint_type
{
NDS32_RELAX_HINT_NONE = 0,
- NDS32_RELAX_HINT_LA,
- NDS32_RELAX_HINT_LS
+ NDS32_RELAX_HINT_LA_FLSI,
+ NDS32_RELAX_HINT_LALS,
+ NDS32_RELAX_HINT_LA_PLT,
+ NDS32_RELAX_HINT_LA_GOT,
+ NDS32_RELAX_HINT_LA_GOTOFF,
+ NDS32_RELAX_HINT_TLS_START = 0x100,
+ NDS32_RELAX_HINT_TLS_LE_LS,
+ NDS32_RELAX_HINT_TLS_IE_LS,
+ NDS32_RELAX_HINT_TLS_IE_LA,
+ NDS32_RELAX_HINT_TLS_IEGP_LA,
+ NDS32_RELAX_HINT_TLS_DESC_LS,
};
struct nds32_relax_hint_table