Commit Graph

170 Commits

Author SHA1 Message Date
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
svenbarth
b3c579f49c * ensure that the includes for the new mm related files are indeed enabled
git-svn-id: trunk@43966 -
2020-01-18 11:22:20 +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
33fa211b84 + x86-64: assembler implementation for u128_div_u64_to_u64 for SysV ABI
* reminder => remainder (thanks to Stefan Kanthak for pointing it out)

git-svn-id: trunk@43695 -
2019-12-17 21:54:47 +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
7df861487b * use include files in the unix ports unit as well
+ add portsh.inc and ports.inc for x86_64 as well

git-svn-id: trunk@39420 -
2018-07-09 14:42:01 +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
2c8853f239 + added the fpc_x86_*port* intrinsics to the x86_64 system unit as well
git-svn-id: trunk@39370 -
2018-07-03 22:53:48 +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
svenbarth
7990b2e3f3 * apply patch from J. Gareth Moreton to implement Int() for SSE (currently only used on Win64)
+ added test

git-svn-id: trunk@38993 -
2018-05-14 21:08:04 +00:00
svenbarth
abd893cac4 * fix for Mantis #33635: correctly working SSE2 based Frac() implementation by J. Gareth Moreton
+ added test

git-svn-id: trunk@38903 -
2018-05-04 15:44:40 +00:00
svenbarth
e3ea46d1cb * disable SSE optimized Frac() for Win64; it has a much lower supported range than the existing Pascal implementation which uses Int() (in essence Round() and Trunc() should be corrected as well)
git-svn-id: trunk@38856 -
2018-04-27 15:18:36 +00:00
pierre
4026644278 Add explicit registers to fcomip to allow compilation with clang (bug report 33547)
git-svn-id: trunk@38661 -
2018-04-02 17:14:42 +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
florian
5b766a1e67 * fixed CompareByte for x86-64 after r37528
git-svn-id: trunk@37535 -
2017-10-30 21:01:59 +00:00
florian
0c7306e1cd * improved CompareByte for x86-64 based on a patch by Markus Beth
git-svn-id: trunk@37528 -
2017-10-29 22:15:31 +00:00
nickysn
30b5a4dd3e + added x86_64 asm implementation of math.DivMod
git-svn-id: trunk@36306 -
2017-05-23 17:14:10 +00:00
svenbarth
5f08e47d84 + add an SSE2 implementation of Frac() (the existing Trunc() and Round() implementations are also SSE2, so nothing special to keep in mind here)
git-svn-id: trunk@36253 -
2017-05-19 14:59:23 +00:00
svenbarth
b58c3ed212 + add guards for consistency with the code for Extended
git-svn-id: trunk@36252 -
2017-05-19 14:57:36 +00:00
marco
bc39eb29d3 * comment spelling fix (modifed->modified)
git-svn-id: trunk@35119 -
2016-12-13 12:50:38 +00:00
sergei
4ddbb7cd26 * Fixed assembler blocks to comply with x86_64 ABIs, which normally do not allow to change stack pointer at arbitrary locations. Register RBX is now saved/restored by compiler in function prologue, due to its presence in list of modified registers.
git-svn-id: trunk@34908 -
2016-11-17 10:58:10 +00:00
sergei
cad30aaee9 * x86_64: Modified fpc_exp_real so it does not use 'sahf' assembler instruction, which may be not present on early 64-bit capable x86 processors. Mantis #29583.
git-svn-id: trunk@33205 -
2016-03-07 22:39:34 +00:00
Jonas Maebe
e4647ac133 - removed "nostackframe" from floating point helpers for llvm, as FPC
doesn't handle nostackframe correctly in combination with extended
    parameters on x86 (with or without llvm)

git-svn-id: trunk@32598 -
2015-12-05 18:03:57 +00:00
Jonas Maebe
6909523b70 * handle atan, sqrt, ln, sin and cos in the x86 RTL for llvm
o there are llvm intrinsics for all of these except for atan,
      but these obey "the same rules as the equivalent libc functions"
      and I first have to investigate whether these libc functions
      behave the same as our FPC implementations

git-svn-id: trunk@31657 -
2015-09-12 23:33:57 +00:00
nickysn
7c884bd2ee + added all x86_64 specific system unit includes to rtl/x86_64/makefile.cpu
git-svn-id: trunk@30132 -
2015-03-07 22:49:31 +00:00
florian
43515ab109 * explicitly add asmmode, resolves #27255
git-svn-id: trunk@29424 -
2015-01-06 14:45:34 +00:00
sergei
f456bb3a25 * Re-implement ln(x) also for x87-based x86_64 targets (counterpart of r27367,r27518,r27552,r27553 for i386 target).
git-svn-id: trunk@29131 -
2014-11-23 21:37:32 +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
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
sergei
2981f73aaa - Removed redundant functions "power", they were neither used nor accessible through interface. The actual function "power" is located in Math unit.
git-svn-id: trunk@27499 -
2014-04-07 09:04:13 +00:00
sergei
d1348d3f9b - i386 and x86_64: Once softfloat stuff has been cleaned up, SysResetFPU and SysInitFPU end up doing exactly the same. Removed one of them.
git-svn-id: trunk@27280 -
2014-03-25 10:52:07 +00:00
sergei
a882e89bc2 * x86_64: SetExceptionMask and SetRoundingMode must return the old value of mask/mode respectively, not the new one.
git-svn-id: trunk@27225 -
2014-03-21 18:08:11 +00:00
florian
1f6c43810d * fix wrong suffix
git-svn-id: trunk@27211 -
2014-03-20 20:12:46 +00:00
florian
5d57f38619 + functions for FMA and AVX2 detection
git-svn-id: trunk@27202 -
2014-03-20 15:47:51 +00:00
sergei
4952754184 - i386 and x86_64 no longer use any softfloat stuff.
git-svn-id: trunk@27182 -
2014-03-19 12:14:44 +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
sergei
fb02283927 * x86_64: Adjust result of fpc_longjmp without using branches.
git-svn-id: trunk@26415 -
2014-01-10 07:29:28 +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
sergei
5ea99c84fd * x86_64 non-Win64 targets: calculate tan() and cotan() using x87 "fptan" instruction.
git-svn-id: trunk@25996 -
2013-11-09 11:31:27 +00:00
sergei
2b1e5f7014 * Mantis #17273: don't generate x87 instructions on win64 target.
git-svn-id: trunk@25995 -
2013-11-08 13:31:07 +00:00
sergei
90d66595c2 * typecheck_real_to_currency: generate inline round() node instead of direct call to fpc_round_real, this allows target-specific processing to take place and possibly emit more efficient code.
* Provide x86_64 SSE versions of fpc_trunc_real and fpc_round_real, strictly they are not necessary after the above change to code generation, but it still reduces size of system unit by avoiding compilation of related generic code.

git-svn-id: trunk@25735 -
2013-10-10 12:46:51 +00:00
sergei
5039ddc4a7 * Changed definition of XMM register save area from array to record, removes compilation warnings about reference size mismatch. The cause of warnings is rautils.getrecordoffsetsize function which, for array types, returns size of element and not size of array itself.
git-svn-id: trunk@25425 -
2013-09-05 12:39:16 +00:00
sergei
690995fa12 * RTL: fixed some warnings when compiling for x86_64:
* x86_64/x86_64.inc: IsMultithread is a LongBool, not Boolean -> fixed assembler instruction suffixes
  * inc/generic.inc: cast Sizeof() to unsigned, so that combining it with unsigned operands does not cause promotion to larger signed type.
  + win64/seh64.inc: explicit typecast and missing function result assignment.
  + inc/genmath.inc: explicit typecasts.

git-svn-id: trunk@25384 -
2013-08-29 07:52:38 +00:00
sergei
db045c4871 * Define FPC_ABSMASK_SINGLE and FPC_ABSMASK_DOUBLE without using assembler.
git-svn-id: trunk@25371 -
2013-08-26 07:32:41 +00:00
pierre
4cfc693a63 * Fix win64 math unit compilation
git-svn-id: trunk@24327 -
2013-04-26 09:37:48 +00:00
pierre
c26ef20f30 Use OLDBINUTILS conditional to disable assembler code unsupported by older GNU assmebler for x86_64.inc as in cpu.pp to allow use for openbsd for instance
git-svn-id: trunk@23355 -
2013-01-10 16:19:07 +00:00