Commit Graph

147 Commits

Author SHA1 Message Date
Sven/Sarah Barth
e94d02a067 * with all existing RTLs switched over to the atomic intrinsics, the define FPC_SYSTEM_INTERLOCKED_USE_INTRIN can be removed again 2024-12-12 22:05:20 +01:00
Sven/Sarah Barth
60b8dd4276 * switch i8086 RTL to provide atomic intrinsic helpers instead of Interlocked* functions 2024-12-12 22:05:16 +01:00
Rika Ichinose
ce5a632432 Remove the rest of the VER3_0 conditionals. 2024-09-01 17:13:39 +00:00
Michael VAN CANNEYT
ccfa38c68e * Dotted RTL compiles 2023-07-27 19:04:03 +02:00
Michael VAN CANNEYT
c8551879f7 * string -> shortstring 2023-07-14 17:26:11 +02:00
Michael VAN CANNEYT
9d9df104b9 * Char -> AnsiChar 2023-07-14 17:26:10 +02:00
Jonas Maebe
0758aa1143 FPU exception mask: generlised system unit interface 2022-10-17 19:43:01 +00:00
pierre
3362abb30c * Set softfloat_rounding_mode indise SetRoundMode function for all CPUs.
* SetRoundMode returns previous rounding mode value for all CPUs.

git-svn-id: trunk@48018 -
2021-01-03 21:44:18 +00:00
yury
4b84de6a72 * Optimized Handle_I8086_Error by using smaller int types.
git-svn-id: trunk@46335 -
2020-08-08 19:23:52 +00:00
florian
7281ea7a2c * floating point division by zero should throw run time error 208, fixed
git-svn-id: trunk@46210 -
2020-08-03 19:42:16 +00:00
nickysn
fe47db32be + added asm optimized version of fpc_pwidechar_length for i8086
git-svn-id: trunk@41317 -
2019-02-14 16:14:02 +00:00
nickysn
5db8d6bd5e * optimize the i8086 backwards move by using movsw instead of movsb in the Move
and MoveData procedures

git-svn-id: trunk@41316 -
2019-02-14 12:18:51 +00:00
nickysn
4f573b50ad * access the Default8087CW global variable directly from within inline asm,
instead of copying it to a local var first, since the concern about PIC code
  (this asm code started out as a copy of the i386 rtl code) doesn't exist on
  the i8086, since there's no such thing as PIC code on the i8086

git-svn-id: trunk@41311 -
2019-02-12 16:31:16 +00:00
nickysn
a8f466c400 * updated the CSeg, DSeg and SSeg rtl functions on i8086 to use the new x86
intrinsics for reading the segment registers

git-svn-id: trunk@39434 -
2018-07-11 14:34:05 +00:00
nickysn
9272bf59b2 + added x86 (i8086, i386 and x86_64) intrinsics fpc_x86_get_cs/ss/ds/es/fs/gs
for getting the value of x86 segment registers

git-svn-id: trunk@39433 -
2018-07-11 14:19:40 +00:00
nickysn
8e6205aca6 * changed the visibility of the writeport and readport methods in the ports unit
objects to private (since they should be accessed only through the default
  indexed property)

git-svn-id: trunk@39421 -
2018-07-09 14:55:20 +00:00
nickysn
5318a04a5b * moved the interface and implementation parts of the i8086-msdos ports unit to
include files portsh.inc and ports.inc in the i8086 rtl directory

git-svn-id: trunk@39396 -
2018-07-06 15:41:44 +00:00
nickysn
ff2fff365f + added x86 compiler intrinsics fpc_x86_sti and fpc_x86_cli, which generate the
'sti' and 'cli' instructions

git-svn-id: trunk@39388 -
2018-07-04 16:48:34 +00:00
nickysn
1c9d0d445b * moved the compiler intrinsics for the i8086 'in' and 'out' instructions to the
system unit (with a 'fpc_x86_' prefix added)

git-svn-id: trunk@39368 -
2018-07-03 22:32:17 +00:00
nickysn
26a3ac3fd4 * moved the fpc_in_x86_*port* constants to the system unit in cpuinnr.inc in the
i8086, i386 and x86_64 rtl directories. This is done for consistency with
  other compiler internal function numbers (which are declared in innr.inc).

git-svn-id: trunk@39367 -
2018-07-03 21:30:43 +00:00
nickysn
29f307589e + added an i8086-specific procedure MoveData, that allows moving of far data,
regardless of the memory model; procedure interface is the same as a similar
  Turbo C (and DJGPP) function

git-svn-id: trunk@37741 -
2017-12-15 21:47:21 +00:00
nickysn
0119e7afb3 * changed the codepointer type in the i8086 small and compact memory models from
nearpointer to nearcspointer

git-svn-id: trunk@37730 -
2017-12-14 17:36:15 +00:00
nickysn
bc8c1ea1bc * fixed get_caller_frame() for win16 (on that platform, bp is incremented by
one, before pushing, to indicate a far call, so it has to be aligned by 2
  again, after reading)

git-svn-id: trunk@37657 -
2017-12-01 23:00:47 +00:00
nickysn
44f04d39a4 + added asm optimized implementations of StrLower() and StrUpper() for i8086
git-svn-id: trunk@37618 -
2017-11-24 16:11:18 +00:00
nickysn
5595a74609 + i8086 asm implementation of StrEnd()
git-svn-id: trunk@37616 -
2017-11-23 17:06:06 +00:00
florian
ff86c80176 * cpu specific header file for the system unit: cpuh.inc, moved several declarations into it
git-svn-id: trunk@37542 -
2017-11-01 16:33:30 +00:00
nickysn
e4a405dcd9 + added unit 'cpu' for i8086
git-svn-id: trunk@37332 -
2017-09-27 16:55:56 +00:00
nickysn
e8a09fba0d * use xchg, instead of mov, because it's 1 byte shorter
git-svn-id: trunk@36345 -
2017-05-26 18:26:00 +00:00
nickysn
34113b930b * removed the checkoverflow: boolean parameter of the software mul helpers;
replaced it with a separate "_checkoverflow" version of each helper

git-svn-id: trunk@36344 -
2017-05-26 15:34:26 +00:00
nickysn
9946393018 + added comment about the fptan instruction restrictions on the 8087 and 80287
git-svn-id: trunk@36326 -
2017-05-25 12:57:24 +00:00
pierre
277f1c1c2d Check if FPC_SYSTEM_HAS_SYSINITFPU before parsing generic i8086 code
git-svn-id: trunk@36263 -
2017-05-19 21:49:13 +00:00
pierre
8ebac8ed52 Add Handle_I8086_Error procedure
git-svn-id: trunk@36262 -
2017-05-19 21:47:26 +00:00
florian
7213a13081 * split fpc_mul_<64 bit> into separate procedures with and without overflow checking
git-svn-id: trunk@35454 -
2017-02-19 19:15:14 +00:00
nickysn
ca46040728 + added 16-bit versions of the InterLocked* functions for i8086
git-svn-id: trunk@35149 -
2016-12-18 00:17:10 +00:00
nickysn
c78f406d99 + implemented proper stack checking for the i8086
git-svn-id: trunk@33787 -
2016-05-24 23:57:47 +00:00
pierre
e835f120e9 Fix fpc_frac_real, fpc_trunk_real and fpc_int_real by removing the assumption that SP=BP at entry
git-svn-id: trunk@32865 -
2016-01-06 15:20:57 +00:00
nickysn
0f6b5161e6 * the 'count' parameter of Move and FillChar on i8086 made 16-bit unsigned,
instead of signed (BP7 compatibility)

git-svn-id: trunk@32443 -
2015-11-21 17:55:47 +00:00
nickysn
3d2919acae + added an i8086 asm optimized implementation of fpc_pchar_length
git-svn-id: trunk@32113 -
2015-10-21 13:21:04 +00:00
nickysn
3bd5934a51 * some micro optimizations for zero size blocks in CompareByte for i8086
git-svn-id: trunk@32041 -
2015-10-13 15:12:43 +00:00
nickysn
4fe125d779 * fixed ds corruption in CompareWord in far data memory models
git-svn-id: trunk@32040 -
2015-10-13 15:01:10 +00:00
nickysn
7ed7b090fe + i8086 asm optimized implementation of CompareDWord
git-svn-id: trunk@32039 -
2015-10-13 14:51:50 +00:00
nickysn
2152420e4f + added i8086 asm optimized version of CompareWord
git-svn-id: trunk@32037 -
2015-10-13 13:10:43 +00:00
nickysn
f107956169 + added an i8086 asm optimized version of CompareByte()
git-svn-id: trunk@32026 -
2015-10-12 16:47:50 +00:00
nickysn
5e3a88b7f5 * replaced or cx,cx/jz with jcxz in IndexByte, IndexWord and IndexDWord for i8086
git-svn-id: trunk@31961 -
2015-10-06 14:55:51 +00:00
nickysn
3752047dd4 + added an i8086 asm optimized IndexDWord routine
git-svn-id: trunk@31960 -
2015-10-06 14:52:58 +00:00
nickysn
792b7e67be * treat the len parameter to the i8086 versions of IndexByte and IndexWord as
unsigned, like the other platforms do

git-svn-id: trunk@31954 -
2015-10-05 19:59:15 +00:00
nickysn
94a398896b - removed spurious DX initialization at the end of IndexByte for i8086
git-svn-id: trunk@31950 -
2015-10-05 17:32:51 +00:00
nickysn
80b892aafb + added i8086 asm optimized IndexWord routine
git-svn-id: trunk@31948 -
2015-10-05 16:24:15 +00:00
nickysn
a4e216c7fd + added i8086 asm optimized IndexByte routine
git-svn-id: trunk@31947 -
2015-10-05 15:35:26 +00:00
nickysn
11eb1a4179 + added some i8086 memory model specific defines in strings.inc and
stringss.inc, used by the assembler routines (they are already defined in
  the system unit, but these includes are included in units, other than system)

git-svn-id: trunk@31922 -
2015-10-03 09:30:57 +00:00