arch/arm: replace SYS_syscall_return hardcode from syscall
Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
parent
6a1a7bf455
commit
e0fabbfdd6
@ -95,8 +95,9 @@ static void dispatch_syscall(void)
|
||||
" add sp, sp, #12\n" /* Destroy the stack frame */
|
||||
" 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\n"::"i"(SYS_syscall) /* Return from the SYSCALL */
|
||||
" mov r0, %0\n" /* R0=SYS_syscall_return */
|
||||
" svc %1\n"::"i"(SYS_syscall_return),
|
||||
"i"(SYS_syscall) /* Return from the SYSCALL */
|
||||
);
|
||||
}
|
||||
#endif
|
||||
|
@ -96,8 +96,9 @@ static void dispatch_syscall(void)
|
||||
" ldr lr, [sp, #12]\n" /* Restore lr */
|
||||
" 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 %0\n"::"i"(SYS_syscall) /* Return from the SYSCALL */
|
||||
" mov r0, %0\n" /* R0=SYS_syscall_return */
|
||||
" svc %1\n"::"i"(SYS_syscall_return),
|
||||
"i"(SYS_syscall) /* Return from the SYSCALL */
|
||||
);
|
||||
}
|
||||
#endif
|
||||
|
@ -103,8 +103,9 @@ static void dispatch_syscall(void)
|
||||
" ldr r2, [sp, #16]\n" /* Restore (orig_SP - new_SP) value */
|
||||
" 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\n"::"i"(SYS_syscall) /* Return from the SYSCALL */
|
||||
" mov r0, %0\n" /* R0=SYS_syscall_return */
|
||||
" svc %1\n"::"i"(SYS_syscall_return),
|
||||
"i"(SYS_syscall) /* Return from the SYSCALL */
|
||||
);
|
||||
}
|
||||
#endif
|
||||
|
@ -93,8 +93,9 @@ static void dispatch_syscall(void)
|
||||
" ldr lr, [sp, #12]\n" /* Restore lr */
|
||||
" 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 %0\n"::"i"(SYS_syscall) /* Return from the SYSCALL */
|
||||
" mov r0, %0\n" /* R0=SYS_syscall_return */
|
||||
" svc %1\n"::"i"(SYS_syscall_return),
|
||||
"i"(SYS_syscall) /* Return from the SYSCALL */
|
||||
);
|
||||
}
|
||||
#endif
|
||||
|
@ -102,8 +102,9 @@ static void dispatch_syscall(void)
|
||||
" ldr r2, [sp, #16]\n" /* Restore (orig_SP - new_SP) value */
|
||||
" 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\n"::"i"(SYS_syscall) /* Return from the SYSCALL */
|
||||
" mov r0, %0\n" /* R0=SYS_syscall_return */
|
||||
" svc %1\n"::"i"(SYS_syscall_return),
|
||||
"i"(SYS_syscall) /* Return from the SYSCALL */
|
||||
);
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user