From patchwork Mon Feb 27 14:00:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 657009 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2371386wrb; Mon, 27 Feb 2023 06:09:57 -0800 (PST) X-Google-Smtp-Source: AK7set+raO9KEYG+xz1Iyw2cYncFxcz9UQDRold6vv/Bm4/603eBdOfqA7mLLMUje+EkXsjqUOXn X-Received: by 2002:a05:622a:294:b0:3bf:c432:357 with SMTP id z20-20020a05622a029400b003bfc4320357mr13980947qtw.10.1677506997006; Mon, 27 Feb 2023 06:09:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506996; cv=none; d=google.com; s=arc-20160816; b=EDLjX3SAYNs39SiI+aRHozNHyRNqQjQ9yLu0O7LLx3jnl9qROOVUaoIVy+GbwdAVuD N59BIBrNeEUTyJr8SYvefgAk9FiVWiP/ZuDgJ5yKWMRqSPun+yz30DeBeG/3m0XtzwWA 4aV9Ozll19IB5cEWArhEWcWR+Keg90HcxU0/YTIBguJxY/5WPZrBcXwAD9/vMJGr6nOn rLhjMIMXf4u0Y3ScnLgALpbfQyxDodwlRwbgjG6Tnssr5WO1dIMFPIrG6l+ukJFlA3rN tGxzYAjphMVhkRamocZr5UdHVfs6MSKqfM2kT8dp/fQt7SD18DdzHC7MhX9U8xwRicax J+vg== 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:to:from :dkim-signature; bh=oID0XRKWjWT5mF7tiW/PUiEOqizwpNDJYfpRIj4ZwZM=; b=rUNd12J3aA8veqPt580AOTvneO5R0FoFZTZ+9s54dr7SGhPsvou//H7Q/5DwaaGifW 1ZKjZ6BouGBQX59lpjxpesHSBKeQFLDoFRd2++j89miVda2pYNJFReVkjpbl9uaAvyuL oThmw37Lk/FUe6R4lnSqEl6fM4lacg9V+gQ7PvrhMo0HGmohrtH4h6/YJbxqV5HRU77q hjyt/8c2eYq1HNSY8/SGsYLBgvGmZXr6Yc3CJSbcHlHgqxZnJ9/S0ZPL8RtqjnBgtZrY JCJ31F2MW6lBZ0+Kfdk4iObPnfOeanUfMkYLMTJVUXDRPaMCi4jyuHIeLIRedhDF5qjT o7kA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=H0rma6gX; 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 bn45-20020a05620a2aed00b00718e35db8f5si5920785qkb.88.2023.02.27.06.09.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:09:56 -0800 (PST) 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=H0rma6gX; 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 1pWe52-0001q8-IQ; Mon, 27 Feb 2023 09:02:16 -0500 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 1pWe46-0000dL-0V for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:29 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe41-0007XC-Vb for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:15 -0500 Received: by mail-wm1-x330.google.com with SMTP id o38-20020a05600c512600b003e8320d1c11so6627700wms.1 for ; Mon, 27 Feb 2023 06:01:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=oID0XRKWjWT5mF7tiW/PUiEOqizwpNDJYfpRIj4ZwZM=; b=H0rma6gXAXIT3PwNQMJH9TfYLwot1Wvz/3s/xT/TG9qqSsMSi4uEse7gx7UBsrjMnX dntEzeCwLrG3Puxguxvq95RjC8h0GV3VdtgPlJ+nQpsRyc1mqcwZsHCSiOKXybivk2js PElGYL81CExuKpQnr9xgjySmC4Js0ipI5LyfWz+xie0hg1YQ/mYttb7z1Ujaah8q5Gyq 3ioDyUB3Pd+/IoA9fi+Hy+CcR8ieN/oqRZzfN1ecCMgJaUmAcs8+vLDIMiXbfqLrCtJy TlOiiOSDidU4vhSK/OP/C6OQ1oxFJhjKUVMyKdZ7KwmffQMPovqAz+pDrLL2GI3xf0tu 6kpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oID0XRKWjWT5mF7tiW/PUiEOqizwpNDJYfpRIj4ZwZM=; b=bUc94ToRZmW/cli0wL5+1rHU7yeSKeLUj2cl9XjiSfU9QWQ3zoTvCGyRcVmS9KS+JR APudq5OjilDJGvH6e8HDmbyTUVHhy2OLdVY06x52hkKaidpQteaMxJyYs+Apuf4SHqbM SugCSqxcq8pA/X4vxvTjOKQ/5we/UgxA/HiN1X487r3uRRgqhq+5vuVCjknsFuanLOia IswKHfBmXoaq1IZGORewF6UCN9g2w28t8fyAa48sat19HvH646tSSzz7ASRkYBeYuOn8 WtDumrAmvleOgbBOHo8NXm4NFnjuSvhBgb1U/sI4nAAwUsiqvWcWUPX5hZ8oCDiyuOfe EVTw== X-Gm-Message-State: AO0yUKU6uSvC+FkknMsIr7COAPrzlgFjmppMiTts5Orh/0yuyTaWgJP9 7Pj4M14xiZtuITYObIVBbtPvLNnb29NpBNjm X-Received: by 2002:a05:600c:331b:b0:3dc:4318:d00d with SMTP id q27-20020a05600c331b00b003dc4318d00dmr18799432wmp.11.1677506472129; Mon, 27 Feb 2023 06:01:12 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id s9-20020a5d4249000000b002c5598c14acsm7158514wrr.6.2023.02.27.06.01.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 06:01:11 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 05/25] target/arm: move helpers to tcg/ Date: Mon, 27 Feb 2023 14:00:42 +0000 Message-Id: <20230227140102.3712344-6-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227140102.3712344-1-peter.maydell@linaro.org> References: <20230227140102.3712344-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x330.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 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 From: Claudio Fontana Signed-off-by: Claudio Fontana Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- target/arm/{ => tcg}/vec_internal.h | 0 target/arm/tcg-stubs.c | 23 +++++++++++++++++++++++ target/arm/{ => tcg}/crypto_helper.c | 0 target/arm/{ => tcg}/helper-a64.c | 0 target/arm/{ => tcg}/iwmmxt_helper.c | 0 target/arm/{ => tcg}/m_helper.c | 0 target/arm/{ => tcg}/mte_helper.c | 0 target/arm/{ => tcg}/mve_helper.c | 0 target/arm/{ => tcg}/neon_helper.c | 0 target/arm/{ => tcg}/op_helper.c | 0 target/arm/{ => tcg}/pauth_helper.c | 0 target/arm/{ => tcg}/sme_helper.c | 0 target/arm/{ => tcg}/sve_helper.c | 0 target/arm/{ => tcg}/tlb_helper.c | 0 target/arm/{ => tcg}/vec_helper.c | 0 target/arm/meson.build | 15 ++------------- target/arm/tcg/meson.build | 13 +++++++++++++ 17 files changed, 38 insertions(+), 13 deletions(-) rename target/arm/{ => tcg}/vec_internal.h (100%) create mode 100644 target/arm/tcg-stubs.c rename target/arm/{ => tcg}/crypto_helper.c (100%) rename target/arm/{ => tcg}/helper-a64.c (100%) rename target/arm/{ => tcg}/iwmmxt_helper.c (100%) rename target/arm/{ => tcg}/m_helper.c (100%) rename target/arm/{ => tcg}/mte_helper.c (100%) rename target/arm/{ => tcg}/mve_helper.c (100%) rename target/arm/{ => tcg}/neon_helper.c (100%) rename target/arm/{ => tcg}/op_helper.c (100%) rename target/arm/{ => tcg}/pauth_helper.c (100%) rename target/arm/{ => tcg}/sme_helper.c (100%) rename target/arm/{ => tcg}/sve_helper.c (100%) rename target/arm/{ => tcg}/tlb_helper.c (100%) rename target/arm/{ => tcg}/vec_helper.c (100%) diff --git a/target/arm/vec_internal.h b/target/arm/tcg/vec_internal.h similarity index 100% rename from target/arm/vec_internal.h rename to target/arm/tcg/vec_internal.h diff --git a/target/arm/tcg-stubs.c b/target/arm/tcg-stubs.c new file mode 100644 index 00000000000..1a7ddb36647 --- /dev/null +++ b/target/arm/tcg-stubs.c @@ -0,0 +1,23 @@ +/* + * QEMU ARM stubs for some TCG helper functions + * + * Copyright 2021 SUSE LLC + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ + +#include "qemu/osdep.h" +#include "cpu.h" +#include "internals.h" + +void write_v7m_exception(CPUARMState *env, uint32_t new_exc) +{ + g_assert_not_reached(); +} + +void raise_exception_ra(CPUARMState *env, uint32_t excp, uint32_t syndrome, + uint32_t target_el, uintptr_t ra) +{ + g_assert_not_reached(); +} diff --git a/target/arm/crypto_helper.c b/target/arm/tcg/crypto_helper.c similarity index 100% rename from target/arm/crypto_helper.c rename to target/arm/tcg/crypto_helper.c diff --git a/target/arm/helper-a64.c b/target/arm/tcg/helper-a64.c similarity index 100% rename from target/arm/helper-a64.c rename to target/arm/tcg/helper-a64.c diff --git a/target/arm/iwmmxt_helper.c b/target/arm/tcg/iwmmxt_helper.c similarity index 100% rename from target/arm/iwmmxt_helper.c rename to target/arm/tcg/iwmmxt_helper.c diff --git a/target/arm/m_helper.c b/target/arm/tcg/m_helper.c similarity index 100% rename from target/arm/m_helper.c rename to target/arm/tcg/m_helper.c diff --git a/target/arm/mte_helper.c b/target/arm/tcg/mte_helper.c similarity index 100% rename from target/arm/mte_helper.c rename to target/arm/tcg/mte_helper.c diff --git a/target/arm/mve_helper.c b/target/arm/tcg/mve_helper.c similarity index 100% rename from target/arm/mve_helper.c rename to target/arm/tcg/mve_helper.c diff --git a/target/arm/neon_helper.c b/target/arm/tcg/neon_helper.c similarity index 100% rename from target/arm/neon_helper.c rename to target/arm/tcg/neon_helper.c diff --git a/target/arm/op_helper.c b/target/arm/tcg/op_helper.c similarity index 100% rename from target/arm/op_helper.c rename to target/arm/tcg/op_helper.c diff --git a/target/arm/pauth_helper.c b/target/arm/tcg/pauth_helper.c similarity index 100% rename from target/arm/pauth_helper.c rename to target/arm/tcg/pauth_helper.c diff --git a/target/arm/sme_helper.c b/target/arm/tcg/sme_helper.c similarity index 100% rename from target/arm/sme_helper.c rename to target/arm/tcg/sme_helper.c diff --git a/target/arm/sve_helper.c b/target/arm/tcg/sve_helper.c similarity index 100% rename from target/arm/sve_helper.c rename to target/arm/tcg/sve_helper.c diff --git a/target/arm/tlb_helper.c b/target/arm/tcg/tlb_helper.c similarity index 100% rename from target/arm/tlb_helper.c rename to target/arm/tcg/tlb_helper.c diff --git a/target/arm/vec_helper.c b/target/arm/tcg/vec_helper.c similarity index 100% rename from target/arm/vec_helper.c rename to target/arm/tcg/vec_helper.c diff --git a/target/arm/meson.build b/target/arm/meson.build index b2904b676b0..3e2f4030056 100644 --- a/target/arm/meson.build +++ b/target/arm/meson.build @@ -1,17 +1,9 @@ arm_ss = ss.source_set() arm_ss.add(files( 'cpu.c', - 'crypto_helper.c', 'debug_helper.c', 'gdbstub.c', 'helper.c', - 'iwmmxt_helper.c', - 'm_helper.c', - 'mve_helper.c', - 'neon_helper.c', - 'op_helper.c', - 'tlb_helper.c', - 'vec_helper.c', 'vfp_helper.c', 'cpu_tcg.c', )) @@ -22,11 +14,6 @@ arm_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c', 'kvm64.c'), if_false: fil arm_ss.add(when: 'TARGET_AARCH64', if_true: files( 'cpu64.c', 'gdbstub64.c', - 'helper-a64.c', - 'mte_helper.c', - 'pauth_helper.c', - 'sve_helper.c', - 'sme_helper.c', )) arm_softmmu_ss = ss.source_set() @@ -43,6 +30,8 @@ subdir('hvf') if 'CONFIG_TCG' in config_all subdir('tcg') +else + arm_ss.add(files('tcg-stubs.c')) endif target_arch += {'arm': arm_ss} diff --git a/target/arm/tcg/meson.build b/target/arm/tcg/meson.build index 044561bd4de..1f27ba1272e 100644 --- a/target/arm/tcg/meson.build +++ b/target/arm/tcg/meson.build @@ -23,10 +23,23 @@ arm_ss.add(files( 'translate-mve.c', 'translate-neon.c', 'translate-vfp.c', + 'crypto_helper.c', + 'iwmmxt_helper.c', + 'm_helper.c', + 'mve_helper.c', + 'neon_helper.c', + 'op_helper.c', + 'tlb_helper.c', + 'vec_helper.c', )) arm_ss.add(when: 'TARGET_AARCH64', if_true: files( 'translate-a64.c', 'translate-sve.c', 'translate-sme.c', + 'helper-a64.c', + 'mte_helper.c', + 'pauth_helper.c', + 'sme_helper.c', + 'sve_helper.c', ))