SVC系统服务的使用(ARM AC6环境下)
1、熟悉内嵌汇编
__attribute__((always_inline)) void svc_service_add(uint32_t x, uint32_t y, uint32_t* res)
{
register unsigned r0 __asm("r0") = x;
register unsigned r1 __asm("r1") = y;
register unsigned r2 __asm("r2") = (uint32_t)res;
__asm volatile("SVC #4" :: "r" (r0), "r" (r1), &#