Improve Bochs instrumentation
Small changes in APIC timer, should fix the bug report [ 957660 ] >>PANIC<< APIC: R(curr timer count): delta < initial
This commit is contained in:
parent
c12a314851
commit
a86002a8bc
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: apic.cc,v 1.53 2005-04-29 18:38:34 sshwarts Exp $
|
||||
// $Id: apic.cc,v 1.54 2005-04-29 21:28:42 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define NEED_CPU_REG_SHORTCUTS 1
|
||||
@ -251,10 +251,10 @@ bx_bool bx_generic_apic_c::deliver (Bit8u dest, Bit8u dest_mode, Bit8u delivery_
|
||||
arbitrate_and_trigger_one(deliver_bitmask, vector, trig_mode);
|
||||
else {
|
||||
for (int i = 0; i < BX_LOCAL_APIC_NUM; i++) {
|
||||
if (deliver_bitmask & (1<<i)) {
|
||||
local_apic_index[i]->trigger_irq(vector, i, trig_mode);
|
||||
}
|
||||
break;
|
||||
if (deliver_bitmask & (1<<i)) {
|
||||
local_apic_index[i]->trigger_irq(vector, i, trig_mode);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -262,11 +262,12 @@ bx_bool bx_generic_apic_c::deliver (Bit8u dest, Bit8u dest_mode, Bit8u delivery_
|
||||
arbitrate_and_trigger(deliver_bitmask, vector, trig_mode);
|
||||
else {
|
||||
for (int i = 0; i < BX_LOCAL_APIC_NUM; i++) {
|
||||
if (deliver_bitmask & (1<<i))
|
||||
local_apic_index[i]->trigger_irq(vector, i, trig_mode);
|
||||
if (deliver_bitmask & (1<<i))
|
||||
local_apic_index[i]->trigger_irq(vector, i, trig_mode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -556,7 +557,7 @@ void bx_local_apic_c::write (Bit32u addr, Bit32u *data, unsigned len)
|
||||
timer_active = 1;
|
||||
Bit32u timervec = lvt[APIC_LVT_TIMER];
|
||||
bx_bool continuous = (timervec & 0x20000) > 0;
|
||||
ticksInitial = bx_pc_system.getTicksTotal(); // Take a reading.
|
||||
ticksInitial = bx_pc_system.time_ticks(); // Take a reading.
|
||||
bx_pc_system.activate_timer_ticks(timer_handle,
|
||||
Bit64u(timer_initial) * Bit64u(timer_divide_factor), continuous);
|
||||
}
|
||||
@ -923,7 +924,7 @@ void bx_local_apic_c::periodic(void)
|
||||
}
|
||||
// Reload timer values.
|
||||
timer_current = timer_initial;
|
||||
ticksInitial = bx_pc_system.getTicksTotal(); // Take a reading.
|
||||
ticksInitial = bx_pc_system.time_ticks(); // Take a reading.
|
||||
BX_DEBUG(("%s: local apic timer (periodic) triggered int, reset counter to 0x%08x", cpu->name, timer_current));
|
||||
}
|
||||
else {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: fetchdecode.cc,v 1.78 2005-03-17 20:50:37 sshwarts Exp $
|
||||
// $Id: fetchdecode.cc,v 1.79 2005-04-29 21:28:42 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -1515,9 +1515,9 @@ another_byte:
|
||||
|
||||
if (attr & BxAnother) {
|
||||
if (attr & BxPrefix) {
|
||||
BX_INSTR_PREFIX(BX_CPU_ID, b1);
|
||||
switch (b1) {
|
||||
case 0x66: // OpSize
|
||||
BX_INSTR_PREFIX_OS(BX_CPU_ID);
|
||||
os_32 = !is_32;
|
||||
sse_prefix |= SSE_PREFIX_66;
|
||||
instruction->setOs32B(os_32);
|
||||
@ -1528,7 +1528,6 @@ another_byte:
|
||||
return(0);
|
||||
|
||||
case 0x67: // AddrSize
|
||||
BX_INSTR_PREFIX_AS(BX_CPU_ID);
|
||||
instruction->setAs32B(!is_32);
|
||||
if (ilen < remain) {
|
||||
ilen++;
|
||||
@ -1537,7 +1536,6 @@ another_byte:
|
||||
return(0);
|
||||
|
||||
case 0xf2: // REPNE/REPNZ
|
||||
BX_INSTR_PREFIX_REPNE(BX_CPU_ID);
|
||||
sse_prefix |= SSE_PREFIX_F2;
|
||||
instruction->setRepUsed(b1 & 3);
|
||||
if (ilen < remain) {
|
||||
@ -1547,7 +1545,6 @@ another_byte:
|
||||
return(0);
|
||||
|
||||
case 0xf3: // REP/REPE/REPZ
|
||||
BX_INSTR_PREFIX_REP(BX_CPU_ID);
|
||||
sse_prefix |= SSE_PREFIX_F3;
|
||||
instruction->setRepUsed(b1 & 3);
|
||||
if (ilen < remain) {
|
||||
@ -1557,7 +1554,6 @@ another_byte:
|
||||
return(0);
|
||||
|
||||
case 0x2e: // CS:
|
||||
BX_INSTR_PREFIX_CS(BX_CPU_ID);
|
||||
instruction->setSeg(BX_SEG_REG_CS);
|
||||
if (ilen < remain) {
|
||||
ilen++;
|
||||
@ -1565,7 +1561,6 @@ another_byte:
|
||||
}
|
||||
return(0);
|
||||
case 0x26: // ES:
|
||||
BX_INSTR_PREFIX_ES(BX_CPU_ID);
|
||||
instruction->setSeg(BX_SEG_REG_ES);
|
||||
if (ilen < remain) {
|
||||
ilen++;
|
||||
@ -1573,7 +1568,6 @@ another_byte:
|
||||
}
|
||||
return(0);
|
||||
case 0x36: // SS:
|
||||
BX_INSTR_PREFIX_SS(BX_CPU_ID);
|
||||
instruction->setSeg(BX_SEG_REG_SS);
|
||||
if (ilen < remain) {
|
||||
ilen++;
|
||||
@ -1581,7 +1575,6 @@ another_byte:
|
||||
}
|
||||
return(0);
|
||||
case 0x3e: // DS:
|
||||
BX_INSTR_PREFIX_DS(BX_CPU_ID);
|
||||
instruction->setSeg(BX_SEG_REG_DS);
|
||||
if (ilen < remain) {
|
||||
ilen++;
|
||||
@ -1589,7 +1582,6 @@ another_byte:
|
||||
}
|
||||
return(0);
|
||||
case 0x64: // FS:
|
||||
BX_INSTR_PREFIX_FS(BX_CPU_ID);
|
||||
instruction->setSeg(BX_SEG_REG_FS);
|
||||
if (ilen < remain) {
|
||||
ilen++;
|
||||
@ -1597,7 +1589,6 @@ another_byte:
|
||||
}
|
||||
return(0);
|
||||
case 0x65: // GS:
|
||||
BX_INSTR_PREFIX_GS(BX_CPU_ID);
|
||||
instruction->setSeg(BX_SEG_REG_GS);
|
||||
if (ilen < remain) {
|
||||
ilen++;
|
||||
@ -1606,7 +1597,6 @@ another_byte:
|
||||
return(0);
|
||||
|
||||
case 0xf0: // LOCK:
|
||||
BX_INSTR_PREFIX_LOCK(BX_CPU_ID);
|
||||
lock = 1;
|
||||
if (ilen < remain) {
|
||||
ilen++;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: fetchdecode64.cc,v 1.74 2005-03-29 21:59:44 sshwarts Exp $
|
||||
// $Id: fetchdecode64.cc,v 1.75 2005-04-29 21:28:42 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -2104,9 +2104,9 @@ another_byte:
|
||||
|
||||
if (attr & BxAnother) {
|
||||
if (attr & BxPrefix) {
|
||||
BX_INSTR_PREFIX(BX_CPU_ID, b1);
|
||||
switch (b1) {
|
||||
case 0x66: // OpSize
|
||||
BX_INSTR_PREFIX_OS(BX_CPU_ID);
|
||||
sse_prefix |= SSE_PREFIX_66;
|
||||
if (!instruction->os64L()) {
|
||||
instruction->setOs32B(0);
|
||||
@ -2119,7 +2119,6 @@ another_byte:
|
||||
return(0);
|
||||
|
||||
case 0x67: // AddrSize
|
||||
BX_INSTR_PREFIX_AS(BX_CPU_ID);
|
||||
instruction->setAs64B(0);
|
||||
if (ilen < remain) {
|
||||
ilen++;
|
||||
@ -2143,8 +2142,6 @@ another_byte:
|
||||
case 0x4D:
|
||||
case 0x4E:
|
||||
case 0x4F:
|
||||
BX_INSTR_PREFIX_EXTEND8B(BX_CPU_ID);
|
||||
|
||||
instruction->assertExtend8bit();
|
||||
if (b1 & 0x8) {
|
||||
instruction->assertOs64();
|
||||
@ -2161,7 +2158,6 @@ another_byte:
|
||||
return(0);
|
||||
|
||||
case 0xf2: // REPNE/REPNZ
|
||||
BX_INSTR_PREFIX_REPNE(BX_CPU_ID);
|
||||
sse_prefix |= SSE_PREFIX_F2;
|
||||
instruction->setRepUsed(b1 & 3);
|
||||
if (ilen < remain) {
|
||||
@ -2171,7 +2167,6 @@ another_byte:
|
||||
return(0);
|
||||
|
||||
case 0xf3: // REP/REPE/REPZ
|
||||
BX_INSTR_PREFIX_REP(BX_CPU_ID);
|
||||
sse_prefix |= SSE_PREFIX_F3;
|
||||
instruction->setRepUsed(b1 & 3);
|
||||
if (ilen < remain) {
|
||||
@ -2181,7 +2176,6 @@ another_byte:
|
||||
return(0);
|
||||
|
||||
case 0x2e: // CS:
|
||||
BX_INSTR_PREFIX_CS(BX_CPU_ID);
|
||||
/* instruction->setSeg(BX_SEG_REG_CS); */
|
||||
if (ilen < remain) {
|
||||
ilen++;
|
||||
@ -2190,7 +2184,6 @@ another_byte:
|
||||
return(0);
|
||||
|
||||
case 0x26: // ES:
|
||||
BX_INSTR_PREFIX_ES(BX_CPU_ID);
|
||||
/* instruction->setSeg(BX_SEG_REG_ES); */
|
||||
if (ilen < remain) {
|
||||
ilen++;
|
||||
@ -2199,7 +2192,6 @@ another_byte:
|
||||
return(0);
|
||||
|
||||
case 0x36: // SS:
|
||||
BX_INSTR_PREFIX_SS(BX_CPU_ID);
|
||||
/* instruction->setSeg(BX_SEG_REG_SS); */
|
||||
if (ilen < remain) {
|
||||
ilen++;
|
||||
@ -2208,7 +2200,6 @@ another_byte:
|
||||
return(0);
|
||||
|
||||
case 0x3e: // DS:
|
||||
BX_INSTR_PREFIX_DS(BX_CPU_ID);
|
||||
/* instruction->setSeg(BX_SEG_REG_DS); */
|
||||
if (ilen < remain) {
|
||||
ilen++;
|
||||
@ -2217,7 +2208,6 @@ another_byte:
|
||||
return(0);
|
||||
|
||||
case 0x64: // FS:
|
||||
BX_INSTR_PREFIX_FS(BX_CPU_ID);
|
||||
instruction->setSeg(BX_SEG_REG_FS);
|
||||
if (ilen < remain) {
|
||||
ilen++;
|
||||
@ -2226,7 +2216,6 @@ another_byte:
|
||||
return(0);
|
||||
|
||||
case 0x65: // GS:
|
||||
BX_INSTR_PREFIX_GS(BX_CPU_ID);
|
||||
instruction->setSeg(BX_SEG_REG_GS);
|
||||
if (ilen < remain) {
|
||||
ilen++;
|
||||
@ -2235,7 +2224,6 @@ another_byte:
|
||||
return(0);
|
||||
|
||||
case 0xf0: // LOCK:
|
||||
BX_INSTR_PREFIX_LOCK(BX_CPU_ID);
|
||||
lock = 1;
|
||||
if (ilen < remain) {
|
||||
ilen++;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: instrument.cc,v 1.11 2003-08-04 16:03:09 akrisak Exp $
|
||||
// $Id: instrument.cc,v 1.12 2005-04-29 21:28:43 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -193,24 +193,10 @@ void bx_instr_fetch_decode_completed(unsigned cpu, const bxInstruction_c *i)
|
||||
}
|
||||
}
|
||||
|
||||
#define PROCESS_PREFIX(name) \
|
||||
void bx_instr_prefix_##name(unsigned cpu) \
|
||||
{ \
|
||||
if(active) instruction[cpu].nprefixes++; \
|
||||
}
|
||||
|
||||
PROCESS_PREFIX(as);
|
||||
PROCESS_PREFIX(os);
|
||||
PROCESS_PREFIX(rep);
|
||||
PROCESS_PREFIX(repne);
|
||||
PROCESS_PREFIX(lock);
|
||||
PROCESS_PREFIX(cs);
|
||||
PROCESS_PREFIX(ss);
|
||||
PROCESS_PREFIX(ds);
|
||||
PROCESS_PREFIX(es);
|
||||
PROCESS_PREFIX(fs);
|
||||
PROCESS_PREFIX(gs);
|
||||
PROCESS_PREFIX(extend8b);
|
||||
void bx_instr_prefix(unsigned cpu, Bit8u prefix)
|
||||
{
|
||||
if(active) instruction[cpu].nprefixes++;
|
||||
}
|
||||
|
||||
void bx_instr_interrupt(unsigned cpu, unsigned vector)
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: instrument.h,v 1.12 2005-03-17 20:50:39 sshwarts Exp $
|
||||
// $Id: instrument.h,v 1.13 2005-04-29 21:28:43 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -64,18 +64,7 @@ void bx_instr_far_branch(unsigned cpu, unsigned what, Bit16u new_cs, bx_address
|
||||
void bx_instr_opcode(unsigned cpu, Bit8u *opcode, unsigned len, bx_bool is32);
|
||||
void bx_instr_fetch_decode_completed(unsigned cpu, const bxInstruction_c *i);
|
||||
|
||||
void bx_instr_prefix_as(unsigned cpu);
|
||||
void bx_instr_prefix_os(unsigned cpu);
|
||||
void bx_instr_prefix_rep(unsigned cpu);
|
||||
void bx_instr_prefix_repne(unsigned cpu);
|
||||
void bx_instr_prefix_lock(unsigned cpu);
|
||||
void bx_instr_prefix_cs(unsigned cpu);
|
||||
void bx_instr_prefix_ss(unsigned cpu);
|
||||
void bx_instr_prefix_ds(unsigned cpu);
|
||||
void bx_instr_prefix_es(unsigned cpu);
|
||||
void bx_instr_prefix_fs(unsigned cpu);
|
||||
void bx_instr_prefix_gs(unsigned cpu);
|
||||
void bx_instr_prefix_extend8b(unsigned cpu);
|
||||
void bx_instr_prefix(unsigned cpu, Bit8u prefix);
|
||||
|
||||
void bx_instr_interrupt(unsigned cpu, unsigned vector);
|
||||
void bx_instr_exception(unsigned cpu, unsigned vector);
|
||||
@ -107,19 +96,8 @@ void bx_instr_mem_data(unsigned cpu, bx_address lin, unsigned size, unsigned rw)
|
||||
# define BX_INSTR_FETCH_DECODE_COMPLETED(cpu_id, i) \
|
||||
bx_instr_fetch_decode_completed(cpu_id, i)
|
||||
|
||||
/* prefix decoded */
|
||||
# define BX_INSTR_PREFIX_AS(cpu_id) bx_instr_prefix_as(cpu_id)
|
||||
# define BX_INSTR_PREFIX_OS(cpu_id) bx_instr_prefix_os(cpu_id)
|
||||
# define BX_INSTR_PREFIX_REP(cpu_id) bx_instr_prefix_rep(cpu_id)
|
||||
# define BX_INSTR_PREFIX_REPNE(cpu_id) bx_instr_prefix_repne(cpu_id)
|
||||
# define BX_INSTR_PREFIX_LOCK(cpu_id) bx_instr_prefix_lock(cpu_id)
|
||||
# define BX_INSTR_PREFIX_CS(cpu_id) bx_instr_prefix_cs(cpu_id)
|
||||
# define BX_INSTR_PREFIX_SS(cpu_id) bx_instr_prefix_ss(cpu_id)
|
||||
# define BX_INSTR_PREFIX_DS(cpu_id) bx_instr_prefix_ds(cpu_id)
|
||||
# define BX_INSTR_PREFIX_ES(cpu_id) bx_instr_prefix_es(cpu_id)
|
||||
# define BX_INSTR_PREFIX_FS(cpu_id) bx_instr_prefix_fs(cpu_id)
|
||||
# define BX_INSTR_PREFIX_GS(cpu_id) bx_instr_prefix_gs(cpu_id)
|
||||
# define BX_INSTR_PREFIX_EXTEND8B(cpu_id) bx_instr_prefix_extend8b(cpu_id)
|
||||
/* prefix byte decoded */
|
||||
# define BX_INSTR_PREFIX(cpu_id, prefix) bx_instr_prefix_as(cpu_id, prefix)
|
||||
|
||||
/* exceptional case and interrupt */
|
||||
# define BX_INSTR_EXCEPTION(cpu_id, vector) bx_instr_exception(cpu_id, vector)
|
||||
@ -180,19 +158,8 @@ void bx_instr_mem_data(unsigned cpu, bx_address lin, unsigned size, unsigned rw)
|
||||
# define BX_INSTR_OPCODE(cpu_id, opcode, len, is32)
|
||||
# define BX_INSTR_FETCH_DECODE_COMPLETED(cpu_id, i)
|
||||
|
||||
/* prefix decoded */
|
||||
# define BX_INSTR_PREFIX_AS(cpu_id)
|
||||
# define BX_INSTR_PREFIX_OS(cpu_id)
|
||||
# define BX_INSTR_PREFIX_REP(cpu_id)
|
||||
# define BX_INSTR_PREFIX_REPNE(cpu_id)
|
||||
# define BX_INSTR_PREFIX_LOCK(cpu_id)
|
||||
# define BX_INSTR_PREFIX_CS(cpu_id)
|
||||
# define BX_INSTR_PREFIX_SS(cpu_id)
|
||||
# define BX_INSTR_PREFIX_DS(cpu_id)
|
||||
# define BX_INSTR_PREFIX_ES(cpu_id)
|
||||
# define BX_INSTR_PREFIX_FS(cpu_id)
|
||||
# define BX_INSTR_PREFIX_GS(cpu_id)
|
||||
# define BX_INSTR_PREFIX_EXTEND8B(cpu_id)
|
||||
/* prefix byte decoded */
|
||||
# define BX_INSTR_PREFIX(cpu_id, prefix)
|
||||
|
||||
/* exceptional case and interrupt */
|
||||
# define BX_INSTR_EXCEPTION(cpu_id, vector)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: instrument.cc,v 1.7 2003-08-04 16:03:09 akrisak Exp $
|
||||
// $Id: instrument.cc,v 1.8 2005-04-29 21:28:43 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -144,24 +144,10 @@ void bxInstrumentation::bx_instr_fetch_decode_completed(const bxInstruction_c *i
|
||||
}
|
||||
}
|
||||
|
||||
#define PROCESS_PREFIX(name) \
|
||||
void bxInstrumentation::bx_instr_prefix_##name() \
|
||||
{ \
|
||||
if(active) nprefixes++; \
|
||||
}
|
||||
|
||||
PROCESS_PREFIX(as);
|
||||
PROCESS_PREFIX(os);
|
||||
PROCESS_PREFIX(rep);
|
||||
PROCESS_PREFIX(repne);
|
||||
PROCESS_PREFIX(lock);
|
||||
PROCESS_PREFIX(cs);
|
||||
PROCESS_PREFIX(ss);
|
||||
PROCESS_PREFIX(ds);
|
||||
PROCESS_PREFIX(es);
|
||||
PROCESS_PREFIX(fs);
|
||||
PROCESS_PREFIX(gs);
|
||||
PROCESS_PREFIX(extend8b);
|
||||
void bxInstrumentation::bx_instr_prefix(Bit8u prefix)
|
||||
{
|
||||
if(active) nprefixes++;
|
||||
}
|
||||
|
||||
void bxInstrumentation::bx_instr_interrupt(unsigned vector)
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: instrument.h,v 1.10 2005-03-17 20:50:39 sshwarts Exp $
|
||||
// $Id: instrument.h,v 1.11 2005-04-29 21:28:59 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -105,18 +105,7 @@ public:
|
||||
void bx_instr_opcode(Bit8u *opcode, unsigned len, bx_bool is32);
|
||||
void bx_instr_fetch_decode_completed(const bxInstruction_c *i);
|
||||
|
||||
void bx_instr_prefix_as();
|
||||
void bx_instr_prefix_os();
|
||||
void bx_instr_prefix_rep();
|
||||
void bx_instr_prefix_repne();
|
||||
void bx_instr_prefix_lock();
|
||||
void bx_instr_prefix_cs();
|
||||
void bx_instr_prefix_ss();
|
||||
void bx_instr_prefix_ds();
|
||||
void bx_instr_prefix_es();
|
||||
void bx_instr_prefix_fs();
|
||||
void bx_instr_prefix_gs();
|
||||
void bx_instr_prefix_extend8b();
|
||||
void bx_instr_prefix(Bit8u prefix);
|
||||
|
||||
void bx_instr_interrupt(unsigned vector);
|
||||
void bx_instr_exception(unsigned vector);
|
||||
@ -154,19 +143,8 @@ extern bxInstrumentation icpu[BX_SMP_PROCESSORS];
|
||||
# define BX_INSTR_FETCH_DECODE_COMPLETED(cpu_id, i) \
|
||||
icpu[cpu_id].bx_instr_fetch_decode_completed(i)
|
||||
|
||||
/* prefix decoded */
|
||||
# define BX_INSTR_PREFIX_AS(cpu_id) icpu[cpu_id].bx_instr_prefix_as()
|
||||
# define BX_INSTR_PREFIX_OS(cpu_id) icpu[cpu_id].bx_instr_prefix_os()
|
||||
# define BX_INSTR_PREFIX_REP(cpu_id) icpu[cpu_id].bx_instr_prefix_rep()
|
||||
# define BX_INSTR_PREFIX_REPNE(cpu_id) icpu[cpu_id].bx_instr_prefix_repne()
|
||||
# define BX_INSTR_PREFIX_LOCK(cpu_id) icpu[cpu_id].bx_instr_prefix_lock()
|
||||
# define BX_INSTR_PREFIX_CS(cpu_id) icpu[cpu_id].bx_instr_prefix_cs()
|
||||
# define BX_INSTR_PREFIX_SS(cpu_id) icpu[cpu_id].bx_instr_prefix_ss()
|
||||
# define BX_INSTR_PREFIX_DS(cpu_id) icpu[cpu_id].bx_instr_prefix_ds()
|
||||
# define BX_INSTR_PREFIX_ES(cpu_id) icpu[cpu_id].bx_instr_prefix_es()
|
||||
# define BX_INSTR_PREFIX_FS(cpu_id) icpu[cpu_id].bx_instr_prefix_fs()
|
||||
# define BX_INSTR_PREFIX_GS(cpu_id) icpu[cpu_id].bx_instr_prefix_gs()
|
||||
# define BX_INSTR_PREFIX_EXTEND8B(cpu_id) icpu[cpu_id].bx_instr_prefix_extend8b()
|
||||
/* prefix byte decoded */
|
||||
# define BX_INSTR_PREFIX(cpu_id, prefix) icpu[cpu_id].bx_instr_prefix(prefix)
|
||||
|
||||
/* exceptional case and interrupt */
|
||||
# define BX_INSTR_EXCEPTION(cpu_id, vector) icpu[cpu_id].bx_instr_exception(vector)
|
||||
@ -227,19 +205,8 @@ extern bxInstrumentation icpu[BX_SMP_PROCESSORS];
|
||||
# define BX_INSTR_OPCODE(cpu_id, opcode, len, is32)
|
||||
# define BX_INSTR_FETCH_DECODE_COMPLETED(cpu_id, i)
|
||||
|
||||
/* prefix decoded */
|
||||
# define BX_INSTR_PREFIX_AS(cpu_id)
|
||||
# define BX_INSTR_PREFIX_OS(cpu_id)
|
||||
# define BX_INSTR_PREFIX_REP(cpu_id)
|
||||
# define BX_INSTR_PREFIX_REPNE(cpu_id)
|
||||
# define BX_INSTR_PREFIX_LOCK(cpu_id)
|
||||
# define BX_INSTR_PREFIX_CS(cpu_id)
|
||||
# define BX_INSTR_PREFIX_SS(cpu_id)
|
||||
# define BX_INSTR_PREFIX_DS(cpu_id)
|
||||
# define BX_INSTR_PREFIX_ES(cpu_id)
|
||||
# define BX_INSTR_PREFIX_FS(cpu_id)
|
||||
# define BX_INSTR_PREFIX_GS(cpu_id)
|
||||
# define BX_INSTR_PREFIX_EXTEND8B(cpu_id)
|
||||
/* prefix byte decoded */
|
||||
# define BX_INSTR_PREFIX(cpu_id, prefix)
|
||||
|
||||
/* exceptional case and interrupt */
|
||||
# define BX_INSTR_EXCEPTION(cpu_id, vector)
|
||||
|
@ -84,21 +84,10 @@ it is a Bochs internal structure that holds all necessary information about
|
||||
currently executed instruction, such as sib/modrm bytes, execution pointer and
|
||||
etc.
|
||||
|
||||
|
||||
void bx_instr_prefix_as(unsigned cpu);
|
||||
void bx_instr_prefix_os(unsigned cpu);
|
||||
void bx_instr_prefix_rep(unsigned cpu);
|
||||
void bx_instr_prefix_repne(unsigned cpu);
|
||||
void bx_instr_prefix_lock(unsigned cpu);
|
||||
void bx_instr_prefix_cs(unsigned cpu);
|
||||
void bx_instr_prefix_ss(unsigned cpu);
|
||||
void bx_instr_prefix_ds(unsigned cpu);
|
||||
void bx_instr_prefix_es(unsigned cpu);
|
||||
void bx_instr_prefix_fs(unsigned cpu);
|
||||
void bx_instr_prefix_gs(unsigned cpu);
|
||||
void bx_instr_prefix(unsigned cpu, Bit8u prefix);
|
||||
|
||||
These callback functions are called by Bochs decoding stage each time, when
|
||||
corresponding prefix was decoded.
|
||||
any prefix byte was decoded.
|
||||
|
||||
|
||||
void bx_instr_interrupt(unsigned cpu, unsigned vector);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: instrument.cc,v 1.12 2005-03-17 20:50:57 sshwarts Exp $
|
||||
// $Id: instrument.cc,v 1.13 2005-04-29 21:28:59 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -46,18 +46,7 @@ void bx_instr_far_branch(unsigned cpu, unsigned what, Bit16u new_cs, bx_address
|
||||
void bx_instr_opcode(unsigned cpu, Bit8u *opcode, unsigned len, bx_bool is32) {}
|
||||
void bx_instr_fetch_decode_completed(unsigned cpu, const bxInstruction_c *i) {}
|
||||
|
||||
void bx_instr_prefix_as(unsigned cpu) {}
|
||||
void bx_instr_prefix_os(unsigned cpu) {}
|
||||
void bx_instr_prefix_rep(unsigned cpu) {}
|
||||
void bx_instr_prefix_repne(unsigned cpu) {}
|
||||
void bx_instr_prefix_lock(unsigned cpu) {}
|
||||
void bx_instr_prefix_cs(unsigned cpu) {}
|
||||
void bx_instr_prefix_ss(unsigned cpu) {}
|
||||
void bx_instr_prefix_ds(unsigned cpu) {}
|
||||
void bx_instr_prefix_es(unsigned cpu) {}
|
||||
void bx_instr_prefix_fs(unsigned cpu) {}
|
||||
void bx_instr_prefix_gs(unsigned cpu) {}
|
||||
void bx_instr_prefix_extend8b(unsigned cpu) {}
|
||||
void bx_instr_prefix(unsigned cpu, Bit8u prefix) {}
|
||||
|
||||
void bx_instr_interrupt(unsigned cpu, unsigned vector) {}
|
||||
void bx_instr_exception(unsigned cpu, unsigned vector) {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: instrument.h,v 1.16 2005-04-18 17:21:34 sshwarts Exp $
|
||||
// $Id: instrument.h,v 1.17 2005-04-29 21:28:59 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -40,13 +40,10 @@
|
||||
#define BX_INSTR_IS_JMP 13
|
||||
#define BX_INSTR_IS_INT 14
|
||||
|
||||
#define BX_INSTR_PREFETCH_NTA 00
|
||||
#define BX_INSTR_PREFETCH_T0 01
|
||||
#define BX_INSTR_PREFETCH_T1 02
|
||||
#define BX_INSTR_PREFETCH_T2 03
|
||||
|
||||
|
||||
|
||||
#define BX_INSTR_PREFETCH_NTA 0
|
||||
#define BX_INSTR_PREFETCH_T0 1
|
||||
#define BX_INSTR_PREFETCH_T1 2
|
||||
#define BX_INSTR_PREFETCH_T2 3
|
||||
|
||||
|
||||
#if BX_INSTRUMENTATION
|
||||
@ -73,18 +70,7 @@ void bx_instr_far_branch(unsigned cpu, unsigned what, Bit16u new_cs, bx_address
|
||||
void bx_instr_opcode(unsigned cpu, Bit8u *opcode, unsigned len, bx_bool is32);
|
||||
void bx_instr_fetch_decode_completed(unsigned cpu, const bxInstruction_c *i);
|
||||
|
||||
void bx_instr_prefix_as(unsigned cpu);
|
||||
void bx_instr_prefix_os(unsigned cpu);
|
||||
void bx_instr_prefix_rep(unsigned cpu);
|
||||
void bx_instr_prefix_repne(unsigned cpu);
|
||||
void bx_instr_prefix_lock(unsigned cpu);
|
||||
void bx_instr_prefix_cs(unsigned cpu);
|
||||
void bx_instr_prefix_ss(unsigned cpu);
|
||||
void bx_instr_prefix_ds(unsigned cpu);
|
||||
void bx_instr_prefix_es(unsigned cpu);
|
||||
void bx_instr_prefix_fs(unsigned cpu);
|
||||
void bx_instr_prefix_gs(unsigned cpu);
|
||||
void bx_instr_prefix_extend8b(unsigned cpu);
|
||||
void bx_instr_prefix(unsigned cpu, Bit8u prefix);
|
||||
|
||||
void bx_instr_interrupt(unsigned cpu, unsigned vector);
|
||||
void bx_instr_exception(unsigned cpu, unsigned vector);
|
||||
@ -94,9 +80,9 @@ void bx_instr_tlb_cntrl(unsigned cpu, unsigned what, Bit32u newval);
|
||||
void bx_instr_cache_cntrl(unsigned cpu, unsigned what);
|
||||
void bx_instr_prefetch_hint(unsigned cpu, unsigned what, unsigned seg, bx_address offset);
|
||||
|
||||
void bx_instr_before_execution(unsigned cpu, const bxInstruction_c *i);
|
||||
void bx_instr_after_execution(unsigned cpu, const bxInstruction_c *i);
|
||||
void bx_instr_repeat_iteration(unsigned cpu, const bxInstruction_c *i);
|
||||
void bx_instr_before_execution(unsigned cpu);
|
||||
void bx_instr_after_execution(unsigned cpu);
|
||||
void bx_instr_repeat_iteration(unsigned cpu);
|
||||
|
||||
void bx_instr_inp(Bit16u addr, unsigned len);
|
||||
void bx_instr_outp(Bit16u addr, unsigned len);
|
||||
@ -138,19 +124,8 @@ void bx_instr_wrmsr(unsigned cpu, unsigned addr, Bit64u value);
|
||||
# define BX_INSTR_FETCH_DECODE_COMPLETED(cpu_id, i) \
|
||||
bx_instr_fetch_decode_completed(cpu_id, i)
|
||||
|
||||
/* prefix decoded */
|
||||
# define BX_INSTR_PREFIX_AS(cpu_id) bx_instr_prefix_as(cpu_id)
|
||||
# define BX_INSTR_PREFIX_OS(cpu_id) bx_instr_prefix_os(cpu_id)
|
||||
# define BX_INSTR_PREFIX_REP(cpu_id) bx_instr_prefix_rep(cpu_id)
|
||||
# define BX_INSTR_PREFIX_REPNE(cpu_id) bx_instr_prefix_repne(cpu_id)
|
||||
# define BX_INSTR_PREFIX_LOCK(cpu_id) bx_instr_prefix_lock(cpu_id)
|
||||
# define BX_INSTR_PREFIX_CS(cpu_id) bx_instr_prefix_cs(cpu_id)
|
||||
# define BX_INSTR_PREFIX_SS(cpu_id) bx_instr_prefix_ss(cpu_id)
|
||||
# define BX_INSTR_PREFIX_DS(cpu_id) bx_instr_prefix_ds(cpu_id)
|
||||
# define BX_INSTR_PREFIX_ES(cpu_id) bx_instr_prefix_es(cpu_id)
|
||||
# define BX_INSTR_PREFIX_FS(cpu_id) bx_instr_prefix_fs(cpu_id)
|
||||
# define BX_INSTR_PREFIX_GS(cpu_id) bx_instr_prefix_gs(cpu_id)
|
||||
# define BX_INSTR_PREFIX_EXTEND8B(cpu_id) bx_instr_prefix_extend8b(cpu_id)
|
||||
/* prefix byte decoded */
|
||||
# define BX_INSTR_PREFIX(cpu_id, prefix) bx_instr_prefix(cpu_id, prefix)
|
||||
|
||||
/* exceptional case and interrupt */
|
||||
# define BX_INSTR_EXCEPTION(cpu_id, vector) bx_instr_exception(cpu_id, vector)
|
||||
@ -212,19 +187,8 @@ void bx_instr_wrmsr(unsigned cpu, unsigned addr, Bit64u value);
|
||||
# define BX_INSTR_OPCODE(cpu_id, opcode, len, is32)
|
||||
# define BX_INSTR_FETCH_DECODE_COMPLETED(cpu_id, i)
|
||||
|
||||
/* prefix decoded */
|
||||
# define BX_INSTR_PREFIX_AS(cpu_id)
|
||||
# define BX_INSTR_PREFIX_OS(cpu_id)
|
||||
# define BX_INSTR_PREFIX_REP(cpu_id)
|
||||
# define BX_INSTR_PREFIX_REPNE(cpu_id)
|
||||
# define BX_INSTR_PREFIX_LOCK(cpu_id)
|
||||
# define BX_INSTR_PREFIX_CS(cpu_id)
|
||||
# define BX_INSTR_PREFIX_SS(cpu_id)
|
||||
# define BX_INSTR_PREFIX_DS(cpu_id)
|
||||
# define BX_INSTR_PREFIX_ES(cpu_id)
|
||||
# define BX_INSTR_PREFIX_FS(cpu_id)
|
||||
# define BX_INSTR_PREFIX_GS(cpu_id)
|
||||
# define BX_INSTR_PREFIX_EXTEND8B(cpu_id)
|
||||
/* prefix byte decoded */
|
||||
# define BX_INSTR_PREFIX(cpu_id, prefix)
|
||||
|
||||
/* exceptional case and interrupt */
|
||||
# define BX_INSTR_EXCEPTION(cpu_id, vector)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: pc_system.h,v 1.31 2005-04-26 19:19:57 sshwarts Exp $
|
||||
// $Id: pc_system.h,v 1.32 2005-04-29 21:28:41 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2004 MandrakeSoft S.A.
|
||||
@ -142,9 +142,6 @@ public:
|
||||
return bx_pc_system.ticksTotal +
|
||||
Bit64u(bx_pc_system.currCountdownPeriod - bx_pc_system.currCountdown);
|
||||
}
|
||||
static BX_CPP_INLINE Bit64u getTicksTotal(void) {
|
||||
return bx_pc_system.ticksTotal;
|
||||
}
|
||||
|
||||
static BX_CPP_INLINE Bit32u getNumCpuTicksLeftNextEvent(void) {
|
||||
return bx_pc_system.currCountdown;
|
||||
|
Loading…
Reference in New Issue
Block a user