[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 051/108] target-xtensa: fix cross-page jumps/calls a
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 051/108] target-xtensa: fix cross-page jumps/calls at the end of TB |
Date: |
Wed, 6 Aug 2014 15:39:01 -0500 |
From: Max Filippov <address@hidden>
Use tb->pc instead of dc->pc to check for cross-page jumps.
When TB translation stops at the page boundary dc->pc points to the next
page allowing chaining to TBs in it, which is wrong.
Cc: address@hidden
Signed-off-by: Max Filippov <address@hidden>
(cherry picked from commit 433d33c555deeed375996e338df1a9510df401c6)
Signed-off-by: Michael Roth <address@hidden>
---
target-xtensa/translate.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target-xtensa/translate.c b/target-xtensa/translate.c
index 764cee9..dda105d 100644
--- a/target-xtensa/translate.c
+++ b/target-xtensa/translate.c
@@ -419,7 +419,7 @@ static void gen_jump(DisasContext *dc, TCGv dest)
static void gen_jumpi(DisasContext *dc, uint32_t dest, int slot)
{
TCGv_i32 tmp = tcg_const_i32(dest);
- if (((dc->pc ^ dest) & TARGET_PAGE_MASK) != 0) {
+ if (((dc->tb->pc ^ dest) & TARGET_PAGE_MASK) != 0) {
slot = -1;
}
gen_jump_slot(dc, tmp, slot);
@@ -447,7 +447,7 @@ static void gen_callw(DisasContext *dc, int callinc,
TCGv_i32 dest)
static void gen_callwi(DisasContext *dc, int callinc, uint32_t dest, int slot)
{
TCGv_i32 tmp = tcg_const_i32(dest);
- if (((dc->pc ^ dest) & TARGET_PAGE_MASK) != 0) {
+ if (((dc->tb->pc ^ dest) & TARGET_PAGE_MASK) != 0) {
slot = -1;
}
gen_callw_slot(dc, callinc, tmp, slot);
--
1.9.1
- [Qemu-devel] [PATCH 041/108] configure: remove bashism, (continued)
- [Qemu-devel] [PATCH 041/108] configure: remove bashism, Michael Roth, 2014/08/06
- [Qemu-devel] [PATCH 043/108] pci-assign: limit # of msix vectors, Michael Roth, 2014/08/06
- [Qemu-devel] [PATCH 042/108] Revert "qapi: Clean up superfluous null check in qapi_dealloc_type_str()", Michael Roth, 2014/08/06
- [Qemu-devel] [PATCH 045/108] qcow1: Make padding in the header explicit, Michael Roth, 2014/08/06
- [Qemu-devel] [PATCH 047/108] qcow1: Validate L2 table size (CVE-2014-0222), Michael Roth, 2014/08/06
- [Qemu-devel] [PATCH 044/108] virtio: allow mapping up to max queue size, Michael Roth, 2014/08/06
- [Qemu-devel] [PATCH 046/108] qcow1: Check maximum cluster size, Michael Roth, 2014/08/06
- [Qemu-devel] [PATCH 049/108] qcow1: Stricter backing file length check, Michael Roth, 2014/08/06
- [Qemu-devel] [PATCH 048/108] qcow1: Validate image size (CVE-2014-0223), Michael Roth, 2014/08/06
- [Qemu-devel] [PATCH 052/108] cputlb: Fix regression with TCG interpreter (bug 1310324), Michael Roth, 2014/08/06
- [Qemu-devel] [PATCH 051/108] target-xtensa: fix cross-page jumps/calls at the end of TB,
Michael Roth <=
- [Qemu-devel] [PATCH 050/108] virtio-scsi: Plug memory leak on virtio_scsi_push_event() error path, Michael Roth, 2014/08/06
- [Qemu-devel] [PATCH 053/108] input (curses): mask keycodes to remove modifier bits, Michael Roth, 2014/08/06
- [Qemu-devel] [PATCH 054/108] qemu-img: Plug memory leak in convert command, Michael Roth, 2014/08/06
- [Qemu-devel] [PATCH 055/108] block/sheepdog: Plug memory leak in sd_snapshot_create(), Michael Roth, 2014/08/06
- [Qemu-devel] [PATCH 056/108] block/vvfat: Plug memory leak in read_directory(), Michael Roth, 2014/08/06
- [Qemu-devel] [PATCH 057/108] block/vvfat: Plug memory leak in check_directory_consistency(), Michael Roth, 2014/08/06
- [Qemu-devel] [PATCH 058/108] block/qapi: Plug memory leak in dump_qobject() case QTYPE_QERROR, Michael Roth, 2014/08/06
- [Qemu-devel] [PATCH 059/108] blockdev: Plug memory leak in drive_init(), Michael Roth, 2014/08/06
- [Qemu-devel] [PATCH 060/108] blockdev: Plug memory leak in blockdev_init(), Michael Roth, 2014/08/06
- [Qemu-devel] [PATCH 062/108] block: Plug memory leak on brv_open_image() error path, Michael Roth, 2014/08/06