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

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 tail

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

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 Mainly,

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 mail,

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 recognized

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 w...@mail.berlios.de 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

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

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

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

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

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 some basic tests on

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

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, so I hope

[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

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

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't run

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