qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 23/48] tcg: Split helper-gen.h


From: Richard Henderson
Subject: Re: [PATCH v3 23/48] tcg: Split helper-gen.h
Date: Fri, 2 Jun 2023 21:09:01 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0

On 6/2/23 14:17, Philippe Mathieu-Daudé wrote:
On 31/5/23 06:03, Richard Henderson wrote:
Create helper-gen-common.h without the target specific portion.
Use that in tcg-op-common.h.  Reorg headers in target/arm to
ensure that helper-gen.h is included before helper-info.c.inc.
All other targets are already correct in this regard.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
  include/exec/helper-gen-common.h |  17 ++++++
  include/exec/helper-gen.h        | 101 ++-----------------------------
  include/tcg/tcg-op-common.h      |   2 +-
  include/exec/helper-gen.h.inc    | 101 +++++++++++++++++++++++++++++++
  target/arm/tcg/translate.c       |   8 +--
  5 files changed, 126 insertions(+), 103 deletions(-)
  create mode 100644 include/exec/helper-gen-common.h
  create mode 100644 include/exec/helper-gen.h.inc


diff --git a/include/exec/helper-gen.h.inc b/include/exec/helper-gen.h.inc
new file mode 100644
index 0000000000..83bfa5b23f
--- /dev/null
+++ b/include/exec/helper-gen.h.inc
@@ -0,0 +1,101 @@
+/*
+ * Helper file for declaring TCG helper functions.
+ * This one expands generation functions for tcg opcodes.
+ * Define HELPER_H for the header file to be expanded,
+ * and static inline to change from global file scope.
+ */
+
+#include "tcg/tcg.h"
+#include "tcg/helper-info.h"
+#include "exec/helper-head.h"
+
+#define DEF_HELPER_FLAGS_0(name, flags, ret)                            \
+extern TCGHelperInfo glue(helper_info_, name);                          \
+static inline void glue(gen_helper_, name)(dh_retvar_decl0(ret))        \
+{                                                                       \
+    tcg_gen_call0(&glue(helper_info_, name), dh_retvar(ret));           \
+}
[...]

File not guarded for multiple inclusions, otherwise:
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

That is why it is named ".h.inc", because it *is* included multiple times.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]