From patchwork Sat Dec 17 22:21:44 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 132024 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 291481007D2 for ; Sun, 18 Dec 2011 09:22:11 +1100 (EST) Received: from localhost ([::1]:55264 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rc2dq-0003nc-N7 for incoming@patchwork.ozlabs.org; Sat, 17 Dec 2011 17:22:06 -0500 Received: from eggs.gnu.org ([140.186.70.92]:35375) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rc2dg-0003ev-Nn for qemu-devel@nongnu.org; Sat, 17 Dec 2011 17:21:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rc2df-0000pR-BV for qemu-devel@nongnu.org; Sat, 17 Dec 2011 17:21:56 -0500 Received: from mail-iy0-f173.google.com ([209.85.210.173]:52826) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rc2df-0000p4-8V for qemu-devel@nongnu.org; Sat, 17 Dec 2011 17:21:55 -0500 Received: by mail-iy0-f173.google.com with SMTP id j37so7270149iag.4 for ; Sat, 17 Dec 2011 14:21:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=xpj6s6wiT78ehV1TmPiqRgAnPnb7lCOMYbmKh5kjEgk=; b=oJFHy4wqT9MVmNni40qNJKs/Tfu90DllBjilgFb+jJ7RzoE3mecnR2orcUxHUur9CC qoKJIbgZdPfBfs7ym654kpfzDzuAIRjYz/l/4mXoQ3oRZqV4G9jYiW516efDYUSdugus uv3zE2LwfFWs1YYlq4F9iZsMs7A6V/h5O8jHU= Received: by 10.50.106.226 with SMTP id gx2mr18057882igb.13.1324160514931; Sat, 17 Dec 2011 14:21:54 -0800 (PST) Received: from anchor.twiddle.home ([173.160.232.49]) by mx.google.com with ESMTPS id mb4sm22620613igc.1.2011.12.17.14.21.53 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 17 Dec 2011 14:21:54 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sat, 17 Dec 2011 14:21:44 -0800 Message-Id: <1324160506-25183-2-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.7.7.4 In-Reply-To: <1324160506-25183-1-git-send-email-rth@twiddle.net> References: <1324160506-25183-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.210.173 Cc: Aurelien Jarno Subject: [Qemu-devel] [PATCH 1/3] target-mips: Streamline indexed cp1 memory addressing. 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 We've already eliminated both base and index being zero. Signed-off-by: Richard Henderson --- target-mips/translate.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/target-mips/translate.c b/target-mips/translate.c index d5b1c76..b20a817 100644 --- a/target-mips/translate.c +++ b/target-mips/translate.c @@ -7749,8 +7749,7 @@ static void gen_flt3_ldst (DisasContext *ctx, uint32_t opc, } else if (index == 0) { gen_load_gpr(t0, base); } else { - gen_load_gpr(t0, index); - gen_op_addr_add(ctx, t0, cpu_gpr[base], t0); + gen_op_addr_add(ctx, t0, cpu_gpr[base], cpu_gpr[index]); } /* Don't do NOP if destination is zero: we must perform the actual memory access. */