mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-29 05:13:54 -06:00
ARMv7 support.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3572 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
ee4e83ed8d
commit
9ee6e8bb85
35 changed files with 11799 additions and 653 deletions
13
cpu-exec.c
13
cpu-exec.c
|
@ -173,6 +173,7 @@ static inline TranslationBlock *tb_find_fast(void)
|
|||
flags |= (1 << 6);
|
||||
if (env->vfp.xregs[ARM_VFP_FPEXC] & (1 << 30))
|
||||
flags |= (1 << 7);
|
||||
flags |= (env->condexec_bits << 8);
|
||||
cs_base = 0;
|
||||
pc = env->regs[15];
|
||||
#elif defined(TARGET_SPARC)
|
||||
|
@ -511,8 +512,18 @@ int cpu_exec(CPUState *env1)
|
|||
env->exception_index = EXCP_FIQ;
|
||||
do_interrupt(env);
|
||||
}
|
||||
/* ARMv7-M interrupt return works by loading a magic value
|
||||
into the PC. On real hardware the load causes the
|
||||
return to occur. The qemu implementation performs the
|
||||
jump normally, then does the exception return when the
|
||||
CPU tries to execute code at the magic address.
|
||||
This will cause the magic PC value to be pushed to
|
||||
the stack if an interrupt occured at the wrong time.
|
||||
We avoid this by disabling interrupts when
|
||||
pc contains a magic address. */
|
||||
if (interrupt_request & CPU_INTERRUPT_HARD
|
||||
&& !(env->uncached_cpsr & CPSR_I)) {
|
||||
&& ((IS_M(env) && env->regs[15] < 0xfffffff0)
|
||||
|| !(env->uncached_cpsr & CPSR_I))) {
|
||||
env->exception_index = EXCP_IRQ;
|
||||
do_interrupt(env);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue