public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* MSP430 in gcc4.9 ... enable interrupts?
@ 2014-02-14 10:12 Brian Drummond
  2014-02-14 19:17 ` DJ Delorie
  0 siblings, 1 reply; 6+ messages in thread
From: Brian Drummond @ 2014-02-14 10:12 UTC (permalink / raw)
  To: gcc

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 the MSP430 port for 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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-02-18  8:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-14 10:12 MSP430 in gcc4.9 ... enable interrupts? Brian Drummond
2014-02-14 19:17 ` DJ Delorie
2014-02-14 20:53   ` Brian Drummond
2014-02-16 14:26   ` David Brown
2014-02-17 23:12     ` DJ Delorie
2014-02-18  8:01       ` David Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).