+2009-01-07 Sterling Augustine <sterling@tensilica.com>
+
+ * config/tc-xtensa.c (produce_flix): New.
+ (option_flix, optoin_no_generate_flix, option_no_flix) Define.
+ (md_longopts): Add support for them.
+ (md_parse_option): Likewise.
+ (md_show_usage): Add help message.
+ (finish_vinsn): Don't allow multi-slot flix when produce_flix
+ option is set to FLIX_NONE.
+ * config/xtensa-relax.c (transition_applies): Only relax to
+ flix branches when produce_flix equals FLIX_ALL.
+ * config/xtensa-relax.h (flix_level, FLIX_ALL, FLIX_NO_GENERATE
+ FLIX_NONE): New.
+ (produce_flix): Declare.
+
2009-01-06 Chao-ying Fu <fu@mips.com>
* config/tc-mips.c (mips_ip): Set lastregno to 0xffffffff.
/* Command-line Options. */
bfd_boolean use_literal_section = TRUE;
+enum flix_level produce_flix = FLIX_ALL;
static bfd_boolean align_targets = TRUE;
static bfd_boolean warn_unaligned_branch_targets = FALSE;
static bfd_boolean has_a0_b_retw = FALSE;
option_density = OPTION_MD_BASE,
option_no_density,
+ option_flix,
+ option_no_generate_flix,
+ option_no_flix,
+
option_relax,
option_no_relax,
{ "density", no_argument, NULL, option_density },
{ "no-density", no_argument, NULL, option_no_density },
+ { "flix", no_argument, NULL, option_flix },
+ { "no-generate-flix", no_argument, NULL, option_no_generate_flix },
+ { "no-allow-flix", no_argument, NULL, option_no_flix },
+
/* Both "relax" and "generics" are deprecated and treated as equivalent
to the "transform" option. */
{ "relax", no_argument, NULL, option_relax },
case option_no_link_relax:
linkrelax = 0;
return 1;
+ case option_flix:
+ produce_flix = FLIX_ALL;
+ return 1;
+ case option_no_generate_flix:
+ produce_flix = FLIX_NO_GENERATE;
+ return 1;
+ case option_no_flix:
+ produce_flix = FLIX_NONE;
+ return 1;
case option_generics:
as_warn (_("--generics is deprecated; use --transform instead"));
return md_parse_option (option_transform, arg);
--[no-]target-align [Do not] try to align branch targets\n\
--[no-]longcalls [Do not] emit 32-bit call sequences\n\
--[no-]transform [Do not] transform instructions\n\
+ --flix both allow hand-written and generate flix bundles\n\
+ --no-generate-flix allow hand-written but do not generate\n\
+ flix bundles\n\
+ --no-allow-flix neither allow hand-written nor generate\n\
+ flix bundles\n\
--rename-section old=new Rename section 'old' to 'new'\n", stream);
}
if (vinsn->format == XTENSA_UNDEFINED)
vinsn->format = xg_find_narrowest_format (vinsn);
+ if (xtensa_format_num_slots (xtensa_default_isa, vinsn->format) > 1
+ && produce_flix == FLIX_NONE)
+ {
+ as_bad (_("The option \"--no-allow-flix\" prohibits multi-slot flix."));
+ xg_clear_vinsn (vinsn);
+ return;
+ }
+
if (vinsn->format == XTENSA_UNDEFINED)
{
as_where (&file_name, &line);
else if (!strcmp (option_name, "Loops"))
option_available = (XCHAL_HAVE_LOOPS == 1);
else if (!strcmp (option_name, "WideBranches"))
- option_available = (XCHAL_HAVE_WIDE_BRANCHES == 1);
+ option_available
+ = (XCHAL_HAVE_WIDE_BRANCHES == 1 && produce_flix == FLIX_ALL);
else if (!strcmp (option_name, "PredictedBranches"))
- option_available = (XCHAL_HAVE_PREDICTED_BRANCHES == 1);
+ option_available
+ = (XCHAL_HAVE_PREDICTED_BRANCHES == 1
+ && produce_flix == FLIX_ALL);
else if (!strcmp (option_name, "Booleans"))
option_available = (XCHAL_HAVE_BOOLEANS == 1);
else