[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 29/36] tcg: Add TCG_CALL_RET_BY_VEC
From: |
Richard Henderson |
Subject: |
[PATCH v2 29/36] tcg: Add TCG_CALL_RET_BY_VEC |
Date: |
Fri, 21 Oct 2022 17:15:42 +1000 |
This will be used by _WIN64 to return i128. Not yet used,
because allocation is not yet enabled.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/tcg-internal.h | 1 +
tcg/tcg.c | 17 +++++++++++++++++
2 files changed, 18 insertions(+)
diff --git a/tcg/tcg-internal.h b/tcg/tcg-internal.h
index 1fe7bd7d5d..44ef51ca30 100644
--- a/tcg/tcg-internal.h
+++ b/tcg/tcg-internal.h
@@ -38,6 +38,7 @@ typedef enum {
TCG_CALL_RET_NORMAL, /* by registers */
TCG_CALL_RET_NORMAL_4, /* for i128, by 4 registers */
TCG_CALL_RET_BY_REF, /* for i128, by reference as first arg */
+ TCG_CALL_RET_BY_VEC, /* for i128, by vector register */
} TCGCallReturnKind;
typedef enum {
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 25dc3c9f8f..9ec5b85f44 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -768,6 +768,8 @@ static void init_call_layout(TCGHelperInfo *info)
cum.reg_slot = 1;
}
break;
+ case TCG_CALL_RET_BY_VEC:
+ break;
default:
g_assert_not_reached();
}
@@ -4685,6 +4687,21 @@ static void tcg_reg_alloc_call(TCGContext *s, TCGOp *op)
}
break;
+ case TCG_CALL_RET_BY_VEC:
+ {
+ TCGTemp *ts = arg_temp(op->args[0]);
+
+ tcg_debug_assert(ts->type == TCG_TYPE_I128);
+ if (!ts->mem_allocated) {
+ temp_allocate_frame(s, ts);
+ }
+ tcg_out_st(s, TCG_TYPE_V128,
+ tcg_target_call_oarg_reg(TCG_CALL_RET_BY_VEC, 0),
+ ts->mem_base->reg, ts->mem_offset + i * 4);
+ ts->val_type = TEMP_VAL_MEM;
+ }
+ break;
+
default:
g_assert_not_reached();
}
--
2.34.1
- [PATCH v2 23/36] tcg: Define TCG_TYPE_I128 and related helper macros, (continued)
- [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
- [PATCH v2 30/36] include/qemu/int128: Use Int128 structure for TCI, Richard Henderson, 2022/10/21
- [PATCH v2 26/36] tcg: Introduce tcg_out_addi_ptr, Richard Henderson, 2022/10/21
- [PATCH v2 13/36] tcg: Allocate TCGTemp pairs in host memory order, Richard Henderson, 2022/10/21
- [PATCH v2 18/36] tcg: Replace TCG_TARGET_EXTEND_ARGS with TCG_TARGET_CALL_ARG_I32, Richard Henderson, 2022/10/21
- [PATCH v2 20/36] tcg: Reorg function calls, Richard Henderson, 2022/10/21
- [PATCH v2 24/36] tcg: Add TCG_CALL_{RET,ARG}_NORMAL_4, Richard Henderson, 2022/10/21
- [PATCH v2 28/36] tcg: Introduce tcg_target_call_oarg_reg, Richard Henderson, 2022/10/21
- [PATCH v2 29/36] tcg: Add TCG_CALL_RET_BY_VEC,
Richard Henderson <=
- [PATCH v2 27/36] tcg: Add TCG_CALL_{RET,ARG}_BY_REF, Richard Henderson, 2022/10/21
- [PATCH v2 34/36] tcg: Add TCG_TARGET_CALL_{RET,ARG}_I128, Richard Henderson, 2022/10/21
- [PATCH v2 32/36] tcg/tci: Fix big-endian return register ordering, Richard Henderson, 2022/10/21
- [PATCH v2 33/36] tcg/tci: Add TCG_TARGET_CALL_{RET,ARG}_I128, Richard Henderson, 2022/10/21
- [PATCH v2 31/36] tcg/i386: Add TCG_TARGET_CALL_{RET,ARG}_I128, Richard Henderson, 2022/10/21
- [PATCH v2 35/36] tcg: Add temp allocation for TCGv_i128, Richard Henderson, 2022/10/21
- [PATCH v2 36/36] tcg: Add tcg_gen_extr_i128_i64, tcg_gen_concat_i64_i128, Richard Henderson, 2022/10/21