Inline assembler processor mode restrictions in C and C++ code
ARM strongly recommends that you do not change processor modes or modify coprocessor states in inline assembly code.
The compiler does not recognize such changes.
Instead of attempting to change processor modes or coprocessor states from within inline assembly code, see if there are any intrinsics available that provide what you require. If no such intrinsics are available, use embedded assembly code if absolutely necessary.