diff options
author | Richard Henderson | 2021-01-28 07:04:43 +0100 |
---|---|---|
committer | Richard Henderson | 2021-02-05 21:24:14 +0100 |
commit | 53f405569cf84eb08756a53ad722d4dbe07023ec (patch) | |
tree | c8054c07fb0ca96503a9d85c637afbdfc07101ea /tcg/tci.c | |
parent | tcg/tci: Merge INDEX_op_st16_{i32,i64} (diff) | |
download | qemu-53f405569cf84eb08756a53ad722d4dbe07023ec.tar.gz qemu-53f405569cf84eb08756a53ad722d4dbe07023ec.tar.xz qemu-53f405569cf84eb08756a53ad722d4dbe07023ec.zip |
tcg/tci: Move stack bounds check to compile-time
The existing check was incomplete:
(1) Only applied to two of the 7 stores, and not to the loads at all.
(2) Only checked the upper, but not the lower bound of the stack.
Doing this at compile time means that we don't need to do it
at runtime as well.
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tcg/tci.c')
-rw-r--r-- | tcg/tci.c | 2 |
1 files changed, 0 insertions, 2 deletions
@@ -628,7 +628,6 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchState *env, t0 = tci_read_r32(regs, &tb_ptr); t1 = tci_read_r(regs, &tb_ptr); t2 = tci_read_s32(&tb_ptr); - tci_assert(t1 != sp_value || (int32_t)t2 < 0); *(uint32_t *)(t1 + t2) = t0; break; @@ -884,7 +883,6 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchState *env, t0 = tci_read_r64(regs, &tb_ptr); t1 = tci_read_r(regs, &tb_ptr); t2 = tci_read_s32(&tb_ptr); - tci_assert(t1 != sp_value || (int32_t)t2 < 0); *(uint64_t *)(t1 + t2) = t0; break; |