mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-30 00:52:16 +08:00
Add --enable-special command line switch.
This commit is contained in:
@ -1,3 +1,11 @@
|
|||||||
|
start-sanitize-m32rx
|
||||||
|
Tue May 12 13:34:12 1998 Nick Clifton <nickc@cygnus.com>
|
||||||
|
|
||||||
|
* config/tc-m32r.c: Add command line switch to support special
|
||||||
|
M32Rx instructions.
|
||||||
|
* doc/c-m32r.texi: Document new command line switch.
|
||||||
|
|
||||||
|
end-sanitize-m32rx
|
||||||
Tue May 12 12:03:44 1998 Richard Henderson <rth@cygnus.com>
|
Tue May 12 12:03:44 1998 Richard Henderson <rth@cygnus.com>
|
||||||
|
|
||||||
* config/tc-d30v.c (cur_mul32_p, prev_mul32_p): Make static.
|
* config/tc-d30v.c (cur_mul32_p, prev_mul32_p): Make static.
|
||||||
|
@ -75,10 +75,14 @@ static int m32r_relax;
|
|||||||
static char * m32r_cpu_desc;
|
static char * m32r_cpu_desc;
|
||||||
|
|
||||||
/* start-sanitize-m32rx */
|
/* 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. */
|
extended M32RX instruction set should be enabled. */
|
||||||
static int enable_m32rx = 0;
|
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
|
/* Non-zero if the programmer should be warned when an explicit parallel
|
||||||
instruction might have constraint violations. */
|
instruction might have constraint violations. */
|
||||||
static int warn_explicit_parallel_conflicts = 1;
|
static int warn_explicit_parallel_conflicts = 1;
|
||||||
@ -153,12 +157,14 @@ struct option md_longopts[] =
|
|||||||
#define OPTION_NO_WARN (OPTION_MD_BASE + 2)
|
#define OPTION_NO_WARN (OPTION_MD_BASE + 2)
|
||||||
{"no-warn-explicit-parallel-conflicts", no_argument, NULL, OPTION_NO_WARN},
|
{"no-warn-explicit-parallel-conflicts", no_argument, NULL, OPTION_NO_WARN},
|
||||||
{"Wnp", 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 */
|
/* end-sanitize-m32rx */
|
||||||
|
|
||||||
#if 0 /* not supported yet */
|
#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},
|
{"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},
|
{"cpu-desc", required_argument, NULL, OPTION_CPU_DESC},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -189,6 +195,11 @@ md_parse_option (c, arg)
|
|||||||
case OPTION_NO_WARN:
|
case OPTION_NO_WARN:
|
||||||
warn_explicit_parallel_conflicts = 0;
|
warn_explicit_parallel_conflicts = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case OPTION_SPECIAL:
|
||||||
|
allow_m32rx (1);
|
||||||
|
enable_special = 1;
|
||||||
|
break;
|
||||||
/* end-sanitize-m32rx */
|
/* end-sanitize-m32rx */
|
||||||
|
|
||||||
#if 0 /* not supported yet */
|
#if 0 /* not supported yet */
|
||||||
@ -213,6 +224,8 @@ md_show_usage (stream)
|
|||||||
fprintf (stream, _("M32R/X specific command line options:\n"));
|
fprintf (stream, _("M32R/X specific command line options:\n"));
|
||||||
fprintf (stream, _("\
|
fprintf (stream, _("\
|
||||||
--m32rx support the extended m32rx instruction set\n"));
|
--m32rx support the extended m32rx instruction set\n"));
|
||||||
|
fprintf (stream, _("\
|
||||||
|
--enable-special support the special m32rx instructions\n"));
|
||||||
|
|
||||||
fprintf (stream, _("\
|
fprintf (stream, _("\
|
||||||
-O try to combine instructions in parallel\n"));
|
-O try to combine instructions in parallel\n"));
|
||||||
@ -701,14 +714,24 @@ assemble_parallel_insn (str, str2)
|
|||||||
return;
|
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. */
|
/* FIXME: Need standard macro to perform this test. */
|
||||||
&& CGEN_INSN_ATTR (first.insn, CGEN_INSN_MACH) == (1 << MACH_M32RX))
|
&& CGEN_INSN_ATTR (first.insn, CGEN_INSN_MACH) == (1 << MACH_M32RX))
|
||||||
{
|
{
|
||||||
|
/* xgettext:c-format */
|
||||||
as_bad (_("instruction '%s' is for the M32RX only"), str);
|
as_bad (_("instruction '%s' is for the M32RX only"), str);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check to see if this is an allowable parallel insn. */
|
/* Check to see if this is an allowable parallel insn. */
|
||||||
if (CGEN_INSN_ATTR (first.insn, CGEN_INSN_PIPE) == PIPE_NONE)
|
if (CGEN_INSN_ATTR (first.insn, CGEN_INSN_PIPE) == PIPE_NONE)
|
||||||
{
|
{
|
||||||
@ -752,9 +775,18 @@ assemble_parallel_insn (str, str2)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Check it. */
|
/* 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))
|
&& CGEN_INSN_ATTR (second.insn, CGEN_INSN_MACH) == (1 << MACH_M32RX))
|
||||||
{
|
{
|
||||||
|
/* xgettext:c-format */
|
||||||
as_bad (_("instruction '%s' is for the M32RX only"), str);
|
as_bad (_("instruction '%s' is for the M32RX only"), str);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -771,6 +803,7 @@ assemble_parallel_insn (str, str2)
|
|||||||
if (CGEN_INSN_NUM (first.insn) != M32R_INSN_NOP
|
if (CGEN_INSN_NUM (first.insn) != M32R_INSN_NOP
|
||||||
&& CGEN_INSN_NUM (second.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);
|
as_bad (_("'%s': only the NOP instruction can be issued in parallel on the m32r"), str2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -796,9 +829,11 @@ assemble_parallel_insn (str, str2)
|
|||||||
if (warn_explicit_parallel_conflicts)
|
if (warn_explicit_parallel_conflicts)
|
||||||
{
|
{
|
||||||
if (first_writes_to_seconds_operands (& first, & second, false))
|
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);
|
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))
|
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);
|
as_warn (_("%s: output of 2nd instruction is the same as an input to 1st instruction - is this intentional ?"), str2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -887,8 +922,18 @@ md_assemble (str)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* start-sanitize-m32rx */
|
/* 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);
|
as_bad (_("instruction '%s' is for the M32RX only"), str);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -40,6 +40,13 @@ to the M32RX microprocessor, which adds some more instructions to the
|
|||||||
basic M32R instruction set, and some additional parameters to some of
|
basic M32R instruction set, and some additional parameters to some of
|
||||||
the original instructions.
|
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
|
@item --warn-explicit-parallel-conflicts
|
||||||
@cindex @samp{--warn-explicit-parallel-conflicts} option, M32RX
|
@cindex @samp{--warn-explicit-parallel-conflicts} option, M32RX
|
||||||
Instructs @code{@value{AS}} to produce warning messages when
|
Instructs @code{@value{AS}} to produce warning messages when
|
||||||
@ -52,11 +59,21 @@ different result from @samp{mv r1, r2 \n mv r3, r1} since the former
|
|||||||
moves r1 into r3 and then r2 into r1, whereas the later moves r2 into r1
|
moves r1 into r3 and then r2 into r1, whereas the later moves r2 into r1
|
||||||
and r3.
|
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
|
@item --no-warn-explicit-parallel-conflicts
|
||||||
@cindex @samp{--no-warn-explicit-parallel-conflicts} option, M32RX
|
@cindex @samp{--no-warn-explicit-parallel-conflicts} option, M32RX
|
||||||
Instructs @code{@value{AS}} not to produce warning messages when
|
Instructs @code{@value{AS}} not to produce warning messages when
|
||||||
questionable parallel instructions are encountered.
|
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
|
@end table
|
||||||
|
|
||||||
@node M32R-Warnings
|
@node M32R-Warnings
|
||||||
@ -94,6 +111,10 @@ which is only supported by the M32Rx processor, and the @samp{--m32rx}
|
|||||||
command line flag has not been specified to allow assembly of such
|
command line flag has not been specified to allow assembly of such
|
||||||
instructions.
|
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
|
@item only the NOP instruction can be issued in parallel on the m32r
|
||||||
This message is produced when the assembler encounters a parallel
|
This message is produced when the assembler encounters a parallel
|
||||||
instruction which does not involve a NOP instruction and the
|
instruction which does not involve a NOP instruction and the
|
||||||
@ -117,6 +138,7 @@ For example these code fragments will produce this message:
|
|||||||
@samp{jl r0 || mv r14, r1}
|
@samp{jl r0 || mv r14, r1}
|
||||||
@samp{st r2, @@-r1 || mv r1, r3}
|
@samp{st r2, @@-r1 || mv r1, r3}
|
||||||
@samp{mv r1, r2 || ld r0, @@r1+}
|
@samp{mv r1, r2 || ld r0, @@r1+}
|
||||||
|
@samp{cmp r1, r2 || addx r3, r4} (Both write to the condition bit)
|
||||||
|
|
||||||
@end table
|
@end table
|
||||||
@c end-sanitize-m32rx
|
@c end-sanitize-m32rx
|
||||||
|
Reference in New Issue
Block a user