2002-10-13 H.J. Lu * gas/config/tc-mips.c (mips_relax_branch): Initialized to -1. (mips_after_parse_args): Set to 0 for EMBEDDED_PIC, otherwise 2. (md_convert_frag): Warn branch relaxation if it is turned on from command line. --- gas/config/tc-mips.c.relax Sat Oct 12 08:49:24 2002 +++ gas/config/tc-mips.c Sun Oct 13 14:11:27 2002 @@ -576,7 +576,12 @@ static int mips_fix_4122_bugs; fail to compute the offset before expanding the macro to the most efficient expansion. */ -static int mips_relax_branch; +/* + 0: relaxation is off. + 1: relaxation is turned on from command line. + 2: relaxation is on by default. + */ +static int mips_relax_branch = -1; /* Since the MIPS does not have multiple forms of PC relative instructions, we do not have to do relaxing as is done on other @@ -10815,6 +10820,9 @@ mips_after_parse_args () #endif /* OBJ_MAYBE_ECOFF */ mips_flag_mdebug = 0; } + + if (mips_relax_branch < 0) + mips_relax_branch = (mips_pic == EMBEDDED_PIC) ? 0 : 2; } void @@ -13380,8 +13388,9 @@ md_convert_frag (abfd, asec, fragp) { int i; - as_warn_where (fragp->fr_file, fragp->fr_line, - _("relaxed out-of-range branch into a jump")); + if (mips_relax_branch == 1) + as_warn_where (fragp->fr_file, fragp->fr_line, + _("relaxed out-of-range branch into a jump")); if (RELAX_BRANCH_UNCOND (fragp->fr_subtype)) goto uncond;