aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-xtensa.c
diff options
context:
space:
mode:
authorSterling Augustine <saugustine@google.com>2009-01-07 17:41:09 +0000
committerSterling Augustine <saugustine@google.com>2009-01-07 17:41:09 +0000
commit19fc37235f75095174fe9d679e94b686b9c8ee9f (patch)
treebac02f0e2bded9db179afffc78713f1fcb87e49a /gas/config/tc-xtensa.c
parent60023297c354be3ac7f8a250c7681c1a409fdeec (diff)
downloadgdb-19fc37235f75095174fe9d679e94b686b9c8ee9f.zip
gdb-19fc37235f75095174fe9d679e94b686b9c8ee9f.tar.gz
gdb-19fc37235f75095174fe9d679e94b686b9c8ee9f.tar.bz2
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.
Diffstat (limited to 'gas/config/tc-xtensa.c')
-rw-r--r--gas/config/tc-xtensa.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
index 6646ef7..04e96d3 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
@@ -591,6 +591,7 @@ static xtensa_opcode xtensa_waiti_opcode;
/* 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;
@@ -635,6 +636,10 @@ enum
option_density = OPTION_MD_BASE,
option_no_density,
+ option_flix,
+ option_no_generate_flix,
+ option_no_flix,
+
option_relax,
option_no_relax,
@@ -693,6 +698,10 @@ struct option md_longopts[] =
{ "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 },
@@ -775,6 +784,15 @@ md_parse_option (int c, char *arg)
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);
@@ -941,6 +959,11 @@ Xtensa options:\n\
--[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);
}
@@ -6180,6 +6203,14 @@ finish_vinsn (vliw_insn *vinsn)
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);