public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Supervisor Calls on ARM Cortex-M3
@ 2013-01-11  3:30 Alex Alexandrov
  2013-01-12 10:44 ` Maxim Kuvyrkov
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Alexandrov @ 2013-01-11  3:30 UTC (permalink / raw)
  To: gcc-help

Hello,

Do the GCC  C/C++ compilers support supervisor function calls on ARM 
Cortex M3/4 targets?
I mean something like the IAR's "#pragma _swi" or the "__svc" keyword 
used by the RealView compiler.
How can I make the compiler use the "svc" machine instruction when 
calling the function, instead of the regular "branch and link" instruction?

Regards:
Alex Alexandrov

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

* Re: Supervisor Calls on ARM Cortex-M3
  2013-01-11  3:30 Supervisor Calls on ARM Cortex-M3 Alex Alexandrov
@ 2013-01-12 10:44 ` Maxim Kuvyrkov
  0 siblings, 0 replies; 2+ messages in thread
From: Maxim Kuvyrkov @ 2013-01-12 10:44 UTC (permalink / raw)
  To: Alex Alexandrov; +Cc: gcc-help

On 11/01/2013, at 11:47 AM, Alex Alexandrov wrote:

> Hello,
> 
> Do the GCC  C/C++ compilers support supervisor function calls on ARM Cortex M3/4 targets?
> I mean something like the IAR's "#pragma _swi" or the "__svc" keyword used by the RealView compiler.
> How can I make the compiler use the "svc" machine instruction when calling the function, instead of the regular "branch and link" instruction?

Inline assembly and google are your friends:
- http://stackoverflow.com/questions/13338314/gcc-arm-ensuring-args-are-retained-when-inlining-functions-with-inline-asm-st
- http://stackoverflow.com/questions/11377453/using-gcc-inline-assembly-with-instructions-that-take-immediate-values

--
Maxim Kuvyrkov

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

end of thread, other threads:[~2013-01-12  3:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-11  3:30 Supervisor Calls on ARM Cortex-M3 Alex Alexandrov
2013-01-12 10:44 ` Maxim Kuvyrkov

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).