[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 35/69] target/s390x: Save current ilen during transla
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PULL 35/69] target/s390x: Save current ilen during translation |
Date: |
Sun, 4 Jun 2017 10:34:35 -0700 |
Use this saved value instead of recomputing from next_pc difference.
Reviewed-by: David Hildenbrand <address@hidden>
Reviewed-by: Aurelien Jarno <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
---
target/s390x/translate.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/target/s390x/translate.c b/target/s390x/translate.c
index 4bd16d9..5b8333f 100644
--- a/target/s390x/translate.c
+++ b/target/s390x/translate.c
@@ -58,6 +58,7 @@ struct DisasContext {
const DisasInsn *insn;
DisasFields *fields;
uint64_t pc, next_pc;
+ uint32_t ilen;
enum cc_op cc_op;
bool singlestep_enabled;
};
@@ -349,7 +350,7 @@ static void gen_program_exception(DisasContext *s, int code)
tcg_gen_st_i32(tmp, cpu_env, offsetof(CPUS390XState, int_pgm_code));
tcg_temp_free_i32(tmp);
- tmp = tcg_const_i32(s->next_pc - s->pc);
+ tmp = tcg_const_i32(s->ilen);
tcg_gen_st_i32(tmp, cpu_env, offsetof(CPUS390XState, int_pgm_ilen));
tcg_temp_free_i32(tmp);
@@ -2207,7 +2208,7 @@ static ExitStatus op_ex(DisasContext *s, DisasOps *o)
v1 = regs[r1];
}
- ilen = tcg_const_i32(s->next_pc - s->pc);
+ ilen = tcg_const_i32(s->ilen);
gen_helper_ex(cpu_env, ilen, v1, o->in2);
tcg_temp_free_i32(ilen);
@@ -4052,7 +4053,7 @@ static ExitStatus op_svc(DisasContext *s, DisasOps *o)
tcg_gen_st_i32(t, cpu_env, offsetof(CPUS390XState, int_svc_code));
tcg_temp_free_i32(t);
- t = tcg_const_i32(s->next_pc - s->pc);
+ t = tcg_const_i32(s->ilen);
tcg_gen_st_i32(t, cpu_env, offsetof(CPUS390XState, int_svc_ilen));
tcg_temp_free_i32(t);
@@ -5191,6 +5192,7 @@ static const DisasInsn *extract_insn(CPUS390XState *env,
DisasContext *s,
op = (insn >> 8) & 0xff;
ilen = get_ilen(op);
s->next_pc = s->pc + ilen;
+ s->ilen = ilen;
switch (ilen) {
case 2:
--
2.9.4
- [Qemu-devel] [PULL 27/69] target/s390x: Use unwind data for helper_testblock, (continued)
- [Qemu-devel] [PULL 27/69] target/s390x: Use unwind data for helper_testblock, Richard Henderson, 2017/06/04
- [Qemu-devel] [PULL 29/69] target/s390x: Use unwind data for helper_lra, Richard Henderson, 2017/06/04
- [Qemu-devel] [PULL 32/69] target/s390x: Fix EXECUTE with R1==0, Richard Henderson, 2017/06/04
- [Qemu-devel] [PULL 31/69] target/s390x: Fix some helper_ex problems, Richard Henderson, 2017/06/04
- [Qemu-devel] [PULL 34/69] target/s390x: Implement CSPG, Richard Henderson, 2017/06/04
- [Qemu-devel] [PULL 30/69] target/s390x: Use unwind data for helper_mvcs/mvcp, Richard Henderson, 2017/06/04
- [Qemu-devel] [PULL 33/69] target/s390x: Use atomic operations for COMPARE SWAP PURGE, Richard Henderson, 2017/06/04
- [Qemu-devel] [PULL 36/69] target/s390x: End the TB after EXECUTE, Richard Henderson, 2017/06/04
- [Qemu-devel] [PULL 38/69] target/s390x: Re-implement a few EXECUTE target insns directly, Richard Henderson, 2017/06/04
- [Qemu-devel] [PULL 39/69] target/s390x/cpu_models: Allow some additional feature bits for the "qemu" CPU, Richard Henderson, 2017/06/04
- [Qemu-devel] [PULL 35/69] target/s390x: Save current ilen during translation,
Richard Henderson <=
- [Qemu-devel] [PULL 41/69] target/s390x: remove some Linux assumptions from IPTE, Richard Henderson, 2017/06/04
- [Qemu-devel] [PULL 40/69] target/s390x: remove dead code in translate.c, Richard Henderson, 2017/06/04
- [Qemu-devel] [PULL 42/69] target/s390x: implement local-TLB-clearing in IPTE, Richard Henderson, 2017/06/04
- [Qemu-devel] [PULL 37/69] target/s390x: Implement EXECUTE via new TranslationBlock, Richard Henderson, 2017/06/04
- [Qemu-devel] [PULL 43/69] target/s390x: implement TEST AND SET, Richard Henderson, 2017/06/04
- [Qemu-devel] [PULL 46/69] target/s390x: implement LOAD PAIR FROM QUADWORD, Richard Henderson, 2017/06/04
- [Qemu-devel] [PULL 47/69] target/s390x: implement STORE PAIR TO QUADWORD, Richard Henderson, 2017/06/04
- [Qemu-devel] [PULL 44/69] target/s390x: implement TEST ADDRESSING MODE, Richard Henderson, 2017/06/04
- [Qemu-devel] [PULL 45/69] target/s390x: implement PACK, Richard Henderson, 2017/06/04
- [Qemu-devel] [PULL 48/69] target/s390x: implement COMPARE AND SIGNAL, Richard Henderson, 2017/06/04