Stanislav Shwartsman
cc694377b9
Standartization of Bochs instruction handlers.
...
Bochs instruction emulation handlers won't refer to direct fields of instructions like MODRM.NNN or MODRM.RM anymore.
Use generic source/destination indications like SRC1, SRC2 and DST.
All handlers are modified to support new notation. In addition fetchDecode module was modified to assign sources to instructions properly.
Immediate benefits:
- Removal of several duplicated handlers (FMA3 duplicated with FMA4 is a trivial example)
- Simpler to understand fetch-decode code
Future benefits:
- Integration of disassembler into Bochs CPU module, ability to disasm bx_instruction_c instance (planned)
Huge patch. Almost all source files wre modified.
2012-08-05 13:52:40 +00:00
Stanislav Shwartsman
3ca29cbdf3
stack direct access optimization - 5% emu speedup to all 32-bit guests, for 64-bit guests speedup is less because they have less stack accesses
2012-03-25 11:54:32 +00:00
Stanislav Shwartsman
002c86660a
reword all the CPU code in preparation for future CPU speedup implementation.
...
Bochs emulation can be another 10-15% faster using technique described in paper
"Fast Microcode Interpretation with Transactional Commit/Abort"
http://amas-bt.cs.virginia.edu/2011proceedings/amasbt2011-p3.pdf
2011-07-06 20:01:18 +00:00
Stanislav Shwartsman
a02d8cfe67
cleanups, simplications, copyright updates
2011-04-23 20:39:27 +00:00
Stanislav Shwartsman
7d80a6ebe0
Adding Id and Rev property to all files
2011-02-24 21:54:04 +00:00
Stanislav Shwartsman
d60b7c0919
rename accessor for opcodeReg() in instruction
2010-12-06 21:45:56 +00:00
Stanislav Shwartsman
927c3594d6
enable compilation with CPU_LEVEL <= 6
...
converted SEP to runtime option as well
2010-02-26 11:44:50 +00:00
Stanislav Shwartsman
bd60e0264c
change Copyright to Bochs Project
2009-12-04 16:53:12 +00:00
Stanislav Shwartsman
4fc66aab31
Fixes for compilation by Visual Studio 2008
2009-04-07 16:12:19 +00:00
Stanislav Shwartsman
9d4c24b6a3
Split instruction 32/64
2009-04-06 18:44:28 +00:00
Stanislav Shwartsman
9929e6ed78
- updated FSF address
2009-01-16 18:18:59 +00:00
Stanislav Shwartsman
a95c24b019
Some functions could be called only from 32 bit
2008-09-06 21:18:08 +00:00
Stanislav Shwartsman
c1306f7d75
small non-significant speedups
2008-09-06 21:10:40 +00:00
Stanislav Shwartsman
0d90ab0478
Completely new way to handle LD+OP cases - allows to significantly reduce number of BX_CPU_C methods
2008-08-09 21:05:07 +00:00
Stanislav Shwartsman
5dd02b26e3
Make even more efficient RmAddr calculation - good optimizing compiler could make more efficient code than it was before
2008-08-08 09:22:49 +00:00
Stanislav Shwartsman
709d74728d
Call #UD exception directly instead of UndefinedOpcode function - for future use
2008-07-13 15:35:10 +00:00
Stanislav Shwartsman
3f5efb6475
Remove more duplicated methods
2008-07-13 10:06:07 +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
a2897933a3
white space cleanup
2008-02-02 21:46:54 +00:00
Stanislav Shwartsman
7b80c5f481
I merged and succeded to remove some similar execution functions - less code, less chance for branch misprediction
2008-01-25 19:34:30 +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
e9a148f9c4
lmost last instruction split -> CMOV in 16/32 bit modes
2007-12-21 18:24:19 +00:00
Stanislav Shwartsman
d830c301cf
Fixed 64-bit versions of LOOP instructions, some cleanups
2007-12-21 17:30:49 +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
7ca78b88e9
configure/compile changes + small optimizations
2007-12-01 16:45:17 +00:00
Stanislav Shwartsman
0a1063ad77
Split GvEv opcode groups
2007-11-21 22:36:02 +00:00
Stanislav Shwartsman
613bad34ee
split MOVZX/MOVSX opcodes
2007-11-17 18:29:00 +00:00
Stanislav Shwartsman
5ec15df46d
Split more opcodes EbIb opcodes
2007-11-17 18:08:46 +00:00
Stanislav Shwartsman
d9e58bd598
split11b on opcode tables level - split almost eevery splittable instruction
...
will be continued
2007-11-17 12:44:10 +00:00
Stanislav Shwartsman
351244d1ea
Rename splitmod11b methods
2007-11-16 08:30:22 +00:00
Stanislav Shwartsman
8221fa6838
- Fixed zero upper 32-bit part of GPR in x86-64 mode
...
- CMOV_GdEd should zero upper 32-bit part of GPR register even if the
'cmov' condition was false !
2007-01-26 22:12:05 +00:00
Stanislav Shwartsman
6e8dcbce8b
Fixed 64-bit NOP problem
...
Patch by mvysin in patch tyracker
2006-11-26 12:53:01 +00:00
Stanislav Shwartsman
aa1a61bfde
Add (when needed) or remove (when not needed) x86-64 compilation hack
2006-06-26 20:28:00 +00:00
Stanislav Shwartsman
f8c3968d42
Changes list made after CVS service crash:
...
- Fixed critical bug in CPU code added with one of the prev commits
- Disasm support for SSE4
- Rename PNI->SSE3 everywhere in the code
- Correctly decode, disassemble and execute 'XCHG R8, rAX' x86-64 instruction
- Correctly decode, disassemble and execute multi-byte NOP 0F F1 opcode
- Fixed ENTER and LEAVE instructions in x86-64 mode
- Added ability to turn ON instruction trace, only GUI support is missed.
Instruction trace could be enabled if Bochs was compiled with disasm
- More changes Bit32u -> bx_phy_address
- Complete preliminary implementation of SMM in Bochs, SMI is still PANICs but if you press 'continue' everything should work OK
- Small code cleanup
- Update CHANGES and user docs
2006-04-05 17:31:35 +00:00
Stanislav Shwartsman
5c3fba4399
Support access to SMRAM in memory object
...
Cleanup in CPU code
2006-03-26 18:58:01 +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
ce8f1ade07
Some not really significant speedups
2005-06-21 17:01:21 +00:00
Stanislav Shwartsman
c026a90779
Unify coding style in CPU methods
...
NO AFFECT ON EMULATION RESULTS
2005-05-20 20:06:50 +00:00
Stanislav Shwartsman
5213e903bd
mov duplicate opcode groups from fectchdecode*.cc to .h
...
use common register accessor macroses instead of direct register file structure access
2004-11-26 20:21:28 +00:00
Stanislav Shwartsman
8191201e17
If exception occured register should not be modified.
...
Fix for x86-64
2004-11-02 20:39:45 +00:00
Stanislav Shwartsman
6cdb42d909
Little bit optimize memory access functions. Now values are calculated only if they actually needed.
2004-09-13 20:48:11 +00:00
Stanislav Shwartsman
a1f830d429
Implemented FAST lazy flags version for logic instructions.
...
Small code cleanup/simplification for others.
2004-08-13 20:00:03 +00:00
Stanislav Shwartsman
8f0cf91fff
This commit is the first commit in long series of changes the have several purposes:
...
1. Review and commit patch
[ 896733 ] Lazy flags, for more instructions, only 1 src op
May be partially, but I hope to get all ideas from patch in
2. Get Bochs speedup after lazy flags optimization
3. Most important for me: improve correctness of emulation by handling several
undocumented EFLAGS modifications. And finally pass
UFLAGS - Undefined Flags Test v 3.0
Copyright (C) Potemkin's Hackers Group (PHG) 1989,1995
The test still fails on > 50% of its checks.
2004-08-09 21:28:47 +00:00
Stanislav Shwartsman
5c5b556f24
Merge softfloat-fpu-implementation_ver4_branch branch
2004-06-18 14:11:11 +00:00
Stanislav Shwartsman
3274e0dd12
Commit patch
...
[ 950905 ] Do not PANIC on rare, bad input from user-mode
by h.johansson
with little changes and fixes
2004-05-10 21:05:51 +00:00
Stanislav Shwartsman
3f7c794b26
commit patch
...
899972 data xfer performance patch V 2.0.4 2004-02-18 15:38 nobody psychosmur
2004-02-26 19:17:40 +00:00
Stanislav Shwartsman
b770d809d3
Clearify disagnostic messages.
...
Remove redundant cpu level checks for x86-64
2003-12-29 21:20:58 +00:00
Stanislav Shwartsman
3084a41abf
Changes BX_PANIC to BX_INFO if Bochs behavour is exactly matches Intel docs
2003-10-04 20:48:13 +00:00
Christophe Bothamy
091052e199
- reverting to previous revision (xfer8 1.15, xfer16 1.21, xfer32 1.21)
...
as it breaks AMD64 support.
2003-05-08 17:56:48 +00:00