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
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
a647c7e551
Check for old TSS limits in task switching logic
...
MSR_GSKERNELBASE should be canonical - added WRMSR check
2008-04-25 11:39:51 +00:00
Stanislav Shwartsman
24f1507fa9
- sysenter/exit should be supported in v8086 mode as well
...
- fixed missed CS.LIMIT check in all far calls/jmps in real/v8086 mode
2008-04-20 21:44:13 +00:00
Stanislav Shwartsman
280617288c
Mode change in SYSENTER/EXIT/CALL/RET could happen only when already in long mode
2008-04-20 18:17:14 +00:00
Stanislav Shwartsman
a91ef4e31b
Ignore CS.L bit when EFER.LMA is not set
...
Add potentially missed CPU mode change in SYSCALL/RET/ENTER/EXIT
2008-04-20 18:10:32 +00:00
Stanislav Shwartsman
d9bf2b8453
Small emulation speed optimization
2008-04-19 22:29:44 +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
67f02bfa12
Add debugger callback
2008-04-15 21:29:18 +00:00
Stanislav Shwartsman
fab4042cad
SYSENTER/SYSEXIT in long mode
2008-04-15 14:41:50 +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
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
41fe0b3ebb
Fix code duplication
2008-04-03 18:59:10 +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
a22160959b
HLT callback to Bochs internal debugger
2008-03-23 21:39:01 +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
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
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
965568ea88
cleanups
2008-02-07 18:28:50 +00:00
Stanislav Shwartsman
a2897933a3
white space cleanup
2008-02-02 21:46:54 +00:00
Stanislav Shwartsman
032b13047c
Minor fix in cpu reset, bug sometimes caused to run on garbage memory after software reset. Some small debug messages fixes
2008-02-01 13:25:23 +00:00
Stanislav Shwartsman
d18b90484f
Added instr callbacks for sysenter/sysexit/syscall/sysret
2008-01-18 08:57:35 +00:00
Stanislav Shwartsman
e287dcd91a
correctly implement CLFLUSH protection/paging checks + add instrumentation callback
2008-01-16 22:56:17 +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
838fb2a048
Fixing V2008 warnings - they found a bug in sse_pfp.cc !
2007-12-23 17:21:28 +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
46366b5064
Speedup simulation by eliminating CPL==3 check from read/write_virtual* functions
2007-12-16 21:03:46 +00:00
Stanislav Shwartsman
d9a59c7a1f
Added ability to merge traces cross JCC branch instructions
...
Makes traces longer -> emulation faster in average
2007-12-14 20:41:09 +00:00
Stanislav Shwartsman
db69a25c36
Trace cache instrumentation methods
...
Next step will be tracing cross non-taken branches
2007-12-14 11:27:44 +00:00
Stanislav Shwartsman
48d815427c
According to AMD docs INVLD/WBINVLD instructions not required to flush TLBs
2007-12-14 10:15:12 +00:00
Stanislav Shwartsman
85d10e4f72
Added MWAIT callback
2007-12-13 21:41:32 +00:00
Stanislav Shwartsman
91e0db63c4
no need to invalidate prefetch queue for RDMSR/WRMSR
2007-12-03 21:43:14 +00:00
Stanislav Shwartsman
c58e95f611
Make hw breakpoint match check a function - normally it should be called from read/write_virtual as well
2007-12-03 20:49:24 +00:00
Stanislav Shwartsman
8cfd17202a
some simple SSE code optimizations
2007-11-27 22:12:45 +00:00
Stanislav Shwartsman
48650a70b4
Optimized alignment check
2007-11-20 21:22:03 +00:00
Stanislav Shwartsman
e1496bb9e0
Small optimization
2007-11-18 18:40:38 +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
24e1936fbb
Fixed compilation warning when compiling with no x86-64
2007-11-09 12:06:34 +00:00
Stanislav Shwartsman
5a172541e2
Small cleanup
2007-11-01 20:43:53 +00:00
Stanislav Shwartsman
e137560b14
Complete MONITOR/MWAIT implemntation (including monitoring of memory range)
...
Fixed PANIC in read/write Cr/Dr - should #UD with unkown register used
2007-11-01 18:03:48 +00:00
Stanislav Shwartsman
4ec7f5df39
Optimize access to IP (16 bit) - made IP register similar to GPR
2007-10-18 22:44:39 +00:00
Stanislav Shwartsman
082eb05b6b
First step to fully configurable CPUID
...
- put CPUID functions data into array, in future we could load this array from configure file
- cpuid initialize function is more flexible now but still reuire some work
2007-10-12 19:30:51 +00:00
Stanislav Shwartsman
8adbbcf17c
Started first implementation of MONITOR/MWAIT
2007-10-11 21:29:01 +00:00
Stanislav Shwartsman
f6ed95785f
added cpu state param - for future use and for dbg info
...
started to move debugger to info bx_param interface -> info sse and info mmx commands modified
2007-10-11 18:12:00 +00:00
Stanislav Shwartsman
82b7eaabd5
CLFLUSH do not fault when checking execute only segment
2007-10-10 21:48:46 +00:00