Stanislav Shwartsman
33c0c5367c
Fixed bug in tasking.cc last change
2005-09-03 11:39:26 +00:00
Stanislav Shwartsman
086ee4c9aa
Fix code duplication in tas
2005-08-28 17:37:37 +00:00
Stanislav Shwartsman
823dfa6f40
This code will be required for dynamic translation in future.
...
For now it is no more than code duplication fix ...
2005-08-23 20:01:54 +00:00
Stanislav Shwartsman
126069829d
Fixed compilation error when icache is disabled
2005-08-13 14:10:22 +00:00
Stanislav Shwartsman
b192b2af9b
Optimize pageWriteStamp checking
2005-08-10 18:18:57 +00:00
Stanislav Shwartsman
37bd193337
Split PUSHF/POPF to 3 different methods according to op size.
...
By the way fix VIP/VIF flags handling in POPF/PUSHF (future fix for VME)
2005-08-08 19:56:11 +00:00
Stanislav Shwartsman
8be190d848
Implemented RDTSCP instruction
2005-08-05 12:47:33 +00:00
Stanislav Shwartsman
ea30a3ef06
Implemented CALL FAR in 64-bit mode
2005-08-04 19:38:51 +00:00
Stanislav Shwartsman
084b4fa2b2
Fixed IRET implementation for long mode
2005-08-03 21:19:11 +00:00
Stanislav Shwartsman
3681126235
Fixed ugly load_ss64/mode changing workaround in exception.cc
2005-08-03 21:10:42 +00:00
Stanislav Shwartsman
d8ab4e3424
Fully implemented jump_far and ret_far in 64-bit mode.
...
Note that I am not sure about 100% correctness, I am just coding Intel specs ...
Code review and massive testing still required.
2005-08-02 18:44:20 +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
954aae3f99
Speedup push/pop operations, they actually not needed to do can_push/can_pop checkes, the same checkes already done in read/write_virtial methods
...
Split push_seg_reg methods according to op size
2005-07-31 17:57:27 +00:00
Stanislav Shwartsman
5da36b7d3d
Fixed code duplication, added canonical address checking for RETF in long mode
2005-07-29 06:29:57 +00:00
Stanislav Shwartsman
2b5a812674
Split last bit.cc methods according to os16/32/64
2005-07-25 04:18:20 +00:00
Stanislav Shwartsman
51e03f071d
Fixed XLAT instruction for x86-64
...
Small optimization for lazy flags for ADD/ADC/SUB/SBB instructions
Enable RETF64 for same privelege level return
2005-07-21 01:59:05 +00:00
Stanislav Shwartsman
169fa0c574
Clearify the code. x86-64 code always running in pmode so it is not needed to check if we are in protected mode everytime
2005-07-10 20:32:32 +00:00
Stanislav Shwartsman
01d8a97613
Try to cleanup/rewrite RepeatSpeedups optimization
...
This code doesn't add new speedups but makes it very easy
After some validation it could be no problem to enable repeat speedups optimization for REP MOVSx with any address size. And REP STOSx too.
2005-07-04 17:44:08 +00:00
Stanislav Shwartsman
64f6d8c293
Separate force_flags function from read_flags (fix code duplication)
2005-06-16 17:25:04 +00:00
Stanislav Shwartsman
0b60100a0d
Merged patch for Hkan T. Johansson
...
TLB access bit optimizations
2005-06-14 20:55:57 +00:00
Stanislav Shwartsman
663f7d5ef3
CMPXCHG16B instruction implemented
2005-05-19 20:25:16 +00:00
Stanislav Shwartsman
caa0648188
Move duplicated code to separate function
...
And fix a bug I added by previous merge
2005-04-17 21:51:59 +00:00
Stanislav Shwartsman
6fa52214b0
Canonical address check for RIP in x86-64
2005-04-17 18:54:54 +00:00
Stanislav Shwartsman
0b6a3afb53
Fixed compilation problem in segment_ctrl.pro
...
Restore back the workaround for segmentation checking in exception.cc until the better solution will be found
2005-04-13 17:13:05 +00:00
Stanislav Shwartsman
9b30cad4c4
Just software changes:
...
1. Separate interrupt function to 3 different functions (real_mode, long_mode, pmode)
2. Added PANIC messages for not implemented FAR CALL, FAR JUMP and FAR RET in long mode
2005-04-12 18:08:10 +00:00
Stanislav Shwartsman
c2c18d2aa4
Clean fix for loading NULL SS selector in exception.cc
2005-04-11 18:53:04 +00:00
Stanislav Shwartsman
1755589376
Separate pageWriteStamp from ICACHE. The pageWriteStamp has totally independant structure and could be used in future with icache structure. Also it could be significantly speeded up using BX_SMF analog constructions.
2005-04-10 19:42:48 +00:00
Stanislav Shwartsman
6d491de4d3
Fixed bug with jumping from long mode when executing interrupt
2005-03-30 22:31:03 +00:00
Stanislav Shwartsman
0f7f728e86
Added debug messages for interrupt function in long mode
...
Added mode switch debug prints
2005-03-30 20:53:04 +00:00
Stanislav Shwartsman
da9091f04a
Fixed compatability mode execution bug, compatability mode and long mode should be treated as protected for all protected_mode() checks
2005-03-29 21:37:06 +00:00
Kevin Lawton
831afe7c40
Removed unused instruction (function) prototypes which were generated as
...
a result of the initial implementation of AMD64 support. These appear
to have been cut-n-paste vestiges.
2005-03-25 21:33:47 +00:00
Kevin Lawton
e6cb602231
Moved macros for duplicate SSE/SSE2 functions from fetchdecode.h to
...
cpu.h, and defined function prototypes for the case where bochs
is compiled with a new #define (called StandAloneDecoder) is set.
This allows for the decoder to be tested separately from bochs.
2005-03-23 01:45:16 +00:00
Kevin Lawton
4e03c4448c
Added some comment tags so that a script can pull out relevant parts
...
of the decoder to test it in standalone mode. A few lines in cpu.h
were re-arranged to make this easy, but no real lines of code were
changed or generated.
Changed a few PANICs to INFOs after testing corresponding cases.
2005-03-22 18:19:55 +00:00
Stanislav Shwartsman
f77ddd9701
Remove cpu_onlline_map varaible, it wasn't initialized properly and might cause APIC problems
2005-03-19 18:43:00 +00:00
Stanislav Shwartsman
6e53a54907
Extend cpu_mode for :
...
#define BX_MODE_IA32_REAL 0x0 // CR0.PE=0
#define BX_MODE_IA32_PROTECTED 0x1 // CR0.PE=1, EFLAGS.VM=0
#define BX_MODE_IA32_V8086 0x2 // CR0.PE=1, EFLAGS.VM=1
#define BX_MODE_LONG_COMPAT 0x3 // EFER.LMA = 0, EFER.LME = 1
#define BX_MODE_LONG_64 0x4 // EFER.LMA = 1, EFER.LME = 1
2005-03-15 19:00:04 +00:00
Stanislav Shwartsman
189e55885d
put VME initial code in BX_SUPPORT_VME ifdefs
2005-03-13 20:18:37 +00:00
Stanislav Shwartsman
fd13784231
Small cleanup in access.cc
...
VME feature code should be valid only for CPU LEVEL >= 4
2005-03-12 19:34:18 +00:00
Stanislav Shwartsman
2a5a5c2de5
Fixed compilation error for 486 CPU
...
small fixes for IRET instructionm
2005-03-12 16:40:14 +00:00
Stanislav Shwartsman
24fa5935c1
Getting little bit closer to VME feature
2005-03-09 22:01:13 +00:00
Stanislav Shwartsman
709b218c10
Reduce metaInfo initialization in fetchDecode
2005-03-01 21:44:01 +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
c583a6f9cf
move segments and descriptors definitions and macroses for new descriptor.h
2005-02-27 17:41:45 +00:00
Stanislav Shwartsman
2bfc842c09
CPU fixes by Kevin Lawton
2005-02-16 21:27:21 +00:00
Stanislav Shwartsman
91526a90b3
Merged patch
...
[1123895] x86-64 gdb/debugger fixes by Avi Kivity
2005-02-16 18:58:48 +00:00
Stanislav Shwartsman
799403620e
Small speedup in boundaryFetch method
2005-02-12 14:00:13 +00:00
Stanislav Shwartsman
9305305493
First (and may be last) step to implementation of
...
Virtual Mode Extensions (VME)
and
Protected Mode Virtual Interrupts (PVI)
instructions STI and CLI have full support of these features, according to Intel docs. Need to check POPF and PUSHF instructions and afterwise VME and PVI extensions could be enabled in CR4
2005-02-03 22:08:34 +00:00
Stanislav Shwartsman
bbcc5e0e3a
Split BOUND instruction to two different according to operand size
...
Coding style change
2005-01-28 20:50:48 +00:00
Stanislav Shwartsman
8fe15b0ddc
Fixed compilation error
2004-12-17 10:50:49 +00:00
Stanislav Shwartsman
f5b64a3a59
more preparations to NXE feature
2004-12-16 22:21:35 +00:00
Stanislav Shwartsman
da24883199
Extend page directory entries to 8 byte in PAE mode when X86_64 is enabled
...
(prepartions to NX feature implementation)
2004-12-13 22:26:36 +00:00