Re: [Qemu-devel] [PATCH] Porting TCG to alpha platform

2010-01-31 Thread Richard Henderson
tcg_out_ld(s, TCG_TYPE_I64, r1, r1, offsetof(CPUTLBEntry, addend) - offsetof(CPUTLBEntry, addr_read)); should be modified to tcg_out_ld(s, TCG_TYPE_I64, r1, r1, offsetof(CPUTLBEntry, addend)); Actually, it should be the entire offset from CPUState. The ADDR_WRITE offset before was entirely st

Re: [Qemu-devel] [PATCH] Porting TCG to alpha platform

2010-01-29 Thread identifier scorpio
BUG? In tcg_out_qemu_ld tcg_out_ld(s, TCG_TYPE_I64, r1, r1,    offsetof(CPUTLBEntry, addend)    - offsetof(CPUTLBEntry, addr_read)); should be modified to tcg_out_ld(s, TCG_TYPE_I64, r1, r1,    offsetof(CPUTLBEntry, addend)); since the when calling tcg_out

Re: [Qemu-devel] [PATCH] Porting TCG to alpha platform

2010-01-29 Thread Laurent Desnogues
On Sat, Jan 30, 2010 at 12:04 AM, Stefan Weil wrote: [...] > > that was a good suggestion. bntest raises a segmentation fault > (NULL pointer, p == 0, see below) with qemu-x86_64 on a x86_64 host. Compile bntest statically and it should work. x86_64 user mode is completely broken for dynamically

Re: [Qemu-devel] [PATCH] Porting TCG to alpha platform

2010-01-29 Thread Edgar E. Iglesias
On Sat, Jan 30, 2010 at 12:04:29AM +0100, Stefan Weil wrote: > Edgar E. Iglesias schrieb: > > On Fri, Jan 29, 2010 at 09:04:58AM -0800, Richard Henderson wrote: > >> On 01/28/2010 05:55 PM, identifier scorpio wrote: > >>> Your code is more skilled and I learn a lot from it, but I haven't yet > >>>

Re: [Qemu-devel] [PATCH] Porting TCG to alpha platform

2010-01-29 Thread Stefan Weil
Edgar E. Iglesias schrieb: > On Fri, Jan 29, 2010 at 09:04:58AM -0800, Richard Henderson wrote: >> On 01/28/2010 05:55 PM, identifier scorpio wrote: >>> Your code is more skilled and I learn a lot from it, but I haven't yet >>> recognized the key difference between your version and mine. In last >>

Re: [Qemu-devel] [PATCH] Porting TCG to alpha platform

2010-01-29 Thread Edgar E. Iglesias
On Fri, Jan 29, 2010 at 09:04:58AM -0800, Richard Henderson wrote: > On 01/28/2010 05:55 PM, identifier scorpio wrote: > > Your code is more skilled and I learn a lot from it, but I haven't yet > > recognized the key difference between your version and mine. In last > > mail, you've said that "Main

Re: [Qemu-devel] [PATCH] Porting TCG to alpha platform

2010-01-29 Thread Richard Henderson
+} else if (cond == TCG_COND_EQ || cond == TCG_COND_NE) { +tcg_out_mem_long(s, INSN_LDA, TMP_REG1, arg1, -arg2); +opc = (cond == TCG_COND_EQ ? INSN_BEQ : INSN_BNE); Bug here. What was intended was to add "arg1 = TMP_REG1". But since the constraints use "I" for ui

Re: [Qemu-devel] [PATCH] Porting TCG to alpha platform

2010-01-29 Thread Richard Henderson
On 01/25/2010 05:19 PM, Richard Henderson wrote: +} else if (~val == (uint8_t)~val) { +tcg_out_fmt_opi(s, INSN_BIC, ra, ~val, rc); Bug here. I've applied the following to my local tree. r~ commit 2ecce92da6eee4b3496c7655da45259308abb536 Author: Richard Henderson Date: Fri Jan

Re: [Qemu-devel] [PATCH] Porting TCG to alpha platform

2010-01-29 Thread Richard Henderson
On 01/28/2010 05:55 PM, identifier scorpio wrote: 1. adding constraints for operation mov_i32/movi_i32/mov_i64/movi_i64 2. replacing "goto do_arith" with "break" for INDEX_op_not_i32/i64 case handling in tcg_out_op Oops. 3. removing the redundant declaration for "alpha_tb_set_jmp_target()" at

Re: [Qemu-devel] [PATCH] Porting TCG to alpha platform

2010-01-28 Thread identifier scorpio
I'v reviewed your code and applied the patch to 0.12.0.rc1. After fixing some small bugs I run it on my debian/alpha platform, and it hung after running abort 3 TBs. I'll continue to trace your code. The bugs that are fixed are listed as follow: 1. adding constraints for operation mov_i32/movi_i

Re: [Qemu-devel] [PATCH] Porting TCG to alpha platform

2010-01-22 Thread Richard Henderson
On 01/22/2010 07:47 AM, identifier scorpio wrote: Is there any good method to find the bug except "guess and try"? -singlestep -d in_asm,cpu,exec Use these options on both Alpha host and x86_64 host and diff the resulting output files. That will show you which target instruction is emulated d

Re: [Qemu-devel] [PATCH] Porting TCG to alpha platform

2010-01-22 Thread identifier scorpio
Hi, Richard. I almost re-write the whole code under your help and now it seems somehow elegant. Unfortunately, it still can't run MS windows, I wonder whether there are some other special places in QEMU to be modifed for alpha case, beside the 3 files (cpu-all.h/tcg-target.c/tcg-target.h) I wri

Re: [Qemu-devel] [PATCH] Porting TCG to alpha platform

2010-01-21 Thread Stefan Weil
identifier scorpio schrieb: > Thank Mr. Weil for your reply. > > > > > Maybe you can also try the TCG interpreter (TCI) from > > http://repo.or.cz/w/qemu/ar7.git. > > In theory, it supports any host architecture with or > > without native TCG > > support. > > > > It was tested successful with som

Re: [Qemu-devel] [PATCH] Porting TCG to alpha platform

2010-01-20 Thread identifier scorpio
Thank Mr. Weil for your reply.   > > Maybe you can also try the TCG interpreter (TCI) from > http://repo.or.cz/w/qemu/ar7.git. > In theory, it supports any host architecture with or > without native TCG > support. > > It was tested successful with some basic tests on x86, > mips, ppc and arm, > s

Re: [Qemu-devel] [PATCH] Porting TCG to alpha platform

2010-01-20 Thread Richard Henderson
On 01/20/2010 09:19 AM, identifier scorpio wrote: Below i'll append my newly generated patch against stable-0.10, in case it is mangled, i also put it in the attachment. For the record, the inline portion was again mangled; the attachment is fine. in qemu_ld/st, we must use $16,$17,$18 as t

Re: [Qemu-devel] [PATCH] Porting TCG to alpha platform

2010-01-19 Thread Stefan Weil
identifier scorpio schrieb: > Hello. > > I ported TCG to alpha platform, the patch is currently based on stable-0.10 > branch, and now it can run linux-0.2.img testing image on my alpha XP1000 > workstation. but it still can't run MS-windows, and I hope someone, > especially those guys that are

Re: [Qemu-devel] [PATCH] Porting TCG to alpha platform

2010-01-19 Thread malc
On Tue, 19 Jan 2010, Richard Henderson wrote: > On 01/19/2010 12:47 AM, identifier scorpio wrote: > > I ported TCG to alpha platform, the patch is currently based on stable-0.10 > > branch, > > and now it can run linux-0.2.img testing image on my alpha XP1000 > > workstation. > > but it still can'

Re: [Qemu-devel] [PATCH] Porting TCG to alpha platform

2010-01-19 Thread Richard Henderson
On 01/19/2010 12:47 AM, identifier scorpio wrote: I ported TCG to alpha platform, the patch is currently based on stable-0.10 branch, and now it can run linux-0.2.img testing image on my alpha XP1000 workstation. but it still can't run MS-windows, and I hope someone, especially those guys that

[Qemu-devel] [PATCH] Porting TCG to alpha platform

2010-01-19 Thread identifier scorpio
Hello. I ported TCG to alpha platform, the patch is currently based on stable-0.10 branch, and now it can run linux-0.2.img testing image on my alpha XP1000 workstation. but it still can't run MS-windows, and I hope someone, especially those guys that are working on target-alpha, may help me to