qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH] Porting TCG to alpha platform
Date: Fri, 29 Jan 2010 09:04:58 -0800
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.7) Gecko/20100120 Fedora/3.0.1-1.fc12 Thunderbird/3.0.1

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~




reply via email to

[Prev in Thread] Current Thread [Next in Thread]