Commit Graph

614 Commits

Author SHA1 Message Date
Stanislav Shwartsman
283f9ae5d2 Simplify cpu.h
Speedup FYL2X and FYL2XP1 instructions
2004-09-14 20:19:54 +00:00
Stanislav Shwartsman
6cdb42d909 Little bit optimize memory access functions. Now values are calculated only if they actually needed. 2004-09-13 20:48:11 +00:00
Stanislav Shwartsman
fc631037ff remove obsolete comments from fetchdecode 2004-09-06 20:22:39 +00:00
Stanislav Shwartsman
ce459276c3 Fixed problem in previous commit ... 2004-09-04 20:19:39 +00:00
Stanislav Shwartsman
3916754e30 speedup and cleanup 2004-09-04 19:37:37 +00:00
Stanislav Shwartsman
6dc8a1cafd Very small code cleanup 2004-09-04 18:22:22 +00:00
Stanislav Shwartsman
193c7332aa 1. Small optimization for lazy_flags.cc
2. Merge patch 1013516
Avoid invalidate_prefetch_q on enter, leave and cpuid
2004-09-04 10:21:28 +00:00
Stanislav Shwartsman
75006eed8a Fix MUL/IMUL instructions flags handling 2004-08-31 19:43:58 +00:00
Stanislav Shwartsman
016207b222 Commented problematic check in misc_mem.cc
Implemnted lazy-flags and undocumented flags handling for IMUL instructions
2004-08-30 21:47:24 +00:00
Stanislav Shwartsman
77b3886f8b Cleanup and optimize 2004-08-28 08:41:46 +00:00
Stanislav Shwartsman
8953bfaffb Fixed flags handling for SHLD and rotate instrructions 2004-08-27 20:13:32 +00:00
Stanislav Shwartsman
27897c925e Fix undocumented flags handling for SHL instruction
remove invalidate_prefetch_q from CPUID
2004-08-27 18:43:23 +00:00
Stanislav Shwartsman
f2294e7c29 LAZY-FLAGS for MUL instructions
undocumented flags handling for MUL instructions
2004-08-26 20:37:50 +00:00
Stanislav Shwartsman
fcc54c7f82 Add missed flags modification 2004-08-18 21:38:50 +00:00
Stanislav Shwartsman
1f5aa2696f Fix compilation errors ;) 2004-08-18 21:29:07 +00:00
Stanislav Shwartsman
8c618be951 Fix comments 2004-08-18 20:49:31 +00:00
Stanislav Shwartsman
b370a417a4 Optimize lazy-flags for ADC and SBB instructions 2004-08-18 20:47:35 +00:00
Stanislav Shwartsman
729e0abd2a Fixed bug [ 912496 ] IDIV can cause simulator divide error 2004-08-18 19:27:52 +00:00
Stanislav Shwartsman
571617bcda Optimize lazy flags for NEG instruction
Removed duplicate flags modification in CMPXCHG instruction
2004-08-17 17:34:47 +00:00
Stanislav Shwartsman
231cd533c6 1. Update changes
2. Fix lazy_flags duplicate instruction patterns
2004-08-16 20:18:01 +00:00
Stanislav Shwartsman
c2b7f183af more correct implementation 2004-08-15 20:31:27 +00:00
Stanislav Shwartsman
eefdcece6f Speed-up BTC instruction
Speed-up SAR instruction with implementing lazy-flags for it
2004-08-15 20:12:05 +00:00
Stanislav Shwartsman
12b68ede54 XADD and ADD instructions have same flags modification rules - remove redundant switch case 2004-08-14 20:44:48 +00:00
Stanislav Shwartsman
88a19a8594 Speedup lazy-flags for NEG instruction 2004-08-14 20:09:22 +00:00
Stanislav Shwartsman
1b7b791493 Speedup lazy-flags for INC and DEC instructions 2004-08-14 20:00:24 +00:00
Stanislav Shwartsman
1732e54baa Fixed undocumented flags handling for some instructions.
Bugfix for CF flag handling for SHL64 instruction
2004-08-14 19:34:02 +00:00
Stanislav Shwartsman
a1f830d429 Implemented FAST lazy flags version for logic instructions.
Small code cleanup/simplification for others.
2004-08-13 20:00:03 +00:00
Stanislav Shwartsman
5de51f67d9 Prepare lazy flags macroses for more efficient lazy flags handling 2004-08-11 21:26:23 +00:00
Stanislav Shwartsman
8f0cf91fff This commit is the first commit in long series of changes the have several purposes:
1. Review and commit patch

	[ 896733 ] Lazy flags, for more instructions, only 1 src op

   May be partially, but I hope to get all ideas from patch in

2. Get Bochs speedup after lazy flags optimization

3. Most important for me: improve correctness of emulation by handling several
   undocumented EFLAGS modifications. And finally pass

	UFLAGS - Undefined Flags Test v 3.0
	Copyright (C) Potemkin's Hackers Group (PHG) 1989,1995

   The test still fails on > 50% of its checks.
2004-08-09 21:28:47 +00:00
Stanislav Shwartsman
789ed4da04 Removed debug print 2004-07-29 20:30:14 +00:00
Stanislav Shwartsman
f9bd2b74be 1. Fixed bug in FSUB instruction
2. Fixed bug

[ 989478 ] I-Cache and undefined Instruktions

The L4 microkernel uses an undefined instruction to
trap for a special requests into the kernel (LOCK NOP).
The handler fixes this up and gives the user a special
code page with syscall stubs. If you're not using the
I-Cache optimization everthing works find on bochs. But
if you enable the I-Cache (--enable-icache), then the
undefined opcode exception is thrown only once for ever
virtual address it occurs. See the demodisk of the
L4KA::pistachio
(http://www.l4ka.org/projects/pistachio/download.php).
In this case the pingpong benchmark of this demo is of
interest. Everything runs fine until the program tries
to spawn a new task for its measurements. This new task
shares the code of the creating program. But the new
task stops executing at the undefined instruction
explained above and no exception is thrown.
2004-07-29 20:15:19 +00:00
Stanislav Shwartsman
50aaf8ec6f Implemented FFREEP 287+ compatability instruction 2004-07-15 19:45:33 +00:00
Stanislav Shwartsman
79b1cfdc1c removed unused code 2004-07-12 19:20:55 +00:00
Stanislav Shwartsman
ddc6c33887 BX_PANIC replaced by BX_INFO 2004-07-08 20:15:23 +00:00
Stanislav Shwartsman
02dec84af9 Fix FXSAVE/FXRSTOR instructions exceptions handling 2004-07-03 11:02:43 +00:00
Stanislav Shwartsman
cc61e5d5d5 Leave aligment in floatx80 reg to compiler.
CPU code no longer assume that floatx80 register is 16-byte aligned
2004-07-02 20:24:47 +00:00
Stanislav Shwartsman
2a0a361298 Implemented precision lost up indication in floating point status word 2004-06-25 18:51:28 +00:00
Stanislav Shwartsman
dfd17222b0 Changed MMX regs access macros to avoid code duplication in MMX register declaration 2004-06-23 21:59:24 +00:00
Christophe Bothamy
ba13a484b5 - replace ResetCpu and ResetSystem by Reset(BX_RESET_SOFTWARE) and Reset(BX_RESET_HARDWARE) 2004-06-21 10:39:24 +00:00
Stanislav Shwartsman
a7cad86666 clean code 2004-06-19 19:16:02 +00:00
Stanislav Shwartsman
5873b26a82 Speed up compilation process.
bochs.h already not include iodev.h which reduces compilation dependences for almost all cpu and fpu files, now cpu files will not be recompiled if iodev includes was changed
2004-06-19 15:20:15 +00:00
Stanislav Shwartsman
5c5b556f24 Merge softfloat-fpu-implementation_ver4_branch branch 2004-06-18 14:11:11 +00:00
Stanislav Shwartsman
e6991f043f pply patch
[ 924428 ] ET bit mismatch between CR0 and MSW
2004-06-03 17:57:29 +00:00
Volker Ruppert
25582ed29d - fixed cpu/Makefile.in after renaming file
- reg_ld_str.c: fixed regparm argument (bugfix found in SuSE 9.1 sources of Bochs 2.1.1)
2004-05-17 19:50:43 +00:00
Stanislav Shwartsman
14b70fa9ed rename fpu.cc in cpu folder
this fixed bug
[954751] Two FPU.CPP in project
2004-05-16 18:46:42 +00:00
Stanislav Shwartsman
4eea772270 LOADALL for cpu-level=2 in fetchdecode 2004-05-11 16:44:58 +00:00
Stanislav Shwartsman
3274e0dd12 Commit patch
[ 950905 ] Do not PANIC on rare, bad input from user-mode
by h.johansson
with little changes and fixes
2004-05-10 21:05:51 +00:00
Stanislav Shwartsman
279d207d45 Fix fetchdecode bugs reported by Gilbert Netzer
(opcode patches for x86_64 cpu)
2004-05-03 17:58:36 +00:00
Christophe Bothamy
f4dbefad66 - fix bug reported by Thomas Weidner [ 877510 ] amd64 fixes... 2004-04-28 19:57:37 +00:00
Stanislav Shwartsman
0c47a35c99 Change BX_PANIC to BX_INFO if the behaviour exactly matches Intel docs 2004-04-17 17:10:58 +00:00