[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 13/27] tcg: Introduce TCGCallReturnKind and TCGCallArgumentKin
From: |
Richard Henderson |
Subject: |
[PATCH v4 13/27] tcg: Introduce TCGCallReturnKind and TCGCallArgumentKind |
Date: |
Tue, 13 Dec 2022 15:25:27 -0600 |
Prepare to replace a bunch of separate ifdefs with a
consistent way to describe the ABI of a function call.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/tcg-internal.h | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/tcg/tcg-internal.h b/tcg/tcg-internal.h
index 2c06b5116a..f574743ff8 100644
--- a/tcg/tcg-internal.h
+++ b/tcg/tcg-internal.h
@@ -27,6 +27,21 @@
#define TCG_HIGHWATER 1024
+/*
+ * Describe the calling convention of a given argument type.
+ */
+typedef enum {
+ TCG_CALL_RET_NORMAL, /* by registers */
+} 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 */
+} TCGCallArgumentKind;
+
typedef struct TCGHelperInfo {
void *func;
const char *name;
--
2.34.1
- [PATCH v4 04a/27] tcg: Massage process_op_defs(), (continued)
- [PATCH v4 07/27] tcg: Move TCG_{LOW,HIGH} to tcg-internal.h, Richard Henderson, 2022/12/13
- [PATCH v4 09/27] tcg: Simplify calls to temp_sync vs mem_coherent, Richard Henderson, 2022/12/13
- [PATCH v4 08/27] tcg: Add temp_subindex to TCGTemp, Richard Henderson, 2022/12/13
- [PATCH v4 10/27] tcg: Allocate TCGTemp pairs in host memory order, Richard Henderson, 2022/12/13
- [PATCH v4 12/27] tcg: Introduce tcg_type_size, Richard Henderson, 2022/12/13
- [PATCH v4 11/27] tcg: Move TCG_TYPE_COUNT outside enum, Richard Henderson, 2022/12/13
- [PATCH v4 13/27] tcg: Introduce TCGCallReturnKind and TCGCallArgumentKind,
Richard Henderson <=
- [PATCH v4 14/27] tcg: Replace TCG_TARGET_CALL_ALIGN_ARGS with TCG_TARGET_CALL_ARG_I64, Richard Henderson, 2022/12/13
- [PATCH v4 15/27] tcg: Replace TCG_TARGET_EXTEND_ARGS with TCG_TARGET_CALL_ARG_I32, Richard Henderson, 2022/12/13
- [PATCH v4 16/27] tcg: Use TCG_CALL_ARG_EVEN for TCI special case, Richard Henderson, 2022/12/13
- [PATCH v4 18/27] accel/tcg/plugin: Avoid duplicate copy in copy_call, Richard Henderson, 2022/12/13
- [PATCH v4 17/27] accel/tcg/plugin: Don't search for the function pointer index, Richard Henderson, 2022/12/13
- [PATCH v4 21/27] tcg: Use output_pref wrapper function, Richard Henderson, 2022/12/13
- [PATCH v4 24/27] tcg: Factor init_ffi_layouts() out of tcg_context_init(), Richard Henderson, 2022/12/13