[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 13/22] target/i386: Truncate values for lcall_real to i32
From: |
Richard Henderson |
Subject: |
[PATCH 13/22] target/i386: Truncate values for lcall_real to i32 |
Date: |
Mon, 22 Aug 2022 16:33:09 -0700 |
Use i32 not int or tl for eip and cs arguments.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/i386/helper.h | 2 +-
target/i386/tcg/seg_helper.c | 6 ++----
target/i386/tcg/translate.c | 3 ++-
3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/target/i386/helper.h b/target/i386/helper.h
index ac3b4d1ee3..39a3c24182 100644
--- a/target/i386/helper.h
+++ b/target/i386/helper.h
@@ -37,7 +37,7 @@ DEF_HELPER_2(lldt, void, env, int)
DEF_HELPER_2(ltr, void, env, int)
DEF_HELPER_3(load_seg, void, env, int, int)
DEF_HELPER_4(ljmp_protected, void, env, int, tl, tl)
-DEF_HELPER_5(lcall_real, void, env, int, tl, int, int)
+DEF_HELPER_5(lcall_real, void, env, i32, i32, int, i32)
DEF_HELPER_5(lcall_protected, void, env, int, tl, int, tl)
DEF_HELPER_2(iret_real, void, env, int)
DEF_HELPER_3(iret_protected, void, env, int, int)
diff --git a/target/i386/tcg/seg_helper.c b/target/i386/tcg/seg_helper.c
index bffd82923f..539189b4d1 100644
--- a/target/i386/tcg/seg_helper.c
+++ b/target/i386/tcg/seg_helper.c
@@ -1504,14 +1504,12 @@ void helper_ljmp_protected(CPUX86State *env, int
new_cs, target_ulong new_eip,
}
/* real mode call */
-void helper_lcall_real(CPUX86State *env, int new_cs, target_ulong new_eip1,
- int shift, int next_eip)
+void helper_lcall_real(CPUX86State *env, uint32_t new_cs, uint32_t new_eip,
+ int shift, uint32_t next_eip)
{
- int new_eip;
uint32_t esp, esp_mask;
target_ulong ssp;
- new_eip = new_eip1;
esp = env->regs[R_ESP];
esp_mask = get_sp_mask(env->segs[R_SS].flags);
ssp = env->segs[R_SS].base;
diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c
index 367a7a335a..13577f5d7b 100644
--- a/target/i386/tcg/translate.c
+++ b/target/i386/tcg/translate.c
@@ -5189,7 +5189,8 @@ static bool disas_insn(DisasContext *s, CPUState *cpu)
tcg_const_tl(s->pc - s->cs_base));
} else {
tcg_gen_trunc_tl_i32(s->tmp2_i32, s->T0);
- gen_helper_lcall_real(cpu_env, s->tmp2_i32, s->T1,
+ tcg_gen_trunc_tl_i32(s->tmp3_i32, s->T1);
+ gen_helper_lcall_real(cpu_env, s->tmp2_i32, s->tmp3_i32,
tcg_const_i32(dflag - 1),
tcg_const_i32(s->pc - s->cs_base));
}
--
2.34.1
- [PATCH 01/22] target/i386: Return bool from disas_insn, (continued)
- [PATCH 01/22] target/i386: Return bool from disas_insn, Richard Henderson, 2022/08/22
- [PATCH 03/22] target/i386: Remove cur_eip, next_eip arguments to gen_interrupt, Richard Henderson, 2022/08/22
- [PATCH 02/22] target/i386: Remove cur_eip argument to gen_exception, Richard Henderson, 2022/08/22
- [PATCH 04/22] target/i386: Create gen_update_eip_cur, Richard Henderson, 2022/08/22
- [PATCH 05/22] target/i386: Create gen_update_eip_next, Richard Henderson, 2022/08/22
- [PATCH 06/22] target/i386: Introduce DISAS_EOB*, Richard Henderson, 2022/08/22
- [PATCH 07/22] target/i386: Use DISAS_EOB* in gen_movl_seg_T0, Richard Henderson, 2022/08/22
- [PATCH 08/22] target/i386: Use DISAS_EOB_NEXT, Richard Henderson, 2022/08/22
- [PATCH 10/22] target/i386: Create cur_insn_len, cur_insn_len_i32, Richard Henderson, 2022/08/22
- [PATCH 09/22] target/i386: USe DISAS_EOB_ONLY, Richard Henderson, 2022/08/22
- [PATCH 13/22] target/i386: Truncate values for lcall_real to i32,
Richard Henderson <=
- [PATCH 15/22] target/i386: Use DISAS_TOO_MANY to exit after gen_io_start, Richard Henderson, 2022/08/22
- [PATCH 16/22] target/i386: Create gen_jmp_rel, Richard Henderson, 2022/08/22
- [PATCH 17/22] target/i386: Use gen_jmp_rel for loop and jecxz insns, Richard Henderson, 2022/08/22
- [PATCH 11/22] target/i386: Remove cur_eip, next_eip arguments to gen_repz*, Richard Henderson, 2022/08/22
- [PATCH 20/22] target/i386: Use gen_jmp_rel for DISAS_TOO_MANY, Richard Henderson, 2022/08/22
- [PATCH 12/22] target/i386: Introduce DISAS_JUMP, Richard Henderson, 2022/08/22
- [PATCH 19/22] target/i386: Use gen_jmp_rel for gen_repz*, Richard Henderson, 2022/08/22
- [PATCH 18/22] target/i386: Use gen_jmp_rel for gen_jcc, Richard Henderson, 2022/08/22
- [PATCH 22/22] target/i386: Enable TARGET_TB_PCREL, Richard Henderson, 2022/08/22
- [PATCH 21/22] target/i386: Create gen_eip_cur, Richard Henderson, 2022/08/22