[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-stable] [PATCH 057/113] tcg: Introduce tcg_set_insn_start_param
From: |
Michael Roth |
Subject: |
[Qemu-stable] [PATCH 057/113] tcg: Introduce tcg_set_insn_start_param |
Date: |
Mon, 18 Jun 2018 20:42:23 -0500 |
From: Richard Henderson <address@hidden>
The parameters for tcg_gen_insn_start are target_ulong, which may be split
into two TCGArg parameters for storage in the opcode on 32-bit hosts.
Fixes the ARM target and its direct use of tcg_set_insn_param, which would
set the wrong argument in the 64-on-32 case.
Cc: address@hidden
Reported-by: address@hidden
Signed-off-by: Richard Henderson <address@hidden>
Message-id: address@hidden
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>
(cherry picked from commit 9743cd5736263e90d312b2c33bd739ffe1eae70d)
Conflicts:
target/arm/translate.h
tcg/tcg.h
* rework to avoid functional dependency on 15fa08f
Signed-off-by: Michael Roth <address@hidden>
---
target/arm/translate.h | 2 +-
tcg/tcg.h | 10 ++++++++++
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/target/arm/translate.h b/target/arm/translate.h
index 410ba79c0d..0c6a24d287 100644
--- a/target/arm/translate.h
+++ b/target/arm/translate.h
@@ -118,7 +118,7 @@ static void disas_set_insn_syndrome(DisasContext *s,
uint32_t syn)
/* We check and clear insn_start_idx to catch multiple updates. */
assert(s->insn_start_idx != 0);
- tcg_set_insn_param(s->insn_start_idx, 2, syn);
+ tcg_set_insn_start_param(s->insn_start_idx, 2, syn);
s->insn_start_idx = 0;
}
diff --git a/tcg/tcg.h b/tcg/tcg.h
index cb7b329876..d88d3520ac 100644
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
@@ -783,6 +783,16 @@ static inline void tcg_set_insn_param(int op_idx, int arg,
TCGArg v)
tcg_ctx->gen_op_buf[op_idx].args[arg] = v;
}
+static inline void tcg_set_insn_start_param(int op_idx, int arg, target_ulong
v)
+{
+#if TARGET_LONG_BITS <= TCG_TARGET_REG_BITS
+ tcg_set_insn_param(op_idx, arg, v);
+#else
+ tcg_set_insn_param(op_idx, arg * 2, v);
+ tcg_set_insn_param(op_idx, arg * 2 + 1, v >> 32);
+#endif
+}
+
/* The number of opcodes emitted so far. */
static inline int tcg_op_buf_count(void)
{
--
2.11.0
- [Qemu-stable] [PATCH 049/113] iotests: Test preallocated truncate of 2G image, (continued)
- [Qemu-stable] [PATCH 049/113] iotests: Test preallocated truncate of 2G image, Michael Roth, 2018/06/18
- [Qemu-stable] [PATCH 048/113] block/file-posix: Fix fully preallocated truncate, Michael Roth, 2018/06/18
- [Qemu-stable] [PATCH 050/113] tcg: Mark muluh_i64 and mulsh_i64 as 64-bit ops, Michael Roth, 2018/06/18
- [Qemu-stable] [PATCH 004/113] memfd: fix configure test, Michael Roth, 2018/06/18
- [Qemu-stable] [PATCH 051/113] target/i386: Fix andn instruction, Michael Roth, 2018/06/18
- [Qemu-stable] [PATCH 052/113] exec: fix memory leak in find_max_supported_pagesize(), Michael Roth, 2018/06/18
- [Qemu-stable] [PATCH 053/113] gluster: Fix blockdev-add with server.N.type=unix, Michael Roth, 2018/06/18
- [Qemu-stable] [PATCH 054/113] cpus.c: ensure running CPU recalculates icount deadlines on timer expiry, Michael Roth, 2018/06/18
- [Qemu-stable] [PATCH 056/113] hw/block/pflash_cfi: fix off-by-one error, Michael Roth, 2018/06/18
- [Qemu-stable] [PATCH 055/113] vfio-ccw: fix memory leaks in vfio_ccw_realize(), Michael Roth, 2018/06/18
- [Qemu-stable] [PATCH 057/113] tcg: Introduce tcg_set_insn_start_param,
Michael Roth <=
- [Qemu-stable] [PATCH 059/113] device_tree: Increase FDT_MAX_SIZE to 1 MiB, Michael Roth, 2018/06/18
- [Qemu-stable] [PATCH 058/113] hw/char/cmsdk-apb-uart.c: Correctly clear INTSTATUS bits on writes, Michael Roth, 2018/06/18
- [Qemu-stable] [PATCH 060/113] ccid: Fix dwProtocols advertisement of T=0, Michael Roth, 2018/06/18
- [Qemu-stable] [PATCH 061/113] nbd/client: Fix error messages during NBD_INFO_BLOCK_SIZE, Michael Roth, 2018/06/18
- [Qemu-stable] [PATCH 005/113] sdl: workaround bug in sdl 2.0.8 headers, Michael Roth, 2018/06/18
- [Qemu-stable] [PATCH 063/113] s390-ccw: force diag 308 subcode to unsigned long, Michael Roth, 2018/06/18
- [Qemu-stable] [PATCH 062/113] s390: Do not pass inofficial IPL type to the guest, Michael Roth, 2018/06/18
- [Qemu-stable] [PATCH 064/113] tcg/arm: Fix memory barrier encoding, Michael Roth, 2018/06/18
- [Qemu-stable] [PATCH 065/113] target/arm: Implement v8M VLLDM and VLSTM, Michael Roth, 2018/06/18
- [Qemu-stable] [PATCH 066/113] target/ppc: always set PPC_MEM_TLBIE in pre 2.8 migration hack, Michael Roth, 2018/06/18