From 88fc725d2fa9234fef229e80472740610172421b Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Sat, 18 Oct 2003 15:53:40 +0000 Subject: 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. --- gas/doc/c-mmix.texi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'gas/doc') diff --git a/gas/doc/c-mmix.texi b/gas/doc/c-mmix.texi index d1b3016..a5205b6 100644 --- a/gas/doc/c-mmix.texi +++ b/gas/doc/c-mmix.texi @@ -82,6 +82,21 @@ that at link stage can be contracted. (Though linker relaxation isn't yet implemented in @code{@value{LD}}.) The option @samp{-x} also imples @samp{--linker-allocated-gregs}. +@cindex @samp{--no-pushj-stubs} command line option, MMIX +@cindex @samp{--no-stubs} command line option, MMIX +If instruction expansion is enabled, @code{@value{AS}} can expand a +@samp{PUSHJ} instruction into a series of instructions. The shortest +expansion is to not expand it, but just mark the call as redirectable to a +stub, which @code{@value{LD}} creates at link-time, but only if the +original @samp{PUSHJ} instruction is found not to reach the target. The +stub consists of the necessary instructions to form a jump to the target. +This happens if @code{@value{AS}} can assert that the @samp{PUSHJ} +instruction can reach such a stub. The option @samp{--no-pushj-stubs} +disables this shorter expansion, and the longer series of instructions is +then created at assembly-time. The option @samp{--no-stubs} is a synonym, +intended for compatibility with future releases, where generation of stubs +for other instructions may be implemented. + @cindex @samp{--linker-allocated-gregs} command line option, MMIX Usually a two-operand-expression (@pxref{GREG-base}) without a matching @samp{GREG} directive is treated as an error by @code{@value{AS}}. When -- cgit v1.1