I want to use DSB instruction with inline assembly in my C code.
With ARM C/C++ Compiler, 4.1 [Build 894], it results in compilation error - instruction not allowed for inline assembly.
__asm("DSB"); is not allowed.
But it is possible to use embedded assembly of this instruction with a wrapper function as below.
__asm void fXYZ()
{
DSB
}
But since I need to use it inline in C code, I tried
__inline __asm void fXYZ()
or
__forceinline __asm void fXYZ()
but compiler is ignoring the __inline/__forceinline.
I tried using optimization option -Otime as suggested in ARM manual, but still there was no success.
Please suggest a solution.
Thanks.