From patchwork Sun Jun 11 08:58:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 691350 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d8a:0:0:0:0:0 with SMTP id b10csp1572218wru; Sun, 11 Jun 2023 02:04:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4ZEpTC8GNFw807qN9Gqal1I626gRehs3LvpfkjBYA1qmRGB/hnWTvPhjiMwXiX9hHSGOr8 X-Received: by 2002:a05:6214:c67:b0:628:ed0e:a165 with SMTP id t7-20020a0562140c6700b00628ed0ea165mr7639743qvj.58.1686474265554; Sun, 11 Jun 2023 02:04:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686474265; cv=none; d=google.com; s=arc-20160816; b=NRRf1gIuwCCfIjyhYrXVZEDEd/UesB59KJZ66w59nJC5sLkOnDWOzbgJ5zv2A63v78 T1s1LgZeUyYUF0EAyKJbB/kXNTOXIc6+biOPltSbsJ/+b/9xZjszJrNra9gpeO2QqYTV DBxYoz2IU/Q+/NZi5DxaJJv3Y9zrHAAW6gV/y3Bz+EmCM1jbh95n7pwAZ7YVCzxw6xc/ ReDQfr1isjCjJflfE+zVJYRNhcM1Lj8UAjEgWLasc1jSDQPdCdtSHdY+kHUyGPXXXVqo bXWxjUBJVYzPWtJ5bV68Y0SQeUi3dG8Bj37+4gvPHyOJ76wR5Jdm3cCdQ/GyRXn01LRW wPfw== 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=sFrqSxuYHrI3cS6SOens6cMF97H9CMcbIb+bhGC3+VE=; b=K1plmUSumONGSKcI3Nf/uSku4OCQPX6DIVCRkZewvq5Euwbb/LE5ukiqrLv0KoWGHZ SdjsRCcKy2LyCUPOGdLdCB0zNULexWgFBLa9edbfd7D7oyk9DG+xlzWaK+TbfTs9f7hR 8Y8wYPT+75wE3qySTE5TvyVsT/M13CTETi9VuDds5hoAeZLFIZzIXfOva9oKbC8w6SZt ONTLTa93gIjfumsFcHL9S1EnyIpjEX9gJl+y+bYz2EbjD6Dm6w9+L0y1wmN+pzKyykNT s4HPRrpSBPsJy6Mrm7yOtSzSenc4250baIB9tMBZdmZ8JtDTfUKsSESkm5u4KcTLREuf InBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Amm+rujT; 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 jl14-20020ad45e8e000000b00621257f084csi4600937qvb.156.2023.06.11.02.04.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 11 Jun 2023 02:04:25 -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=Amm+rujT; 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 1q8Gxa-00058F-DQ; Sun, 11 Jun 2023 05:02:07 -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 1q8Gvu-0002oz-Qc for qemu-devel@nongnu.org; Sun, 11 Jun 2023 05:00:24 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q8Gvt-00043K-05 for qemu-devel@nongnu.org; Sun, 11 Jun 2023 05:00:22 -0400 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-307d20548adso2161258f8f.0 for ; Sun, 11 Jun 2023 02:00:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686474019; x=1689066019; 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=sFrqSxuYHrI3cS6SOens6cMF97H9CMcbIb+bhGC3+VE=; b=Amm+rujTZFaiFRW1MTIaW1l3ApJ8Nu10NtTmtnrVAs33pd0UPuDF+PfyhZ2XRW2oL4 VTHY5cHRIwviP1IdNOeK3rRvLzxTFsjePuSgw7wICl6bLOT3qKnyrJSoCJc8gNaQAdvp vmXzMcYnvrBJ5kv5AovsA/Hdoojjosp6SH7qaA8ydARzsR8ICT6IJskImN6CzW3HXEDC 4rzhNFx9JiNQfUwg8NO+01T/pL4uBTHC6tN+6Lco3SG4HlgWdBFDdpkFq14BRhyNZSTg mEkhTs5rXhbkAmMg8MoRiXzlhbh4q0WgGkMdlkCqHXbe12zalueR0mF/qEQqwt/gVisC 7vgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686474019; x=1689066019; 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=sFrqSxuYHrI3cS6SOens6cMF97H9CMcbIb+bhGC3+VE=; b=WgsoCwNJn7neHPhmvgkZFqrNbNRvnQ7OZoHaPERMTq12jWCLEpKX2EpfQ31olRD5tT 6ilzbID0ttcA1MyT6mhNPIM85EWOGCSDKWuvjHcwCx713EWoVRBM10wYm3CLtboTVrbK h7QOgya8RV0LKTfe1URcRm7/EGvMdklqzzExNyctxlVuRgQeBy9sdn7mPirtzQuOq8tb mnxVQLuR3XE+r7PphvSJftXOsaVJZGJwuHbj85qI/cQJp0uUVfYA+1OsRoklveLsB7oI AK5NiJtDmcMxtkLvYzKcUumx+ANck8RnjFneHWP/+Mvdvgag0mAlroS68DJ8BuJjsFaJ PWjA== X-Gm-Message-State: AC+VfDyoja1g1e91RSVrcA72Cx0Am+vKvrKyZfPxfIVCEagkKr73Vu9B y//pTu+exgbC5NQbkPvjbCzE+tYxbwXTXCDsOnU= X-Received: by 2002:adf:f6c8:0:b0:309:50e7:7d0 with SMTP id y8-20020adff6c8000000b0030950e707d0mr2664023wrp.31.1686474019087; Sun, 11 Jun 2023 02:00:19 -0700 (PDT) Received: from localhost.localdomain (91-163-26-170.subs.proxad.net. [91.163.26.170]) by smtp.gmail.com with ESMTPSA id m11-20020a5d6a0b000000b0030b5d203e7esm9088473wru.97.2023.06.11.02.00.18 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 11 Jun 2023 02:00:18 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Peter Maydell , qemu-arm@nongnu.org, =?utf-8?q?Ph?= =?utf-8?q?ilippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v2 21/26] target/arm/tcg: Extract M-profile definitions to 'helper-m.h.inc' Date: Sun, 11 Jun 2023 10:58:41 +0200 Message-Id: <20230611085846.21415-22-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230611085846.21415-1-philmd@linaro.org> References: <20230611085846.21415-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=philmd@linaro.org; helo=mail-wr1-x42d.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=unavailable 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 helper.h is used by all units, but not all require the M-profile definitions. Move them to a new header; the next commit will remove it from the common helper.h. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/arm/helper.h | 17 ++--------------- target/arm/tcg/helper-m.h.inc | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 15 deletions(-) create mode 100644 target/arm/tcg/helper-m.h.inc diff --git a/target/arm/helper.h b/target/arm/helper.h index 71e2cd5580..05117934f3 100644 --- a/target/arm/helper.h +++ b/target/arm/helper.h @@ -62,21 +62,6 @@ DEF_HELPER_3(cpsr_write, void, env, i32, i32) DEF_HELPER_2(cpsr_write_eret, void, env, i32) DEF_HELPER_1(cpsr_read, i32, env) -DEF_HELPER_3(v7m_msr, void, env, i32, i32) -DEF_HELPER_2(v7m_mrs, i32, env, i32) - -DEF_HELPER_2(v7m_bxns, void, env, i32) -DEF_HELPER_2(v7m_blxns, void, env, i32) - -DEF_HELPER_3(v7m_tt, i32, env, i32, i32) - -DEF_HELPER_1(v7m_preserve_fp_state, void, env) - -DEF_HELPER_2(v7m_vlstm, void, env, i32) -DEF_HELPER_2(v7m_vlldm, void, env, i32) - -DEF_HELPER_2(v8m_stackcheck, void, env, i32) - DEF_HELPER_FLAGS_2(check_bxj_trap, TCG_CALL_NO_WG, void, env, i32) DEF_HELPER_4(access_check_cp_reg, cptr, env, i32, i32, i32) @@ -536,3 +521,5 @@ DEF_HELPER_FLAGS_5(gvec_uclamp_s, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, ptr, i32) DEF_HELPER_FLAGS_5(gvec_uclamp_d, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, ptr, i32) + +#include "tcg/helper-m.h.inc" diff --git a/target/arm/tcg/helper-m.h.inc b/target/arm/tcg/helper-m.h.inc new file mode 100644 index 0000000000..122311b6d0 --- /dev/null +++ b/target/arm/tcg/helper-m.h.inc @@ -0,0 +1,23 @@ +/* + * ARM M-profile helper definitions + * + * Copyright (c) 2007 CodeSourcery. + * Written by Paul Brook + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +DEF_HELPER_3(v7m_msr, void, env, i32, i32) +DEF_HELPER_2(v7m_mrs, i32, env, i32) + +DEF_HELPER_2(v7m_bxns, void, env, i32) +DEF_HELPER_2(v7m_blxns, void, env, i32) + +DEF_HELPER_3(v7m_tt, i32, env, i32, i32) + +DEF_HELPER_1(v7m_preserve_fp_state, void, env) + +DEF_HELPER_2(v7m_vlstm, void, env, i32) +DEF_HELPER_2(v7m_vlldm, void, env, i32) + +DEF_HELPER_2(v8m_stackcheck, void, env, i32)