Stanislav Shwartsman
1ec33ec518
Correctly #UD on aliased instructions when no SSE2 is configured
2007-03-22 22:51:41 +00:00
Stanislav Shwartsman
b8787fd5a7
Some code cleanups and warning fixes
2007-03-14 21:15:15 +00:00
Stanislav Shwartsman
05ea111e1c
Clean CPU debug methods in main cpu_loop
2007-03-06 17:47:18 +00:00
Stanislav Shwartsman
c24627c00f
Implemented CLFLUSH instruction
...
Set of minor fixes for correctness
2007-01-28 21:27:31 +00:00
Stanislav Shwartsman
82607c4a35
Safety net - comment BX_WRITE_32BIT_REG macro - always use WRITE_32BIT_REGZ instead !
2007-01-26 22:16:59 +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
f8003098b1
Rename SSE4 to SSE3E to match intel docs. SSE4 coming later ;)
...
Fixed "last prefix" for REX in 64-bit mode
2007-01-25 19:09:41 +00:00
Stanislav Shwartsman
9db896d100
minor x86_64 fixes and cleanups
2007-01-12 22:47:21 +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
e8cd2052c9
- improved gdbstub network efficiency (SF patch #1149659 by Avi Kivity)
...
- reimplemented "enter debugger" in ask dialog for gdbstub
- X11 and wxWidgets ask dialog now show "Debugger" button for gdbstub
- indent mode changes
2006-10-29 08:48:30 +00:00
Stanislav Shwartsman
650086669c
Print 64-bit registers in 'info registers' command and in dump_regs
2006-10-21 22:06:39 +00:00
Stanislav Shwartsman
6c63e84d23
Fixed CR3 masking in long mode
...
Added PANIC assertion of 32-bit physical address in PAE mode
cleanup
2006-10-04 19:08:40 +00:00
Stanislav Shwartsman
65082e4a4f
Handle granularity field for LDT
...
Next step - fix code duplication with TSS
2006-08-25 19:56:03 +00:00
Stanislav Shwartsman
3ce7764fce
Fixes in 64-bit decoding
2006-08-11 17:23:36 +00:00
Stanislav Shwartsman
c7aa53d044
Fixed compilation error of extdb
2006-06-25 21:44:46 +00:00
Stanislav Shwartsman
070d782ec8
Move paddr_valid param of dbg_xlate_linear2phy method to return value.
...
This is much easier to use.
2006-06-17 12:09:55 +00:00
Stanislav Shwartsman
869f74b3ee
Reduce amount of dbg_get_cpu calls (I would like to remove this function) and use save/restore power in debugger
2006-06-11 16:40:37 +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
286b89d763
Several x86-64 MSRs were not-initilized !
...
Fixed small save-restore bug in dma.cc
First step to make save-restore code look better (only several files processed for example)
2006-05-28 17:07:57 +00:00
Stanislav Shwartsman
8b0df8e99b
Merge SAVE_RESTORE branch to CVS
2006-05-27 15:54:49 +00:00
Stanislav Shwartsman
7c1767d17a
Partial sync with save-restore
2006-05-27 14:02:34 +00:00
Stanislav Shwartsman
1acdb7f274
Simplify CPU loop and fix compilation error
2006-05-24 16:46:57 +00:00
Stanislav Shwartsman
73e1266cbe
Add CR0 consistency checks and CS.L/CS.D consistency check
...
Optimize icache writestamps - 2x more space to decrement for page-write-stamp
2006-05-19 20:04:33 +00:00
Stanislav Shwartsman
7c2c9c41e8
Remove unused CPU vars
2006-05-15 18:00:55 +00:00
Stanislav Shwartsman
f4c7b4074e
Support for x86-64 in x86 debugger (DR0-DR7)
2006-05-13 12:49:45 +00:00
Stanislav Shwartsman
fe644dfcbf
- Code cleanup, remove x86-64 code from functions which cannot be called from x86-64
...
- Fix PANIC multiple SSE prefix decoding (fetchdecode and disasm)
- More Bit32u -> bx_phy_address convert
- Lazy flags optimization
2006-05-12 17:04:19 +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
20b14aefa6
Fix in BSWAP 64-bit mode - allow to use additional R8-R15 registers
...
Also fixed code duplication story with BSWAP instruction
2006-05-07 18:58:47 +00:00
Stanislav Shwartsman
d69eba6c07
Split in/out instructions based on operand size
2006-05-07 18:27:36 +00:00
Stanislav Shwartsman
f93ab35357
Flush TLB for all CPUs when memory mapping information changed by system (A20 change, PAM write or similar events)
2006-04-29 17:21:49 +00:00
Stanislav Shwartsman
199c987ee3
Return back (modified) dbg_is_end_instr_bpoint method in cpu.cc
2006-04-29 16:14:47 +00:00
Stanislav Shwartsman
2889ed190c
Removed icount guard for debugger. Implement STEPN debugger command using CPU_LOOP method capabilities
2006-04-29 09:27:49 +00:00
Stanislav Shwartsman
1a0b7ee1e3
I want to replace debugger ICOUNT guard by existent cpu_loop funtionality, first step to do that ...
2006-04-29 07:12:13 +00:00
Stanislav Shwartsman
4b86ae3917
Added new ar_byte function, might be used to fix code duplication and for save-restore
2006-04-25 15:35:26 +00:00
Stanislav Shwartsman
b2408c2fca
Added assertion check CPU method, could be used for "debug mode" run with checking various assumptions before each instruction emulation
2006-04-25 14:42:57 +00:00
Stanislav Shwartsman
1939544bf8
move get_descriptor_l/get_descriptor_h methods to general cpu methods (were debugger only)
2006-04-23 17:16:27 +00:00
Stanislav Shwartsman
d972e4a4b7
Fixed CR3 restore in RSM instruction
...
Added HALT state indication (actually make existant one working for single CPU)
2006-04-10 19:05:21 +00:00
Stanislav Shwartsman
45f30f0a4c
some code written to enter CPU to shutdown state.
...
finally the shutdown handling should be done exactly as in VmWare - the GUI should ask user if the CPU should reset and go to HLT/IF=0 if user choosed to stay in shutdown mode.
CPU configure option reset-on-triple-failt should be extended to shutdown-reset=0|1
small code cleanups and fixes
2006-04-07 20:47:32 +00:00
Stanislav Shwartsman
03eac64013
Added decoding of new SSE4 instructions (recently published in Intel docs)
...
At least CPUID detects them correctly
The code is never tested (still) ! (but should work fine)
2006-04-06 18:30:05 +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
ae2ea87c43
More fixes for SMM
2006-03-29 18:08:13 +00:00
Stanislav Shwartsman
4fd9bd53c3
Change Bit32u -> bx_phy_address in memory
2006-03-28 16:53:02 +00:00
Stanislav Shwartsman
da3d26d7f4
Preliminary implemntation of SMM save statei
...
Fixed fetchModeMask for load32bitOsStack
2006-03-27 18:02:07 +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
f347ab97bf
Fixed CALL/JMP far through call gate 64
...
Decode SWAPGS and RDTSCP instructions
Indent changes in fetchdecode
2006-03-22 20:47:11 +00:00
Stanislav Shwartsman
d6f85c12f6
NMI support inside the CPU.
...
Added two functions to query NMI and SMI from Bochs debugger.
In future they could be used for generating NMI or SMI by user request using GUI button (could be implemented separatelly later and under configure-time or .bocshrc option)
2006-03-16 20:24:09 +00:00
Stanislav Shwartsman
a64b16391d
Remove unused vars
2006-03-15 17:57:11 +00:00
Stanislav Shwartsman
da0b2ac377
Update dependencies for iodev and root project folders.
...
Fixed compilation errors for 386 case
Added file header for slowdown_timer.h
2006-03-06 22:32:03 +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
5fad793989
move local apic handling to the access_linear function for the memory class.
...
speedup the whole simulation by 2% !
2006-03-01 22:32:24 +00:00