[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 23/37] target/i386: reimplement 0x0f 0x78-0x7f, add AVX
From: |
Richard Henderson |
Subject: |
Re: [PATCH 23/37] target/i386: reimplement 0x0f 0x78-0x7f, add AVX |
Date: |
Mon, 12 Sep 2022 14:56:16 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 |
On 9/12/22 00:04, Paolo Bonzini wrote:
+static void gen_MOVD_from(DisasContext *s, CPUX86State *env, X86DecodedInsn
*decode)
+{
+ MemOp ot = decode->op[2].ot;
+ int lo_ofs = decode->op[2].offset
+ - xmm_offset(decode->op[2].ot)
+ + xmm_offset(ot);
+
+ switch (ot) {
+ case MO_32:
+#ifdef TARGET_X86_64
+ tcg_gen_ld_i32(s->tmp2_i32, cpu_env, lo_ofs);
+ tcg_gen_extu_i32_tl(s->T0, s->tmp2_i32);
tcg_gen_ld32u_tl(s->T0, cpu_env, lo_ofs);
+static void gen_MOVQ(DisasContext *s, CPUX86State *env, X86DecodedInsn *decode)
+{
+ int vec_len = sse_vec_len(s, decode);
+ int lo_ofs = decode->op[0].offset
+ - xmm_offset(decode->op[0].ot)
+ + xmm_offset(MO_64);
+
+ tcg_gen_ld_i64(s->tmp1_i64, cpu_env, decode->op[2].offset);
+ tcg_gen_gvec_dup_imm(MO_64, decode->op[0].offset, vec_len, vec_len, 0);
+ tcg_gen_st_i64(s->tmp1_i64, cpu_env, lo_ofs);
tcg_gen_gvec_dup_i64(MO_64, offset, 8, sse_vec_max_len, s->tmp1_i64);
+static void gen_SSE4a_I(DisasContext *s, CPUX86State *env, X86DecodedInsn
*decode)
+{
+ TCGv_i32 length = tcg_const_i32(decode->immediate & 255);
+ TCGv_i32 index = tcg_const_i32(decode->immediate >> 8);
+
+ if (s->prefix & PREFIX_DATA) {
+ gen_helper_extrq_i(cpu_env, s->ptr0, index, length);
+ } else {
+ gen_helper_insertq_i(cpu_env, s->ptr0, index, length);
+ }
+ tcg_temp_free_i32(length);
+ tcg_temp_free_i32(index);
Again, why the choice of delayed decode? I guess it doesn't matter, but it's
odd.
r~
- [PATCH 22/37] target/i386: reimplement 0x0f 0x50-0x5f, add AVX, (continued)
- [PATCH 22/37] target/i386: reimplement 0x0f 0x50-0x5f, add AVX, Paolo Bonzini, 2022/09/11
- [PATCH 21/37] target/i386: reimplement 0x0f 0xd8-0xdf, 0xe8-0xef, 0xf8-0xff, add AVX, Paolo Bonzini, 2022/09/11
- [PATCH 20/37] target/i386: reimplement 0x0f 0x60-0x6f, add AVX, Paolo Bonzini, 2022/09/11
- Re: [PATCH 20/37] target/i386: reimplement 0x0f 0x60-0x6f, add AVX, Richard Henderson, 2022/09/12
- [PATCH 23/37] target/i386: reimplement 0x0f 0x78-0x7f, add AVX, Paolo Bonzini, 2022/09/11
- Re: [PATCH 23/37] target/i386: reimplement 0x0f 0x78-0x7f, add AVX,
Richard Henderson <=
- [PATCH 25/37] target/i386: reimplement 0x0f 0xd0-0xd7, 0xe0-0xe7, 0xf0-0xf7, add AVX, Paolo Bonzini, 2022/09/11
- [PATCH 24/37] target/i386: reimplement 0x0f 0x70-0x77, add AVX, Paolo Bonzini, 2022/09/11
- [PATCH 27/37] target/i386: Use tcg gvec ops for pmovmskb, Paolo Bonzini, 2022/09/11
[PATCH 26/37] target/i386: reimplement 0x0f 0x3a, add AVX, Paolo Bonzini, 2022/09/11