From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NauHJ-0004im-0g for qemu-devel@nongnu.org; Fri, 29 Jan 2010 12:05:05 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NauHH-0004hl-PD for qemu-devel@nongnu.org; Fri, 29 Jan 2010 12:05:04 -0500 Received: from [199.232.76.173] (port=51098 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NauHH-0004he-Jb for qemu-devel@nongnu.org; Fri, 29 Jan 2010 12:05:03 -0500 Received: from are.twiddle.net ([75.149.56.221]:40782) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NauHG-0006ZJ-Lp for qemu-devel@nongnu.org; Fri, 29 Jan 2010 12:05:03 -0500 Message-ID: <4B63153A.6070509@twiddle.net> Date: Fri, 29 Jan 2010 09:04:58 -0800 From: Richard Henderson MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Porting TCG to alpha platform References: <62332.72612.qm@web15907.mail.cnb.yahoo.com> In-Reply-To: <62332.72612.qm@web15907.mail.cnb.yahoo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: identifier scorpio Cc: qemu-devel@nongnu.org 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 of tcg-target.c, it has been declared in exec-all.h Ah, yes, a line I had to add temporarily for the x86 compiler; I meant to take it out again. > I just find that a suspect bug in tcg_out_brcond() and have not tried yet. > > if ( opc == 0) { > opc = cmp_opc[cond]; > if ( const_arg2) { /* should be if (const_arg2 && arg2 & ~0xff == 0) ? > tcg_out_fmt_opi(s, opc, ...) { INDEX_op_brcond_i32, { "rJ", "rI" } }, { INDEX_op_brcond_i64, { "rJ", "rI" } }, The "I" constraint is supposed to have already limited the constant to 0 .. 0xff. You could put an assert there if you like, to make sure everything is going as it should. > 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, tcg_target_long was used places that > could be holding HOST values, which means that the host values would > have been truncated to 32 bits.", and I can't fully understand it, may > you put it more clearly. It was a mis-statement made while tired. Of course tcg_target_long is defined to int64_t when TCG_TARGET_REG_BITS == 64, so there was no truncation to 32 bits. Have you tested of any of the other embedded targets? You may be able to find the error with one of those easier than finding it emulating full-scale Windows. See the images at the bottom of the QEMU download page. r~