qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-arm@nongnu.org, qemu-devel@nongnu.org
Subject: [PATCH 01/13] target/arm: Move constant expanders to translate.h
Date: Tue, 13 Apr 2021 17:07:47 +0100	[thread overview]
Message-ID: <20210413160759.5917-2-peter.maydell@linaro.org> (raw)
In-Reply-To: <20210413160759.5917-1-peter.maydell@linaro.org>

Some of the constant expanders defined in translate.c are generically
useful and will be used by the separate C files for VFP and Neon once
they are created; move the expander definitions to translate.h.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 target/arm/translate.h | 24 ++++++++++++++++++++++++
 target/arm/translate.c | 24 ------------------------
 2 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/target/arm/translate.h b/target/arm/translate.h
index 423b0e08df0..4c0b6e8fc42 100644
--- a/target/arm/translate.h
+++ b/target/arm/translate.h
@@ -116,6 +116,30 @@ extern TCGv_i32 cpu_NF, cpu_ZF, cpu_CF, cpu_VF;
 extern TCGv_i64 cpu_exclusive_addr;
 extern TCGv_i64 cpu_exclusive_val;
 
+/*
+ * Constant expanders for the decoders.
+ */
+
+static inline int negate(DisasContext *s, int x)
+{
+    return -x;
+}
+
+static inline int plus_2(DisasContext *s, int x)
+{
+    return x + 2;
+}
+
+static inline int times_2(DisasContext *s, int x)
+{
+    return x * 2;
+}
+
+static inline int times_4(DisasContext *s, int x)
+{
+    return x * 4;
+}
+
 static inline int arm_dc_feature(DisasContext *dc, int feature)
 {
     return (dc->features & (1ULL << feature)) != 0;
diff --git a/target/arm/translate.c b/target/arm/translate.c
index 62b1c2081b6..0e30892d54e 100644
--- a/target/arm/translate.c
+++ b/target/arm/translate.c
@@ -109,30 +109,6 @@ static void arm_gen_condlabel(DisasContext *s)
     }
 }
 
-/*
- * Constant expanders for the decoders.
- */
-
-static int negate(DisasContext *s, int x)
-{
-    return -x;
-}
-
-static int plus_2(DisasContext *s, int x)
-{
-    return x + 2;
-}
-
-static int times_2(DisasContext *s, int x)
-{
-    return x * 2;
-}
-
-static int times_4(DisasContext *s, int x)
-{
-    return x * 4;
-}
-
 /* Flags for the disas_set_da_iss info argument:
  * lower bits hold the Rt register number, higher bits are flags.
  */
-- 
2.20.1



  reply	other threads:[~2021-04-13 16:19 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-13 16:07 [PATCH 00/13] target/arm: Split translate-*.c.inc into separate compilation units Peter Maydell
2021-04-13 16:07 ` Peter Maydell [this message]
2021-04-13 16:59   ` [PATCH 01/13] target/arm: Move constant expanders to translate.h Philippe Mathieu-Daudé
2021-04-27 16:29   ` Richard Henderson
2021-04-13 16:07 ` [PATCH 02/13] target/arm: Share unallocated_encoding() and gen_exception_insn() Peter Maydell
2021-04-27 16:36   ` Richard Henderson
2021-04-13 16:07 ` [PATCH 03/13] target/arm: Make functions used by m-nocp global Peter Maydell
2021-04-27 16:42   ` Richard Henderson
2021-04-13 16:07 ` [PATCH 04/13] target/arm: Split m-nocp trans functions into their own file Peter Maydell
2021-04-27 16:40   ` Richard Henderson
2021-04-13 16:07 ` [PATCH 05/13] target/arm: Move gen_aa32 functions to translate-a32.h Peter Maydell
2021-04-27 16:44   ` Richard Henderson
2021-04-27 16:46     ` Peter Maydell
2021-04-13 16:07 ` [PATCH 06/13] target/arm: Move vfp_{load, store}_reg{32, 64} to translate-vfp.c.inc Peter Maydell
2021-04-13 17:00   ` Philippe Mathieu-Daudé
2021-04-27 16:47   ` Richard Henderson
2021-04-13 16:07 ` [PATCH 07/13] target/arm: Make functions used by translate-vfp global Peter Maydell
2021-04-13 17:01   ` Philippe Mathieu-Daudé
2021-04-27 17:03   ` Richard Henderson
2021-04-13 16:07 ` [PATCH 08/13] target/arm: Make translate-vfp.c.inc its own compilation unit Peter Maydell
2021-04-13 17:02   ` Philippe Mathieu-Daudé
2021-04-27 17:06   ` Richard Henderson
2021-04-13 16:07 ` [PATCH 09/13] target/arm: Move vfp_reg_ptr() to translate-neon.c.inc Peter Maydell
2021-04-13 17:02   ` Philippe Mathieu-Daudé
2021-04-13 17:03   ` Philippe Mathieu-Daudé
2021-04-27 17:06   ` Richard Henderson
2021-04-13 16:07 ` [PATCH 10/13] target/arm: Delete unused typedef Peter Maydell
2021-04-27 17:07   ` Richard Henderson
2021-04-13 16:07 ` [PATCH 11/13] target/arm: Move NeonGenThreeOpEnvFn typedef to translate.h Peter Maydell
2021-04-27 17:07   ` Richard Henderson
2021-04-13 16:07 ` [PATCH 12/13] target/arm: Make functions used by translate-neon global Peter Maydell
2021-04-13 17:04   ` Philippe Mathieu-Daudé
2021-04-27 17:07   ` Richard Henderson
2021-04-13 16:07 ` [PATCH 13/13] target/arm: Make translate-neon.c.inc its own compilation unit Peter Maydell
2021-04-13 17:04   ` Philippe Mathieu-Daudé
2021-04-27 17:08   ` 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=20210413160759.5917-2-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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).