mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-18 23:52:14 -06:00
Arm Linux EABI syscall support.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1756 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
b88a38324b
commit
ce4defa062
4 changed files with 170 additions and 32 deletions
|
@ -360,6 +360,7 @@ void cpu_loop(CPUARMState *env)
|
|||
case EXCP_SWI:
|
||||
case EXCP_BKPT:
|
||||
{
|
||||
env->eabi = 1;
|
||||
/* system call */
|
||||
if (trapnr == EXCP_BKPT) {
|
||||
if (env->thumb) {
|
||||
|
@ -386,13 +387,14 @@ void cpu_loop(CPUARMState *env)
|
|||
} else if (n == ARM_NR_semihosting
|
||||
|| n == ARM_NR_thumb_semihosting) {
|
||||
env->regs[0] = do_arm_semihosting (env);
|
||||
} else if (n >= ARM_SYSCALL_BASE
|
||||
} else if (n == 0 || n >= ARM_SYSCALL_BASE
|
||||
|| (env->thumb && n == ARM_THUMB_SYSCALL)) {
|
||||
/* linux syscall */
|
||||
if (env->thumb) {
|
||||
if (env->thumb || n == 0) {
|
||||
n = env->regs[7];
|
||||
} else {
|
||||
n -= ARM_SYSCALL_BASE;
|
||||
env->eabi = 0;
|
||||
}
|
||||
env->regs[0] = do_syscall(env,
|
||||
n,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue