static char * m32r_cpu_desc;
/* start-sanitize-m32rx */
-/* Non-zero if -m32rx has been specified, in which case support for the
+/* Non-zero if --m32rx has been specified, in which case support for the
extended M32RX instruction set should be enabled. */
static int enable_m32rx = 0;
+/* Non-zero if --enable-special has been specified, in which case support for
+ the special M32RX instruction set should be enabled. */
+static int enable_special = 0;
+
/* Non-zero if the programmer should be warned when an explicit parallel
instruction might have constraint violations. */
static int warn_explicit_parallel_conflicts = 1;
#define OPTION_NO_WARN (OPTION_MD_BASE + 2)
{"no-warn-explicit-parallel-conflicts", no_argument, NULL, OPTION_NO_WARN},
{"Wnp", no_argument, NULL, OPTION_NO_WARN},
+#define OPTION_SPECIAL (OPTION_MD_BASE + 3)
+ {"enable-special", no_argument, NULL, OPTION_SPECIAL},
/* end-sanitize-m32rx */
#if 0 /* not supported yet */
-#define OPTION_RELAX (OPTION_MD_BASE + 3)
+#define OPTION_RELAX (OPTION_MD_BASE + 4)
{"relax", no_argument, NULL, OPTION_RELAX},
-#define OPTION_CPU_DESC (OPTION_MD_BASE + 4)
+#define OPTION_CPU_DESC (OPTION_MD_BASE + 5)
{"cpu-desc", required_argument, NULL, OPTION_CPU_DESC},
#endif
case OPTION_NO_WARN:
warn_explicit_parallel_conflicts = 0;
break;
+
+ case OPTION_SPECIAL:
+ allow_m32rx (1);
+ enable_special = 1;
+ break;
/* end-sanitize-m32rx */
#if 0 /* not supported yet */
fprintf (stream, _("M32R/X specific command line options:\n"));
fprintf (stream, _("\
--m32rx support the extended m32rx instruction set\n"));
+ fprintf (stream, _("\
+--enable-special support the special m32rx instructions\n"));
fprintf (stream, _("\
-O try to combine instructions in parallel\n"));
return;
}
- if (! enable_m32rx
+ if (! enable_special
+ && CGEN_INSN_ATTR (first.insn, CGEN_INSN_SPECIAL))
+ {
+ /* xgettext:c-format */
+ as_bad (_("unknown instruction '%s'"), str);
+
+ return;
+ }
+ else if (! enable_m32rx
/* FIXME: Need standard macro to perform this test. */
&& CGEN_INSN_ATTR (first.insn, CGEN_INSN_MACH) == (1 << MACH_M32RX))
{
+ /* xgettext:c-format */
as_bad (_("instruction '%s' is for the M32RX only"), str);
+
return;
}
-
+
/* Check to see if this is an allowable parallel insn. */
if (CGEN_INSN_ATTR (first.insn, CGEN_INSN_PIPE) == PIPE_NONE)
{
}
/* Check it. */
- if (! enable_m32rx
+ if (! enable_special
+ && CGEN_INSN_ATTR (second.insn, CGEN_INSN_SPECIAL))
+ {
+ /* xgettext:c-format */
+ as_bad (_("unknown instruction '%s'"), str);
+
+ return;
+ }
+ else if (! enable_m32rx
&& CGEN_INSN_ATTR (second.insn, CGEN_INSN_MACH) == (1 << MACH_M32RX))
{
+ /* xgettext:c-format */
as_bad (_("instruction '%s' is for the M32RX only"), str);
return;
}
if (CGEN_INSN_NUM (first.insn) != M32R_INSN_NOP
&& CGEN_INSN_NUM (second.insn) != M32R_INSN_NOP)
{
+ /* xgettext:c-format */
as_bad (_("'%s': only the NOP instruction can be issued in parallel on the m32r"), str2);
return;
}
if (warn_explicit_parallel_conflicts)
{
if (first_writes_to_seconds_operands (& first, & second, false))
+ /* xgettext:c-format */
as_warn (_("%s: output of 1st instruction is the same as an input to 2nd instruction - is this intentional ?"), str2);
if (first_writes_to_seconds_operands (& second, & first, false))
+ /* xgettext:c-format */
as_warn (_("%s: output of 2nd instruction is the same as an input to 1st instruction - is this intentional ?"), str2);
}
}
/* start-sanitize-m32rx */
- if (! enable_m32rx && CGEN_INSN_ATTR (insn.insn, CGEN_INSN_MACH) == (1 << MACH_M32RX))
+ if (! enable_special
+ && CGEN_INSN_ATTR (insn.insn, CGEN_INSN_SPECIAL))
+ {
+ /* xgettext:c-format */
+ as_bad (_("unknown instruction '%s'"), str);
+
+ return;
+ }
+ else if (! enable_m32rx
+ && CGEN_INSN_ATTR (insn.insn, CGEN_INSN_MACH) == (1 << MACH_M32RX))
{
+ /* xgettext:c-format */
as_bad (_("instruction '%s' is for the M32RX only"), str);
return;
}
basic M32R instruction set, and some additional parameters to some of
the original instructions.
+@item --enable-special
+@cindex @samp{--enable-special} option, M32RX
+@cindex architecture options, M32RX
+@cindex M32R architecture options
+This option is the equivalent of the @emph{--m32rx} option, except that
+it also allows the special M32RX instructions to be assembled as well.
+
@item --warn-explicit-parallel-conflicts
@cindex @samp{--warn-explicit-parallel-conflicts} option, M32RX
Instructs @code{@value{AS}} to produce warning messages when
moves r1 into r3 and then r2 into r1, whereas the later moves r2 into r1
and r3.
+@item --Wp
+@cindex @samp{--Wp} option, M32RX
+This is a shorter synonym for the @emph{--warn-explicit-parallel-conflicts}
+option.
+
@item --no-warn-explicit-parallel-conflicts
@cindex @samp{--no-warn-explicit-parallel-conflicts} option, M32RX
Instructs @code{@value{AS}} not to produce warning messages when
questionable parallel instructions are encountered.
+@item --Wnp
+@cindex @samp{--Wnp} option, M32RX
+This is a shorter synonym for the @emph{--no-warn-explicit-parallel-conflicts}
+option.
+
@end table
@node M32R-Warnings
command line flag has not been specified to allow assembly of such
instructions.
+@item unknown instruction @samp{...}
+This message is produced when the assembler encounters an instruction
+which it doe snot recognise.
+
@item only the NOP instruction can be issued in parallel on the m32r
This message is produced when the assembler encounters a parallel
instruction which does not involve a NOP instruction and the
@samp{jl r0 || mv r14, r1}
@samp{st r2, @@-r1 || mv r1, r3}
@samp{mv r1, r2 || ld r0, @@r1+}
+@samp{cmp r1, r2 || addx r3, r4} (Both write to the condition bit)
@end table
@c end-sanitize-m32rx