Commit Graph

94 Commits

Author SHA1 Message Date
nickysn
024ebb287e + implemented set_jmp and long_jmp on win16 via the Catch and Throw winapi
functions, which provide the same functionality, but are safe to use in all
  windows modes (e.g. they include the magic for handling jumps to discarded
  or moved code segments in real mode)

git-svn-id: trunk@31579 -
2015-09-08 16:03:50 +00:00
nickysn
3497359a9f + added missing i8086 system unit includes hugeptr.inc, int32p.inc and
int64p.inc to rtl/i8086/makefile.cpu

git-svn-id: trunk@30133 -
2015-03-08 01:39:40 +00:00
sergei
9a72100405 - removed obsolete and commented out variable
git-svn-id: trunk@29320 -
2014-12-25 09:25:49 +00:00
nickysn
16c5849fc6 + added HexStr() overload for huge pointers
git-svn-id: trunk@28180 -
2014-07-07 15:13:29 +00:00
nickysn
13646c7afe + added rtl helper for huge pointer subtraction
git-svn-id: trunk@28178 -
2014-07-06 19:15:14 +00:00
nickysn
c306f48c14 + added rtl helpers for huge pointer comparisons
git-svn-id: trunk@28148 -
2014-07-04 08:34:17 +00:00
nickysn
f0346c096f + added rtl helpers for huge pointer arithmetic
git-svn-id: trunk@28099 -
2014-06-28 17:08:40 +00:00
nickysn
ce4f9577d7 * seges prefix and lodsb instruction put on the same line for better readability
git-svn-id: trunk@28067 -
2014-06-25 21:07:25 +00:00
nickysn
2f83e2efc9 * use 'seges' instead of db 26h. It is actually supported, but for some reason,
unlike TP7's inline asm, in FPC it doesn't work on the same line as 'lodsb'.

git-svn-id: trunk@28065 -
2014-06-25 18:07:24 +00:00
nickysn
ec55340359 * i8086 far data memory model fixes in get_caller_addr and get_caller_frame
git-svn-id: trunk@28063 -
2014-06-25 16:47:56 +00:00
nickysn
ec75c5dfa0 + added an asm implementation of FillDWord for i8086
git-svn-id: trunk@27650 -
2014-04-25 09:18:43 +00:00
sergei
217bac7a0b - Removed fpc_pi_real compilerproc, it is no longer used. At least two releases (2.6.2 and 2.6.4) emit Pi directly as a constant.
git-svn-id: trunk@27500 -
2014-04-07 09:16:24 +00:00
nickysn
c0cb3643f8 + support i8086 far data memory models in fpc_longJmp
git-svn-id: trunk@27413 -
2014-03-31 15:53:12 +00:00
nickysn
d24cfbcc8e + implemented InterLockedCompareExchange for i8086
git-svn-id: trunk@27410 -
2014-03-31 13:36:30 +00:00
nickysn
6cac29e1b5 + implemented InterLockedExchangeAdd for i8086
git-svn-id: trunk@27406 -
2014-03-31 09:49:37 +00:00
nickysn
5b71ad3e3b + i8086 InterLockedExchange reimplemented in asm, added locking with cli
git-svn-id: trunk@27404 -
2014-03-31 09:24:23 +00:00
nickysn
3b2cc1baf5 - rm unused local vars from SysInitFPU and SysResetFPU
git-svn-id: trunk@27403 -
2014-03-30 23:03:51 +00:00
nickysn
8eaf8938f4 + support i8086 far data memory models in InterLockedDecrement and
InterLockedIncrement

git-svn-id: trunk@27402 -
2014-03-30 22:49:40 +00:00
nickysn
14ecc118ec + disable interrupts as a form of 'locking' in InterLockedDecrement and
InterLockedIncrement

git-svn-id: trunk@27401 -
2014-03-30 22:41:48 +00:00
nickysn
2dd9a36bdc * use si, instead of bp in InterLockedDecrement and InterLockedIncrement
git-svn-id: trunk@27400 -
2014-03-30 22:38:30 +00:00
nickysn
7f37a3300d + added an i8086 asm implementation of move()
git-svn-id: trunk@27374 -
2014-03-30 13:22:52 +00:00
nickysn
1f98dfc3b4 * i8086 far data memory model fixes in FPC_SETJMP. FPC_LONGJUMP not converted
yet.

git-svn-id: trunk@27368 -
2014-03-30 10:56:42 +00:00
nickysn
ab3b3ab169 + i8086 far data memory model support in Sptr and get_frame
git-svn-id: trunk@27269 -
2014-03-24 17:10:38 +00:00
nickysn
47aed8b01f * optimized the i8086 version of Get8087CW
git-svn-id: trunk@27221 -
2014-03-21 13:46:38 +00:00
sergei
b89822d3e9 * i8086: added assembler implementation of fpc_round_real and removed remaining softfloat dependencies.
git-svn-id: trunk@27195 -
2014-03-20 02:28:47 +00:00
sergei
0255eb880e - Removed mathuh.inc files which are identical for all targets (except m68k, see below), their contents moved into math.pp.
+ m68k/mathu.inc: added stub implementations for missing functions.

git-svn-id: trunk@27180 -
2014-03-18 20:01:15 +00:00
nickysn
a176c2d4f5 + add overloaded versions of HexStr(pointer) for i8086 near and far pointers
- rm ifdefs for i8086 far code memory model when doing stack traces. The
  compiler will now choose the correct overload of HexStr according to the
  CodePointer type.

git-svn-id: trunk@27163 -
2014-03-16 17:40:31 +00:00
nickysn
41d28f91e5 - rm asmmode intel from the i8086-msdos rtl, as that is the default asm mode on
that platform

git-svn-id: trunk@27144 -
2014-03-15 13:01:05 +00:00
nickysn
015c7e951a * Changed the default packset setting to 1 and disabled the padding of 3-byte
sets to 4 bytes on 16 and 8-bit CPUs. This is compatible with Turbo Pascal 7
  and Delphi 1.

git-svn-id: trunk@27140 -
2014-03-14 23:51:14 +00:00
nickysn
4c27c42f35 + added asm optimized BSF/BSR routines for i8086 by Max Nazhalov
git-svn-id: trunk@26593 -
2014-01-26 23:12:32 +00:00
nickysn
a85bb98aa6 * patch from Max Nazhalov with improvements to the i8086 64-bit division:
since [unnormalized] n >= 0x10000 now, we have
   1. lzv<=47, so all code that makes shifts by >= 48 is dead;
   2. q3=0, so main loop can be executed just 3 times instead of 4.

git-svn-id: trunk@26535 -
2014-01-20 21:39:05 +00:00
nickysn
b91509159a + added asm optimized 64-bit division helpers for i8086 by Max Nazhalov
git-svn-id: trunk@26520 -
2014-01-19 20:26:24 +00:00
nickysn
4a107dcfa6 + added 32-bit asm optimized division helpers for i8086 by Max Nazhalov
git-svn-id: trunk@26512 -
2014-01-18 20:33:30 +00:00
nickysn
a71debb762 + added 32x32 to 64-bit multiplication helper for i8086 by Max Nazhalov
git-svn-id: trunk@26403 -
2014-01-06 03:23:36 +00:00
pierre
de89827eb7 Clean up comment at start of fpc_mul_dword
git-svn-id: trunk@26368 -
2014-01-03 13:15:34 +00:00
pierre
a4e08f8611 Move int32p.inc inclusion to end of i8086.inc as it needs to be parsed before generic.inc
git-svn-id: trunk@26366 -
2014-01-03 11:42:53 +00:00
nickysn
f2e73b5e6f + added 32-bit and 64-bit unsigned asm optimized multiplication routines for
i8086, contributed by Max Nazhalov

git-svn-id: trunk@26306 -
2013-12-28 22:43:45 +00:00
nickysn
4eb9043ac7 * x87 optimized version of math.log2() for i8086, i386 and x86_64
git-svn-id: trunk@26266 -
2013-12-22 23:21:41 +00:00
nickysn
f23c521c50 - disabled the i8086 math.arctan2 asm code, because it doesn't work on the 8087/80287
git-svn-id: trunk@26243 -
2013-12-16 23:05:16 +00:00
nickysn
c88be4550d * optimization in the 8087/80287 version of fpc_arctan_real(): when calculating
arctan([-]1/d), use fxch to swap the two arguments, instead of using fdivr,
  since fpatan can do the division for free

git-svn-id: trunk@26227 -
2013-12-13 01:24:01 +00:00
nickysn
a7b4953795 + proper (i.e. not broken) implementation of arctan() for the 8087 and 80287
git-svn-id: trunk@26226 -
2013-12-12 23:46:51 +00:00
nickysn
a68b9fd01f * use byte sized instead of word sized memory operations on the fpu control
word in fpc_frac_real, fpc_int_real and fpc_trunc_real, because the byte sized
  ones are faster on the i8088, due to the 8-bit bus

git-svn-id: trunk@26214 -
2013-12-10 21:16:35 +00:00
nickysn
9c86da1911 - rm the fwait after fstsw in fpc_exp_real. My own testing on a true i8087 shows
that fwait after fstsw appears to be unnecessary. On the other hand, using
  fnstsw, followed by fwait produces wrong results.

git-svn-id: trunk@26204 -
2013-12-10 00:38:28 +00:00
nickysn
775619ef8b * 8087/80287 fixes in fpc_exp_real
git-svn-id: trunk@26203 -
2013-12-10 00:02:20 +00:00
nickysn
d0a7522e1f + also init Default8087CW in DetectFPU
git-svn-id: trunk@26201 -
2013-12-08 22:39:48 +00:00
nickysn
180ddf2ddd + i8086 FPU detection code updated to also identify the FPU type (8087/287/387+)
and initialize the Test8087 global variable.

git-svn-id: trunk@26200 -
2013-12-08 20:50:52 +00:00
nickysn
fcfb73f508 + i8086 asm implementation of math.arctan2, based on the i386 version
git-svn-id: trunk@26154 -
2013-11-29 18:40:31 +00:00
nickysn
bb0a3a7374 + i8086 asm implementation of fpc_frac_real, based on the i386 version
git-svn-id: trunk@26131 -
2013-11-24 18:30:40 +00:00
nickysn
6cd62437f9 + i8086 asm implementation of fpc_trunc_real, based on the i386 version. Fixes
i8086 compilation after r26122.

git-svn-id: trunk@26125 -
2013-11-24 02:00:57 +00:00
nickysn
f23794bf39 * get_caller_frame for i8086 optimized for size
git-svn-id: trunk@25860 -
2013-10-27 12:01:29 +00:00