Add support for the C_SKY series of processors.
[deliverable/binutils-gdb.git] / gas / config / tc-csky.h
CommitLineData
b8891f8d
AJ
1/* tc-csky.h -- Header file for tc-csky.c
2 Copyright (C) 1989-2018 Free Software Foundation, Inc.
3 Contributed by C-SKY Microsystems and Mentor Graphics.
4
5 This file is part of GAS, the GNU Assembler.
6
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)
10 any later version.
11
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.
16
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
20 02110-1301, USA. */
21
22#ifndef TC_CSKY
23#define TC_CSKY 1
24
25#define WORKING_DOT_WORD
26
27#define TARGET_ARCH bfd_arch_csky
28
29#define LISTING_HEADER "CSKY GAS"
30
31#ifdef OBJ_ELF
32#define TARGET_FORMAT elf32_csky_target_format ()
33#endif
34
35#define TARGET_BYTES_BIG_ENDIAN 0
36
37#define MD_PCREL_FROM_SECTION(F,S) md_pcrel_from_section (F, S)
38
39#define TC_GENERIC_RELAX_TABLE csky_relax_table
40
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
47
48/* Reloc API. */
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
54
55/* Dwarf API. */
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)
64
65typedef enum
66{
67 MAP_UNDEFINED = 0,
68 MAP_DATA,
69 MAP_TEXT,
70} map_state;
71
72typedef struct
73{
74 map_state current_state;
75} csky_segment_info_type;
76
77struct tls_addend
78{
79 fragS *frag;
80 offsetT offset;
81};
82
83#define TC_FIX_TYPE struct tls_addend
84#define TC_INIT_FIX_DATA(FIX) \
85 { (FIX)->tc_fix_data.frag = NULL; (FIX)->tc_fix_data.offset = 0; }
86
87#include "write.h"
88extern const relax_typeS csky_relax_table [];
89
90extern void md_csky_end (void);
91extern long md_pcrel_from_section (fixS *, segT);
92extern void csky_cons_fix_new (fragS *,
93 unsigned int off,
94 unsigned int len,
95 expressionS *,
96 bfd_reloc_code_real_type);
97extern int csky_force_relocation (fixS *);
98extern bfd_boolean csky_fix_adjustable (fixS *);
99extern void csky_cfi_frame_initial_instructions (void);
100extern int tc_csky_regname_to_dw2regnum (char *);
101extern long csky_relax_frag (segT, fragS *, long);
102
103#ifdef OBJ_ELF
104const char * elf32_csky_target_format (void);
105#endif
106
107#endif
This page took 0.026321 seconds and 4 git commands to generate.