[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 01/34] target-s390x: fix CC computation for EX instru
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PULL 01/34] target-s390x: fix CC computation for EX instruction |
Date: |
Fri, 5 Jun 2015 01:41:31 +0200 |
From: Aurelien Jarno <address@hidden>
Commit 7a6c7067f optimized CC computation by only saving cc_op before
calling helpers as they either don't touch the CC or generate a new
static value. This however doesn't work for the EX instruction as the
helper changes or not the CC value depending on the actual executed
instruction (e.g. MVC vs CLC).
This patches force a CC computation before calling the helper. This
fixes random memory corruption occuring in guests.
Signed-off-by: Aurelien Jarno <address@hidden>
[agraf: remove set_cc_static in op_ex as suggested by rth]
Signed-off-by: Alexander Graf <address@hidden>
---
target-s390x/translate.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/target-s390x/translate.c b/target-s390x/translate.c
index fbffd30..497733d 100644
--- a/target-s390x/translate.c
+++ b/target-s390x/translate.c
@@ -2101,13 +2101,12 @@ static ExitStatus op_ex(DisasContext *s, DisasOps *o)
TCGv_i64 tmp;
update_psw_addr(s);
- update_cc_op(s);
+ gen_op_calc_cc(s);
tmp = tcg_const_i64(s->next_pc);
gen_helper_ex(cc_op, cpu_env, cc_op, o->in1, o->in2, tmp);
tcg_temp_free_i64(tmp);
- set_cc_static(s);
return NO_EXIT;
}
--
1.7.12.4
- [Qemu-devel] [PULL 02/34] target-s390x: fix CC computation for LOAD POSITIVE instructions, (continued)
- [Qemu-devel] [PULL 02/34] target-s390x: fix CC computation for LOAD POSITIVE instructions, Alexander Graf, 2015/06/04
- [Qemu-devel] [PULL 09/34] target-s390x: implement STPT helper, Alexander Graf, 2015/06/04
- [Qemu-devel] [PULL 14/34] target-s390x: silence NaNs for LOAD LENGTHENED and LOAD ROUNDED, Alexander Graf, 2015/06/04
- [Qemu-devel] [PULL 16/34] target-s390x: move a few instructions to the correct facility, Alexander Graf, 2015/06/04
- [Qemu-devel] [PULL 20/34] target-s390x: change CHRL and CGHRL format to RIL-b, Alexander Graf, 2015/06/04
- [Qemu-devel] [PULL 30/34] target-s390x: add a cpu_mmu_idx_to_asc function, Alexander Graf, 2015/06/04
- [Qemu-devel] [PULL 12/34] target-s390x: fix MMU index computation, Alexander Graf, 2015/06/04
- [Qemu-devel] [PULL 11/34] target-s390x: fix PSW value on dynamical exception from helpers, Alexander Graf, 2015/06/04
- [Qemu-devel] [PULL 15/34] target-s390x: detect tininess before rounding for FP operations, Alexander Graf, 2015/06/04
- [Qemu-devel] [PULL 03/34] target-s390x: optimize (negative-) abs computation, Alexander Graf, 2015/06/04
- [Qemu-devel] [PULL 01/34] target-s390x: fix CC computation for EX instruction,
Alexander Graf <=
- [Qemu-devel] [PULL 24/34] target-s390x: implement TRANSLATE AND TEST instruction, Alexander Graf, 2015/06/04
- [Qemu-devel] [PULL 13/34] target-s390x: define default NaN values, Alexander Graf, 2015/06/04
- [Qemu-devel] [PULL 33/34] target-s390x: fix MVC instruction when areas overlap, Alexander Graf, 2015/06/04
- [Qemu-devel] [PULL 22/34] target-s390x: move SET DFP ROUNDING MODE to the correct facility, Alexander Graf, 2015/06/04
- [Qemu-devel] [PULL 10/34] target-s390x: fix LOAD MULTIPLE instruction on page boundary, Alexander Graf, 2015/06/04
- [Qemu-devel] [PULL 18/34] target-s390x: fix exception for invalid operation code, Alexander Graf, 2015/06/04
- [Qemu-devel] [PULL 27/34] target-s390x: implement miscellaneous-instruction-extensions facility, Alexander Graf, 2015/06/04
- [Qemu-devel] [PULL 23/34] target-s390x: implement LOAD FP INTEGER instructions, Alexander Graf, 2015/06/04