Commit graph pcem/src/386_common.h
Author SHA1 Message Date
SarahW
ab124776a0 Rework self modifying code handling.
Code blocks now have a varying level of granularity in the page and dirty masks.
Most blocks have 64-byte granularity, but blocks that are repeatedly modified
drop to 1-byte granularity. This reduces the maximum size of the affected block
significantly, but reduces recompilation due to data located too close to code.

If the block is still marked as dirty, then it is recompiled without any
immediate instruction parameters being baked into the recompiled code, instead
being fetched from the RAM array as needed. This severely reduces recompilation
rates on some SMC-heavy games, eg Duke Nukem 3D, System Shock, Screamer etc,
giving a major speedup.
2019-03-16 14:53:26 +00:00
SarahW
2554952658 Remove unused checkio_perm() macro. 2019-02-08 19:36:30 +00:00
SarahW
dd68b19f0a Second CPU sanitising pass. 2019-02-07 21:53:44 +00:00
SarahW
1af0b660b3 First pass at sanitising CPU headers. 2019-02-07 21:30:53 +00:00
SarahW
87031d4d09 Remove readmemb386l() and writememb386l(). 2019-02-07 20:18:03 +00:00
SarahW
a4d3aa1912 Move flags and eflags variables into cpu_struct. 2018-11-28 09:42:04 +00:00
SarahW
0f0a1c3223 Perform NULL segment checks upfront in opcode handlers, rather than on every memory access.
This removes the need to pass the segment to readmem*l()/writemem*l().
2018-07-18 22:10:18 +01:00
SarahW
a96e87527e Reorganised REP instructions. 2017-07-20 21:06:21 +01:00
SarahW
8fbebead19 CHECK_READ()/CHECK_WRITE() now handle code segments. Patch from Greatpsycho. 2017-06-20 19:32:58 +01:00
SarahW
3b4392bcf8 Implemented data misalignment penalties on 486 and later CPUs. 2017-06-04 16:41:33 +01:00
SarahW
2b892d2a7a Fixed compiler warnings for Windows builds.
Added -Werror to Windows makefiles.
2017-04-11 19:34:41 +01:00
SarahW
eb126fd822 Moved more variables into cpu_state structure. 2016-08-21 21:28:23 +01:00
SarahW
c664682758 Move some more variables into cpu_state structure. Minor speedup (~2%). 2016-08-17 21:28:16 +01:00
SarahW
535604b760 Pack decoded ModR/M data into a single word - minor recompiler speedup. 2016-08-14 16:29:54 +01:00
SarahW
c81a91fd72 Moved integer registers, PC and flags_* variables into new cpu_state structure. Reduces recompiled code size slightly, small speedup (1-3%). 2016-04-20 21:39:41 +01:00
TomW
08254b8dfb Initial 64-bit recompiler.
Various 64-bit fixes.
Various fixes to allow building under MinGW-w64.
2015-07-18 12:11:54 +01:00
TomW
b5a498683a Writing to read-only data selector now causes a fault. 2015-06-21 14:54:58 +01:00
TomW
f3607c2308 Added code generation for :
- FCOM/FUCOM
- FSUBR/FSUBRP/FDIVR/FDIVRP
- FLDCW/FSTCW
- FILD/FIST/FISTP (16-bit, 32-bit and 64-bit variants)
- FLD/FST/FSTP double precision
- Integer and double precision variants of FADD/FSUB/FMUL/FDIV
Also added 64-bit readmemq/writememq functions.
2015-06-13 16:14:35 +01:00
TomW
15bca849c8 Added code generation for first batch of FPU instructions; instructions added are most common instructions used in Quake. 2015-04-19 08:42:04 +01:00
TomW
c11a771530 Fixed crashes in fastread*() 2015-02-16 20:00:16 +00:00
TomW
087f412d3f Reorganised FPU emulation. 2014-11-09 14:07:03 +00:00
TomW
4676daade4 Initial commit of dynamic recompiler.
Various CPU changes to support dynamic recompiler.
2014-11-05 21:24:16 +00:00