Stanislav Shwartsman
69153fc532
added enum for memory types
2009-01-03 20:04:03 +00:00
Stanislav Shwartsman
3cd5ab1041
added phy addr check
2009-01-02 13:21:48 +00:00
Stanislav Shwartsman
e182e74a4d
Added ability to define user MSRs spec for emulated CPU
2008-12-28 20:30:48 +00:00
Stanislav Shwartsman
a794bef607
optimize invlpg for split large pages
2008-12-19 16:03:25 +00:00
Stanislav Shwartsman
a2e07ff971
- Removed --enable-guest2hos-tlb configure option. The option will be
...
always enabled for any Bochs configuration.
2008-12-11 21:19:38 +00:00
Stanislav Shwartsman
35487c3ebd
get/set_segment_ar_data prepared for future reuse in other than SMM mode
2008-12-06 18:52:02 +00:00
Stanislav Shwartsman
15fa42963f
get/set_segment_ar_data prepared for future reuse in other than SMM mode
2008-12-06 18:01:00 +00:00
Stanislav Shwartsman
d7fa44d270
optimize code access detection
2008-12-05 22:34:42 +00:00
Stanislav Shwartsman
098308dd9f
some variable renames + comp warn fix
2008-12-01 19:06:14 +00:00
Stanislav Shwartsman
f69ac41e59
added infrastructure for init disable
2008-12-01 18:54:24 +00:00
Stanislav Shwartsman
e402062499
-Fixes for INVLPG
2008-11-29 19:28:10 +00:00
Stanislav Shwartsman
cde9595e86
implement cluster addressing model in local apic
...
deliver INIT IPI through local apic
2008-11-20 18:44:15 +00:00
Stanislav Shwartsman
577c8c7969
another way to do the same optimization
2008-10-08 20:40:26 +00:00
Stanislav Shwartsman
17040303f7
Optimization of repeat string
2008-10-08 20:15:37 +00:00
Stanislav Shwartsman
ab716f62aa
inline prepareMMX method
2008-10-08 11:14:35 +00:00
Stanislav Shwartsman
67fae3ab41
Fixed compilation
2008-10-06 20:06:30 +00:00
Stanislav Shwartsman
2066d8b594
Fixed compilation issues
2008-10-06 17:50:06 +00:00
Stanislav Shwartsman
fb71c07b15
Fixes for MONITOR/MWAIT - the feature is still EXPERIMENTAL ONLY !
2008-10-03 16:53:08 +00:00
Stanislav Shwartsman
c009e87a81
Remove external debugger interface:
...
- it is closed source (!!!)
- we have very nice replacement now
2008-10-01 09:44:40 +00:00
Stanislav Shwartsman
bc381e51da
very small cleanups
2008-09-19 19:18:57 +00:00
Stanislav Shwartsman
db664c4012
more optimizations after fetchdecode
2008-09-16 20:57:16 +00:00
Stanislav Shwartsman
a9c77eb75d
Try to optimize individual instructions after fetchdecode
2008-09-16 19:20:03 +00:00
Stanislav Shwartsman
7566faf948
A bit simplify FPU decoding
2008-09-16 18:28:53 +00:00
Stanislav Shwartsman
d57a211df9
Fixed handling of prefixes for EMMS
...
Small FPU optimization
2008-09-12 20:59:31 +00:00
Stanislav Shwartsman
f5ba90da55
Misaligned check small optimization
2008-09-08 15:45:57 +00:00
Stanislav Shwartsman
c1306f7d75
small non-significant speedups
2008-09-06 21:10:40 +00:00
Stanislav Shwartsman
b3b2f77675
Reduce size of Bochs static tables by changing from bx_bool (which is 32bit) to Bit8u
2008-09-06 18:21:29 +00:00
Stanislav Shwartsman
7145d240f4
Optimize system read using Guest2Host TLB
2008-09-06 17:44:02 +00:00
Stanislav Shwartsman
7a57ccd435
- Partially fixed x87 Underflow/Overflow (#P) unmasked responce
2008-09-02 19:46:55 +00:00
Stanislav Shwartsman
bdf25fa3ca
Inexact Result (#P) unmasked responce
...
CVS ----------------------------------------------------------------------
2008-09-02 05:38:36 +00:00
Stanislav Shwartsman
398f80a214
- Fixed CALL FAR between legacy and 64-bit modes
2008-08-31 06:04:14 +00:00
Stanislav Shwartsman
79eb5efffa
- Preliminary implementation of X86 IO breakpoints
2008-08-30 08:14:46 +00:00
Stanislav Shwartsman
b96f78dc0a
Some kind of big change in fetchdecode tables invented in order to compress the tables for better host data cache utilization
2008-08-29 19:23:03 +00:00
Stanislav Shwartsman
a5a01c4b42
optimize LEAVE operation
2008-08-27 21:57:40 +00:00
Stanislav Shwartsman
d029823fb5
Fixed compilation error under --enable-smp
2008-08-24 17:29:17 +00:00
Stanislav Shwartsman
d0803ebd10
branch_16 optimizations
2008-08-23 22:27:58 +00:00
Stanislav Shwartsman
5e92a1642d
Fixed compilation errors, added BX_ASSERT in paging.cc
2008-08-18 05:20:23 +00:00
Stanislav Shwartsman
56504e4a67
Add some missed eflags accessors and pay more attention for special ones
2008-08-16 21:06:56 +00:00
Stanislav Shwartsman
e2fa98b629
- Fixed TLB flush on CR3 change - flush all pages is CR4.PGE is OFF
2008-08-16 15:35:35 +00:00
Stanislav Shwartsman
dcb82ec4bf
Optimize TLB flush methods
2008-08-13 21:51:54 +00:00
Stanislav Shwartsman
8ecea83f02
Fixed compilation error
2008-08-12 05:03:51 +00:00
Stanislav Shwartsman
70c7c5ceca
Use LOAD_Eb approach to remove duplicated GbEb methods
2008-08-11 20:34:05 +00:00
Stanislav Shwartsman
a8adb36dc2
Implemented MOVBE Intel Atom(R) instruction
2008-08-11 18:53:24 +00:00
Stanislav Shwartsman
b61017e5b6
Split more opcodes using new LOAD technique
2008-08-10 21:16:12 +00:00
Stanislav Shwartsman
1da5943f1a
More use of LOAD_Ex method
2008-08-10 19:34:28 +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
bbf02a8bc5
More clean rewrite of the TLB access bits
2008-08-07 22:14:38 +00:00
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
2e8bc558d1
Speedup SSE by introducing read/write_virtual_dqword_aligned methods
2008-08-02 10:16:47 +00:00
Stanislav Shwartsman
67f302352c
Implement PDPE cache to support faster PAE paging tranlsation
2008-08-01 13:28:44 +00:00
Stanislav Shwartsman
59514dcbfb
Fixed compilation err typo
2008-07-26 20:50:20 +00:00
Stanislav Shwartsman
c388f48fff
- Fixed memory bug in tripple fault detection
...
- Implement 16-byte memory accessor for SSEx - speedup SSE code emulation by >20%
2008-07-26 14:19:06 +00:00
Stanislav Shwartsman
85686db212
Removed unused methods
2008-07-13 14:22:43 +00:00
Stanislav Shwartsman
3f5efb6475
Remove more duplicated methods
2008-07-13 10:06:07 +00:00
Stanislav Shwartsman
0127415ba6
Clear some duplicated arithmetic opcodes - difference only in operands order
2008-07-13 09:59:59 +00:00
Stanislav Shwartsman
c1f308d80d
Push error code if segment violation occurs when pushing arguments into a new stack
2008-06-25 02:28:31 +00:00
Stanislav Shwartsman
a6fda9a971
Instrumentation code updated, some PANIC messages fixed
2008-06-23 02:56:31 +00:00
Stanislav Shwartsman
678ac970aa
Reorganize ctrl_xfer8.cc code, allows to inline branch32 method
2008-06-22 03:45:55 +00:00
Stanislav Shwartsman
98581c44d3
Fixed compilation when use64 is disabled
2008-06-13 08:17:52 +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
607900dd4d
very small cleeanup
2008-06-12 16:40:53 +00:00
Stanislav Shwartsman
424f316e07
Fixed comment
2008-06-02 20:11:03 +00:00
Stanislav Shwartsman
7494b8823b
- Support of AES CPU extensions, to enable configure with
...
--enable-aes option
2008-05-30 20:35:08 +00:00
Stanislav Shwartsman
d295371450
- Correctly handle segment a byte in BIG real mode
2008-05-26 21:46:39 +00:00
Stanislav Shwartsman
77fbc2c187
Fixed LAR/LSL in 64-bit mode, compilation error fixes
2008-05-25 15:53:29 +00:00
Stanislav Shwartsman
3619c0f6b4
Some changes to make x86-debugger feature working back
2008-05-23 17:49:46 +00:00
Stanislav Shwartsman
4e5d10d02e
Code reorganization + small bug fixes in translate linear code
2008-05-19 18:10:32 +00:00
Stanislav Shwartsman
76fc10e3d4
Added ability to override exception class to TRAP (#DB)
2008-05-15 20:10:00 +00:00
Stanislav Shwartsman
d934190370
Fixed data type for cr3_masked
2008-05-11 19:58:41 +00:00
Stanislav Shwartsman
4a76bd2169
Fixed setting of reserved bits in CR3 register
2008-05-11 19:36:06 +00:00
Stanislav Shwartsman
d3528cccd6
Style fixes - name convention for push to new stack methods
2008-05-10 20:35:03 +00:00
Stanislav Shwartsman
ec1ff39a5f
Splitted memory access methods for 32 and 64-bit code.
...
The 64-bit code got >10% speedup, the 32-bit code also got about 2% because laddr cacluation optimization
2008-05-10 18:10:53 +00:00
Stanislav Shwartsman
3634c6f892
Compress FPU tag word
2008-05-10 13:34:47 +00:00
Stanislav Shwartsman
8e7cf2bf3a
- Fixed CPUID
...
- Merged jmp_call_gate16 and jmp_call_gate32 to single function
2008-05-09 18:09:04 +00:00
Stanislav Shwartsman
5da460b6dc
Clear segment descriptor cache when loading null selector
2008-05-06 19:45:17 +00:00
Stanislav Shwartsman
f642b57a54
Lazy falgs optimizations by Darek Mihocka
2008-05-04 15:07:08 +00:00
Stanislav Shwartsman
ed4be45a8b
Split shift/rotate opcodes in 32-bit mode and 64-bit mode
2008-05-02 22:47:07 +00:00
Stanislav Shwartsman
f5780a5f5c
Hide some BX_MEM_C variables
...
Optimize resolve16 methods - by reducing their amount again - reduce chance for misspredictin
2008-05-01 20:08:37 +00:00
Stanislav Shwartsman
81deffd65d
More fetchdecode fixes
2008-04-30 21:32:33 +00:00
Stanislav Shwartsman
06c6ac0060
- Fixed effective address wrap in 64-bit mode with 32-bit address size
...
- Fixed SMSW instruction in 32-bit and 64-bit modes
2008-04-28 18:18:08 +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
e86102eea5
Fixed 2nd dword of 64-bit descriptor check
2008-04-26 19:41:28 +00:00
Stanislav Shwartsman
9047c9be96
Support for reserved bits checking in paging
...
Check for page is in DTLB before invalidating by INVLPG
2008-04-25 20:08:23 +00:00
Stanislav Shwartsman
64f2489afb
Correctly implement opcode group G11 i.e. instructions C6 and C7 should @UD when modrm nnn field != 0 (1st instr in the group
2008-04-24 21:52:28 +00:00
Stanislav Shwartsman
d24a274909
Eliminate can_pop function - with bugfix in retf
2008-04-23 17:25:21 +00:00
Stanislav Shwartsman
d9bf2b8453
Small emulation speed optimization
2008-04-19 22:29:44 +00:00
Stanislav Shwartsman
bdaef81603
Added debugger memory trace functionality. Enable by 'trace-mem on' command
2008-04-19 13:21:23 +00:00
Stanislav Shwartsman
cacec881cf
Fixed param type for set_TSC
2008-04-18 18:37:29 +00:00
Stanislav Shwartsman
15e9dca062
- support 64-bit write to MSR_TSC using WRMSR instruction
...
- fixed save/restore param type for async_event
- fixed setting of reserved bits in upper part of CR4 in 64-bit mode
2008-04-18 18:32:40 +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
4c26043969
Fixed 3rd fault detection (shutdown condition)
2008-04-15 17:22:11 +00:00
Stanislav Shwartsman
fab4042cad
SYSENTER/SYSEXIT in long mode
2008-04-15 14:41:50 +00:00
Stanislav Shwartsman
a98cd9f781
small cpu code reorganization
2008-04-08 17:58:56 +00:00
Stanislav Shwartsman
a33d8c6008
Make get_laddr and get_segment_base BX_SMF
2008-04-08 05:36:30 +00:00
Stanislav Shwartsman
a851cfd8f0
Re-implemented modebp debugger function in simple and more clean way
2008-04-07 19:59:53 +00:00
Stanislav Shwartsman
fea49bb270
Fixed linear address wrap in legacy (not long64) mode
2008-04-07 18:39:17 +00:00
Stanislav Shwartsman
77d91d59aa
Inline prepare_SSE and prepare_XSAVE functions
2008-04-06 18:00:20 +00:00
Stanislav Shwartsman
90f1973bef
Removed BX_USE_TLB - TLB is always used, only Guest2HostTLB is optional feature
...
Use Guest2HostTLB in prefetch code for IFETCHES - speedup above 3%
2008-04-05 20:41:00 +00:00
Stanislav Shwartsman
1bdddc1f78
Split SHRD/SHLD instructions
2008-04-05 19:08:01 +00:00
Stanislav Shwartsman
5826e2843a
Inline pop/push functions
...
Store only single byte of opcode in b1() - speedup shift instructions
Code cleanups
2008-04-05 17:51:55 +00:00
Stanislav Shwartsman
2aaafa76a2
Reorganize fetchdecode tables with another level of redirection - a leap toward future improvements
...
Currently no speedup and no slowdown - about the same results on my Bochs benchmarking
A lot of code reorganization in fetchdecode
2008-04-04 22:39:45 +00:00
Stanislav Shwartsman
62e3728591
preparations for future optimizations - not necessary speedupo now
2008-04-03 17:56:59 +00:00
Stanislav Shwartsman
e91409704f
Convert EFER to val32 register, similar to other control registers
2008-03-31 20:56:27 +00:00
Stanislav Shwartsman
3f2487a0af
Enabled tracing cross repeated instructions
2008-03-31 18:53:08 +00:00
Stanislav Shwartsman
08f958f458
Fixed pageWriteStampTable to handle BIOS code as well - increased the table to all 4G instead of allocated memory size
...
Avoid checking of pageWriteStamp in the heart of cpu loop with trace cache - now decWriteStamp will post stopTraceExecution event if it hits code page
2008-03-29 21:01:25 +00:00
Stanislav Shwartsman
7aef2d5892
Inline get_ZF/SF/PF lazy flags functions - gcc didn't get them inline before
2008-03-29 18:44:13 +00:00
Stanislav Shwartsman
f3a91710e4
Split access_linear to access_read_linear and access_write_linear
2008-03-29 18:18:08 +00:00
Stanislav Shwartsman
e48b398bee
Add NIL register and simplify more BxResolve work
2008-03-29 09:34:35 +00:00
Stanislav Shwartsman
94f30955be
Fixed compilation error
2008-03-25 16:46:39 +00:00
Stanislav Shwartsman
9fcbf28cea
Removed can_push method - normal memory accesses will be used instead.
...
Fixed reset value of TR.TYPE
2008-03-24 22:13:04 +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
7e490699d4
Removing hooks for not-implemented SSE4A from the Bochs code.
2008-03-21 20:04:42 +00:00
Stanislav Shwartsman
64bfbb32b5
Inline icache lookup code - speedup of 3% according to my measurements
2008-03-06 20:22:24 +00:00
Stanislav Shwartsman
65df050a21
Fixed compilation warning
2008-03-03 15:34:03 +00:00
Stanislav Shwartsman
946b7a369d
Added const to fetchPtr in cpu functions
2008-03-03 15:16:46 +00:00
Stanislav Shwartsman
2172e96654
small trace/iacache cleanups, always allow speculative tracing for trace cache
2008-03-03 14:35:36 +00:00
Stanislav Shwartsman
405fcfd75d
Reorganize 3-byte opcode tables - bigger tables but easier to maintain them
2008-02-29 03:02:03 +00:00
Stanislav Shwartsman
a459a64f3e
whispace, tab2space, indent, dos2unix and other cleanups
2008-02-15 22:05:43 +00:00
Stanislav Shwartsman
cdcd7522aa
Added RIP to the GPR register file as lst register
...
This allowed to optimize (read - remove) two more BxResolve methods in 64-bit mode
+ Some white space cleanup
2008-02-15 19:03:54 +00:00
Stanislav Shwartsman
4fc0df26e8
a bit optimize and simplify x87 decoding
2008-02-14 18:59:41 +00:00
Stanislav Shwartsman
ae86ad28a0
Finalize XSAVE/XRSTOR instructions
2008-02-13 22:25:24 +00:00
Stanislav Shwartsman
457152334e
step2 in XSAVE implementation
2008-02-13 16:45:21 +00:00
Stanislav Shwartsman
8615022962
Added first stubs for XSAVE/XRESTOR implementation
...
Disassemble XSAVE/XRSTOR instructions (4 instructions)
Update CHANGES - a bit speculatively
2008-02-12 22:41:39 +00:00
Stanislav Shwartsman
8d7410a852
Canonical check have higher priority than #AC check
2008-02-11 20:52:10 +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
1a55fce072
remove staruct for eflags and use single 32-bit variable
2008-01-29 22:26:29 +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
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
9ec2c87aaa
cleanups and optimizations
2008-01-22 16:20:30 +00:00
Stanislav Shwartsman
192f398b46
removed --enable-magic-breakpoint configure option - it is enabled by default if Bochs internal debugger compiled in. Also it always possible to switch magic break off by .bochsrc option
2008-01-21 21:36:58 +00:00
Stanislav Shwartsman
63d8d50cfc
code cleanup
2008-01-20 20:11:17 +00:00
Stanislav Shwartsman
8c9de8b4db
speculative tracing on fetchdecode level
2008-01-18 09:36:15 +00:00
Stanislav Shwartsman
9e53b71a55
Segment base in not long mode should only 32-bit
2008-01-14 19:03:50 +00:00
Stanislav Shwartsman
c6fd4ebf94
Split CALL_Ev and JMP_Ev methods
2008-01-12 16:40:38 +00:00
Stanislav Shwartsman
77b4b70b9b
oops, revert incorrectly merged change
2008-01-10 20:32:23 +00:00
Stanislav Shwartsman
1f4608cd84
Fix for implemened 3dnow instuctions (most of them are not implemented)
2008-01-10 20:26:49 +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
a9e001bd30
Optimize short traces
2008-01-05 10:21:25 +00:00
Stanislav Shwartsman
eee1a9030d
a bit simplify and optimize shift instructions
...
print failed segment info in check_cs - more debug info
2007-12-30 20:16:35 +00:00
Stanislav Shwartsman
d891f0d8ec
Fixed more VC2008 warnings - hopefully last ones
2007-12-30 17:53:12 +00:00
Stanislav Shwartsman
79fc57dec8
Fixed more VCPP2008 warnings
2007-12-26 23:07:44 +00:00
Stanislav Shwartsman
c3c9c40674
Move MaxFetch calculation into fetchdecode - simplify the logic
2007-12-22 17:17:40 +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
a93b0afdbe
Merge page split detection method suggested by Darek Mihocka
2007-12-21 10:33:39 +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
c9932e97eb
Fixes in resolve.cc -> reduce amount of resolve functions even more
2007-12-18 21:41:44 +00:00