qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH for-6.1] tcg/i386: Split P_VEXW from P_REXW


From: Richard Henderson
Subject: Re: [PATCH for-6.1] tcg/i386: Split P_VEXW from P_REXW
Date: Fri, 13 Aug 2021 06:59:13 -1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 8/13/21 12:37 AM, Peter Maydell wrote:
These changes look OK as far as they go, but it's not clear to
me why the other places that set P_REXW are all OK to use P_REXW
and not P_VEXW. For instance tcg_out_mov() sets rexw = P_REXW
and some of the codepaths there will then pass that into
tcg_out_vex_modrm() which ends up in tcg_out_vex_opc().

This distinguishes between 32-bit and 64-bit transfer between vector and general register. Which of course doesn't make sense for i386.

More generally, is there somewhere we can assert that we
didn't try to use a REXW prefix for i386 codegen rather
than just silently ignoring it ?

I guess tcg_out_opc might be a place. But mostly we try to avoid generating those places in the first place. E.g.

#if TCG_TARGET_REG_BITS == 64
# define OP_32_64(x) \
        case glue(glue(INDEX_op_, x), _i64): \
            rexw = P_REXW; /* FALLTHRU */    \
        case glue(glue(INDEX_op_, x), _i32)
#else
# define OP_32_64(x) \
        case glue(glue(INDEX_op_, x), _i32)
#endif


r~



reply via email to

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