Commit Graph

171 Commits

Author SHA1 Message Date
Stanislav Shwartsman
9e9bc9aeeb Do not touch fdp/fds fields in x87 if not memory instruction 2008-08-23 10:48:38 +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
3223d7c004 Added missed prepare_FPU 2008-07-14 18:54:10 +00:00
Stanislav Shwartsman
709d74728d Call #UD exception directly instead of UndefinedOpcode function - for future use 2008-07-13 15:35:10 +00:00
Stanislav Shwartsman
5abee4819e Indent and style changes 2008-07-13 11:22:55 +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
f331919d63 indent + FPU debug print fixes 2008-05-19 20:00:42 +00:00
Stanislav Shwartsman
307d75f632 Optimizations in FPU tag word handling - compress FPU tag word internally and expose only when calling for tag word read operations (only 4 instructions) 2008-05-10 13:34:01 +00:00
Stanislav Shwartsman
177b4831a8 Another fix for C1 bit clear/set 2008-05-10 10:15:01 +00:00
Stanislav Shwartsman
15e772964d Fixes with C1 bit clear/set 2008-05-10 09:17:24 +00:00
Stanislav Shwartsman
f182f11a8e - significantly improve FPU debug print
- update FPU TW before saving FPU state by FNSAVE or FNSTENV
2008-05-05 21:23:33 +00:00
Stanislav Shwartsman
46f93681e7 Fixed FBSTP instruction signed zero corner case, indent changes 2008-05-04 21:22:42 +00:00
Stanislav Shwartsman
7fe502bae8 Better format for FPU state dump 2008-04-30 20:41:15 +00:00
Stanislav Shwartsman
66282a2078 Fixed FRSTOR instruction 2008-04-27 20:43:38 +00:00
Stanislav Shwartsman
4ecadb915b Fixed FPU tags after FLDENV instruction 2008-04-26 20:24:20 +00:00
Stanislav Shwartsman
f17928ead0 Remove debug prints 2008-04-26 19:56:48 +00:00
Stanislav Shwartsman
ee88a125e7 for FPU instruction which load data from memory we should access memory first and only then check if it FPU stack overflow
memory access might fault before
2008-04-26 19:38:53 +00:00
Stanislav Shwartsman
40bceb55fa Fixed floating point opcode masking 2008-04-26 12:14:58 +00:00
Stanislav Shwartsman
0609d7e7ce Handle undocumented FPU opcodes 2008-04-21 14:17:48 +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
c26d9d563c Missed include file 2008-04-04 21:10:30 +00:00
Stanislav Shwartsman
3f5263a142 Compilation fixes that allow to disable FPU by just setting BX_SUPPORT_FPU=0 2008-04-04 21:05:37 +00:00
Stanislav Shwartsman
bb1195f1e6 move denormals_are_zeros to fpu_specialize.h 2008-04-04 20:02:36 +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
eebd96e2d7 another whitespace cleanup by Sebastien 2008-02-05 22:33:35 +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
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
917a040cc4 Fixed more VCPP2008 warnings 2007-12-26 18:39:15 +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
e51184c8cf Eliminate saving of RSP from heart of cpu_loop
Now save RSP only where it is really required
2007-11-24 14:22:34 +00:00
Stanislav Shwartsman
754e43baed FOO is 11 bit only field 2007-10-30 18:52:25 +00:00
Stanislav Shwartsman
d30a0d3699 warning fixes 2007-10-24 23:29:40 +00:00
Stanislav Shwartsman
42fdd8a3a1 During Bochs benchmarking I figured out that hostasm actually slow down the emulation ... so remove this ugly code which also doesn't help :)
speedup flags update for some instructions - idea was taken from DT patch by h.johansson
2007-10-21 22:07:33 +00:00
Stanislav Shwartsman
efbcc99e9a get rid of ugly do/while(0) construction 2007-09-14 19:39:11 +00:00
Stanislav Shwartsman
9612691aad Debug print changed to look a bit better 2007-09-11 13:11:03 +00:00
Stanislav Shwartsman
412eeeeb7c Get crregs definition to separate file from cpu.h 2007-09-10 16:00:15 +00:00
Stanislav Shwartsman
38d1f39c77 Converted CR0 bits to one register similar to CR4 - a bit slower but helps with other features implemntation 2007-07-09 15:16:14 +00:00
Stanislav Shwartsman
5189cfbf10 SSE4 support 2007-04-19 16:12:21 +00:00
Stanislav Shwartsman
b6c8275cfd remove old PIT model and always use Greg Alexander's new one 2007-04-08 21:57:06 +00:00
Stanislav Shwartsman
1ab3297115 FCOMI are P6 instructions 2007-04-02 10:46:57 +00:00
Stanislav Shwartsman
26f08fdb2c Change my e-mail to #SF one 2007-03-23 21:27:13 +00:00
Stanislav Shwartsman
c7e732fc8c Merged patch from #SF site tracker 2006-09-08 11:26:04 +00:00
Stanislav Shwartsman
ea1127f235 Correctly detect inexact result in FPU (patch by No Name) 2006-08-28 18:48:51 +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
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
7cfa31492c Removed --enable-pni configure option, to compile with PNI use
--enable-sse=3 instead (Stanislav Shwartsman)
2006-02-20 19:28:57 +00:00
Stanislav Shwartsman
765951b1a5 Fix problem in FLDENV/FSTENV instructions 2006-01-29 17:37:23 +00:00
Stanislav Shwartsman
356cb066d4 Reverting back last commit from Kevin.
Both Intel and AMD docs say that fldenv should fault on pending exceptions.
(#MF If an unmasked x87 floating-point exception was pending)
2006-01-28 21:31:20 +00:00