From patchwork Mon Oct 14 10:49:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 176167 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp4363240ill; Mon, 14 Oct 2019 04:12:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqy18WpEAcmKY3prANRk9KNYmTPSDTgopGb3jD/84lgaUuFWeutGjbZ9qWICitEFIeY3jFyJ X-Received: by 2002:aa7:d304:: with SMTP id p4mr27616264edq.224.1571051560745; Mon, 14 Oct 2019 04:12:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571051560; cv=none; d=google.com; s=arc-20160816; b=WaHo2BO5sJI+ynNKR9vK/oBJ3SCZV6VHCegn6kVTz+w0SMkPEDHFGef0+5r2QGHjrH bENSoJgsIznlJevC9PWXfy3zTs3aXtW2a1Pcs9nuSpc/9ShbXl1gJjpRTk21e7h8/aBV DDBWqF5RRuP3KE3zxAyfSDJeglhotxalD6r1gObiWTigTkqCzeEGVFXE4Q1npZpa7KpR BXyvu0kjC/3uc2xv41oWXDPi1ExoY8bMk1vi3psp5nIqbHhzY0nSEkZwUHg4FXPRo/zU OrJsXhINZJL3TcRU/NfjC7gY3Nmh5W1Ea4M5eEEPH/ItiCOknw76+fA23yOVmwIr5Yql o5sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=wkKvV4m59QNrxbn2cShYQVtK2L5V4Z2RfTcq3RzCI+A=; b=kNd6BtEK+H0dlnpXiZgOV8zdTgHnkAS7TSmKfwZCd64DC4OV5mlIIS9ev1EBMgcE8v vkcoI96OOCIzUKp/h+ItZ9aaB8tT2UP074j7MakzqXesozonIDz+MYRtYxB9QRO+luy5 Mc1z7sA6WPYGBUk1Iw9c76v97ddK31e/iFzt/9wnRPODUbquWP45l/Nt6OA3RU5bfwsA 71Q9EdVnPeE5tDn3GWmMQrPIH5OrTLEAifDTelnsOlwaqT0C0lXUvxxVNs4g65CkSyOB Z6cP7JsBNFvSzllygkuuAhnMGs//JWPgfzddef7gINbezYgk6NhzyicowWDb7/lBKsp3 Ydaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ib8GIKxG; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id h90si12494684edd.178.2019.10.14.04.12.40 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Oct 2019 04:12:40 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ib8GIKxG; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:47488 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJyHH-0004zJ-Ja for patch@linaro.org; Mon, 14 Oct 2019 07:12:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44651) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJxvT-0007UN-3L for qemu-devel@nongnu.org; Mon, 14 Oct 2019 06:50:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iJxvR-0006Ea-M3 for qemu-devel@nongnu.org; Mon, 14 Oct 2019 06:50:06 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:38546) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iJxvR-0006DR-E1 for qemu-devel@nongnu.org; Mon, 14 Oct 2019 06:50:05 -0400 Received: by mail-wr1-x443.google.com with SMTP id y18so9677410wrn.5 for ; Mon, 14 Oct 2019 03:50:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wkKvV4m59QNrxbn2cShYQVtK2L5V4Z2RfTcq3RzCI+A=; b=ib8GIKxGCj/S/SDhI+albNwezZ2VxDgbviecKDonjK3TkO1GR/t65pLI9WNFa3n7aO /0N+ZK24IsVFGDYLo3EXrkeTCygZVlW3bLbkIOu2nzCGs+U06mErsezjOIByskWrCyMq FgRbU0pWgesd7nxf+kTNuAlKuI8dE8+qG5HXcoWn7ubrrEym0NI5vVT5EMVc+KbJzMn1 ab+f+uO/cYlP+TH/YWL5OLwhgRF8hPzZvceGLU1+78O5CnNZULH1o+R1BCpmaRbtvuAX 8WxE8ttrQINMRWjOgeFUY5TFm1Pp0+Jvocgbq5YZ0XySOObe97ntalfAhiN36lEU4A1T U/Xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wkKvV4m59QNrxbn2cShYQVtK2L5V4Z2RfTcq3RzCI+A=; b=j0M91AYWHN2vl7GYZa6MWeA1pdQ8QllxTkN8So86VK8fxz3g+ZjZlfCdJoH1TprVAQ VNXI1yChHsgeOydE0Z6O8bhNif6cjTVG6VW+aaZoC+EgoJhyREqiKgZmISDW0uJu9n39 zzEu+4x8cZhMV1ZDFW0Cg2l+F1HahohKFLuSFNLFg+lcW9C0a/m6ueBaN5p1mdBcpGxi XqRRiPJc9X8vPLv9htb4pznmqdxRfTA156PNYlcdaCkC4qf1s23mwYscURrrKJsU5/hQ DjBd+meWv/uje2Sa3UxaqcskzDM5stnxtqXuHKL57nLghWNKx7YqC2UKhrrdXBmJ5kLU pMLQ== X-Gm-Message-State: APjAAAWTmgAf0GoIZwl9Lzrsj8I0nMI9TMEsxTtiJIyB/6h+Cyae5993 zkgSBH1ZZAWS0LEi6V8cFFqGcQ== X-Received: by 2002:adf:f547:: with SMTP id j7mr26755221wrp.26.1571050204391; Mon, 14 Oct 2019 03:50:04 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f9sm21372680wre.74.2019.10.14.03.49.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Oct 2019 03:50:00 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 1A73E1FFAE; Mon, 14 Oct 2019 11:49:55 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v5 25/55] target/ppc: fetch code with translator_ld Date: Mon, 14 Oct 2019 11:49:18 +0100 Message-Id: <20191014104948.4291-26-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191014104948.4291-1-alex.bennee@linaro.org> References: <20191014104948.4291-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::443 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: robert.foley@futurewei.com, Richard Henderson , peter.puhov@futurewei.com, aaron@os.amperecomputing.com, cota@braap.org, "open list:PowerPC TCG CPUs" , =?utf-8?q?Alex_Benn=C3=A9e?= , David Gibson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: "Emilio G. Cota" Signed-off-by: Emilio G. Cota Reviewed-by: Richard Henderson Acked-by: David Gibson Signed-off-by: Alex Bennée --- target/ppc/translate.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) -- 2.20.1 diff --git a/target/ppc/translate.c b/target/ppc/translate.c index adb8fd516f..f5fe5d0611 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -7853,11 +7853,9 @@ static void ppc_tr_translate_insn(DisasContextBase *dcbase, CPUState *cs) LOG_DISAS("nip=" TARGET_FMT_lx " super=%d ir=%d\n", ctx->base.pc_next, ctx->mem_idx, (int)msr_ir); - if (unlikely(need_byteswap(ctx))) { - ctx->opcode = bswap32(cpu_ldl_code(env, ctx->base.pc_next)); - } else { - ctx->opcode = cpu_ldl_code(env, ctx->base.pc_next); - } + ctx->opcode = translator_ldl_swap(env, ctx->base.pc_next, + need_byteswap(ctx)); + LOG_DISAS("translate opcode %08x (%02x %02x %02x %02x) (%s)\n", ctx->opcode, opc1(ctx->opcode), opc2(ctx->opcode), opc3(ctx->opcode), opc4(ctx->opcode),