mirror of
https://github.com/apache/nuttx.git
synced 2026-05-16 13:56:00 +08:00
arch/arm: Use macro defined swi range in dispatch_syscall
Signed-off-by: Huang Qi <huangqi3@xiaomi.com> Change-Id: Ia8503a13c5b04fa8cc13cee74b75b19623986c1d
This commit is contained in:
@@ -100,7 +100,7 @@ static void dispatch_syscall(void)
|
||||
" pop {r4, r5}\n" /* Recover R4 and R5 */
|
||||
" mov r2, r0\n" /* R2=Save return value in R2 */
|
||||
" mov r0, #3\n" /* R0=SYS_syscall_return */
|
||||
" svc 0" /* Return from the syscall */
|
||||
" svc %0\n"::"i"(SYS_syscall) /* Return from the SYSCALL */
|
||||
);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -98,7 +98,7 @@ static void dispatch_syscall(void)
|
||||
" add sp, sp, #16\n" /* Destroy the stack frame */
|
||||
" mov r2, r0\n" /* R2=Save return value in R2 */
|
||||
" mov r0, #0\n" /* R0=SYS_syscall_return */
|
||||
" svc #0x900001\n" /* Return from the SYSCALL */
|
||||
" svc %0\n"::"i"(SYS_syscall) /* Return from the SYSCALL */
|
||||
);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -108,7 +108,7 @@ static void dispatch_syscall(void)
|
||||
" add sp, sp, r2\n" /* Restore SP */
|
||||
" mov r2, r0\n" /* R2=Save return value in R2 */
|
||||
" mov r0, #3\n" /* R0=SYS_syscall_return */
|
||||
" svc 0" /* Return from the syscall */
|
||||
" svc %0\n"::"i"(SYS_syscall) /* Return from the SYSCALL */
|
||||
);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -95,7 +95,7 @@ static void dispatch_syscall(void)
|
||||
" add sp, sp, #16\n" /* Destroy the stack frame */
|
||||
" mov r2, r0\n" /* R2=Save return value in R2 */
|
||||
" mov r0, #0\n" /* R0=SYS_syscall_return */
|
||||
" svc #0x900001\n" /* Return from the SYSCALL */
|
||||
" svc %0\n"::"i"(SYS_syscall) /* Return from the SYSCALL */
|
||||
);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -107,7 +107,7 @@ static void dispatch_syscall(void)
|
||||
" add sp, sp, r2\n" /* Restore SP */
|
||||
" mov r2, r0\n" /* R2=Save return value in R2 */
|
||||
" mov r0, #3\n" /* R0=SYS_syscall_return */
|
||||
" svc 0" /* Return from the syscall */
|
||||
" svc %0\n"::"i"(SYS_syscall) /* Return from the SYSCALL */
|
||||
);
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user