From patchwork Mon Jun 5 20:15:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 689259 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d8a:0:0:0:0:0 with SMTP id b10csp2288297wru; Mon, 5 Jun 2023 13:26:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Vt3dpfXGnYHBD1uCgT1BDbXVi+OrhfhbBtbn10C+JBrTfKCTq/yrMki7HV/r/rjNIiyJb X-Received: by 2002:a05:622a:15d0:b0:3f6:a1c7:bfe9 with SMTP id d16-20020a05622a15d000b003f6a1c7bfe9mr8262209qty.15.1685996772654; Mon, 05 Jun 2023 13:26:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685996772; cv=none; d=google.com; s=arc-20160816; b=iF4oAAtGce7V2U4sDxMSFW51Y79tJ0D6z5ReCyBtNeGpMBMsW0gQRgWPFKeoQeyluu a8jdMICrAcBkPoLU1iOCOe5LJtV5knF+Ur3Yn/MIP/w/gJ5uq0rDbPnxa20gRlj+WIlj d0Yoa7dxfziD7uaNVH30/q5BjHNvCCpxStl+URhL2HRRv7ar9lMpE9mQ1Bq4bIDbTI8l n4Cxp3JhU0DZqELgQvIiGMQnLc07A8uGgF9nsT9dRyAOHabeUeZz9baJxBMxNNvKcp+X SyZwN26SA/p0v1GjCyAH7iQKgiqPV1mNIk5jwPP/o2w7Q7Ax1YJ8DutRBiYtDLmCrZBs BSsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=ho2ebAK9oxZJuEiRPgTWt9rbyluwjwTYfaQBgc6qN/k=; b=IKGUuXLJi8quwPxqw8R+U76OxjfgV7V2PlnMjnUfXWkgyxdRvY8XM1zNlGvUzjeWMK fU3LGMU9BSdbAJgQQ4rYDSWCKpMPLNNicigUIoabUpyqeDWp0PydHcZfVSoqkXngjcKq d/DsivbrXBF+a1Nkp32czK/Fzmq0mJ4qEOUTMoLXNL2qAQyX56XnH6WAY1ZdpxOZZIuB Dc/r/8wgGVxhiu56KJvk9gGO4ZX/hogr1VJHjtq5hwhl5jozhUWY0ugeN3hu+oAbEzy0 kV6h0R0AEJ+xK0soQJ9lY2lbGwCdiioNxhQpibDpPiTrolq/sJC2FIKX2E2bk/Zxhxf0 Yi8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MZwwXC0G; 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=pass (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 o13-20020a05622a044d00b003f7f583efecsi5199865qtx.376.2023.06.05.13.26.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 05 Jun 2023 13:26:12 -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=pass header.i=@linaro.org header.s=google header.b=MZwwXC0G; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q6GgH-0007Dk-IT; Mon, 05 Jun 2023 16:19:57 -0400 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 1q6Gfo-0006sL-Ks for qemu-devel@nongnu.org; Mon, 05 Jun 2023 16:19:32 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q6Gfm-0005j1-8v for qemu-devel@nongnu.org; Mon, 05 Jun 2023 16:19:27 -0400 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-1b02085bf8dso23997045ad.0 for ; Mon, 05 Jun 2023 13:19:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685996365; x=1688588365; 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=ho2ebAK9oxZJuEiRPgTWt9rbyluwjwTYfaQBgc6qN/k=; b=MZwwXC0GInF8ZLp8bUYQoBVaVBR3lC8Q7adCvQYFLYW2GCoDm3DleEXmutSQfD2tdd 8LCkKahIu1AwWajSy8Ez/cgSkUb2aek5D3fUGRl4Y8p6L3y1kO44LbDvWJJRNfZDHWhr aykyNaOLBjVZgsM5r0kwKsMkbcTEXuA2HJ7T6IljDdYmo1/GdewevxxesKLm783gkheS ARB+EWKi6HDTKyrHQRlffo6Pm82lUZQ77DbVbvHP3BWpenxn8xT5S1RrPfvVcTVqE+BS um4x6QgI/Px6sBMPyTNCD2V789t/Xw8XGeGnUSJhW9LUIn+c3sKMhdhMtif/o7C+i0CD M8Tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685996365; x=1688588365; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ho2ebAK9oxZJuEiRPgTWt9rbyluwjwTYfaQBgc6qN/k=; b=S0gMLKp3R06VyWkKOtSaDzlH6w5HAJ7Zlvs/W6iuA+jwjKOHqAJcRy8dL9xXZ+WhQR vZmzcNqcf7JsF8VxMbH/aqt8/mEmsvm1bFnbCnl4u6sq6Vc4lXVGgOMDdM36wdh5wbCz pamuenhvlwTb7HvYb2+FxuiJkWHI3tj6IXFRVIeE9SYZO68FJSqSyrtIPK8EiAiVh65C CQNqZjjp1F2LWMJXXxw8R5tir1lVB99IF/WJVhyodLjtlDSJvwFyeRx62XHBIJRq3CIj 9EQxk8ypARlhiyPgfcmWcY42L8jvZf4IZqBZxhWrp0fVCypINfkaW6m3IBUcj/+RbIdD Xm5A== X-Gm-Message-State: AC+VfDxIpjQn7fu+uwHSFLw7w+oCy3u+Zt+QsmOGeGmC/BAV7P3BX4BI YBvImwrcGjXw3S5ZPAo6GJFJkTiScvyczHuN1Wg= X-Received: by 2002:a17:903:1250:b0:1b0:4680:3f with SMTP id u16-20020a170903125000b001b04680003fmr26696plh.41.1685996364747; Mon, 05 Jun 2023 13:19:24 -0700 (PDT) Received: from stoup.. ([2602:ae:1598:4c01:3f85:a600:6a3e:e465]) by smtp.gmail.com with ESMTPSA id w20-20020a170902c79400b001a980a23802sm7018184pla.111.2023.06.05.13.19.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jun 2023 13:19:24 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 40/52] target/mips: Tidy helpers for translation Date: Mon, 5 Jun 2023 13:15:36 -0700 Message-Id: <20230605201548.1596865-41-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230605201548.1596865-1-richard.henderson@linaro.org> References: <20230605201548.1596865-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62c.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Move most includes from *translate*.c to translate.h, ensuring that we get the ordering correct. Ensure cpu.h is first. Use disas/disas.h instead of exec/log.h. Drop otherwise unused includes. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/mips/tcg/translate.h | 6 ++++-- target/mips/tcg/msa_translate.c | 3 --- target/mips/tcg/mxu_translate.c | 2 -- target/mips/tcg/octeon_translate.c | 4 +--- target/mips/tcg/rel6_translate.c | 2 -- target/mips/tcg/translate.c | 18 ++++++------------ target/mips/tcg/translate_addr_const.c | 1 - target/mips/tcg/tx79_translate.c | 4 +--- target/mips/tcg/vr54xx_translate.c | 3 --- 9 files changed, 12 insertions(+), 31 deletions(-) diff --git a/target/mips/tcg/translate.h b/target/mips/tcg/translate.h index fa8bf55209..3b0498a47a 100644 --- a/target/mips/tcg/translate.h +++ b/target/mips/tcg/translate.h @@ -8,9 +8,11 @@ #ifndef TARGET_MIPS_TRANSLATE_H #define TARGET_MIPS_TRANSLATE_H -#include "qemu/log.h" -#include "exec/translator.h" +#include "cpu.h" #include "tcg/tcg-op.h" +#include "exec/translator.h" +#include "exec/helper-gen.h" +#include "qemu/log.h" #define MIPS_DEBUG_DISAS 0 diff --git a/target/mips/tcg/msa_translate.c b/target/mips/tcg/msa_translate.c index 220cd3b048..b5b66fb38a 100644 --- a/target/mips/tcg/msa_translate.c +++ b/target/mips/tcg/msa_translate.c @@ -11,11 +11,8 @@ * SPDX-License-Identifier: LGPL-2.1-or-later */ #include "qemu/osdep.h" -#include "tcg/tcg-op.h" -#include "exec/helper-gen.h" #include "translate.h" #include "fpu_helper.h" -#include "internal.h" static int elm_n(DisasContext *ctx, int x); static int elm_df(DisasContext *ctx, int x); diff --git a/target/mips/tcg/mxu_translate.c b/target/mips/tcg/mxu_translate.c index be038b5f07..39348b3a91 100644 --- a/target/mips/tcg/mxu_translate.c +++ b/target/mips/tcg/mxu_translate.c @@ -16,8 +16,6 @@ */ #include "qemu/osdep.h" -#include "tcg/tcg-op.h" -#include "exec/helper-gen.h" #include "translate.h" /* diff --git a/target/mips/tcg/octeon_translate.c b/target/mips/tcg/octeon_translate.c index 103c304d10..e25c4cbaa0 100644 --- a/target/mips/tcg/octeon_translate.c +++ b/target/mips/tcg/octeon_translate.c @@ -7,10 +7,8 @@ */ #include "qemu/osdep.h" -#include "tcg/tcg-op.h" -#include "tcg/tcg-op-gvec.h" -#include "exec/helper-gen.h" #include "translate.h" +#include "tcg/tcg-op-gvec.h" /* Include the auto-generated decoder. */ #include "decode-octeon.c.inc" diff --git a/target/mips/tcg/rel6_translate.c b/target/mips/tcg/rel6_translate.c index d631851258..59f237ba3b 100644 --- a/target/mips/tcg/rel6_translate.c +++ b/target/mips/tcg/rel6_translate.c @@ -9,8 +9,6 @@ */ #include "qemu/osdep.h" -#include "tcg/tcg-op.h" -#include "exec/helper-gen.h" #include "translate.h" /* Include the auto-generated decoders. */ diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c index 312ed66989..f3da05ba3b 100644 --- a/target/mips/tcg/translate.c +++ b/target/mips/tcg/translate.c @@ -23,19 +23,13 @@ */ #include "qemu/osdep.h" -#include "cpu.h" -#include "internal.h" -#include "tcg/tcg-op.h" -#include "exec/translator.h" -#include "exec/helper-proto.h" -#include "exec/helper-gen.h" -#include "semihosting/semihost.h" - -#include "trace.h" -#include "exec/log.h" -#include "qemu/qemu-print.h" -#include "fpu_helper.h" #include "translate.h" +#include "internal.h" +#include "exec/helper-proto.h" +#include "semihosting/semihost.h" +#include "trace.h" +#include "disas/disas.h" +#include "fpu_helper.h" #define HELPER_H "helper.h" #include "exec/helper-info.c.inc" diff --git a/target/mips/tcg/translate_addr_const.c b/target/mips/tcg/translate_addr_const.c index a510da406c..6f4b39f715 100644 --- a/target/mips/tcg/translate_addr_const.c +++ b/target/mips/tcg/translate_addr_const.c @@ -11,7 +11,6 @@ * SPDX-License-Identifier: LGPL-2.1-or-later */ #include "qemu/osdep.h" -#include "tcg/tcg-op.h" #include "translate.h" bool gen_lsa(DisasContext *ctx, int rd, int rt, int rs, int sa) diff --git a/target/mips/tcg/tx79_translate.c b/target/mips/tcg/tx79_translate.c index 3a45a1bfea..dd6fb8a7bd 100644 --- a/target/mips/tcg/tx79_translate.c +++ b/target/mips/tcg/tx79_translate.c @@ -8,10 +8,8 @@ */ #include "qemu/osdep.h" -#include "tcg/tcg-op.h" -#include "tcg/tcg-op-gvec.h" -#include "exec/helper-gen.h" #include "translate.h" +#include "tcg/tcg-op-gvec.h" /* Include the auto-generated decoder. */ #include "decode-tx79.c.inc" diff --git a/target/mips/tcg/vr54xx_translate.c b/target/mips/tcg/vr54xx_translate.c index 804672f84c..2c1f6cc527 100644 --- a/target/mips/tcg/vr54xx_translate.c +++ b/target/mips/tcg/vr54xx_translate.c @@ -10,10 +10,7 @@ */ #include "qemu/osdep.h" -#include "tcg/tcg-op.h" -#include "exec/helper-gen.h" #include "translate.h" -#include "internal.h" /* Include the auto-generated decoder. */ #include "decode-vr54xx.c.inc"