[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 16/36] tcg: Introduce TCGCallReturnKind and TCGCallArgumentKin
From: |
Richard Henderson |
Subject: |
[PATCH v2 16/36] tcg: Introduce TCGCallReturnKind and TCGCallArgumentKind |
Date: |
Fri, 21 Oct 2022 17:15:29 +1000 |
Prepare to replace a bunch of separate ifdefs with a
consistent way to describe the abi of a function call.
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 v2 05/36] tcg/arm: Use register pair allocation for qemu_{ld, st}_i64, (continued)
- [PATCH v2 05/36] tcg/arm: Use register pair allocation for qemu_{ld, st}_i64, Richard Henderson, 2022/10/21
- [PATCH v2 02/36] tcg: Tidy tcg_reg_alloc_op, Richard Henderson, 2022/10/21
- [PATCH v2 03/36] tcg: Introduce paired register allocation, Richard Henderson, 2022/10/21
- [PATCH v2 07/36] tcg: Remove TCG_TARGET_STACK_GROWSUP, Richard Henderson, 2022/10/21
- [PATCH v2 08/36] accel/tcg: Set cflags_next_tb in cpu_common_initfn, Richard Henderson, 2022/10/21
- [PATCH v2 09/36] target/sparc: Avoid TCGV_{LOW,HIGH}, Richard Henderson, 2022/10/21
- [PATCH v2 10/36] tcg: Move TCG_{LOW,HIGH} to tcg-internal.h, Richard Henderson, 2022/10/21
- [PATCH v2 12/36] tcg: Simplify calls to temp_sync vs mem_coherent, Richard Henderson, 2022/10/21
- [PATCH v2 11/36] tcg: Add temp_subindex to TCGTemp, Richard Henderson, 2022/10/21
- [PATCH v2 16/36] tcg: Introduce TCGCallReturnKind and TCGCallArgumentKind,
Richard Henderson <=
- [PATCH v2 14/36] tcg: Move TCG_TYPE_COUNT outside enum, Richard Henderson, 2022/10/21
- [PATCH v2 19/36] tcg: Use TCG_CALL_ARG_EVEN for TCI special case, Richard Henderson, 2022/10/21
- [PATCH v2 15/36] tcg: Introduce tcg_type_size, Richard Henderson, 2022/10/21
- [PATCH v2 17/36] tcg: Replace TCG_TARGET_CALL_ALIGN_ARGS with TCG_TARGET_CALL_ARG_I64, Richard Henderson, 2022/10/21
- [PATCH v2 21/36] tcg: Move ffi_cif pointer into TCGHelperInfo, Richard Henderson, 2022/10/21
- [PATCH v2 22/36] tcg: Add TCGHelperInfo argument to tcg_out_call, Richard Henderson, 2022/10/21
- [PATCH v2 23/36] tcg: Define TCG_TYPE_I128 and related helper macros, Richard Henderson, 2022/10/21
- [PATCH v2 25/36] tcg: Allocate objects contiguously in temp_allocate_frame, Richard Henderson, 2022/10/21