Commit Graph

141 Commits

Author SHA1 Message Date
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
florian
a523d81b87 * fix sincos also for x86-64-linux
git-svn-id: trunk@22926 -
2012-11-04 18:02:20 +00:00
florian
a9fed57090 * fix sincos for x86-64 windows resolves #23268
* changed to intel assembler to be more readble
* test for sincos extended

git-svn-id: trunk@22925 -
2012-11-04 16:27:29 +00:00
Jonas Maebe
2f2f394bee * fixed wrong opcode size
git-svn-id: trunk@22855 -
2012-10-27 08:12:31 +00:00
sergei
21f5b5559c * Rewrote x86_64 implementations of setjmp and longjmp.
+ Win64 variant now saves/restores nonvolatile xmm registers and fpu/xmm control words, as required by ABI.

git-svn-id: trunk@22780 -
2012-10-19 19:39:12 +00:00
florian
c57f463ede + AVXSupport function to detect if the CPU and OS support AVX
git-svn-id: trunk@22641 -
2012-10-14 14:04:27 +00:00
Jonas Maebe
da32d99b7e * declare Sptr() and get_frame() as "nostackframe"
git-svn-id: trunk@22235 -
2012-08-24 18:49:33 +00:00
florian
7201bd8526 + sincos implemenation for x86-64
git-svn-id: trunk@22142 -
2012-08-19 22:36:59 +00:00
sergei
1112041ff1 * get_pc_addr on x86_64 needs nostackframe attribute to return the correct value.
git-svn-id: trunk@21853 -
2012-07-10 16:54:42 +00:00
pierre
f340ef87e3 * get_addr function renamed to get_pc_addr
+ get_caller_stackinfo procedure added.

git-svn-id: trunk@21707 -
2012-06-25 22:17:49 +00:00
pierre
8469741700 + Added additional addr pointer parameter to
get_caller_frame, get_caller_addr and dump_stack
  with default NIL value to systemh.inc.
  + Added new get_addr function.
  system.inc: Use get_addr and get_frame to call
  HandleErrorAddrFrame instead of HandleErrorFrame
  in several error functions.
  Modify dump_stack to use frame and addr parameters.
  Provide a dummy get_addr function returning nil.
  i386/i386.inc, x86_64./x86_64.inc: Provide real
  implementation of get_addr function.

git-svn-id: trunk@21697 -
2012-06-24 21:22:09 +00:00
florian
ceb1becfa1 * align cmp byte loop
git-svn-id: trunk@20877 -
2012-04-14 20:09:51 +00:00
florian
59040465d8 + simple assembler implementation of CompareByte
* adapted copyright

git-svn-id: trunk@20861 -
2012-04-13 22:08:50 +00:00
sergei
724227c962 * Cleaned out code marked as originated from glibc:
- strlen.inc: removed, was never actually used anywhere.
  - StrCopy: removed, its generic version is optimized well enough now.
  * StrComp: rewritten, speed somewhat improved.

git-svn-id: trunk@20349 -
2012-02-14 16:09:45 +00:00
sergei
9b2614684e * Return values of get_caller_addr and get_caller_frame was undefined for nil argument.
Moreover, these function have nothing to do with assembler at all.

git-svn-id: trunk@19502 -
2011-10-16 13:18:21 +00:00
sergei
ea571ba1a3 * Use variables instead of direct indexing into stack, eliminates warnings at compilation.
git-svn-id: trunk@19478 -
2011-10-13 08:19:09 +00:00
sergei
369725f2c4 * Get8087CW: Make sure that high bits of result are clear.
git-svn-id: trunk@19465 -
2011-10-11 10:34:52 +00:00
sergei
4a3c7f7ef4 * Get8087CW: use fixed stack.
* Set8087CW: updated to i386 version, eliminates need of PIC code in assembler.
* GetSSECSR: updated similar to Get8087CW, it is somewhat shorter that way.

git-svn-id: trunk@19463 -
2011-10-11 09:08:09 +00:00
sergei
c73b6cfbd4 - removed register lists after pure assembler procedures
- removed {$ifdef FPC_HAS_RIP_RELATIVE}, it is obsolete because rip-releative referencing is supported in at least two releases by now.
+ added nostackframe to simple assembler procedures
* Inclocked, Declocked: do not duplicate entire procedures, Win64 and Linux versions differ in a single instruction.

git-svn-id: trunk@19162 -
2011-09-20 17:57:58 +00:00
florian
88c2c77319 + is_sse3_cpu, put into cpu unit, so x86-64 and i386 can share source code
git-svn-id: trunk@18785 -
2011-08-20 12:01:48 +00:00
sergei
576250bc5b * Reverted r17343, and IFDEF'ed out the newer assembler procedures for FreeBSD for now. They require fixes to assembler writer, and after it's done they still have to be disabled during bootstrapping.
git-svn-id: trunk@17347 -
2011-04-19 15:28:53 +00:00
sergei
0666ab09ae * Changed 'movnti' to 'movntiq', the former is rejected by FreeBSD GAS.
git-svn-id: trunk@17343 -
2011-04-19 09:02:56 +00:00
sergei
dd950d3ceb * Fixed bug #19188 again, this time with *correct* value of the AND mask.
* Additionally, fixed result size for unaligned branch of IndexWord and removed the last 'ret' instruction.

git-svn-id: trunk@17340 -
2011-04-18 18:03:18 +00:00
sergei
e1616fd8ef * Replaced 'movzbl %r8b, %r8' because it is rejected by GAS (suffix does not match the operand size). The correct instruction is 'movzbq %r8b, %r8' but that one is rejected by FPC reader instead. Provides a fix for broken builds of targets using external assembler (Mantis #19188).
git-svn-id: trunk@17339 -
2011-04-18 13:31:07 +00:00
sergei
30f7bff09d * Did a clean rewrite of IndexByte and IndexWord, resulting in somewhat less instructions.
+ IndexWord for the case of unaligned buffer: implemented using aligned reads.
+ tindex.pp: Added testing correctness of IndexWord with unlimited length.

git-svn-id: trunk@17317 -
2011-04-14 17:12:04 +00:00
sergei
c5e7902e4b + x86_64 optimized assembler functions IndexByte and IndexWord
+ Extended tests of IndexByte with checks to verify correct operation when passed length is -1.

git-svn-id: trunk@17281 -
2011-04-10 17:05:18 +00:00
florian
9279c6955e * support for SSSE3, SSE4,1, SSE4.2, AES instructions set by Emelyanov Roman, resolves #18527
+ test for aes support

git-svn-id: trunk@17256 -
2011-04-05 20:22:57 +00:00
Jonas Maebe
da16630c50 * fixed compilation on FPC_USE_LIBC platforms after r17249 (they already
define a version of move() that calls libc.memmove())

git-svn-id: trunk@17250 -
2011-04-05 13:40:45 +00:00
sergei
6e09d76b07 + x86_64 assembler implementations of Move and FillChar. Does not use SIMD, so probably not the fastest for large move sizes, but for small to medium sizes it should be competitive.
* Extended the related test with checks for medium and large move sizes, to improve coverage for different code paths that are used depending on size.

git-svn-id: trunk@17249 -
2011-04-05 09:53:54 +00:00
sergei
7fc2d86bb2 + InterlockedCompareExchange128, Linux implementation.
git-svn-id: trunk@17140 -
2011-03-16 06:28:47 +00:00