bug in TI in430.h implementation

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

bug in TI in430.h implementation

Peter Bigot-4
(Cross-posted from
since it's not clear how TI wants to receive bug reports related to
the new toolchain.)

Back when I added intrinsics to mspgcc I got confirmation that CCS and
IAR both implicitly added the required NOP after a DINT instruction
generated with _disable_interrupts().  (The MSP430 instruction set
explains that this is necessary to eliminate the possibility of
interrupting a subsequent pipelined instruction.)

The implementation of _disable_interrupts() in in430.h from TI's
GCC_RH_20140508.zip does not include this required instruction, making
it inconsistent with all other MSP430 toolchains.  (Fortunately,
msp430-elf does generate a warning in this situation.)

Interestingly, the implementation of _enable_interrupts()
unconditionally adds a NOP after EINT, even though that workaround is
arguably required only on certain devices with a specific erratum, and
this behavior is AFAIK also inconsistent with other toolchains.

msp430-elf should behave as close to CCS and IAR as possible so
developers don't have to work around toolchain-specific
inconsistencies in how these operations are implemented.

TI, please fix this for the next header release.

Please also add a monotonically increasing version number to in430.h
or iomacros.h so applications can work around bugs like this.



HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
Mspgcc-users mailing list
[hidden email]