From nobody Thu Jan 8 13:18:32 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1766829290; cv=none; d=zohomail.com; s=zohoarc; b=aBDsTvvZwDrty0B0xF8fcLhqPSsC3+KdZrVqLZwChwVafCeyDKcI1KlZxTkcYPs2JMj8JtUwUu1qJiEONIo5sfczVtvRe3yROeuIRhwXWefIjWpSMeXd0rKYt6/cgq9w5PUcY6Cnu5ESG7UL9AFBvrBonTOLtkWhAxfYeUpI/GI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1766829290; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=hm/lI/FfjtZ1ql0Pt/4H0tYHsMAbjqQJRNvT37Y3wEk=; b=lISCdHIxaO4yZwrPigcmF0oUKTAORMTcuZG/HuKZbOi0k0nernLRRRN7H1OnRDsc+3XTKS3H6fVgQFyylwTkgmFUOeRxExDaghYC3CSNTrdynPlkkKYh7Ju81YGFIHHxfAmcOgqrSx+esaO8ExFISi3kNiMXt5MILLgj+0ByyAg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1766829290046945.6561919673607; Sat, 27 Dec 2025 01:54:50 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vZQwu-0001j4-1S; Sat, 27 Dec 2025 04:51:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vZQwe-0001Uc-Gm for qemu-devel@nongnu.org; Sat, 27 Dec 2025 04:50:46 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vZQwa-0007NQ-Hw for qemu-devel@nongnu.org; Sat, 27 Dec 2025 04:50:44 -0500 Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-591-A6Q95GrBM2aEXRvWcT9TPQ-1; Sat, 27 Dec 2025 04:50:36 -0500 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-4325ddc5babso2696854f8f.0 for ; Sat, 27 Dec 2025 01:50:36 -0800 (PST) Received: from [192.168.10.48] ([151.95.145.106]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4324ea2278dsm50754437f8f.18.2025.12.27.01.50.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Dec 2025 01:50:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1766829038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hm/lI/FfjtZ1ql0Pt/4H0tYHsMAbjqQJRNvT37Y3wEk=; b=jT8+qvhWvRBrUGkwxI3gPypn68nOoWfIgOn9AHvl7f3KX4li0YlWEE4YbHZURJHigvLjl5 dCUcy5VFLF9uGBOwZ3OUVbWULANf/Fj8ToSmwcu5kivc1opKlY6NEK2xxgcfTI6ubc8RA0 Ooeh0qiCX12W5RSmaua7EYmd/UkdHWo= X-MC-Unique: A6Q95GrBM2aEXRvWcT9TPQ-1 X-Mimecast-MFC-AGG-ID: A6Q95GrBM2aEXRvWcT9TPQ_1766829035 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1766829034; x=1767433834; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hm/lI/FfjtZ1ql0Pt/4H0tYHsMAbjqQJRNvT37Y3wEk=; b=MRFbGgCPjp89waubvNBgf2PThOFgo/eDAAw5kuGAx2X9Dt1K+1agMmahDk0XKRP+ho RBaFp1OW3XpzixXqU2tijZ+VvsMHkLfrmljA8+qemVejyFm3HMpbuSZY8VWlihSJ+lio cimwO5QB4/7tuD1cbKiCrTG7Enmtx6HSR980Bdn05D8yryAkPRvEyROW+Yb+0pM5BmZ8 7r+oupyy9TjiP4FWRir/OUZ+aqPUOKh27SvusZYQJUgvFZTjV17Rkk7ODiTHbWlUC7ig FkTjIGePwPYbvLJuTT7Pod+SwNCUmdmde0lbshK9wSEKa+rP5RKSVvKl/0bA6ZNHdc0+ OM2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766829034; x=1767433834; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=hm/lI/FfjtZ1ql0Pt/4H0tYHsMAbjqQJRNvT37Y3wEk=; b=AR8yCTG6KAJoHbHG/z+vD33RWcHMnf5wZTHaiTpftgZ6xJZwXj9zKYqpzBQCUhaYAc FyrdDnzg2ZvBk0MXGB/y6ODgfrrtvqGflqhUAuYgXtzoBXPttL7nq338si17d0pnHut8 8nHZPCzyUrYeWAQ24As/msI8rHQte46TzVclIvYqBdB+n/6aGp6PzUOTFtRcXSBPvOTE tQWZ2EOUH5KC1TYwpvazinIFHRw3NFQ3JpeCqpfkIA3mXlndK4rtwYuQs9D2cEuOfb15 OoNL/LCTmoze2fyEf8Mev7MZlyYwUK2aCz2cARWfG/GISgRcDhV99f4rUHhGwNXjsUYK SSQA== X-Gm-Message-State: AOJu0Yw387mqoyMBBeT+y5wLg34JaquG5oHyHEeVrUoUKWGuwKNH7rgw Yq/+rWmO6vx/gQ2i4olLVARbXfwJ8/XXv4EbGszTS93CpSPiUf7v9oWHNrJILohYI4+GC76cCej Py0nUBIVSDuCnAA+sgdNTIJC0kUuo0SRLBXqdtcERork1Oma1tooKBw49vp8x9mpub3l26vraWT s9yqcaTwZoePp9iEz1b/wNywg8PweLS9kUY7vsOn/K X-Gm-Gg: AY/fxX72jXKntXbo0kysivnxKsLYUk0WHFTSda+yCEn3Yomi6anind73tCOjBXfCTyS bmXfIlff3/DRhSupO703dZWNoVNMWLAhYYmPWCScFjv2U+k9MEwfm6IM6Pl891Jy1j3t879v3jc X1k/rDNgwg3AIc3z8TXZDkreiv1SqXffGjDpa7s3YFR0eYrRpuDWHvIy8YOit09ITyQ9pf9At8U BYVhMBv1ekTofqelUQf8U/hHiqGsMeKXzdskjVyeL6kKqZuw1TuXu+J9i10L/RnuJj0Cqw1Tlym YKGg0ejzfNKLz3KiHVGnKpFCkfa5DmwjhdTurfPT/6mm3RuugXyBNjK1xnxo8b2asZk+0Oqt3Dc fgNYlJOx12JEnoh3zML1U0tlfrgTQmmSDDdgMZkJ6+PA92A53I9rUxa2H2rhdQ/KFdiIRKGMmeK RKvTtcku8BGs4Hl0I= X-Received: by 2002:a05:6000:3103:b0:432:88bd:df44 with SMTP id ffacd0b85a97d-43288bde3d7mr1407820f8f.0.1766829034056; Sat, 27 Dec 2025 01:50:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IFyzopux4oBUDcSo86RI01aPGOAw88QQgfroacpwA1dn7lPe6XmGbwcUM8glbxZz9I7ahKLjw== X-Received: by 2002:a05:6000:3103:b0:432:88bd:df44 with SMTP id ffacd0b85a97d-43288bde3d7mr1407793f8f.0.1766829033455; Sat, 27 Dec 2025 01:50:33 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Zhao Liu , Farrah Chen , Zide Chen , Xiaoyao Li , Richard Henderson Subject: [PULL 128/153] target/i386/tcg: kill tmp1_i64 Date: Sat, 27 Dec 2025 10:47:33 +0100 Message-ID: <20251227094759.35658-54-pbonzini@redhat.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251227091622.20725-1-pbonzini@redhat.com> References: <20251227091622.20725-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1766829291672158500 Content-Type: text/plain; charset="utf-8" Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/i386/tcg/translate.c | 66 ++++++++++++++++++++-------------- target/i386/tcg/emit.c.inc | 72 ++++++++++++++++++++++--------------- 2 files changed, 84 insertions(+), 54 deletions(-) diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index bdaa436feac..dff7b615ef0 100644 --- a/target/i386/tcg/translate.c +++ b/target/i386/tcg/translate.c @@ -136,7 +136,6 @@ typedef struct DisasContext { =20 /* TCG local register indexes (only used inside old micro ops) */ TCGv_i32 tmp2_i32; - TCGv_i64 tmp1_i64; =20 sigjmp_buf jmpbuf; TCGOp *prev_insn_start; @@ -2365,14 +2364,18 @@ static void gen_jmp_rel_csize(DisasContext *s, int = diff, int tb_num) =20 static inline void gen_ldq_env_A0(DisasContext *s, int offset) { - tcg_gen_qemu_ld_i64(s->tmp1_i64, s->A0, s->mem_index, MO_LEUQ); - tcg_gen_st_i64(s->tmp1_i64, tcg_env, offset); + TCGv_i64 t =3D tcg_temp_new_i64(); + + tcg_gen_qemu_ld_i64(t, s->A0, s->mem_index, MO_LEUQ); + tcg_gen_st_i64(t, tcg_env, offset); } =20 static inline void gen_stq_env_A0(DisasContext *s, int offset) { - tcg_gen_ld_i64(s->tmp1_i64, tcg_env, offset); - tcg_gen_qemu_st_i64(s->tmp1_i64, s->A0, s->mem_index, MO_LEUQ); + TCGv_i64 t =3D tcg_temp_new_i64(); + + tcg_gen_ld_i64(t, tcg_env, offset); + tcg_gen_qemu_st_i64(t, s->A0, s->mem_index, MO_LEUQ); } =20 static inline void gen_ldo_env_A0(DisasContext *s, int offset, bool align) @@ -2452,6 +2455,7 @@ static void gen_x87(DisasContext *s, X86DecodedInsn *= decode) TCGv ea =3D gen_lea_modrm_1(s, decode->mem, false); TCGv last_addr =3D tcg_temp_new(); bool update_fdp =3D true; + TCGv_i64 t64; =20 tcg_gen_mov_tl(last_addr, ea); gen_lea_v_seg(s, ea, decode->mem.def_seg, s->override); @@ -2472,9 +2476,10 @@ static void gen_x87(DisasContext *s, X86DecodedInsn = *decode) break; =20 case 0x20 ... 0x27: /* fxxxl */ - tcg_gen_qemu_ld_i64(s->tmp1_i64, s->A0, + t64 =3D tcg_temp_new_i64(); + tcg_gen_qemu_ld_i64(t64, s->A0, s->mem_index, MO_LEUQ); - gen_helper_fldl_FT0(tcg_env, s->tmp1_i64); + gen_helper_fldl_FT0(tcg_env, t64); gen_helper_fp_arith_ST0_FT0(op & 7); break; =20 @@ -2496,9 +2501,10 @@ static void gen_x87(DisasContext *s, X86DecodedInsn = *decode) gen_helper_fildl_ST0(tcg_env, s->tmp2_i32); break; case 0x28: /* fldl */ - tcg_gen_qemu_ld_i64(s->tmp1_i64, s->A0, + t64 =3D tcg_temp_new_i64(); + tcg_gen_qemu_ld_i64(t64, s->A0, s->mem_index, MO_LEUQ); - gen_helper_fldl_ST0(tcg_env, s->tmp1_i64); + gen_helper_fldl_ST0(tcg_env, t64); break; case 0x38: /* filds */ tcg_gen_qemu_ld_i32(s->tmp2_i32, s->A0, @@ -2513,8 +2519,9 @@ static void gen_x87(DisasContext *s, X86DecodedInsn *= decode) gen_helper_fpop(tcg_env); break; case 0x29: /* fisttpll */ - gen_helper_fisttll_ST0(s->tmp1_i64, tcg_env); - tcg_gen_qemu_st_i64(s->tmp1_i64, s->A0, + t64 =3D tcg_temp_new_i64(); + gen_helper_fisttll_ST0(t64, tcg_env); + tcg_gen_qemu_st_i64(t64, s->A0, s->mem_index, MO_LEUQ); gen_helper_fpop(tcg_env); break; @@ -2542,8 +2549,9 @@ static void gen_x87(DisasContext *s, X86DecodedInsn *= decode) } break; case 0x2a: case 0x2b: /* fstl, fstpl */ - gen_helper_fstl_ST0(s->tmp1_i64, tcg_env); - tcg_gen_qemu_st_i64(s->tmp1_i64, s->A0, + t64 =3D tcg_temp_new_i64(); + gen_helper_fstl_ST0(t64, tcg_env); + tcg_gen_qemu_st_i64(t64, s->A0, s->mem_index, MO_LEUQ); if ((op & 7) =3D=3D 3) { gen_helper_fpop(tcg_env); @@ -2611,13 +2619,15 @@ static void gen_x87(DisasContext *s, X86DecodedInsn= *decode) gen_helper_fpop(tcg_env); break; case 0x3d: /* fildll */ - tcg_gen_qemu_ld_i64(s->tmp1_i64, s->A0, + t64 =3D tcg_temp_new_i64(); + tcg_gen_qemu_ld_i64(t64, s->A0, s->mem_index, MO_LEUQ); - gen_helper_fildll_ST0(tcg_env, s->tmp1_i64); + gen_helper_fildll_ST0(tcg_env, t64); break; case 0x3f: /* fistpll */ - gen_helper_fistll_ST0(s->tmp1_i64, tcg_env); - tcg_gen_qemu_st_i64(s->tmp1_i64, s->A0, + t64 =3D tcg_temp_new_i64(); + gen_helper_fistll_ST0(t64, tcg_env); + tcg_gen_qemu_st_i64(t64, s->A0, s->mem_index, MO_LEUQ); gen_helper_fpop(tcg_env); break; @@ -2959,6 +2969,7 @@ static void gen_multi0F(DisasContext *s, X86DecodedIn= sn *decode) int modrm =3D s->modrm; MemOp ot; int reg, rm, mod, op; + TCGv_i64 t64; =20 /* now check op code */ switch (b) { @@ -3150,9 +3161,10 @@ static void gen_multi0F(DisasContext *s, X86DecodedI= nsn *decode) || (s->prefix & (PREFIX_DATA | PREFIX_REPZ | PREFIX_REPNZ)= )) { goto illegal_op; } + t64 =3D tcg_temp_new_i64(); tcg_gen_trunc_tl_i32(s->tmp2_i32, cpu_regs[R_ECX]); - gen_helper_xgetbv(s->tmp1_i64, tcg_env, s->tmp2_i32); - tcg_gen_extr_i64_tl(cpu_regs[R_EAX], cpu_regs[R_EDX], s->tmp1_= i64); + gen_helper_xgetbv(t64, tcg_env, s->tmp2_i32); + tcg_gen_extr_i64_tl(cpu_regs[R_EAX], cpu_regs[R_EDX], t64); break; =20 case 0xd1: /* xsetbv */ @@ -3164,10 +3176,11 @@ static void gen_multi0F(DisasContext *s, X86Decoded= Insn *decode) if (!check_cpl0(s)) { break; } - tcg_gen_concat_tl_i64(s->tmp1_i64, cpu_regs[R_EAX], + t64 =3D tcg_temp_new_i64(); + tcg_gen_concat_tl_i64(t64, cpu_regs[R_EAX], cpu_regs[R_EDX]); tcg_gen_trunc_tl_i32(s->tmp2_i32, cpu_regs[R_ECX]); - gen_helper_xsetbv(tcg_env, s->tmp2_i32, s->tmp1_i64); + gen_helper_xsetbv(tcg_env, s->tmp2_i32, t64); /* End TB because translation flags may change. */ s->base.is_jmp =3D DISAS_EOB_NEXT; break; @@ -3327,18 +3340,20 @@ static void gen_multi0F(DisasContext *s, X86Decoded= Insn *decode) if (s->prefix & (PREFIX_DATA | PREFIX_REPZ | PREFIX_REPNZ)) { goto illegal_op; } + t64 =3D tcg_temp_new_i64(); tcg_gen_trunc_tl_i32(s->tmp2_i32, cpu_regs[R_ECX]); - gen_helper_rdpkru(s->tmp1_i64, tcg_env, s->tmp2_i32); - tcg_gen_extr_i64_tl(cpu_regs[R_EAX], cpu_regs[R_EDX], s->tmp1_= i64); + gen_helper_rdpkru(t64, tcg_env, s->tmp2_i32); + tcg_gen_extr_i64_tl(cpu_regs[R_EAX], cpu_regs[R_EDX], t64); break; case 0xef: /* wrpkru */ if (s->prefix & (PREFIX_DATA | PREFIX_REPZ | PREFIX_REPNZ)) { goto illegal_op; } - tcg_gen_concat_tl_i64(s->tmp1_i64, cpu_regs[R_EAX], + t64 =3D tcg_temp_new_i64(); + tcg_gen_concat_tl_i64(t64, cpu_regs[R_EAX], cpu_regs[R_EDX]); tcg_gen_trunc_tl_i32(s->tmp2_i32, cpu_regs[R_ECX]); - gen_helper_wrpkru(tcg_env, s->tmp2_i32, s->tmp1_i64); + gen_helper_wrpkru(tcg_env, s->tmp2_i32, t64); break; =20 CASE_MODRM_OP(6): /* lmsw */ @@ -3730,7 +3745,6 @@ static void i386_tr_init_disas_context(DisasContextBa= se *dcbase, CPUState *cpu) dc->T1 =3D tcg_temp_new(); dc->A0 =3D tcg_temp_new(); =20 - dc->tmp1_i64 =3D tcg_temp_new_i64(); dc->tmp2_i32 =3D tcg_temp_new_i32(); dc->cc_srcT =3D tcg_temp_new(); } diff --git a/target/i386/tcg/emit.c.inc b/target/i386/tcg/emit.c.inc index 131aefce53c..8dac4d09da1 100644 --- a/target/i386/tcg/emit.c.inc +++ b/target/i386/tcg/emit.c.inc @@ -521,10 +521,12 @@ static void gen_3dnow(DisasContext *s, X86DecodedInsn= *decode) =20 gen_helper_enter_mmx(tcg_env); if (fn =3D=3D FN_3DNOW_MOVE) { - tcg_gen_ld_i64(s->tmp1_i64, tcg_env, decode->op[1].offset); - tcg_gen_st_i64(s->tmp1_i64, tcg_env, decode->op[0].offset); + TCGv_i64 t =3D tcg_temp_new_i64(); + + tcg_gen_ld_i64(t, tcg_env, decode->op[1].offset); + tcg_gen_st_i64(t, tcg_env, decode->op[0].offset); } else { - fn(tcg_env, OP_PTR0, OP_PTR1); + fn(tcg_env, OP_PTR0, OP_PTR1); } } =20 @@ -2596,10 +2598,11 @@ static void gen_MOVQ(DisasContext *s, X86DecodedIns= n *decode) { int vec_len =3D vector_len(s, decode); int lo_ofs =3D vector_elem_offset(&decode->op[0], MO_64, 0); + TCGv_i64 t =3D tcg_temp_new_i64(); =20 - tcg_gen_ld_i64(s->tmp1_i64, tcg_env, decode->op[2].offset); + tcg_gen_ld_i64(t, tcg_env, decode->op[2].offset); if (decode->op[0].has_ea) { - tcg_gen_qemu_st_i64(s->tmp1_i64, s->A0, s->mem_index, MO_LEUQ); + tcg_gen_qemu_st_i64(t, s->A0, s->mem_index, MO_LEUQ); } else { /* * tcg_gen_gvec_dup_i64(MO_64, op0.offset, 8, vec_len, s->tmp1_64)= would @@ -2610,7 +2613,7 @@ static void gen_MOVQ(DisasContext *s, X86DecodedInsn = *decode) * it disqualifies using oprsz < maxsz to emulate VEX128. */ tcg_gen_gvec_dup_imm(MO_64, decode->op[0].offset, vec_len, vec_len= , 0); - tcg_gen_st_i64(s->tmp1_i64, tcg_env, lo_ofs); + tcg_gen_st_i64(t, tcg_env, lo_ofs); } } =20 @@ -4505,10 +4508,12 @@ static void gen_VMASKMOVPS_st(DisasContext *s, X86D= ecodedInsn *decode) =20 static void gen_VMOVHPx_ld(DisasContext *s, X86DecodedInsn *decode) { + TCGv_i64 t =3D tcg_temp_new_i64(); + gen_ldq_env_A0(s, decode->op[0].offset + offsetof(XMMReg, XMM_Q(1))); if (decode->op[0].offset !=3D decode->op[1].offset) { - tcg_gen_ld_i64(s->tmp1_i64, tcg_env, decode->op[1].offset + offset= of(XMMReg, XMM_Q(0))); - tcg_gen_st_i64(s->tmp1_i64, tcg_env, decode->op[0].offset + offset= of(XMMReg, XMM_Q(0))); + tcg_gen_ld_i64(t, tcg_env, decode->op[1].offset + offsetof(XMMReg,= XMM_Q(0))); + tcg_gen_st_i64(t, tcg_env, decode->op[0].offset + offsetof(XMMReg,= XMM_Q(0))); } } =20 @@ -4519,33 +4524,39 @@ static void gen_VMOVHPx_st(DisasContext *s, X86Deco= dedInsn *decode) =20 static void gen_VMOVHPx(DisasContext *s, X86DecodedInsn *decode) { + TCGv_i64 t =3D tcg_temp_new_i64(); + if (decode->op[0].offset !=3D decode->op[2].offset) { - tcg_gen_ld_i64(s->tmp1_i64, tcg_env, decode->op[2].offset + offset= of(XMMReg, XMM_Q(1))); - tcg_gen_st_i64(s->tmp1_i64, tcg_env, decode->op[0].offset + offset= of(XMMReg, XMM_Q(1))); + tcg_gen_ld_i64(t, tcg_env, decode->op[2].offset + offsetof(XMMReg,= XMM_Q(1))); + tcg_gen_st_i64(t, tcg_env, decode->op[0].offset + offsetof(XMMReg,= XMM_Q(1))); } if (decode->op[0].offset !=3D decode->op[1].offset) { - tcg_gen_ld_i64(s->tmp1_i64, tcg_env, decode->op[1].offset + offset= of(XMMReg, XMM_Q(0))); - tcg_gen_st_i64(s->tmp1_i64, tcg_env, decode->op[0].offset + offset= of(XMMReg, XMM_Q(0))); + tcg_gen_ld_i64(t, tcg_env, decode->op[1].offset + offsetof(XMMReg,= XMM_Q(0))); + tcg_gen_st_i64(t, tcg_env, decode->op[0].offset + offsetof(XMMReg,= XMM_Q(0))); } } =20 static void gen_VMOVHLPS(DisasContext *s, X86DecodedInsn *decode) { - tcg_gen_ld_i64(s->tmp1_i64, tcg_env, decode->op[2].offset + offsetof(X= MMReg, XMM_Q(1))); - tcg_gen_st_i64(s->tmp1_i64, tcg_env, decode->op[0].offset + offsetof(X= MMReg, XMM_Q(0))); + TCGv_i64 t =3D tcg_temp_new_i64(); + + tcg_gen_ld_i64(t, tcg_env, decode->op[2].offset + offsetof(XMMReg, XMM= _Q(1))); + tcg_gen_st_i64(t, tcg_env, decode->op[0].offset + offsetof(XMMReg, XMM= _Q(0))); if (decode->op[0].offset !=3D decode->op[1].offset) { - tcg_gen_ld_i64(s->tmp1_i64, tcg_env, decode->op[1].offset + offset= of(XMMReg, XMM_Q(1))); - tcg_gen_st_i64(s->tmp1_i64, tcg_env, decode->op[0].offset + offset= of(XMMReg, XMM_Q(1))); + tcg_gen_ld_i64(t, tcg_env, decode->op[1].offset + offsetof(XMMReg,= XMM_Q(1))); + tcg_gen_st_i64(t, tcg_env, decode->op[0].offset + offsetof(XMMReg,= XMM_Q(1))); } } =20 static void gen_VMOVLHPS(DisasContext *s, X86DecodedInsn *decode) { - tcg_gen_ld_i64(s->tmp1_i64, tcg_env, decode->op[2].offset); - tcg_gen_st_i64(s->tmp1_i64, tcg_env, decode->op[0].offset + offsetof(X= MMReg, XMM_Q(1))); + TCGv_i64 t =3D tcg_temp_new_i64(); + + tcg_gen_ld_i64(t, tcg_env, decode->op[2].offset); + tcg_gen_st_i64(t, tcg_env, decode->op[0].offset + offsetof(XMMReg, XMM= _Q(1))); if (decode->op[0].offset !=3D decode->op[1].offset) { - tcg_gen_ld_i64(s->tmp1_i64, tcg_env, decode->op[1].offset + offset= of(XMMReg, XMM_Q(0))); - tcg_gen_st_i64(s->tmp1_i64, tcg_env, decode->op[0].offset + offset= of(XMMReg, XMM_Q(0))); + tcg_gen_ld_i64(t, tcg_env, decode->op[1].offset + offsetof(XMMReg,= XMM_Q(0))); + tcg_gen_st_i64(t, tcg_env, decode->op[0].offset + offsetof(XMMReg,= XMM_Q(0))); } } =20 @@ -4557,34 +4568,39 @@ static void gen_VMOVLHPS(DisasContext *s, X86Decode= dInsn *decode) static void gen_VMOVLPx(DisasContext *s, X86DecodedInsn *decode) { int vec_len =3D vector_len(s, decode); + TCGv_i64 t =3D tcg_temp_new_i64(); =20 - tcg_gen_ld_i64(s->tmp1_i64, tcg_env, decode->op[2].offset + offsetof(X= MMReg, XMM_Q(0))); + tcg_gen_ld_i64(t, tcg_env, decode->op[2].offset + offsetof(XMMReg, XMM= _Q(0))); tcg_gen_gvec_mov(MO_64, decode->op[0].offset, decode->op[1].offset, ve= c_len, vec_len); - tcg_gen_st_i64(s->tmp1_i64, tcg_env, decode->op[0].offset + offsetof(X= MMReg, XMM_Q(0))); + tcg_gen_st_i64(t, tcg_env, decode->op[0].offset + offsetof(XMMReg, XMM= _Q(0))); } =20 static void gen_VMOVLPx_ld(DisasContext *s, X86DecodedInsn *decode) { int vec_len =3D vector_len(s, decode); + TCGv_i64 t =3D tcg_temp_new_i64(); =20 - tcg_gen_qemu_ld_i64(s->tmp1_i64, s->A0, s->mem_index, MO_LEUQ); + tcg_gen_qemu_ld_i64(t, s->A0, s->mem_index, MO_LEUQ); tcg_gen_gvec_mov(MO_64, decode->op[0].offset, decode->op[1].offset, ve= c_len, vec_len); - tcg_gen_st_i64(s->tmp1_i64, OP_PTR0, offsetof(ZMMReg, ZMM_Q(0))); + tcg_gen_st_i64(t, OP_PTR0, offsetof(ZMMReg, ZMM_Q(0))); } =20 static void gen_VMOVLPx_st(DisasContext *s, X86DecodedInsn *decode) { - tcg_gen_ld_i64(s->tmp1_i64, OP_PTR2, offsetof(ZMMReg, ZMM_Q(0))); - tcg_gen_qemu_st_i64(s->tmp1_i64, s->A0, s->mem_index, MO_LEUQ); + TCGv_i64 t =3D tcg_temp_new_i64(); + + tcg_gen_ld_i64(t, OP_PTR2, offsetof(ZMMReg, ZMM_Q(0))); + tcg_gen_qemu_st_i64(t, s->A0, s->mem_index, MO_LEUQ); } =20 static void gen_VMOVSD_ld(DisasContext *s, X86DecodedInsn *decode) { TCGv_i64 zero =3D tcg_constant_i64(0); + TCGv_i64 t =3D tcg_temp_new_i64(); =20 - tcg_gen_qemu_ld_i64(s->tmp1_i64, s->A0, s->mem_index, MO_LEUQ); + tcg_gen_qemu_ld_i64(t, s->A0, s->mem_index, MO_LEUQ); tcg_gen_st_i64(zero, OP_PTR0, offsetof(ZMMReg, ZMM_Q(1))); - tcg_gen_st_i64(s->tmp1_i64, OP_PTR0, offsetof(ZMMReg, ZMM_Q(0))); + tcg_gen_st_i64(t, OP_PTR0, offsetof(ZMMReg, ZMM_Q(0))); } =20 static void gen_VMOVSS(DisasContext *s, X86DecodedInsn *decode) --=20 2.52.0