Commit Graph

496 Commits

Author SHA1 Message Date
florian
de62cb8b02 * do not execute xend twice which was introduced in r48430
git-svn-id: trunk@48456 -
2021-01-30 18:46:58 +00:00
pierre
5dbd9eb2e0 Introduce USE_REAL_INSTRUCTIONS to handle expressions not accepted by old assemblers
git-svn-id: trunk@48430 -
2021-01-26 14:50:58 +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
florian
b5725ac3ed * while not official supported, bootstrapping with 3.0.4 fixed
git-svn-id: trunk@47901 -
2020-12-30 09:34:22 +00:00
florian
98d3473a1a * i386: disable InterlockedCompareExchange128 implementation if PIC is enabled
git-svn-id: trunk@47852 -
2020-12-26 21:11:12 +00:00
florian
4f05523db9 + RTMSupport function
+ if available use RTM to support InterlockedCompareExchange128 on i386

git-svn-id: trunk@47833 -
2020-12-22 22:00:08 +00:00
svenbarth
48cc5250f9 * fpc_geteipasebx and fpc_geteipasecx are used as procedures, not functions, so declare them as such
git-svn-id: trunk@45980 -
2020-08-01 17:26:34 +00:00
florian
769a8fa248 + patch by fanjinke: Hygon support for the mmx unit, resolves #37391
git-svn-id: trunk@45848 -
2020-07-24 20:53:54 +00:00
florian
e26e824700 + more helper routine to check for CPU features added
git-svn-id: trunk@45835 -
2020-07-23 20:57:45 +00:00
florian
c01db96df4 + functions to check for Popcnt support
git-svn-id: trunk@45827 -
2020-07-22 20:47:11 +00:00
florian
ac5407268c * regenerated
git-svn-id: trunk@45778 -
2020-07-12 20:46:54 +00:00
Jeppe Johansen
c20b27ede9 Add most SSE instructions as intrinsics.
git-svn-id: trunk@44274 -
2020-03-06 21:34:22 +00:00
florian
22ab6dd329 * disabled mm procs again, they are not usable yet neither supposed to be
used

git-svn-id: trunk@43968 -
2020-01-18 11:37:57 +00:00
svenbarth
8184815780 * ensure that the new mm related procs are only used for 3.3.1 and newer as 3.2 and older don't support the corresponding SSE types
git-svn-id: trunk@43967 -
2020-01-18 11:22:24 +00:00
florian
70a836c4a2 * first part of merging parts of Jeppe's intrinsics patch, mainly r31135
is merged by this commit with a lot of adaptions

git-svn-id: trunk@43949 -
2020-01-14 21:52:39 +00:00
florian
3e6e72118b * keep stack aligned to 16 byte boundaries in assembler subroutines calling other subroutines
git-svn-id: trunk@43012 -
2019-09-15 17:17:31 +00:00
florian
62f890efa3 * improved floating point signal handling on x86/linux
git-svn-id: branches/debug_eh@41451 -
2019-02-24 20:03:02 +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
3673f03841 * set the stdcall calling convention explicitly for each method, that requires
it, instead of using {$calling stdcall} in the go32v2 ports unit

git-svn-id: trunk@39402 -
2018-07-06 15:59:26 +00:00
nickysn
0ea3570b96 * moved the interface and implementation parts of the go32v2 ports unit to
include files portsh.inc and ports.inc in the i386 rtl directory

git-svn-id: trunk@39397 -
2018-07-06 15:52:18 +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
a1bf5e2f07 + also added the fpc_x86_*port* intrinsics to the i386 system unit
git-svn-id: trunk@39369 -
2018-07-03 22:42:03 +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
39dc58de09 - removed one asm instruction from i386's StrEnd() implementation
git-svn-id: trunk@37615 -
2017-11-23 16:43:51 +00:00
nickysn
3d108d5e51 + enabled the i386 asm optimized strcomp (was previously disabled due to wrong ifndef)
git-svn-id: trunk@37614 -
2017-11-23 16:16:05 +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
pierre
efafecbf9f Also use .byte version of emms instruction
git-svn-id: trunk@37011 -
2017-08-21 13:47:47 +00:00
pierre
239b623027 Fix typo in last commit
git-svn-id: trunk@37010 -
2017-08-21 13:37:54 +00:00
pierre
d1e091d5a3 Use .byte substitutes for ldmxcsr and stmxcsr instructions
if OLD_ASSEMBLER macro is defined.

  Do not use PIC code for fpc_exp_real if OLD_ASSEMBLER is defined
  (this generates unsupported relocations for GNU assembler 2.6 used by EMX)

git-svn-id: trunk@37009 -
2017-08-21 13:29:29 +00:00
pierre
df7946a9cc * Do not use fastmove.inc if OLD_ASSEMBLER is defined,
as older assembler do not support 64-bit instructions use in there.
    * Use .byte substitutes for ldmxcsr and movaps instructions

git-svn-id: trunk@37008 -
2017-08-21 13:26:44 +00:00
pierre
82aa8c4d2f Use REPE prefix instead of REP before CMPS{B,W,L} instruction (wasm generates an error for REP)
git-svn-id: trunk@36854 -
2017-08-05 19:50:18 +00:00
pierre
f4ecf87a50 Add conditional FASTMOVE_DISABLE_SSE3 to be able to discard SSE specific code, needed for Watcom Assembler support
git-svn-id: trunk@36848 -
2017-08-04 20:51:58 +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
Károly Balogh
0e54f616b5 merged i386 int64 mod helper fix by Max Nazhalov (Mantis 30240)
git-svn-id: trunk@34059 -
2016-07-03 21:20:07 +00:00
svenbarth
535621faaa Rename FPC_HAS_INDIRECT_MAIN_INFORMATION to FPC_HAS_INDIRECT_ENTRY_INFORMATION which is more logical considering the record's name
git-svn-id: trunk@33950 -
2016-06-11 20:38:22 +00:00
Károly Balogh
963c4aa1f8 * fixed the sign handling of i386 fpc_div_int64 helper (Mantis 30166)
git-svn-id: trunk@33753 -
2016-05-22 16:57:30 +00:00
florian
9b1e6e1976 - removed i386 specific fpc_pchar_length implementation as it is much slower than the generic one which takes advantage of IndexByte
git-svn-id: trunk@33491 -
2016-04-12 18:13:24 +00:00
sergei
17256e8387 * fpc_exp_real: replaced pushing immediate values on stack with Darwin-style PIC. This change increases performance on Intel E7200 almost twice. On AMD CPUs performance increase is not that large, but still noticeable.
git-svn-id: trunk@33131 -
2016-02-28 16:03:02 +00:00
florian
77cf67b59a o unified interface of i386 and x86-64 cpu unit:
+ InterlockedCompareExchange128Support for i386 always returning false
  + AESSupport for i386
  + dummy InterlockedCompareExchange128 for i386 throwing an rte 217

git-svn-id: trunk@32857 -
2016-01-05 15:23:26 +00:00
Jonas Maebe
12030f904a - removed FPC_HAS_VALGRINDBOOL-related checks, FPC 2.6.4 has it
git-svn-id: trunk@31691 -
2015-09-15 11:51:45 +00:00
nickysn
d39bfec4d2 + added missing i386 system unit includes fastmove.inc and int64p.inc to makefile.cpu
git-svn-id: trunk@30131 -
2015-03-07 22:35:23 +00:00
Károly Balogh
88b58c3580 i386: added signed 64bit div/mod helpers in assembly. we have some 64bit heavy code where a direct helper results in about 8-10% of performance advantage compared to going through the generic wrapper + the unsigned function
git-svn-id: trunk@28261 -
2014-07-24 21:06:23 +00:00
sergei
a8bc2085e8 - Delete strpas.inc files, no longer used, their contents has been merged into corresponding $(CPU).inc.
git-svn-id: trunk@27833 -
2014-05-31 00:49:40 +00:00
sergei
fc5f45f65c * sqr(real) and sqrt(real): remove typeconv node inserted by initial call processing (see explanation in comments), allowing these functions to be evaluated using precision of argument. In particular, sqrt(single) and sqrt(double) now emit 'sqrtss' and 'sqrtsd' instructions on x86 targets with -Cfsse3. Non-x86 targets already have the necessary support in code generators.
* abs(real): handle the same way as sqrt and sqr, i.e. without casting to bestreal and back.

git-svn-id: trunk@27808 -
2014-05-21 14:53:47 +00:00
sergei
b16c6f8ced * i386 and x86_64 changes for Delphi compatibility:
* 'mxcsr' variable made public and renamed to DefaultMXCSR.
  * GetSSECSR and SetSSECSR renamed to GetMXCSR and SetMXCSR, respectively. Previous names continue to exist as deprecated aliases.

git-svn-id: trunk@27656 -
2014-04-25 15:10:12 +00:00
sergei
6810d643c4 * Fixed exp() result for +-Inf input, must be +Inf or 0, not NaN. This is mathematically correct and consistent with generic implementation of this function.
git-svn-id: trunk@27553 -
2014-04-12 21:18:57 +00:00
sergei
57c762c8d2 + Inserted license header for AMath routines.
git-svn-id: trunk@27552 -
2014-04-12 20:45:44 +00:00
sergei
bd58adfcc9 + Added credits for functions reused from AMath/DAMath libraries.
git-svn-id: trunk@27518 -
2014-04-10 20:29:49 +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