aboutsummaryrefslogtreecommitdiff
path: root/tcg
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2023-03-29 18:09:28 -0700
committerRichard Henderson <richard.henderson@linaro.org>2023-06-05 12:04:28 -0700
commit0f4e14c25a1900ee77ce29060adbaede1367bd3d (patch)
tree4684e3345834464615795b294df3548658d04c37 /tcg
parent8da7b594354eb66ad6e63b094d31e1d146a1558d (diff)
tcg: Move TCGHelperInfo and dependencies to tcg/helper-info.h
This will be required outside of tcg-internal.h soon. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tcg')
-rw-r--r--tcg/tcg-internal.h47
1 files changed, 1 insertions, 46 deletions
diff --git a/tcg/tcg-internal.h b/tcg/tcg-internal.h
index 67b698bd5c..fbe62b31b8 100644
--- a/tcg/tcg-internal.h
+++ b/tcg/tcg-internal.h
@@ -25,55 +25,10 @@
#ifndef TCG_INTERNAL_H
#define TCG_INTERNAL_H
-#ifdef CONFIG_TCG_INTERPRETER
-#include <ffi.h>
-#endif
+#include "tcg/helper-info.h"
#define TCG_HIGHWATER 1024
-/*
- * Describe the calling convention of a given argument type.
- */
-typedef enum {
- TCG_CALL_RET_NORMAL, /* by registers */
- TCG_CALL_RET_BY_REF, /* for i128, by reference */
- TCG_CALL_RET_BY_VEC, /* for i128, by vector register */
-} TCGCallReturnKind;
-
-typedef enum {
- TCG_CALL_ARG_NORMAL, /* by registers (continuing onto stack) */
- TCG_CALL_ARG_EVEN, /* like normal, but skipping odd slots */
- TCG_CALL_ARG_EXTEND, /* for i32, as a sign/zero-extended i64 */
- TCG_CALL_ARG_EXTEND_U, /* ... as a zero-extended i64 */
- TCG_CALL_ARG_EXTEND_S, /* ... as a sign-extended i64 */
- TCG_CALL_ARG_BY_REF, /* for i128, by reference, first */
- TCG_CALL_ARG_BY_REF_N, /* ... by reference, subsequent */
-} TCGCallArgumentKind;
-
-typedef struct TCGCallArgumentLoc {
- TCGCallArgumentKind kind : 8;
- unsigned arg_slot : 8;
- unsigned ref_slot : 8;
- unsigned arg_idx : 4;
- unsigned tmp_subindex : 2;
-} TCGCallArgumentLoc;
-
-typedef struct TCGHelperInfo {
- void *func;
- const char *name;
-#ifdef CONFIG_TCG_INTERPRETER
- ffi_cif *cif;
-#endif
- unsigned typemask : 32;
- unsigned flags : 8;
- unsigned nr_in : 8;
- unsigned nr_out : 8;
- TCGCallReturnKind out_kind : 8;
-
- /* Maximum physical arguments are constrained by TCG_TYPE_I128. */
- TCGCallArgumentLoc in[MAX_CALL_IARGS * (128 / TCG_TARGET_REG_BITS)];
-} TCGHelperInfo;
-
extern TCGContext tcg_init_ctx;
extern TCGContext **tcg_ctxs;
extern unsigned int tcg_cur_ctxs;