1 /* tc-rl78.h - header file for Renesas RL78
3 Free Software Foundation, Inc.
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
24 extern int target_little_endian;
26 #define LISTING_HEADER "RL78 GAS LE"
27 #define LISTING_LHS_WIDTH 8
28 #define LISTING_WORD_SIZE 1
30 #define TARGET_ARCH bfd_arch_rl78
32 #define TARGET_BYTES_BIG_ENDIAN 0
34 #define TARGET_FORMAT "elf32-rl78"
36 /* We don't need to handle .word strangely. */
37 #define WORKING_DOT_WORD
39 /* Permit temporary numeric labels. */
40 #define LOCAL_LABELS_FB 1
41 /* But make sure that the binutils treat them as locals. */
42 #define LOCAL_LABEL_PREFIX '.'
44 /* Allow classic-style constants. */
45 #define NUMBERS_WITH_SUFFIX 1
47 /* .-foo gets turned into PC relative relocs. */
50 #define md_end rl78_md_end
51 extern void rl78_md_end (void);
53 #define TC_FRAG_TYPE struct rl78_bytesT *
54 #define TC_FRAG_INIT rl78_frag_init
55 extern void rl78_frag_init (fragS *);
57 /* Call md_pcrel_from_section(), not md_pcrel_from(). */
58 #define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section (FIXP, SEC)
59 extern long md_pcrel_from_section (struct fix *, segT);
61 /* RL78 doesn't have a 32 bit PCREL relocations. */
62 #define TC_FORCE_RELOCATION_SUB_LOCAL(FIX, SEG) 1
64 #define TC_VALIDATE_FIX_SUB(FIX, SEG) \
65 rl78_validate_fix_sub (FIX)
66 extern int rl78_validate_fix_sub (struct fix *);
68 #define TC_CONS_FIX_NEW(FRAG, WHERE, NBYTES, EXP) \
69 rl78_cons_fix_new (FRAG, WHERE, NBYTES, EXP)
70 extern void rl78_cons_fix_new (fragS *, int, int, expressionS *);
72 #define tc_fix_adjustable(x) 0
74 #define RELOC_EXPANSION_POSSIBLE 1
75 #define MAX_RELOC_EXPANSION 8