mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-12-04 18:36:32 +00:00
9cea966c22
* elf32-rl78.c (rl78_elf_howto_table): Add R_RL78_RH_RELAX. (rl78_reloc_map): Add BFD_RELOC_RL78_RELAX. (rl78_elf_relocate_section): Add R_RL78_RH_RELAX, R_RL78_RH_SFR, and R_RL78_RH_SADDR. (rl78_elf_finish_dynamic_sections): Only validate PLT section if we didn't relax anything, as relaxing might remove a PLT reference after we've set up the table. (elf32_rl78_relax_delete_bytes): New. (reloc_bubblesort): New. (rl78_offset_for_reloc): New. (relax_addr16): New. (rl78_elf_relax_section): Add support for relaxing long instructions into short ones. [gas] * config/rl78-defs.h (rl78_linkrelax_addr16): Add. (rl78_linkrelax_dsp, rl78_linkrelax_imm): Remove. * config/rl78-parse.y: Tag all addr16 and branch patterns with relaxation markers. * config/tc-rl78.c (rl78_linkrelax_addr16): New. (rl78_linkrelax_branch): New. (OPTION_RELAX): New. (md_longopts): Add relax option. (md_parse_option): Add OPTION_RELAX. (rl78_frag_init): Support relaxation. (rl78_handle_align): New. (md_assemble): Support relaxation. (md_apply_fix): Likewise. (md_convert_frag): Likewise. * config/tc-rl78.h (MAX_MEM_FOR_RS_ALIGN_CODE): New. (HANDLE_ALIGN): New. (rl78_handle_align): Declare. * config/rl78-parse.y (rl78_bit_insn): New. Set it for all bit insn patterns. (find_bit_index): New. Strip .BIT suffix off relevent expressions for bit insns. (rl78_lex): Exclude bit suffixes from expression parsing. [include/elf] * rl78.h (R_RL78_RH_RELAX, R_RL78_RH_SFR, R_RL78_RH_SADDR): New. (RL78_RELAXA_BRA, RL78_RELAXA_ADDR16: New.
51 lines
1.7 KiB
C
51 lines
1.7 KiB
C
/* rl78-defs.h Renesas RL78 internal definitions
|
|
Copyright 2008, 2009
|
|
Free Software Foundation, Inc.
|
|
|
|
This file is part of GAS, the GNU Assembler.
|
|
|
|
GAS is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 3, or (at your option)
|
|
any later version.
|
|
|
|
GAS is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with GAS; see the file COPYING. If not, write to the Free
|
|
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
|
|
02110-1301, USA. */
|
|
|
|
#ifndef RL78_DEFS_H
|
|
#define RL78_DEFS_H
|
|
|
|
/* Third operand to rl78_op. */
|
|
#define RL78REL_DATA 0
|
|
#define RL78REL_PCREL 1
|
|
|
|
extern int rl78_error (const char *);
|
|
extern void rl78_lex_init (char *, char *);
|
|
extern void rl78_prefix (int);
|
|
extern int rl78_has_prefix (void);
|
|
extern void rl78_base1 (int);
|
|
extern void rl78_base2 (int, int);
|
|
extern void rl78_base3 (int, int, int);
|
|
extern void rl78_base4 (int, int, int, int);
|
|
extern void rl78_field (int, int, int);
|
|
extern void rl78_op (expressionS, int, int);
|
|
extern void rl78_disp3 (expressionS, int);
|
|
extern void rl78_field5s (expressionS);
|
|
extern void rl78_field5s2 (expressionS);
|
|
extern void rl78_relax (int, int);
|
|
extern void rl78_linkrelax_addr16 (void);
|
|
extern void rl78_linkrelax_branch (void);
|
|
extern int rl78_parse (void);
|
|
extern int rl78_wrap (void);
|
|
|
|
extern char * rl78_lex_start;
|
|
extern char * rl78_lex_end;
|
|
#endif
|