diff options
author | Hans-Peter Nilsson <hp@axis.com> | 2003-10-18 15:53:40 +0000 |
---|---|---|
committer | Hans-Peter Nilsson <hp@axis.com> | 2003-10-18 15:53:40 +0000 |
commit | 88fc725d2fa9234fef229e80472740610172421b (patch) | |
tree | 0270b842577e8d62dba87d7a61af5b912ae9c41b /gas/config/tc-mmix.h | |
parent | 06335781f67d53f9512551e31195e40d0b584f8f (diff) | |
download | gdb-88fc725d2fa9234fef229e80472740610172421b.zip gdb-88fc725d2fa9234fef229e80472740610172421b.tar.gz gdb-88fc725d2fa9234fef229e80472740610172421b.tar.bz2 |
Generate BFD_RELOC_MMIX_PUSHJ_STUBBABLE for PUSHJ when possible.
* doc/c-mmix.texi (MMIX-Opts): Document --no-pushj-stubs and
--no-stubs.
* config/tc-mmix.c: Include limits.h. Expand on mmix_relax_table
comment.
(expand_op, mmix_next_semicolon_is_eoln): Fix head comment.
(pushj_stubs): New variable.
(OPTION_NOPUSHJSTUBS, STATE_PUSHJSTUB, PUSHJSTUB_MIN)
(PUSHJSTUB_MAX): New macros.
(md_longopts): New options "--no-pushj-stubs" and synonym
"--no-stubs".
(mmix_relax_table): Handle new entry for STATE_PUSHJSTUB.
(md_parse_option): Handle OPTION_NOPUSHJSTUBS.
(md_estimate_size_before_relax): Modify STATE_PUSHJ state for
PUSHJ stub relaxation.
(md_convert_frag): Handle STATE_PUSHJSTUB.
(md_apply_fix3): Handle BFD_RELOC_MMIX_PUSHJ_STUBBABLE.
(tc_gen_reloc): Ditto.
(mmix_md_relax_frag): Handle PUSHJ stub relaxation.
* config/tc-mmix.h (TC_SEGMENT_INFO_TYPE): Define.
(struct mmix_segment_info_type): New.
Diffstat (limited to 'gas/config/tc-mmix.h')
-rw-r--r-- | gas/config/tc-mmix.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/gas/config/tc-mmix.h b/gas/config/tc-mmix.h index 30d2c95..c6d222f 100644 --- a/gas/config/tc-mmix.h +++ b/gas/config/tc-mmix.h @@ -1,5 +1,5 @@ /* tc-mmix.h -- Header file for tc-mmix.c. - Copyright (C) 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. Written by Hans-Peter Nilsson (hp@bitrange.com). This file is part of GAS, the GNU Assembler. @@ -123,7 +123,7 @@ extern int mmix_assemble_return_nonzero PARAMS ((char *)); extern const struct relax_type mmix_relax_table[]; #define TC_GENERIC_RELAX_TABLE mmix_relax_table -/* We use the relax table for everything except the GREG frags. */ +/* We use the relax table for everything except the GREG frags and PUSHJ. */ extern long mmix_md_relax_frag PARAMS ((segT, fragS *, long)); #define md_relax_frag mmix_md_relax_frag @@ -199,6 +199,17 @@ extern void mmix_frob_file PARAMS ((void)); struct mmix_symbol_gregs; #define TC_SYMFIELD_TYPE struct mmix_symbol_gregs * +/* Used by relaxation, counting maximum needed PUSHJ stubs for a section. */ +struct mmix_segment_info_type + { + /* We only need to keep track of the last stubbable frag because + there's no less hackish way to keep track of different relaxation + rounds. */ + fragS *last_stubfrag; + bfd_size_type nstubs; + }; +#define TC_SEGMENT_INFO_TYPE struct mmix_segment_info_type + extern void mmix_md_elf_section_change_hook PARAMS ((void)); #define md_elf_section_change_hook mmix_md_elf_section_change_hook |