Stanislav Shwartsman
6398ebb1d4
First step of access bits cleanup and optimization - no perf gain yet
2008-08-03 19:53:09 +00:00
Stanislav Shwartsman
cedf6bd88a
Small coding style optimization
2008-07-13 13:32:15 +00:00
Stanislav Shwartsman
6f7d39e832
Speedup port read to memory methods
2008-07-13 13:24:36 +00:00
Stanislav Shwartsman
65275ffc02
Remove repeat speedups from 16-bit address size methods - they not gonna speed up anyway because of segment limit issue
2008-06-25 10:34:21 +00:00
Stanislav Shwartsman
1a355e270e
split io repeat methods by address size
2008-06-12 20:12:25 +00:00
Stanislav Shwartsman
92568f7525
Faster 32-bit emulation wwith 64-bit enabled mode.
...
~10% speedup byu optimization of 32-bit mem access
2008-06-12 19:14:40 +00:00
Stanislav Shwartsman
50c9674d2e
Small optimization in memory access functions
2008-05-03 17:33:30 +00:00
Stanislav Shwartsman
67e534832b
Remove from CPU reference to MEM object - it is only one and could be static
2008-04-27 19:49:02 +00:00
Stanislav Shwartsman
892fa99c6f
- prefetch hint should be NOP when use in register mode
...
- #GP when trying to set reserved bits of CR4_HI in 64-bit mode
- #GP when trying to set reserved bits of EFER MSR
- clear upper part of RSI/RDI when executing rep instructions with 32-bit asize
even if no repeat iterations were executed (because of RCX=0 for example)
- write SYSENTER_EIP_MSR and SYSENTER_ESP_MSR as 64-bit when x86_64 supported
- set MSR_FMASK reset value
- MSR_FMASK should be 32-bit only
- check for fetch permissions when doing ITLB lookup
- #GP when trying to write non-canonical address to MSR_CSTAR or MSR_LSTAR
- correct repeat instructions timing
- mark TSS busy in TR after it is loaded
2008-04-16 16:44:06 +00:00
Stanislav Shwartsman
fea49bb270
Fixed linear address wrap in legacy (not long64) mode
2008-04-07 18:39:17 +00:00
Stanislav Shwartsman
167c7075fb
Use fastcall gcc attribute for all cpu execution functions - this pure "compiler helper" optimization brings additional 2% speedup to Bochs code
2008-03-22 21:29:41 +00:00
Stanislav Shwartsman
eea5e6eac5
Simplify RepeatSpeedups optimizations - restrict them only to segments which already passed access/limit validation and avoid mass of heavy checks during repeat speedup itself.
2008-03-21 20:35:46 +00:00
Stanislav Shwartsman
063d896226
Optimization in 16-bit resolve functions
...
Fixes for hosts which can't support misaligned memory access
2008-02-07 20:43:13 +00:00
Stanislav Shwartsman
a2897933a3
white space cleanup
2008-02-02 21:46:54 +00:00
Stanislav Shwartsman
37fbb82baa
Cleanups. Move bxInstruction_c definition to separate file instr.h
2008-01-29 17:13:10 +00:00
Stanislav Shwartsman
d9984bb3a1
Eliminate BxResolve call from the heart of cpu loop and move into instructions that really require this calculation. Yes, it blows the code of EVERY CPU method but it has >15% speedup !
2008-01-10 19:37:56 +00:00
Stanislav Shwartsman
79fc57dec8
Fixed more VCPP2008 warnings
2007-12-26 23:07:44 +00:00
Stanislav Shwartsman
38fb3d78be
small cleanup in repeat code
2007-12-23 18:09:34 +00:00
Stanislav Shwartsman
085f408078
Fixed possible problem with repeat speedups in 64-bit mode.
...
Also was pointed out by MSVCPP2008 warnings
2007-12-23 17:46:44 +00:00
Stanislav Shwartsman
5d4e32b8da
Avoid pointer params for every read_virtual_* except 16-byte SSE and 10-byte x87 reads
2007-12-20 20:58:38 +00:00
Stanislav Shwartsman
b516589e4e
Changes in write_virtual_* and pop_* functions -> avoid moving parameteres by pointer
2007-12-20 18:29:42 +00:00
Stanislav Shwartsman
d032a30429
Fixed a lot of code duplication and possible bug with oncorrect implementation of repeat speedup in 64-bit guest
2007-12-17 21:13:55 +00:00
Stanislav Shwartsman
46366b5064
Speedup simulation by eliminating CPL==3 check from read/write_virtual* functions
2007-12-16 21:03:46 +00:00
Stanislav Shwartsman
a83b8ae843
Slight speed improvement in string functions
2007-10-29 15:39:18 +00:00
Stanislav Shwartsman
fbcdfa49c2
Cleanup
2007-10-10 22:20:32 +00:00
Stanislav Shwartsman
deb79e9675
[Bochs-developers] [PATCH] avoid RCX without BX_SUPPORT_X86_64
2007-09-27 16:11:32 +00:00
Stanislav Shwartsman
e812f81e7b
Fixes in zero upper ECX
2007-09-25 16:11:32 +00:00
Stanislav Shwartsman
38d1f39c77
Converted CR0 bits to one register similar to CR4 - a bit slower but helps with other features implemntation
2007-07-09 15:16:14 +00:00
Stanislav Shwartsman
5c21f7821f
Speed simulation between 3 to 5% by eliminating several checks from cpu loop.
...
The checks were related to repeat instructions - handle them differently
2007-01-05 13:40:47 +00:00
Volker Ruppert
8e85b8654b
- fixed repeat speedup optimization on big endian machines
2006-08-01 17:09:05 +00:00
Stanislav Shwartsman
6c3420a18b
Add debug prints before any #GP excepion which only possible to be generated
2006-06-09 22:29:07 +00:00
Stanislav Shwartsman
8b0df8e99b
Merge SAVE_RESTORE branch to CVS
2006-05-27 15:54:49 +00:00
Stanislav Shwartsman
a4129e5341
Handle NULL_SEG_REG (no segment override) case in fetchdecode.cc
2006-05-24 20:57:37 +00:00
Stanislav Shwartsman
91ada6c72c
Separate RepeatSpeedups code in io.cc to stand-alone CPU methods
...
FestRepINSW and FastRepOUTSW similar to that is done in string.cc
Done to simplify the code, it was just impossible to understand it.
2006-05-07 20:45:42 +00:00
Stanislav Shwartsman
d69eba6c07
Split in/out instructions based on operand size
2006-05-07 18:27:36 +00:00
Stanislav Shwartsman
b8be848943
Use access_type param in getHostMemAddr, less efficient but no copy-paste at least
2006-03-26 19:39:37 +00:00
Stanislav Shwartsman
7b6c2587a9
Now devices could be compiled separatelly from CPU
...
Averything that required cpu.h include now has it explicitly and there are a lot of files not dependant by CPU at all which will compile a lot faster now ...
2006-03-06 22:03:16 +00:00
Stanislav Shwartsman
f096a80716
Fix code duplication for check_cs descriptor
...
The function will execute
- segment is executable code segment
- conforming/non-conforming segment priviledge checks
- segment is present
2005-08-01 21:40:17 +00:00
Stanislav Shwartsman
c026a90779
Unify coding style in CPU methods
...
NO AFFECT ON EMULATION RESULTS
2005-05-20 20:06:50 +00:00
Volker Ruppert
a5fb44c340
- changed data type of bulkIOHostAddr to Bit8u* (fixed compilation on 64 bit hosts)
2005-04-02 11:30:08 +00:00
Stanislav Shwartsman
b25088bf2f
Merge patch [1153327] ignore segment bases in x86-64 by Avi Kivity
2005-02-28 18:56:05 +00:00
Stanislav Shwartsman
0d09a8c8a8
fix code duplication
2004-11-26 19:53:04 +00:00
Stanislav Shwartsman
5873b26a82
Speed up compilation process.
...
bochs.h already not include iodev.h which reduces compilation dependences for almost all cpu and fpu files, now cpu files will not be recompiled if iodev includes was changed
2004-06-19 15:20:15 +00:00
Stanislav Shwartsman
f552a1c861
Apply patches:
...
907163 ctrl_xfer8 clean/speed up 2004-02-29 14:32 nobody psychosmurf
907161 clean/speed up of io.cc 2004-02-29 14:31 nobody psychosmurf
2004-03-02 20:48:48 +00:00
Bryce Denney
5e520261db
Add plugin support to Bochs by merging all the changes from the
...
BRANCH_PLUGINS branch!
Authors:
Bryce Denney
Christophe Bothamy
Kevin Lawton (we grabbed a lot of plugin code from plex86)
Testing help from:
Volker Ruppert
Don Becker (Psyon)
Jeremy Parsons (Br'fin)
The change log is too long to paste in here. To read the change log, do
cvs log patches/patch.final-from-BRANCH_PLUGINS.gz
All the changes and a detailed description are contained in a patch
called patch.final-from-BRANCH_PLUGINS.gz. To look at the complete
patch, do
cvs upd -r1.1 patches/patch.final-from-BRANCH_PLUGINS.gz
Then you will have a local copy of the patch, which you can gunzip and
play with however you want.
Modified Files:
.bochsrc Makefile.in aclocal.m4 bochs.h config.h.in configure
configure.in gdbstub.cc logio.cc main.cc pc_system.cc
pc_system.h state_file.h bios/Makefile.in bios/rombios.c
cpu/Makefile.in cpu/access.cc cpu/apic.cc cpu/arith16.cc
cpu/arith32.cc cpu/arith8.cc cpu/cpu.cc cpu/cpu.h
cpu/ctrl_xfer32.cc cpu/exception.cc cpu/fetchdecode.cc
cpu/fetchdecode64.cc cpu/flag_ctrl.cc cpu/flag_ctrl_pro.cc
cpu/init.cc cpu/io.cc cpu/logical16.cc cpu/logical32.cc
cpu/logical8.cc cpu/paging.cc cpu/proc_ctrl.cc
cpu/protect_ctrl.cc cpu/segment_ctrl_pro.cc cpu/shift16.cc
cpu/shift32.cc cpu/stack64.cc cpu/string.cc cpu/tasking.cc
debug/Makefile.in debug/dbg_main.cc disasm/Makefile.in
doc/docbook/user/user.dbk dynamic/Makefile.in fpu/Makefile.in
gui/Makefile.in gui/amigaos.cc gui/beos.cc gui/carbon.cc
gui/control.cc gui/control.h gui/gui.cc gui/gui.h
gui/keymap.cc gui/keymap.h gui/macintosh.cc gui/nogui.cc
gui/rfb.cc gui/sdl.cc gui/sdlkeys.h gui/siminterface.cc
gui/siminterface.h gui/term.cc gui/win32.cc gui/wx.cc
gui/wxdialog.cc gui/wxdialog.h gui/wxmain.cc gui/wxmain.h
gui/x.cc gui/keymaps/sdl-pc-de.map gui/keymaps/sdl-pc-us.map
gui/keymaps/x11-pc-de.map instrument/example0/instrument.h
instrument/example1/instrument.h
instrument/stubs/instrument.cc instrument/stubs/instrument.h
iodev/Makefile.in iodev/biosdev.cc iodev/biosdev.h
iodev/cdrom.cc iodev/cmos.cc iodev/cmos.h iodev/devices.cc
iodev/dma.cc iodev/dma.h iodev/eth_fbsd.cc iodev/eth_linux.cc
iodev/eth_null.cc iodev/eth_tap.cc iodev/floppy.cc
iodev/floppy.h iodev/guest2host.cc iodev/guest2host.h
iodev/harddrv.cc iodev/harddrv.h iodev/iodebug.cc
iodev/iodebug.h iodev/iodev.h iodev/keyboard.cc
iodev/keyboard.h iodev/ne2k.cc iodev/ne2k.h iodev/parallel.cc
iodev/parallel.h iodev/pci.cc iodev/pci.h iodev/pci2isa.cc
iodev/pci2isa.h iodev/pic.cc iodev/pic.h iodev/pit.cc
iodev/pit.h iodev/pit_wrap.cc iodev/pit_wrap.h iodev/sb16.cc
iodev/sb16.h iodev/scancodes.cc iodev/scancodes.h
iodev/serial.cc iodev/serial.h iodev/slowdown_timer.cc
iodev/slowdown_timer.h iodev/unmapped.cc iodev/unmapped.h
iodev/vga.cc iodev/vga.h memory/Makefile.in memory/memory.cc
memory/memory.h memory/misc_mem.cc misc/bximage.c
misc/niclist.c
Added Files:
README-plugins extplugin.h ltdl.c ltdl.h ltdlconf.h.in
ltmain.sh plugin.cc plugin.h
2002-10-24 21:07:56 +00:00
Stanislav Shwartsman
c5f0ef8c76
Removed duplicated definition of BX_SEG_REGS
2002-10-16 22:10:07 +00:00
Kevin Lawton
82fd79c546
Fixed/updated/cleaned repeat IO & memcpy speedups for Long mode.
...
Fixed/updated/cleaned guest2host TLB speedups for Long mode.
I now can boot the Linux x86-64 kernel to the VFS mount message,
using all the accelerations.
2002-09-24 04:43:59 +00:00
Kevin Lawton
0cd7346b9c
- Added an instruction cache. Size is fixed for the moment,
...
but if you hand edit cpu/cpu.h, and change BxICacheEntries,
you can try different sizes. I'll make this more flexible
with configure. For now, use "--enable-icache" with no parameters.
- Modified fetchdecode.cc/fetchdecode64.cc just enough so that
instructions which encode a direct address now use a memory
resolution function which just sticks the immediate address
into rm_addr. With cached instructions we need this.
2002-09-19 19:17:20 +00:00
Kevin Lawton
4e51dcae40
Converted all the remaining available separate fields in bxInstruction_c
...
to bitfields. bxInstruction_c is now 24 bytes, including 4 for
the memory addr resolution function pointer, and 4 for the
execution function pointer (16 + 4 + 4).
Coded more accessors, to abstract access from most code.
2002-09-18 08:00:43 +00:00
Kevin Lawton
6723ca9bf4
Moved more separate fields in the bxInstruction_c into bitfields
...
with accessors. Had to touch a number of files to update the
access using the new accessors.
Moved rm_addr to the CPU structure, to slim down bxInstruction_c
and to prevent future instruction caching from getting sprayed
with writes to individual rm_addr fields. There only needs to
be one. Though need to deal with instructions which have
static non-modrm addresses, but which are using rm_addr since
that will change.
bxInstruction_c is down to about 40 bytes now. Trying to
get down to 24 bytes.
2002-09-18 05:36:48 +00:00