This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
MSP430 in gcc4.9 ... enable interrupts?
- From: Brian Drummond <brian at shapes dot demon dot co dot uk>
- To: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Thu, 13 Feb 2014 23:12:00 +0000
- Subject: MSP430 in gcc4.9 ... enable interrupts?
- Authentication-results: sourceware.org; auth=none
- Reply-to: brian at shapes dot demon dot co dot uk
I have built a crosscompiler for the MSP430, using a gcc4.9 snapshot
(gcc-4.9-20140112) and the compiler seems OK and builds a simple
"blinky" LED flashing example.
But my slightly larger example, originally built using Peter Bigot's
mspgcc backend, no longer compiles ...
mspgcc had a number of intrinsic functions, such as __nop(), __eint()
and __dint() respectively. Calling these would execute a nop, enable and
disable interrupts respectively.
Others such as __bis_status_register(), __bic_status_register() would
manipulate system status, low power modes etc.
Now in gcc4.9, these intrinsic functions have gone.
Perusing the config/msp430 source files, e.g. config/msp430/msp430.md I
can see evidence that the _functionality_ is still there, e.g.
(define_insn "enable_interrupts"
[(unspec_volatile [(const_int 0)] UNS_EINT)]
""
"EINT"
)
...
(define_insn "bis_SR"
[(unspec_volatile [(match_operand 0 "nonmemory_operand" "ir")]
UNS_BIS_SR)]
""
"BIS.W\t%0, %O0(SP)"
)
... but how do I access it? In other words, what C code fragment would
cause the "enable_interrupts" instruction to be emitted, and generate
"EINT" in the assembler or object output?
- Brian