qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] sh4 linux user emulation on an x86_64 system
@ 2008-10-15 17:49 michael
  2008-10-15 18:46 ` Vince Weaver
  2008-10-20 11:31 ` [Qemu-devel] [PATCH] SH: Fix struct target_stat64 for 64bit host takasi-y
  0 siblings, 2 replies; 10+ messages in thread
From: michael @ 2008-10-15 17:49 UTC (permalink / raw)
  To: qemu-devel

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-01-30 19:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-15 17:49 [Qemu-devel] sh4 linux user emulation on an x86_64 system michael
2008-10-15 18:46 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).