arm nwfpe support - added code no-code-copy option - __preinit_array_start bug fix (untested)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@612 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
28c4f361ac
commit
c69810559b
|
@ -39,6 +39,8 @@ const char interp[] __attribute__((section(".interp"))) = "/lib/ld-linux.so.2";
|
||||||
/* for recent libc, we add these dummy symbols which are not declared
|
/* for recent libc, we add these dummy symbols which are not declared
|
||||||
when generating a linked object (bug in ld ?) */
|
when generating a linked object (bug in ld ?) */
|
||||||
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)
|
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)
|
||||||
|
long __preinit_array_start[0];
|
||||||
|
long __preinit_array_end[0];
|
||||||
long __init_array_start[0];
|
long __init_array_start[0];
|
||||||
long __init_array_end[0];
|
long __init_array_end[0];
|
||||||
long __fini_array_start[0];
|
long __fini_array_start[0];
|
||||||
|
@ -254,11 +256,25 @@ void cpu_loop(CPUARMState *env)
|
||||||
trapnr = cpu_arm_exec(env);
|
trapnr = cpu_arm_exec(env);
|
||||||
switch(trapnr) {
|
switch(trapnr) {
|
||||||
case EXCP_UDEF:
|
case EXCP_UDEF:
|
||||||
info.si_signo = SIGILL;
|
{
|
||||||
info.si_errno = 0;
|
TaskState *ts = env->opaque;
|
||||||
info.si_code = TARGET_ILL_ILLOPN;
|
uint32_t opcode;
|
||||||
info._sifields._sigfault._addr = env->regs[15];
|
|
||||||
queue_signal(info.si_signo, &info);
|
/* we handle the FPU emulation here, as Linux */
|
||||||
|
/* we get the opcode */
|
||||||
|
opcode = ldl_raw((uint8_t *)env->regs[15]);
|
||||||
|
|
||||||
|
if (EmulateAll(opcode, &ts->fpa, env->regs) == 0) {
|
||||||
|
info.si_signo = SIGILL;
|
||||||
|
info.si_errno = 0;
|
||||||
|
info.si_code = TARGET_ILL_ILLOPN;
|
||||||
|
info._sifields._sigfault._addr = env->regs[15];
|
||||||
|
queue_signal(info.si_signo, &info);
|
||||||
|
} else {
|
||||||
|
/* increment PC */
|
||||||
|
env->regs[15] += 4;
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case EXCP_SWI:
|
case EXCP_SWI:
|
||||||
{
|
{
|
||||||
|
@ -783,6 +799,9 @@ void usage(void)
|
||||||
"-s size set the stack size in bytes (default=%ld)\n"
|
"-s size set the stack size in bytes (default=%ld)\n"
|
||||||
"\n"
|
"\n"
|
||||||
"debug options:\n"
|
"debug options:\n"
|
||||||
|
#ifdef USE_CODE_COPY
|
||||||
|
"-no-code-copy disable code copy acceleration\n"
|
||||||
|
#endif
|
||||||
"-d activate log (logfile=%s)\n"
|
"-d activate log (logfile=%s)\n"
|
||||||
"-p pagesize set the host page size to 'pagesize'\n",
|
"-p pagesize set the host page size to 'pagesize'\n",
|
||||||
TARGET_ARCH,
|
TARGET_ARCH,
|
||||||
|
@ -847,7 +866,13 @@ int main(int argc, char **argv)
|
||||||
fprintf(stderr, "page size must be a power of two\n");
|
fprintf(stderr, "page size must be a power of two\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
} else {
|
} else
|
||||||
|
#ifdef USE_CODE_COPY
|
||||||
|
if (!strcmp(r, "no-code-copy")) {
|
||||||
|
code_copy_enabled = 0;
|
||||||
|
} else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
usage();
|
usage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue