fixes a bug in exception handling in v8086 mode
Here are comments from the author:
Since the bug of bochs-2.0.win32 was found and
corrected, it reports. cpu/exception.cpp of src : Within
an interrupt() function, when present is the V8086 mode,
a bug is in the portion which processes 386 (286)
int/trap gate. From the V8086 mode, this portion is
performed, when it is going to execute an int imm
command. The portion in which push_32 () is called in
the state of VM=1 is still a mistake. Although this
push_32 () tends to write in to the stack of a protected
mode, if it is still VM=1 of EFLAGS, the
write_virtual_dword() function called out of push_32 () will
take out a segment protection exception. After
performing clear_VM() etc., it is necessary to make it
call push_32 () correctly, since EFLAGS is saved locally.
Syntax error fixes:
[x] fixed error with array bounds in virt_timer.cc
[x] fixed error with returning value from void functions
[x] fixed const class member initialization (according C++ standard)
[x] for-loop local variable declaration moved out of loop
(for VC 6.0 compliance)
Removed already committed patch from Dirk Thierbach
Replaced the patch from Vitaly Vorobyov by set of splitted patches.
Now any of his patches could be committed separatelly from others !
running on a 32 bit host. The problem was that the FPU code uses native pointers to
represent addresses. The assumption that an emulated address is the same size as a
native pointer breaks down when emulating 64 bit addresses on a 32 bit host. The
patch replaces the occurrences of such an address with a bx_address type.
Once this patch has been reviewed by other developers, it will be committed to the
main cvs branch.
* renamed CPU_ID to BX_CPU_ID.
with this new name there is no possibility for name contentions and BX_CPU_ID
definition could be moved out to NEED_CPU_REG_SHORTCUTS block
* returned back `unsigned BX_CPU::which_cpu(void)` function
* added BX_CPU_ID parameter for
BX_INSTR_PHY_READ(a20addr, len);
BX_INSTR_PHY_WRITE(a20addr, len);
now it will be
BX_INSTR_PHY_READ(cpu_id, a20addr, len);
BX_INSTR_PHY_WRITE(cpu_id, a20addr, len);
It uses special gcc attribute regparm, available on gcc3.2 on x86.
I get about 7% increase when booting windows 95.
The patch still need some integration work before being included
in the main code.