[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 22/23] target/i386: Create gen_eip_cur
From: |
Richard Henderson |
Subject: |
[PATCH v2 22/23] target/i386: Create gen_eip_cur |
Date: |
Tue, 6 Sep 2022 11:09:31 +0100 |
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/i386/tcg/translate.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c
index 97a5f7e432..39bcb7263b 100644
--- a/target/i386/tcg/translate.c
+++ b/target/i386/tcg/translate.c
@@ -516,6 +516,11 @@ static inline void gen_op_st_rm_T0_A0(DisasContext *s, int
idx, int d)
}
}
+static TCGv gen_eip_cur(DisasContext *s)
+{
+ return tcg_constant_tl(s->base.pc_next - s->cs_base);
+}
+
static void gen_jmp_im(DisasContext *s, target_ulong pc)
{
gen_op_jmp_v(tcg_constant_tl(pc));
@@ -6574,7 +6579,7 @@ static bool disas_insn(DisasContext *s, CPUState *cpu)
offsetof(CPUX86State, segs[R_CS].selector));
tcg_gen_st16_i32(s->tmp2_i32, cpu_env,
offsetof(CPUX86State, fpcs));
- tcg_gen_st_tl(tcg_constant_tl(s->base.pc_next - s->cs_base),
+ tcg_gen_st_tl(gen_eip_cur(s),
cpu_env, offsetof(CPUX86State, fpip));
}
}
--
2.34.1
- Re: [PATCH v2 02/23] target/i386: Return bool from disas_insn, (continued)
- [PATCH v2 03/23] target/i386: Remove cur_eip argument to gen_exception, Richard Henderson, 2022/09/06
- [PATCH v2 18/23] target/i386: Use gen_jmp_rel for loop and jecxz insns, Richard Henderson, 2022/09/06
- [PATCH v2 01/23] target/i386: Remove pc_start, Richard Henderson, 2022/09/06
- [PATCH v2 14/23] target/i386: Truncate values for lcall_real to i32, Richard Henderson, 2022/09/06
- [PATCH v2 22/23] target/i386: Create gen_eip_cur,
Richard Henderson <=
- [PATCH v2 23/23] target/i386: Enable TARGET_TB_PCREL, Richard Henderson, 2022/09/06
- [PATCH v2 04/23] target/i386: Remove cur_eip, next_eip arguments to gen_interrupt, Richard Henderson, 2022/09/06
- [PATCH v2 05/23] target/i386: Create gen_update_eip_cur, Richard Henderson, 2022/09/06