Tool/software: Code Composer Studio
From looking through the forums, there are a couple of notes related to spurious "a NOP may be needed here" errors, but these were regarding successive enable/disable interrupt instructions. I'm also seeing these in response to standalone _enable_interrupts calls.
This has probably been around a while, but with a recent upgrade to V9.1.0 of CCS, I've been looking at any warnings generated, with a view to reducing noise. These ones I haven't been able to work around.
The code is written in C, and compiled with GNU V8.3.0.16. The logic uses _enable_interrupts and _disable_interrupts as the entry points to eint and dint. From the MSP430 GCC Users Guide (SLAU464E, June 19), section 4.9.4 (NOP Instructions Surrounding Interrupt State Changes), it states that any necessary pre & post NOP instructions associated with enabling and disabling interrupts are handled correctly in the _enable_interrupts and _disable_interrupts macros, and from having a peek at in340.h, this appears to be the case. However, the compiler continues to report warnings "a NOP may be needed here", after an interrupt enable instruction" (and the equivalent "before"). There are no warnings generated around _disable_interrupts.
I've had a play surrounding the _enable_interrupts macros with _no_operation macros, but the warnings remain. Not surprising, as I believe the NOP's are already there, but the assembler is failing to recognise them, and generating the warnings.
Its not a big issue, but less noise is always better!
Andrew