mirror of https://gitee.com/openkylin/qemu.git
DR6 single step exception status bit, by Juergen Keil.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3024 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
b3ceef24f4
commit
88fe8a41f2
|
@ -190,6 +190,7 @@ void helper_divq_EAX_T0(void);
|
||||||
void helper_idivq_EAX_T0(void);
|
void helper_idivq_EAX_T0(void);
|
||||||
void helper_bswapq_T0(void);
|
void helper_bswapq_T0(void);
|
||||||
void helper_cmpxchg8b(void);
|
void helper_cmpxchg8b(void);
|
||||||
|
void helper_single_step(void);
|
||||||
void helper_cpuid(void);
|
void helper_cpuid(void);
|
||||||
void helper_enter_level(int level, int data32);
|
void helper_enter_level(int level, int data32);
|
||||||
void helper_enter64_level(int level, int data64);
|
void helper_enter64_level(int level, int data64);
|
||||||
|
|
|
@ -1622,6 +1622,12 @@ void helper_cmpxchg8b(void)
|
||||||
CC_SRC = eflags;
|
CC_SRC = eflags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void helper_single_step()
|
||||||
|
{
|
||||||
|
env->dr[6] |= 0x4000;
|
||||||
|
raise_exception(EXCP01_SSTP);
|
||||||
|
}
|
||||||
|
|
||||||
void helper_cpuid(void)
|
void helper_cpuid(void)
|
||||||
{
|
{
|
||||||
uint32_t index;
|
uint32_t index;
|
||||||
|
|
|
@ -730,6 +730,11 @@ void OPPROTO op_cmpxchg8b(void)
|
||||||
helper_cmpxchg8b();
|
helper_cmpxchg8b();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OPPROTO op_single_step(void)
|
||||||
|
{
|
||||||
|
helper_single_step();
|
||||||
|
}
|
||||||
|
|
||||||
void OPPROTO op_movl_T0_0(void)
|
void OPPROTO op_movl_T0_0(void)
|
||||||
{
|
{
|
||||||
T0 = 0;
|
T0 = 0;
|
||||||
|
|
|
@ -2277,7 +2277,7 @@ static void gen_eob(DisasContext *s)
|
||||||
if (s->singlestep_enabled) {
|
if (s->singlestep_enabled) {
|
||||||
gen_op_debug();
|
gen_op_debug();
|
||||||
} else if (s->tf) {
|
} else if (s->tf) {
|
||||||
gen_op_raise_exception(EXCP01_SSTP);
|
gen_op_single_step();
|
||||||
} else {
|
} else {
|
||||||
gen_op_movl_T0_0();
|
gen_op_movl_T0_0();
|
||||||
gen_op_exit_tb();
|
gen_op_exit_tb();
|
||||||
|
|
Loading…
Reference in New Issue