From patchwork Fri Nov 29 02:59:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 295082 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id AD4692C0097 for ; Fri, 29 Nov 2013 14:07:25 +1100 (EST) Received: from localhost ([::1]:44989 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmEQM-0000vY-OA for incoming@patchwork.ozlabs.org; Thu, 28 Nov 2013 22:07:22 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39969) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmEL4-00022F-0K for qemu-devel@nongnu.org; Thu, 28 Nov 2013 22:01:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VmEKy-00022h-5R for qemu-devel@nongnu.org; Thu, 28 Nov 2013 22:01:53 -0500 Received: from mail-pb0-x233.google.com ([2607:f8b0:400e:c01::233]:43946) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmEKx-00022X-QM for qemu-devel@nongnu.org; Thu, 28 Nov 2013 22:01:48 -0500 Received: by mail-pb0-f51.google.com with SMTP id up15so13521101pbc.24 for ; Thu, 28 Nov 2013 19:01:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:in-reply-to:references; bh=GEg15X8Zt0p9DKvVebg9YMkyeDXRPCVlxMQIqA7x+cU=; b=BzFEMUHcUxSqRw4ITCDzz1jvzkwVTJahrXavQwGRui32AdrwKmrlZCB2Mjk8muk5eX i4aASgBJ96yUVQeM0yp2SA/zcsXkVtahEw21RAOKcdDa3XNzLULHn4VUSsLHJkfI1VPu pp4HM+1NHwZQ577nWSKW6qbKsycaG3C5id7RGkWlxfeSThT9bbEyn8NBHF/zKhbSHo5v pBRh20ztm2PCbxqZDlCemXKdbscEvxO6bVi384aHhX0JTP34nRrc8puiByE+ioZbRaAH zSqL9rXveid9PNYSzrYWMm8pLllVAG2M+uzYjNdsuLV5ClcqAs2jQhSXh9AyJi3sealP BRlA== X-Received: by 10.66.179.143 with SMTP id dg15mr49960698pac.52.1385694106866; Thu, 28 Nov 2013 19:01:46 -0800 (PST) Received: from pebble.twiddle.net.twiddle.net ([172.56.32.137]) by mx.google.com with ESMTPSA id hw10sm98475726pbc.24.2013.11.28.19.01.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Nov 2013 19:01:46 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 29 Nov 2013 15:59:56 +1300 Message-Id: <1385694047-6116-10-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1385694047-6116-1-git-send-email-rth@twiddle.net> References: <1385694047-6116-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c01::233 Subject: [Qemu-devel] [PATCH v2 09/60] target-i386: Remove gen_op_ld_T1_A0 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Propagate its definition into all users. Signed-off-by: Richard Henderson --- target-i386/translate.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index c64203e..586e5af 100644 --- a/target-i386/translate.c +++ b/target-i386/translate.c @@ -586,11 +586,6 @@ static inline void gen_op_ld_v(DisasContext *s, int idx, TCGv t0, TCGv a0) tcg_gen_qemu_ld_tl(t0, a0, s->mem_index, idx | MO_LE); } -static inline void gen_op_ld_T1_A0(DisasContext *s, int idx) -{ - gen_op_ld_v(s, idx, cpu_T[1], cpu_A0); -} - static inline void gen_op_st_v(DisasContext *s, int idx, TCGv t0, TCGv a0) { tcg_gen_qemu_st_tl(t0, a0, s->mem_index, idx | MO_LE); @@ -1244,7 +1239,7 @@ static inline void gen_lods(DisasContext *s, int ot) static inline void gen_scas(DisasContext *s, int ot) { gen_string_movl_A0_EDI(s); - gen_op_ld_T1_A0(s, ot); + gen_op_ld_v(s, ot, cpu_T[1], cpu_A0); gen_op(s, OP_CMPL, ot, R_EAX); gen_op_movl_T0_Dshift(ot); gen_op_add_reg_T0(s->aflag, R_EDI); @@ -1253,7 +1248,7 @@ static inline void gen_scas(DisasContext *s, int ot) static inline void gen_cmps(DisasContext *s, int ot) { gen_string_movl_A0_EDI(s); - gen_op_ld_T1_A0(s, ot); + gen_op_ld_v(s, ot, cpu_T[1], cpu_A0); gen_string_movl_A0_ESI(s); gen_op(s, OP_CMPL, ot, OR_TMP0); gen_op_movl_T0_Dshift(ot); @@ -4834,7 +4829,7 @@ static target_ulong disas_insn(CPUX86State *env, DisasContext *s, rm = (modrm & 7) | REX_B(s); if (mod != 3) { gen_lea_modrm(env, s, modrm, ®_addr, &offset_addr); - gen_op_ld_T1_A0(s, ot); + gen_op_ld_v(s, ot, cpu_T[1], cpu_A0); } else if (op == OP_XORL && rm == reg) { goto xor_zero; } else { @@ -5165,7 +5160,7 @@ static target_ulong disas_insn(CPUX86State *env, DisasContext *s, gen_eob(s); break; case 3: /* lcall Ev */ - gen_op_ld_T1_A0(s, ot); + gen_op_ld_v(s, ot, cpu_T[1], cpu_A0); gen_add_A0_im(s, 1 << (ot - MO_16 + 1)); gen_op_ld_v(s, MO_16, cpu_T[0], cpu_A0); do_lcall: @@ -5191,7 +5186,7 @@ static target_ulong disas_insn(CPUX86State *env, DisasContext *s, gen_eob(s); break; case 5: /* ljmp Ev */ - gen_op_ld_T1_A0(s, ot); + gen_op_ld_v(s, ot, cpu_T[1], cpu_A0); gen_add_A0_im(s, 1 << (ot - MO_16 + 1)); gen_op_ld_v(s, MO_16, cpu_T[0], cpu_A0); do_ljmp: @@ -5356,7 +5351,7 @@ static target_ulong disas_insn(CPUX86State *env, DisasContext *s, } else { gen_lea_modrm(env, s, modrm, ®_addr, &offset_addr); gen_op_mov_TN_reg(ot, 0, reg); - gen_op_ld_T1_A0(s, ot); + gen_op_ld_v(s, ot, cpu_T[1], cpu_A0); gen_op_addl_T0_T1(); gen_op_st_T0_A0(s, ot); gen_op_mov_reg_T1(ot, reg); @@ -5842,7 +5837,7 @@ static target_ulong disas_insn(CPUX86State *env, DisasContext *s, /* for xchg, lock is implicit */ if (!(prefixes & PREFIX_LOCK)) gen_helper_lock(); - gen_op_ld_T1_A0(s, ot); + gen_op_ld_v(s, ot, cpu_T[1], cpu_A0); gen_op_st_T0_A0(s, ot); if (!(prefixes & PREFIX_LOCK)) gen_helper_unlock(); @@ -5873,7 +5868,7 @@ static target_ulong disas_insn(CPUX86State *env, DisasContext *s, if (mod == 3) goto illegal_op; gen_lea_modrm(env, s, modrm, ®_addr, &offset_addr); - gen_op_ld_T1_A0(s, ot); + gen_op_ld_v(s, ot, cpu_T[1], cpu_A0); gen_add_A0_im(s, 1 << (ot - MO_16 + 1)); /* load the segment first to handle exceptions properly */ gen_op_ld_v(s, MO_16, cpu_T[0], cpu_A0); @@ -7679,7 +7674,7 @@ static target_ulong disas_insn(CPUX86State *env, DisasContext *s, gen_svm_check_intercept(s, pc_start, op==2 ? SVM_EXIT_GDTR_WRITE : SVM_EXIT_IDTR_WRITE); gen_lea_modrm(env, s, modrm, ®_addr, &offset_addr); - gen_op_ld_T1_A0(s, MO_16); + gen_op_ld_v(s, MO_16, cpu_T[1], cpu_A0); gen_add_A0_im(s, 2); gen_op_ld_v(s, CODE64(s) + MO_32, cpu_T[0], cpu_A0); if (!s->dflag)