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
nickysn
7489bfb56b
* fixed get_caller_addr returning the wrong segment in i8086 medium memory model
...
git-svn-id: trunk@25859 -
2013-10-27 11:36:45 +00:00
nickysn
85c8be531a
+ added an asm implementation of FillWord for i8086 as well
...
git-svn-id: trunk@25854 -
2013-10-26 16:52:57 +00:00
nickysn
2f88ae82b1
+ added an asm implementation of FillChar for i8086
...
git-svn-id: trunk@25849 -
2013-10-25 23:15:44 +00:00
nickysn
5abeb67bff
* the i8086 versions of InterLockedDecrement and InterLockedIncrement were
...
missing 'nostackframe'. Fixed.
git-svn-id: trunk@25813 -
2013-10-17 22:38:59 +00:00
nickysn
e0e4c04456
* the Ptr(sel,ofs) parameters changed from longint to word on i8086
...
git-svn-id: trunk@25811 -
2013-10-17 20:44:58 +00:00
nickysn
f30fddec53
* use 16-bit LEA directly in fpc_SetJmp, since that instruction is now supported
...
by the compiler
git-svn-id: trunk@25809 -
2013-10-17 17:33:55 +00:00
nickysn
9be15583af
* compilation of i8086 rtl fixed (seems like the fpc asm reader doesn't support 16-bit LEA, so hardcode it with DB for now)
...
git-svn-id: trunk@25806 -
2013-10-16 16:34:48 +00:00
nickysn
c9d021aeb8
* prefer to use ax in fpc_SetJmp for i8086, because it's faster on old CPUs (and makes no difference on newer CPUs)
...
git-svn-id: trunk@25805 -
2013-10-16 15:17:23 +00:00
nickysn
acbf73ec6e
* stack frame eliminated also in fpc_longJmp for i8086
...
git-svn-id: trunk@25804 -
2013-10-16 13:50:18 +00:00
nickysn
0d24dcc21b
* optimizations in fpc_SetJmp for i8086 by stack frame elimination and using SI instead of BP
...
git-svn-id: trunk@25803 -
2013-10-16 12:49:38 +00:00
nickysn
6596ba9036
* fixed the stack param offsets in Ptr, get_caller_addr and get_caller_frame after the stackframe elimination
...
git-svn-id: trunk@25802 -
2013-10-16 12:39:39 +00:00
nickysn
9bf3d1edff
* optimized get_caller_addr and get_caller_frame on i8086 by eliminating the stack frame and using si, instead of bp
...
git-svn-id: trunk@25801 -
2013-10-16 12:35:05 +00:00
nickysn
aa9fe36fd3
* optimized version of Ptr() for i8086
...
git-svn-id: trunk@25800 -
2013-10-16 12:29:22 +00:00
nickysn
1c53d24743
* fixed typo (bug) in i8086 get_pc_addr. Use SP instead of BP to obtain the
...
return address.
git-svn-id: trunk@25799 -
2013-10-16 09:32:55 +00:00
nickysn
ea1370a89e
+ implementated get_frame() and get_pc_addr() for the i8086
...
git-svn-id: trunk@25795 -
2013-10-15 20:16:13 +00:00
nickysn
9b2b5a9565
* fixed a bug in fpc_SetJmp on i8086, that caused an incorrect value of sp to
...
be written in Jmp_buf.sp
git-svn-id: trunk@25793 -
2013-10-15 16:28:37 +00:00
nickysn
35c0c76034
* i8086/mathu.inc converted to asmmode intel
...
git-svn-id: trunk@25553 -
2013-09-24 18:31:10 +00:00
nickysn
4fc4e4cb88
* removed the dummy fpc_sin_real and fpc_cos_real that halt with a runtime error
...
from the i8086 rtl, because the FSIN and FCOS instructions are 387+ and on
earlier FPUs the real helper functions are needed.
git-svn-id: trunk@25535 -
2013-09-22 15:06:45 +00:00
nickysn
c1b0fb81f1
* updated all the RTL helper functions related to exceptions and stack traces to use codepointer instead of pointer
...
git-svn-id: trunk@25513 -
2013-09-17 21:25:26 +00:00
nickysn
70cd05caa8
* fpc_setjmp and fpc_longjmp updated to support far code memory models
...
git-svn-id: trunk@24878 -
2013-06-11 23:59:30 +00:00
nickysn
0de550c2c9
* use an indirect jmp in fpc_longjmp
...
git-svn-id: trunk@24877 -
2013-06-11 23:47:30 +00:00
nickysn
07b9019c94
* jmp_buf.pc renamed to .ip and also changed to word
...
git-svn-id: trunk@24876 -
2013-06-11 22:51:06 +00:00
nickysn
8392c492cc
* jmp_buf.bp and .sp changed to word, because pointer will become 32-bit in far data memory models
...
git-svn-id: trunk@24875 -
2013-06-11 22:47:42 +00:00
nickysn
baa4d39ea3
+ apply extra_param_offset to all i8086 asm routines that use nostackframe
...
git-svn-id: trunk@24874 -
2013-06-11 21:10:47 +00:00
nickysn
c49e927077
+ added rtl/i8086/mathu*.inc for compiling the math unit
...
git-svn-id: trunk@24595 -
2013-05-25 15:23:46 +00:00
nickysn
fe404d2891
+ rtl implementation of ptr(seg,ofs) for i8086
...
git-svn-id: trunk@24565 -
2013-05-24 12:11:55 +00:00
nickysn
f1861a71d6
+ fixed startup hang in the i8086-msdos rtl on systems without an FPU
...
git-svn-id: trunk@24455 -
2013-05-06 21:36:37 +00:00
nickysn
5ed1222e64
* changed the default i8086 calling convention to pocall_pascal
...
git-svn-id: branches/i8086@24290 -
2013-04-21 18:03:36 +00:00
nickysn
74cd67b85c
+ added 8087 initialization to the msdos rtl (8087 presence detection is still a TODO)
...
git-svn-id: branches/i8086@24140 -
2013-04-03 16:03:45 +00:00
nickysn
c44f760015
* i8086 near heap renamed 'tiny heap', moved to the inc/ directory
...
git-svn-id: branches/i8086@24082 -
2013-03-30 19:57:21 +00:00
nickysn
28545f2fad
+ implemented near heap for i8086-msdos, based on the embedded target heap
...
git-svn-id: branches/i8086@24074 -
2013-03-30 14:54:01 +00:00
florian
5ab9742c22
+ start of dos unit (derived from go32v2)
...
* adapated Makefiles
git-svn-id: branches/i8086@24059 -
2013-03-29 15:58:21 +00:00
nickysn
ceb76808e7
+ implemented the CSeg, DSeg and SSeg functions on the i8086
...
git-svn-id: branches/i8086@24041 -
2013-03-28 21:29:14 +00:00
nickysn
3b2ea4df6c
+ implmemented FPC_LONGJMP for i8086
...
git-svn-id: branches/i8086@24034 -
2013-03-28 14:59:57 +00:00
nickysn
5ea6f37247
+ implemented FPC_SETJMP for the i8086
...
git-svn-id: branches/i8086@24002 -
2013-03-25 18:12:48 +00:00
nickysn
d2cd13a5c9
* implemented several i8086 procs, some are stubs/not yet implemented
...
git-svn-id: branches/i8086@23862 -
2013-03-16 13:52:28 +00:00
nickysn
1ced81c028
+ added fpc_cpuinit, empty for now
...
git-svn-id: branches/i8086@23855 -
2013-03-16 11:07:43 +00:00
nickysn
37714971ff
+ added rtl/i8086/int64p.inc, empty for now
...
git-svn-id: branches/i8086@23851 -
2013-03-16 03:11:52 +00:00
nickysn
5215bd33c2
* compilation of fpc_exp_real fixed
...
git-svn-id: branches/i8086@23843 -
2013-03-15 12:53:49 +00:00
nickysn
ca1fad8a73
+ added fpc_exp_real for i8086
...
git-svn-id: branches/i8086@23841 -
2013-03-15 01:21:32 +00:00
nickysn
a3fe455de6
+ added the i8086 internal fake math routines to the rtl
...
git-svn-id: branches/i8086@23836 -
2013-03-14 16:35:25 +00:00
nickysn
6757fe5752
* i8086 implementation of fpc_int_real
...
git-svn-id: branches/i8086@23832 -
2013-03-14 15:04:53 +00:00
florian
64ffe8f5ef
+ basic Makefile infrastructure for msdos
...
git-svn-id: branches/i8086@23779 -
2013-03-10 17:31:53 +00:00
nickysn
3768914a3d
slight rtl update for i8086-msdos
...
git-svn-id: branches/i8086@23777 -
2013-03-10 16:57:15 +00:00