[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH v1 05/22] target/i386: introduce gen_ld_modr
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [RFC PATCH v1 05/22] target/i386: introduce gen_ld_modrm_* helpers |
Date: |
Wed, 31 Jul 2019 12:08:50 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
On 7/31/19 10:56 AM, Jan Bobek wrote:
> These help with decoding/loading ModR/M vector operands; the operand's
> register offset is returned, which is suitable for use with gvec
> infrastructure.
>
> Signed-off-by: Jan Bobek <address@hidden>
> ---
> target/i386/translate.c | 47 +++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 47 insertions(+)
>
> diff --git a/target/i386/translate.c b/target/i386/translate.c
> index 9e22eca2dc..7548677e1f 100644
> --- a/target/i386/translate.c
> +++ b/target/i386/translate.c
> @@ -3040,6 +3040,53 @@ static const struct SSEOpHelper_eppi
> sse_op_table7[256] = {
> [0xdf] = AESNI_OP(aeskeygenassist),
> };
>
> +static inline void gen_ld_modrm_PqQq(CPUX86State *env, DisasContext *s, int
> modrm,
> + uint32_t* dofs, uint32_t* aofs)
s/uint32_t* /uint32_t */
Drop the inlines; let the compiler choose.
> +{
> + const int mod = (modrm >> 6) & 3;
> + const int reg = (modrm >> 3) & 7; /* no REX_R */
> + *dofs = offsetof(CPUX86State, fpregs[reg].mmx);
> +
> + if(mod == 3) {
s/if(/if (/
Both of these errors should be caught by ./scripts/checkpatch.pl.
> + gen_ldo_env_A0(s, *aofs); /* FIXME this needs to load 32 bytes for
> YMM
Better as "TODO", since this isn't broken and in need of fixing, since we do
not yet support AVX.
Otherwise,
Reviewed-by: Richard Henderson <address@hidden>
r~
- [Qemu-devel] [RFC PATCH v1 00/22] reimplement (some) x86 vector instructions using tcg-gvec, Jan Bobek, 2019/07/31
- [Qemu-devel] [RFC PATCH v1 02/22] target/i386: Push rex_w into DisasContext, Jan Bobek, 2019/07/31
- [Qemu-devel] [RFC PATCH v1 01/22] target/i386: Push rex_r into DisasContext, Jan Bobek, 2019/07/31
- [Qemu-devel] [RFC PATCH v1 05/22] target/i386: introduce gen_ld_modrm_* helpers, Jan Bobek, 2019/07/31
- Re: [Qemu-devel] [RFC PATCH v1 05/22] target/i386: introduce gen_ld_modrm_* helpers,
Richard Henderson <=
- [Qemu-devel] [RFC PATCH v1 04/22] target/i386: Simplify gen_exception arguments, Jan Bobek, 2019/07/31
- [Qemu-devel] [RFC PATCH v1 07/22] target/i386: add vector register file alignment constraints, Jan Bobek, 2019/07/31
- [Qemu-devel] [RFC PATCH v1 09/22] target/i386: reimplement (V)POR, (V)ORPS, (V)ORPD, Jan Bobek, 2019/07/31
- [Qemu-devel] [RFC PATCH v1 06/22] target/i386: introduce gen_gvec_ld_modrm_* helpers, Jan Bobek, 2019/07/31
- [Qemu-devel] [RFC PATCH v1 08/22] target/i386: reimplement (V)PAND, (V)ANDPS, (V)ANDPD, Jan Bobek, 2019/07/31