From patchwork Thu Oct 17 13:15:45 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: 176623 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp944608ill; Thu, 17 Oct 2019 06:41:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqxX37mkdqQorN3H428sxyvUckWs1zaJWhxnBojRshM6SRCI19CkevmxVxVlmSoyd4RI5Lqi X-Received: by 2002:a37:8185:: with SMTP id c127mr3245662qkd.420.1571319670722; Thu, 17 Oct 2019 06:41:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571319670; cv=none; d=google.com; s=arc-20160816; b=qxdebDPSw9ly5C/rYNCl6TpLZWhG6VGFFQW23d1xExwmLi5ngHb/Dpi+XjX4P+MJqM lx1ZICwLi3VAvTbJaLaJWsIyVhqJVimfOZcUHdHrGyoKxgpsxVQpyUR8ftpjKKJWA9fU PuDr8ioTPnOuZoVqm5e+J8qXeMUMYs/z5ZPvI6bd7gZ6wo3/TsUox1e4qtGcvnaSoZfS trMXBTo0u7m8GUnagbEPVszWqSsbeFZSQGWLqIBBd55MVNH8XKeC4Di/3c2nOrOAG8ZP fGjibY+rAYtx4425E6+6l9/IOaWGSa/ilyjQk8UQcZhrTSv5oOmBzEiR5yS4hnFbLFga yjRg== 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=zoJwzSnpNtm/KpOB6AZKLCOOqIvUG4CtS9/wJYNCjCVctJEofoEzqE0KYFPf3rKAWn bl4s8dng/rToyqhiD5WLUiPMfuYVxy343WqAJgiCyw6bLETtYHNi6SHpHh9mHs2t3D4h aqwRySMlEk4VYnyDn/b4XhiajfOp4HjvQngA7XX5EuiZdtFyWT8UkFGI4HHVgoVGA78g /nlMhGRN3HzmlI1Li4ccp6rMfGfEkLsx+zJPGYGCciB07wC+nIRHGb+qp02ft0f5zU9p Mp5frunjo2lu7CtEpjAHlYUuJL35jqJ3g0U2oNNBupEv4a7CKSjvxQtSF+1i0Cp/h6aX o+1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=rTa1X6lB; 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 c16si2101687qtb.170.2019.10.17.06.41.10 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 17 Oct 2019 06:41:10 -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=rTa1X6lB; 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]:48164 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iL61d-0004ii-QR for patch@linaro.org; Thu, 17 Oct 2019 09:41:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34052) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iL5do-0008Bz-Bh for qemu-devel@nongnu.org; Thu, 17 Oct 2019 09:16:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iL5dn-0005WO-7Q for qemu-devel@nongnu.org; Thu, 17 Oct 2019 09:16:32 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:36632) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iL5dm-0005Vd-UE for qemu-devel@nongnu.org; Thu, 17 Oct 2019 09:16:31 -0400 Received: by mail-wr1-x434.google.com with SMTP id w18so1754265wrt.3 for ; Thu, 17 Oct 2019 06:16:30 -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=rTa1X6lBDRkyP2/hDTmolWJCZfeklme2HvJmd1b/uTAIMlnWIEGSJ6Q+XgnHyI42Dl hte8dTv9c5T2T/QbbvkHqd1g2LCWJMVoCj+0Xd7AZZsQK/3As9msCyjGqEsVGdfCjrZX 7yrvt0DtP9FxwHquBEMX4vDEuD7iGcvnG1eYf/RkgVcEmecNNv3ZXas3LrahiIVUhhbU J4Xph/E66dWCVJRTgM41PA1WZVPz5uNO+GfFrBIi6hLM7hG/hmcgJmjtQnrfNCraH2J/ pidZElsXp698d8jUWgKxtMc0bTSW486kRDpL0DZi0z53NyDN98ozLY/KYhkTItbEJ7mZ XI+g== 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=j6qArK51oApEAo4p3q31gFGreJOHcM+Ms5HhhUv+2eL8cDXdK5bOOVBlgXYt7phgOZ TvDmYm8NuD58k7EynBCsKJsMMNZxScLdX0/SBYugstdem6gQsD4sCIFKaVMgT+DvJhoG ERSKG18qMvX5l9xkpn85XleQVQy5iRWp3ZeIm7KHXBi17a78CI4af+HIqt3ptdTjvfuk NZa7E7LaFiuK5U+PKvGBlMvOQAzwR52ivh4o2ZwsjzXaCGg094TRhSwI+fUNeDUz5YI4 Z6ksU7yNkehu6VSOwtVQraits7DKQwjEL8klqbbU0RoTLaLWYWWEmtrpLsml6tZxqbKt SKtg== X-Gm-Message-State: APjAAAXvXZKM2IPx/WYCadfqs9IkA0026NAE/EGSYeEwNZeZfSvDN7+0 w1LGA14gIJL8nyxBc4iv3zXDsg== X-Received: by 2002:a5d:56ca:: with SMTP id m10mr2939156wrw.369.1571318189782; Thu, 17 Oct 2019 06:16:29 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id r3sm3243066wre.29.2019.10.17.06.16.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Oct 2019 06:16:26 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 3472C1FFAC; Thu, 17 Oct 2019 14:16:18 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v6 24/54] target/ppc: fetch code with translator_ld Date: Thu, 17 Oct 2019 14:15:45 +0100 Message-Id: <20191017131615.19660-25-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191017131615.19660-1-alex.bennee@linaro.org> References: <20191017131615.19660-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::434 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),