This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Supervisor Calls on ARM Cortex-M3


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]