qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Thomas Huth <thuth@redhat.com>, qemu-devel@nongnu.org
Cc: qemu-arm@nongnu.org
Subject: Re: [Qemu-devel] [RFC PATCH 3/3] target/arm: Make m_helper.c optional via CONFIG_ARM_V7M
Date: Tue, 3 Sep 2019 18:19:38 +0200	[thread overview]
Message-ID: <bb6eb994-532e-7afc-bb27-aa5d56080b50@redhat.com> (raw)
In-Reply-To: <20190903154810.27365-4-thuth@redhat.com>

On 9/3/19 5:48 PM, Thomas Huth wrote:
> We've already got the CONFIG_ARM_V7M switch, but it currently can
> not be disabled yet. The m_helper.c code should not be compiled
> into the binary if the switch is not enabled. We also have to
> provide some stubs in a separate file to make sure that we still
> can link the other code without CONFIG_ARM_V7M.

If there is no M support, the translate code shouldn't even generate M
calls, so the stub shouldn't be necessary.
Anyhow I guess this code will be simplified by the ongoing decodetree
conversion from Richard.

> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  target/arm/Makefile.objs   |  3 +-
>  target/arm/m_helper-stub.c | 58 ++++++++++++++++++++++++++++++++++++++
>  2 files changed, 60 insertions(+), 1 deletion(-)
>  create mode 100644 target/arm/m_helper-stub.c
> 
> diff --git a/target/arm/Makefile.objs b/target/arm/Makefile.objs
> index 5cafc1eb6c..225e7a70a9 100644
> --- a/target/arm/Makefile.objs
> +++ b/target/arm/Makefile.objs
> @@ -36,7 +36,8 @@ obj-y += tlb_helper.o debug_helper.o
>  obj-y += translate.o op_helper.o
>  obj-y += crypto_helper.o
>  obj-y += iwmmxt_helper.o vec_helper.o neon_helper.o
> -obj-y += m_helper.o
> +obj-$(CONFIG_ARM_V7M) += m_helper.o
> +obj-$(call lnot,$(CONFIG_ARM_V7M)) += m_helper-stub.o
>  
>  obj-$(CONFIG_SOFTMMU) += psci.o
>  
> diff --git a/target/arm/m_helper-stub.c b/target/arm/m_helper-stub.c
> new file mode 100644
> index 0000000000..8ec9de0fb6
> --- /dev/null
> +++ b/target/arm/m_helper-stub.c
> @@ -0,0 +1,58 @@
> +/*
> + * ARM V7M related stubs.
> + *
> + * SPDX-License-Identifier: GPL-2.0-or-later
> + */
> +#include "qemu/osdep.h"
> +#include "cpu.h"
> +#include "exec/helper-proto.h"
> +
> +void HELPER(v7m_bxns)(CPUARMState *env, uint32_t dest)
> +{
> +    abort();
> +}
> +
> +void HELPER(v7m_blxns)(CPUARMState *env, uint32_t dest)
> +{
> +    abort();
> +}
> +
> +uint32_t HELPER(v7m_mrs)(CPUARMState *env, uint32_t reg)
> +{
> +    abort();
> +}
> +
> +void HELPER(v7m_msr)(CPUARMState *env, uint32_t maskreg, uint32_t val)
> +{
> +    abort();
> +}
> +
> +uint32_t HELPER(v7m_tt)(CPUARMState *env, uint32_t addr, uint32_t op)
> +{
> +    abort();
> +}
> +
> +void HELPER(v7m_preserve_fp_state)(CPUARMState *env)
> +{
> +    abort();
> +}
> +
> +void write_v7m_exception(CPUARMState *env, uint32_t new_exc)
> +{
> +    abort();
> +}
> +
> +void HELPER(v7m_vlldm)(CPUARMState *env, uint32_t fptr)
> +{
> +    abort();
> +}
> +
> +void HELPER(v7m_vlstm)(CPUARMState *env, uint32_t fptr)
> +{
> +    abort();
> +}
> +
> +ARMMMUIdx arm_v7m_mmu_idx_for_secstate(CPUARMState *env, bool secstate)
> +{
> +    abort();
> +}
> 


  reply	other threads:[~2019-09-03 16:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-03 15:48 [Qemu-devel] [RFC PATCH 0/3] Make it possible to compile with CONFIG_ARM_V7M=n Thomas Huth
2019-09-03 15:48 ` [Qemu-devel] [RFC PATCH 1/3] target/arm: Make cpu_register() and set_feature() available for other files Thomas Huth
2019-09-03 16:01   ` Richard Henderson
2019-09-03 16:07   ` Peter Maydell
2019-09-03 15:48 ` [Qemu-devel] [RFC PATCH 2/3] target/arm: Move cortex-m related functions to m_helper.c Thomas Huth
2019-09-03 15:48 ` [Qemu-devel] [RFC PATCH 3/3] target/arm: Make m_helper.c optional via CONFIG_ARM_V7M Thomas Huth
2019-09-03 16:19   ` Philippe Mathieu-Daudé [this message]
2019-09-03 18:23     ` Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bb6eb994-532e-7afc-bb27-aa5d56080b50@redhat.com \
    --to=philmd@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).