Having built a crosscompiler for the MSP430, using a gcc4.9 snapshot (gcc-4.9-20140112) 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 builtin 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 the MSP430 port for gcc4.9, these builtin functions have gone. Reading 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?
I thought about seeing how the testsuite examples did it, e.g. the equivalent of
gcc/testsuite/gcc.target/msp430/builtins_bic_sr.c
(from mspgcc) ... but there is no testsuite folder for the msp430 yet ...
gcc/testsuite/gcc.target/msp430 doesn't exist in the gcc4.9 tree.
Any ideas how to access these functions from C code?
- Brian