1 /* tc-csky.h -- Header file for tc-csky.c
2 Copyright (C) 1989-2019 Free Software Foundation, Inc.
3 Contributed by C-SKY Microsystems and Mentor Graphics.
5 This file is part of GAS, the GNU Assembler.
7 GAS is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
12 GAS is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GAS; see the file COPYING. If not, write to the Free
19 Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
25 #define WORKING_DOT_WORD
27 #define TARGET_ARCH bfd_arch_csky
29 #define LISTING_HEADER "CSKY GAS"
32 #define TARGET_FORMAT elf32_csky_target_format ()
35 #define TARGET_BYTES_BIG_ENDIAN 0
37 #define MD_PCREL_FROM_SECTION(F,S) md_pcrel_from_section (F, S)
39 #define TC_GENERIC_RELAX_TABLE csky_relax_table
41 #define md_end md_csky_end
42 #define md_relax_frag csky_relax_frag
43 #define DOUBLESLASH_LINE_COMMENTS
44 #define LOCAL_LABELS_FB 1
45 #define PAD_LITERAL_LENGTH 6
46 #define PAD_FILL_CONTENT 0x1c00
49 #define EXTERN_FORCE_RELOC 1
50 #define TC_CONS_FIX_NEW csky_cons_fix_new
51 #define TC_FORCE_RELOCATION(fix) csky_force_relocation (fix)
52 #define tc_fix_adjustable(FIX) csky_fix_adjustable (FIX)
53 #define TC_SEGMENT_INFO_TYPE csky_segment_info_type
56 #define DWARF2_LINE_MIN_INSN_LENGTH 2
57 #define DWARF2_ADDR_SIZE(bfd) 4
58 #define DWARF2_FDE_RELOC_SIZE 4
59 #define TARGET_USE_CFIPOP 1
60 #define tc_cfi_frame_initial_instructions csky_cfi_frame_initial_instructions
61 #define tc_regname_to_dw2regnum tc_csky_regname_to_dw2regnum
62 #define DWARF2_DEFAULT_RETURN_COLUMN 15
63 #define DWARF2_CIE_DATA_ALIGNMENT (-4)
65 /* .-foo gets turned into PC relative relocs. */
66 #define DIFF_EXPR_OK 1
77 map_state current_state
;
78 } csky_segment_info_type
;
86 #define TC_FIX_TYPE struct tls_addend
87 #define TC_INIT_FIX_DATA(FIX) \
88 { (FIX)->tc_fix_data.frag = NULL; (FIX)->tc_fix_data.offset = 0; }
91 extern const relax_typeS csky_relax_table
[];
93 extern void md_csky_end (void);
94 extern long md_pcrel_from_section (fixS
*, segT
);
95 extern void csky_cons_fix_new (fragS
*,
99 bfd_reloc_code_real_type
);
100 extern int csky_force_relocation (fixS
*);
101 extern bfd_boolean
csky_fix_adjustable (fixS
*);
102 extern void csky_cfi_frame_initial_instructions (void);
103 extern int tc_csky_regname_to_dw2regnum (char *);
104 extern long csky_relax_frag (segT
, fragS
*, long);
107 const char * elf32_csky_target_format (void);