From: michael <trimarchi@gandalf.sssup.it>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] sh4 linux user emulation on an x86_64 system
Date: Wed, 15 Oct 2008 19:49:44 +0200 [thread overview]
Message-ID: <48F62D38.50001@gandalf.sssup.it> (raw)
Hi all,
I have some trouble using the qemu emulator on the x86_64 host system.
The system emulate
an qemu-sh4 machine. I try to fix it without success:
if I run:
qemu-sh4-32 I don't have problems. I have the log and the program run ok.
If I recompile for the qemu-sh4-64 the system crash. I find the reason
of the crash, but
the problem appears early in the generated code. The effect is the env
variabile
env->pr is filled with an an invalid value
then the pr is taken by the delayed_pc and finally by the pc.
The %r14 register point to the CPUState structure
OUT: [size=242]
0x6018c9e0: mov 0x28(%r14),%edi
0x6018c9e4: mov 0x40(%r14),%esi
0x6018c9e8: add $0x60,%esi
0x6018c9eb: mov %rsi,%rdx
0x6018c9ee: mov %edx,0x44(%r14)
0x6018c9f2: mov %esi,0x40(%r14)
0x6018c9f6: mov %edi,0x8(%r14)
0x6018c9fa: movslq (%rdx),%rdi
0x6018c9fd: mov 0x44(%r14),%esi
0x6018ca01: add $0x4,%esi
0x6018ca04: mov %rsi,%rdx
0x6018ca07: mov %esi,0x44(%r14)
0x6018ca0b: mov %edi,0x114(%r14) <--- the %edi is invalid and here I
set the env->pr
the pr is then copied to the delayed_pc and then in the pc.
variabile
Then the system crash with an access violation. I set a break condition
and a watch point to
trace down the problem and try to compare the i386 code with the x86_64
code. It appears that the
problem is before.
It is a problem if the regs_to_env and env_to_regs are not implemented
during a longjmp and setjmp.
Regards Michael
next reply other threads:[~2008-10-15 17:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-15 17:49 michael [this message]
2008-10-15 18:46 ` [Qemu-devel] sh4 linux user emulation on an x86_64 system Vince Weaver
2008-10-15 20:53 ` michael
2008-10-20 11:31 ` [Qemu-devel] [PATCH] SH: Fix struct target_stat64 for 64bit host takasi-y
2008-10-20 13:52 ` [Qemu-devel] " michael
2008-10-20 17:18 ` [Qemu-devel] " michael
2008-10-20 17:35 ` michael
2008-10-21 3:48 ` [Qemu-devel] " takasi-y
2008-10-26 15:37 ` [Qemu-devel] [PATCH] take2. " takasi-y
2009-01-30 19:48 ` Aurelien Jarno
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48F62D38.50001@gandalf.sssup.it \
--to=trimarchi@gandalf.sssup.it \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.