[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 58/76] tcg: Add tcg_get_insn_start_param
From: |
Richard Henderson |
Subject: |
[PATCH v2 58/76] tcg: Add tcg_get_insn_start_param |
Date: |
Fri, 28 Aug 2020 07:19:11 -0700 |
MicroBlaze will shortly need to update a parameter in place.
Add an interface to read to match that for write.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
include/tcg/tcg.h | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h
index d40c925d04..15da46131b 100644
--- a/include/tcg/tcg.h
+++ b/include/tcg/tcg.h
@@ -777,11 +777,26 @@ static inline TCGv_i32 TCGV_HIGH(TCGv_i64 t)
}
#endif
+static inline TCGArg tcg_get_insn_param(TCGOp *op, int arg)
+{
+ return op->args[arg];
+}
+
static inline void tcg_set_insn_param(TCGOp *op, int arg, TCGArg v)
{
op->args[arg] = v;
}
+static inline target_ulong tcg_get_insn_start_param(TCGOp *op, int arg)
+{
+#if TARGET_LONG_BITS <= TCG_TARGET_REG_BITS
+ return tcg_get_insn_param(op, arg);
+#else
+ return tcg_get_insn_param(op, arg * 2) |
+ (tcg_get_insn_param(op, arg * 2 + 1) << 32);
+#endif
+}
+
static inline void tcg_set_insn_start_param(TCGOp *op, int arg, target_ulong v)
{
#if TARGET_LONG_BITS <= TCG_TARGET_REG_BITS
--
2.25.1
- [PATCH v2 49/76] target/microblaze: Mark fpu helpers TCG_CALL_NO_WG, (continued)
- [PATCH v2 49/76] target/microblaze: Mark fpu helpers TCG_CALL_NO_WG, Richard Henderson, 2020/08/28
- [PATCH v2 48/76] target/microblaze: Fix cpu unwind for fpu exceptions, Richard Henderson, 2020/08/28
- [PATCH v2 50/76] target/microblaze: Replace MSR_EE_FLAG with MSR_EE, Richard Henderson, 2020/08/28
- [PATCH v2 51/76] target/microblaze: Cache mem_index in DisasContext, Richard Henderson, 2020/08/28
- [PATCH v2 52/76] target/microblaze: Fix cpu unwind for stackprot, Richard Henderson, 2020/08/28
- [PATCH v2 54/76] target/microblaze: Assert no overlap in flags making up tb_flags, Richard Henderson, 2020/08/28
- [PATCH v2 53/76] target/microblaze: Convert dec_load and dec_store to decodetree, Richard Henderson, 2020/08/28
- [PATCH v2 56/76] target/microblaze: Fix no-op mb_cpu_transaction_failed, Richard Henderson, 2020/08/28
- [PATCH v2 57/76] target/microblaze: Store "current" iflags in insn_start, Richard Henderson, 2020/08/28
- [PATCH v2 58/76] tcg: Add tcg_get_insn_start_param,
Richard Henderson <=
- [PATCH v2 55/76] target/microblaze: Move bimm to BIMM_FLAG, Richard Henderson, 2020/08/28
- [PATCH v2 59/76] target/microblaze: Use cc->do_unaligned_access, Richard Henderson, 2020/08/28
- [PATCH v2 60/76] target/microblaze: Replace clear_imm with tb_flags_to_set, Richard Henderson, 2020/08/28
- [PATCH v2 63/76] target/microblaze: Convert brk and brki to decodetree, Richard Henderson, 2020/08/28
- [PATCH v2 64/76] target/microblaze: Convert mbar to decodetree, Richard Henderson, 2020/08/28
- [PATCH v2 62/76] target/microblaze: Tidy mb_cpu_dump_state, Richard Henderson, 2020/08/28
- [PATCH v2 61/76] target/microblaze: Replace delayed_branch with tb_flags_to_set, Richard Henderson, 2020/08/28