Commit Graph

69 Commits

Author SHA1 Message Date
florian
91382b5deb * manually merged parts of r42260 to enable further merges
git-svn-id: branches/fixes_3_2@47905 -
2020-12-30 13:53:10 +00:00
svenbarth
432fcd52bc Merged revision(s) 45409, 46897-46898, 47007, 47011, 47065, 47084 from trunk:
* fix for Mantis #37042: apply patch and test (adjusted for Big Endian) by Bi0T1N to add support for TBitConverter
........
* avoid range check error when using SwapEndian with 16-bit constants
+ added test
........
* readd SmallInt typecasts to SmallInt overload of SwapEndian
........
* when removing a method from the synchronization queue using TThread.RemoveQueuedEvent then both the Code and the Data need to match (Delphi does the same)
+ added test
........
* simplify TThread.RemoveQueuedEvent - decide what to delete and not what to leave (better corresponds with the docs)
........
+ add ability to specify a SQLite VFS when opening a SQLite database
........
* fix test: TThread.WaitFor calls CheckSynchronize as well, so the thread needs to signal when it's done with removing entries from the queue
........

git-svn-id: branches/fixes_3_2@47782 -
2020-12-15 22:31:59 +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
marco
bc39eb29d3 * comment spelling fix (modifed->modified)
git-svn-id: trunk@35119 -
2016-12-13 12:50:38 +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
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
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
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
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
Jonas Maebe
da32d99b7e * declare Sptr() and get_frame() as "nostackframe"
git-svn-id: trunk@22235 -
2012-08-24 18:49:33 +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
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
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
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
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
Jonas Maebe
c14574bb56 * don't change the fpu control word in the initialisation code of dynamic
libraries (mantis #16263, #16801)

git-svn-id: trunk@16347 -
2010-11-14 16:00:25 +00:00
pierre
05c1097395 * simplify SysInitFPU assmebler using local variables
git-svn-id: trunk@14390 -
2009-12-10 13:11:40 +00:00
florian
3ce72907c2 + implementation of WriteBarrier
git-svn-id: trunk@13554 -
2009-08-18 16:31:18 +00:00
florian
f17943371c * assembler implementation of SwapEndian on x86-64, resolves #14203
git-svn-id: trunk@13455 -
2009-07-26 14:01:32 +00:00
yury
bba2b87064 * Use RIP relative symbol addressing in assembler blocks. Finally bug #13657 is fixed.
git-svn-id: trunk@13137 -
2009-05-13 10:45:54 +00:00
florian
50b63884cb + applied a fix similar to 11820 to x86-64
git-svn-id: trunk@11821 -
2008-09-25 19:31:16 +00:00
florian
7da7364ee7 * refactored SysResetFPU into SysInitFPU and SysResetFPU
git-svn-id: trunk@8966 -
2007-10-28 12:06:49 +00:00
peter
2e47433989 * fix typo
git-svn-id: trunk@8241 -
2007-08-08 06:00:18 +00:00
micha
d95b9082bb * add memory barrier prototypes + implementation for i386 and sparc + use lwsync for powerpc64
git-svn-id: trunk@8240 -
2007-08-07 20:37:08 +00:00
florian
605e82489a * reset fpu on win64 as well, certain operations like ln use it
git-svn-id: trunk@6920 -
2007-03-18 20:25:58 +00:00
florian
87bc8a4471 * fixed InterlockedCompareExchange(64) of x86_64.inc for win64 too
git-svn-id: trunk@6798 -
2007-03-11 22:28:08 +00:00
ivost
f1e218ffe0 * fixed InterlockedCompareExchange(64) of x86_64.inc (I dont know if win64 version is wrong also!)
git-svn-id: trunk@6751 -
2007-03-08 22:27:34 +00:00
florian
b3a1868ff0 * correct masking of exceptions in genmath code
git-svn-id: trunk@5965 -
2007-01-14 10:44:10 +00:00
Jonas Maebe
5acc8b44a8 * activated internal get_frame for x86
* turn off stackframe optimizations on x86 if get_frame is called
    in the current routine, or if the address of a nested function
    is taken in the current routine
  + test for the above
  * this fixes the IDE when compiled with stackframe optimizations
    on x86

git-svn-id: trunk@5146 -
2006-11-01 12:48:53 +00:00
florian
0ade2e487d * cleaned up and fixed (from mftq75) sse unit initialization, fixes #7268
git-svn-id: trunk@4501 -
2006-08-24 20:00:06 +00:00
peter
4c065bce45 * move InterLocked functions to system unit
git-svn-id: trunk@3933 -
2006-06-25 09:26:23 +00:00
daniel
ebec34c224 * Add {$IFNDEF INTERNAL_BACKTRACE}
git-svn-id: trunk@3525 -
2006-05-14 13:12:23 +00:00
florian
398cb8e0fe * fixed calling conventions for winx64
git-svn-id: trunk@3230 -
2006-04-16 14:32:35 +00:00
florian
bffd9f2cc7 * killed legacy x87 code for Win64
git-svn-id: trunk@288 -
2005-06-08 19:12:23 +00:00
florian
ad3b9b9464 * windows rtl restructuring to share code between win32 and win64
* BeginThread can take a qword on 64 bit targets as stacksize

git-svn-id: trunk@287 -
2005-06-08 19:08:49 +00:00
peter
4ace790492 * remove $Log
git-svn-id: trunk@231 -
2005-06-07 09:47:55 +00:00
fpc
790a4fe2d3 * log and id tags removed
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
fpc
50778076c3 initial import
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00
florian
58202bd7d5 * some ifdef'ed pic code 2005-04-25 09:40:27 +00:00