Aleksandar Andrejevic
c3e55a625c
[FAST486]
...
Actually, we should return FALSE if any exception occurred...
svn path=/branches/ntvdm/; revision=62325
2014-02-25 00:26:00 +00:00
Aleksandar Andrejevic
8abb2bdad6
[FAST486]
...
Return TRUE if nothing unexpected occurred.
svn path=/branches/ntvdm/; revision=62324
2014-02-25 00:02:54 +00:00
Aleksandar Andrejevic
e61c05c35c
[FAST486]
...
Add missing returns after calls to Fast486Exception.
svn path=/branches/ntvdm/; revision=62316
2014-02-24 03:53:02 +00:00
Hermès Bélusca-Maïto
ec52f30bc5
[FAST486]
...
- Fix return values of Fast486OpcodeSahf and Fast486OpcodeLahf handlers.
- [TheFlash], can you please see what we should return after calling Fast486ExceptionWithErrorCode in Fast486OpcodePopFlags ?
svn path=/branches/ntvdm/; revision=62313
2014-02-23 21:02:02 +00:00
Amine Khaldi
121bde3b83
* Sync up to trunk HEAD (r62286).
...
svn path=/branches/ntvdm/; revision=62287
2014-02-22 10:50:51 +00:00
Aleksandar Andrejevic
0b434e7c6c
[FAST486]
...
Add a macro ALIGNMENT_CHECK that checks for unaligned pointers and generates an exception.
svn path=/branches/ntvdm/; revision=62279
2014-02-21 01:29:13 +00:00
Aleksandar Andrejevic
011259b78f
[FAST486]
...
Update the AC flag in the POPF instruction.
svn path=/branches/ntvdm/; revision=62278
2014-02-21 01:15:03 +00:00
Aleksandar Andrejevic
b9dd7fc5fc
[FAST486]
...
Enable the Alignment Check flag. Apparently the 486 supports it.
svn path=/branches/ntvdm/; revision=62277
2014-02-21 01:05:47 +00:00
Hermès Bélusca-Maïto
a4f4c415ac
[FAST486]
...
- When pushing 16-bit value, check only low word of ESP (i.e. SP).
- Don't forget to clear high word of EIP, for the Jump instruction of group 4 (0xFF).
svn path=/branches/ntvdm/; revision=62258
2014-02-19 20:24:53 +00:00
Hermès Bélusca-Maïto
87ac13a950
[FAST486]: Hardcoded_values--;
...
svn path=/branches/ntvdm/; revision=62256
2014-02-19 19:27:05 +00:00
Hermès Bélusca-Maïto
852cd2db79
[FAST486]: Fix argument type.
...
svn path=/branches/ntvdm/; revision=62255
2014-02-19 19:23:36 +00:00
Hermès Bélusca-Maïto
5380113016
Sync with trunk rev.61910 to get latest improvements and bugfixes.
...
svn path=/branches/ntvdm/; revision=61911
2014-02-01 22:56:13 +00:00
Hermès Bélusca-Maïto
3224e67cfc
Sync to trunk revision 61757.
...
svn path=/branches/ntvdm/; revision=61758
2014-01-22 22:56:41 +00:00
Aleksandar Andrejevic
6e741d3856
[FAST486]
...
Implement the LAR instruction.
svn path=/branches/ntvdm/; revision=61650
2014-01-17 03:15:27 +00:00
Hermès Bélusca-Maïto
49ab546ac3
Sync up with trunk r61578.
...
svn path=/branches/ntvdm/; revision=61579
2014-01-11 00:00:10 +00:00
Aleksandar Andrejevic
d07be4e31b
[FAST486]: Fix a comment.
...
svn path=/branches/ntvdm/; revision=61310
2013-12-21 03:50:19 +00:00
Aleksandar Andrejevic
3dd500ab28
[FAST486]
...
Implement the LSL instruction.
Remove instructions that don't exist on a 486 from the TODO list.
svn path=/branches/ntvdm/; revision=61309
2013-12-21 03:48:46 +00:00
Aleksandar Andrejevic
f8861a562a
[FAST486]
...
Remove the waiting code for the HLT instruction until I figure out how to do it properly.
svn path=/branches/ntvdm/; revision=61276
2013-12-15 05:08:57 +00:00
Aleksandar Andrejevic
ec32b3ef34
[FAST486]
...
Fix the calculation of PageLength for the last page.
svn path=/branches/ntvdm/; revision=61275
2013-12-15 05:02:59 +00:00
Aleksandar Andrejevic
4c80791d47
[FAST486]
...
Fix linear memory access when paging is enabled.
svn path=/branches/ntvdm/; revision=61274
2013-12-15 04:15:03 +00:00
Aleksandar Andrejevic
efcf73c467
[FAST486]
...
The LDT can be loaded with a NULL descriptor. That invalidates the LDT but doesn't cause
any exception.
svn path=/branches/ntvdm/; revision=61269
2013-12-14 02:30:42 +00:00
Aleksandar Andrejevic
18b844dffa
[FAST486]
...
Fix the emulation of the Local Descriptor Table.
svn path=/branches/ntvdm/; revision=61268
2013-12-14 02:13:01 +00:00
Aleksandar Andrejevic
5303c91efa
[FAST486]
...
Implement the extended opcode group 0x0F, 0x00 (SLDT, STR, LLDT, LTR, VERR, VERW).
svn path=/branches/ntvdm/; revision=61264
2013-12-13 03:32:41 +00:00
Hermès Bélusca-Maïto
a2bd742ecd
[FAST486]
...
- Call Fast486GetCurrentPrivLevel only when needed.
- Fix a type.
svn path=/branches/ntvdm/; revision=61211
2013-12-03 23:51:51 +00:00
Aleksandar Andrejevic
978c08c15c
[FAST486]
...
Implement the BOUND instruction.
svn path=/branches/ntvdm/; revision=61205
2013-12-03 01:30:15 +00:00
Aleksandar Andrejevic
2064d10bad
[FAST486]
...
Check for division by zero, and generate the appropriate exception.
svn path=/branches/ntvdm/; revision=61204
2013-12-03 00:56:47 +00:00
Aleksandar Andrejevic
e7a6deb93f
[FAST486]
...
The current "fast" method used in MOVS gives incorrect results. It has been temporarily
replaced with a slow method that works correctly.
The string functions do nothing when CX is 0 on entry, fix CMPS and SCAS.
svn path=/branches/ntvdm/; revision=61203
2013-12-03 00:12:55 +00:00
Aleksandar Andrejevic
03ecfdff3f
[FAST486]
...
Fix MOVS and STOS when DF = 1. The starting position in the block was off by 1.
svn path=/branches/ntvdm/; revision=61163
2013-12-01 03:16:49 +00:00
Aleksandar Andrejevic
ba237b0251
[FAST486]
...
Revert r61158, and fix the prefix issue correctly, but resetting the flags
again after the call to Fast486InterruptInternal.
svn path=/branches/ntvdm/; revision=61160
2013-11-30 23:45:59 +00:00
Aleksandar Andrejevic
7393337fcf
[FAST486]
...
Use the size of CS, and not SS, in Fast486OpcodePopReg.
svn path=/branches/ntvdm/; revision=61159
2013-11-30 23:14:54 +00:00
Aleksandar Andrejevic
2cbcfd75c5
[FAST486]
...
Move the prefix reset below the interrupt check, because Fast486InterruptInternal
might set OPSIZE in some circumstances.
svn path=/branches/ntvdm/; revision=61158
2013-11-30 22:17:18 +00:00
Aleksandar Andrejevic
9c6b9c9bab
[FAST486]
...
FPU instructions never generate #UD. If CR0.EM is set, they generate #NM.
If there is no FPU and CR0.EM is cleared, they do nothing.
Add a helper macro FPU_ST for accessing FPU registers.
Add a compile-time option to disable the FPU.
svn path=/branches/ntvdm/; revision=61150
2013-11-30 02:03:51 +00:00
Aleksandar Andrejevic
81c27b5b19
[FAST486]
...
Start implementing the FPU. Stubplement the FPU opcode handlers.
svn path=/branches/ntvdm/; revision=61141
2013-11-29 03:00:59 +00:00
Aleksandar Andrejevic
d358641f7c
[FAST486]
...
Fix the order of operations.
svn path=/branches/ntvdm/; revision=61106
2013-11-26 18:11:53 +00:00
Aleksandar Andrejevic
556bace69f
[FAST486]
...
Complete the previous commit with a fix for Fast486WriteLinearMemory too.
svn path=/branches/ntvdm/; revision=61105
2013-11-26 17:56:18 +00:00
Aleksandar Andrejevic
f45361126f
[FAST486]
...
Handle the case when the last page is also the first page in Fast486ReadLinearMemory ( when paging is enabled).
svn path=/branches/ntvdm/; revision=61104
2013-11-26 17:55:07 +00:00
Aleksandar Andrejevic
8e356f7a95
[FAST486]
...
The 486 doesn't have AC, VIF, VIP or ID.
Fix and simplify POPF.
[NTVDM]
Fix the count in the XMS copy function (INT 15h, AH = 87h).
svn path=/branches/ntvdm/; revision=61082
2013-11-23 01:34:03 +00:00
Aleksandar Andrejevic
9a8c7e2a04
[FAST486]
...
Fix CF calculation in SHRD/SHLD.
svn path=/branches/ntvdm/; revision=61070
2013-11-22 02:47:48 +00:00
Aleksandar Andrejevic
24954c9d07
[FAST486]
...
DAA, DAS: Update the flags.
AAA, AAS: Subtract from AX instead of AL. The specification says AL, but
so far in all known CPUs and emulators, AX is subtracted.
AAD: Clear AH.
svn path=/branches/ntvdm/; revision=61069
2013-11-22 02:02:05 +00:00
Aleksandar Andrejevic
363543b325
[FAST486]
...
Fix the calculation of AF in ADC and the calculation of AF and CF in SBB.
svn path=/branches/ntvdm/; revision=61068
2013-11-22 01:22:00 +00:00
Aleksandar Andrejevic
c0d571c92a
[FAST486]
...
In the string functions, use ADSIZE and not OPSIZE.
In SCAS and CMPS, fix the "(1 << 32) - 1" bug.
svn path=/branches/ntvdm/; revision=61067
2013-11-22 00:46:28 +00:00
Aleksandar Andrejevic
9c999826e1
[FAST486]
...
Put the conditional expression in parenthesis so that the addition happens after it.
svn path=/branches/ntvdm/; revision=61063
2013-11-21 04:07:15 +00:00
Aleksandar Andrejevic
37b16fec31
[FAST486]
...
Fix a bug in Fast486LoadSegment.
svn path=/branches/ntvdm/; revision=61062
2013-11-21 03:18:34 +00:00
Aleksandar Andrejevic
f90a1db2b7
[FAST486]
...
The top half of EIP is cleared after a 16-bit jump.
svn path=/branches/ntvdm/; revision=61058
2013-11-20 14:21:47 +00:00
Aleksandar Andrejevic
459e3a6f48
[FAST486]
...
Read the LDT instead of the GDT when the table indicator is set.
svn path=/branches/ntvdm/; revision=61057
2013-11-20 10:48:26 +00:00
Aleksandar Andrejevic
e2fb91925e
[FAST486]
...
Implement privilege checks when loading the code selector.
svn path=/branches/ntvdm/; revision=61056
2013-11-20 10:43:12 +00:00
Aleksandar Andrejevic
b456a8b355
[FAST486]
...
Make the parameters to Fast486ReadModrm*Operands optional, so that
unnecessary extra reads aren't performed. This also eliminates the
need for dummy variables.
svn path=/branches/ntvdm/; revision=61055
2013-11-20 08:01:10 +00:00
Hermès Bélusca-Maïto
8998a96d56
[NTVDM] : Implement getMSW and setMSW for getting and setting the Machine Status Word (lower word of CR0).
...
[FAST486]: MSW = Machine Status Word
svn path=/branches/ntvdm/; revision=61044
2013-11-18 20:25:10 +00:00
Aleksandar Andrejevic
4b005f11bf
[FAST486]
...
- When accessing memory using ESP, make the SS segment default.
- The INT instructions always pushes 16-bit values in real mode, regardless
of the operand/address size attributes.
svn path=/branches/ntvdm/; revision=61000
2013-11-15 20:49:48 +00:00
Aleksandar Andrejevic
f5d0d3e784
[FAST486]
...
The CS cached descriptor has the default operand size, even for stack
operations.
svn path=/branches/ntvdm/; revision=60996
2013-11-15 04:16:25 +00:00