diff options
author | Nick Clifton <nickc@redhat.com> | 2014-03-03 17:27:55 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2014-03-03 17:27:55 +0000 |
commit | 65d7bab5919338f2f41256e24c0609c91eaf0432 (patch) | |
tree | 009a19f6274a2dd338ee6e42603aed7e83d6e162 /gas/doc | |
parent | c1a3e85c37d0121efd395406ef3234b93e588a14 (diff) | |
download | gdb-65d7bab5919338f2f41256e24c0609c91eaf0432.zip gdb-65d7bab5919338f2f41256e24c0609c91eaf0432.tar.gz gdb-65d7bab5919338f2f41256e24c0609c91eaf0432.tar.bz2 |
This patch enhances the MSP430 port of GAS so that, if requested, it will
generate warning messages about an instruction that changes the interrupt
state not being followed by a NOP instruction.
* config/msp430/msp430.c: Replace known mcu array with known
msp430 ISA mcu name array.
Accept any name for -mmcu option.
Add -mz option to warn about missing NOP following an interrupt
status change.
(check_for_nop): New.
(msp430_operands): Emit a warning, if requested, when an interrupt
changing instruction is not followed by a NOP.
* doc/c-msp430.c: Document -mz option.
* gas/msp430/bad.d: Add -mz option.
* gas/msp430/bad.s: Add more cases where warnings should be
generated.
* gas/msp430/bad.l: Add expected warning messages.
Diffstat (limited to 'gas/doc')
-rw-r--r-- | gas/doc/c-msp430.texi | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/gas/doc/c-msp430.texi b/gas/doc/c-msp430.texi index 4a46961..d8fe3ce 100644 --- a/gas/doc/c-msp430.texi +++ b/gas/doc/c-msp430.texi @@ -1,4 +1,4 @@ -@c Copyright 2002-2013 Free Software Foundation, Inc. +@c Copyright 2002-2014 Free Software Foundation, Inc. @c This is part of the GAS manual. @c For copying conditions, see the file as.texinfo. @ifset GENERIC @@ -29,13 +29,12 @@ @table @code @item -mmcu -selects the mpu arch. If the architecture is 430Xv2 then this also -enables NOP generation unless the @option{-mN} is also specified. +selects the mcu architecture. If the architecture is 430Xv2 then this +also enables NOP generation unless the @option{-mN} is also specified. @item -mcpu selects the cpu architecture. If the architecture is 430Xv2 then this -also enables NOP generation unless the @option{-mN} is also -specified. +also enables NOP generation unless the @option{-mN} is also specified. @item -mP enables polymorph instructions handler. @@ -55,17 +54,25 @@ SR}, @code{BIS #8, SR} or @code{MOV.W <>, SR}) must be followed by a NOP instruction in order to ensure the correct processing of interrupts. By default it is up to the programmer to supply these NOP instructions, but this command line option enables -the automatic insertion by the assembler. Note - the assembler does -not peek ahead to the next instruction so it will insert a NOP even -one is already present. +the automatic insertion by the assembler, if they are missing. -@c end-sanitize-msp430 -@c %redact note changed text for mN option @item -mN disables the generation of a NOP instruction following any instruction that might change the interrupts enabled/disabled state. This is the default behaviour. +@item -mz +tells the assembler to generate a warning message if a NOP does not +immediately forllow an instruction that enables or disables +interrupts. This is the default. + +Note that this option can be stacked with the @option{-mn} option so +that the assembler will both warn about missing NOP instructions and +then insert them automatically. + +@item -mZ +disables warnings about missing NOP instructions. + @item -md mark the object file as one that requires data to copied from ROM to RAM at execution startup. Disabled by default. |