Commit Graph

41729 Commits

Author SHA1 Message Date
nickysn
90b69184f1 * use a {$if defined()} sequence, instead of nested ifdefs for selecting the
float type in unit math

git-svn-id: trunk@26265 -
2013-12-22 19:18:15 +00:00
sergei
65d24e000f * SPARC: generate PIC prologue as recommended by ABI, it does not require FPC_GETGOT helper.
git-svn-id: trunk@26264 -
2013-12-22 14:20:18 +00:00
sergei
6469d41e2a * SPARC: removed 32 bit shift code, and adjusted 64-bit shifts to take advantage of 3-address instructions (a port of r26142 for MIPS)
git-svn-id: trunk@26263 -
2013-12-22 14:09:24 +00:00
sergei
58cc531dd9 * SPARC: convert from int64/qword to float using genmath helpers. Removes dependency on softfloat code.
git-svn-id: trunk@26262 -
2013-12-22 14:02:34 +00:00
sergei
5ccdfcf106 * SPARC: optimized a_op_const_reg and a_op_const_reg_reg, take advantage of optimize_op_const functionality.
git-svn-id: trunk@26261 -
2013-12-22 13:54:49 +00:00
sergei
16156cbcd7 - SPARC RTL: removed assembler PIC/threadvar hacks.
git-svn-id: trunk@26260 -
2013-12-22 13:42:53 +00:00
sergei
9a486d73ba + SPARC: support FNEGd/FNEGq internal instructions, and use them to implement floating-point negation more efficiently.
git-svn-id: trunk@26259 -
2013-12-21 16:27:24 +00:00
sergei
8ecad469a6 * Reverted r26256 since it produced wrong results if argument of inc/dec is actually unaligned. Added description of the issue and slightly increased node complexity at which address is cached, so operations on record/class fields do not take address.
git-svn-id: trunk@26258 -
2013-12-21 10:33:38 +00:00
sergei
c3fe0c7379 * On SPARC, using shifts for zero-extending to OS_16 is more efficient than ANDing with 65535 (two instructions and no temp registers vs. three instructions and a temp register).
git-svn-id: trunk@26257 -
2013-12-20 19:00:44 +00:00
sergei
b376f56bf3 * Use typed pointer to store address of x when processing inc(x)/dec(x) with range checking enabled. This preserves alignment of x and prevents generating unaligned code on alignment-sensitive targets.
git-svn-id: trunk@26256 -
2013-12-20 17:13:41 +00:00
sergei
5cd0684d45 * tcg.a_load_ref_reg_unaligned: if loading signed 16-bit value, treat upper half as signed 8-bit to ensure that result is properly extended. This routine is used only by SPARC target (other CPUs use specific implementations), and it generates pretty inefficient code, therefore it's probably worth to drop it altogether and implement SPARC-specific version. Mantis #25440.
git-svn-id: trunk@26255 -
2013-12-20 17:07:00 +00:00
reiniero
48e4fc4bb2 * fcl-db: dbf,bufdataset (and descendents): allow filter using double delimiters inside string. Fixes issue #25432
allow escaping delimiters by doubling them e.g.
  Filter:='(NAME=''O''''Malley''''s "Magic" Hammer'')';
  which gives
  (NAME='O''Malley''s "Magic" Hammer')
  which will match record
  O'Malley's "Magic" Hammer

git-svn-id: trunk@26253 -
2013-12-19 16:42:57 +00:00
reiniero
4229c6b40f * fcl-db: additional stringfilter tests
git-svn-id: trunk@26252 -
2013-12-19 16:40:08 +00:00
sergei
f2096de53a * tcg386.g_proc_exit: instead of recalculating stack size, use current_procinfo.final_localsize which was calculated in g_proc_entry.
* tcgx86.g_proc_entry: don't over-allocate stack in SEH finalizer procedures.

git-svn-id: trunk@26251 -
2013-12-19 10:32:32 +00:00
sergei
258e8c58a4 + Added trecorddef.buildderefimpl, necessary since advanced records have been implemented. Fixes compiler crash on webtbs/tw18688.pp on x86_64-win64.
git-svn-id: trunk@26250 -
2013-12-18 16:26:50 +00:00
reiniero
f27d3baccc * fcl-db: test filter using double delimiters inside string to test syntax as presented in issue #25432
allow escaping delimiters by doubling them e.g.
  Filter:='(NAME=''O''''Malley''''s "Magic" Hammer'')';
  which gives
  (NAME='O''Malley''s "Magic" Hammer')
  which will match
  O'Malley's "Magic" Hammer

git-svn-id: trunk@26249 -
2013-12-17 15:08:12 +00:00
reiniero
8c6fb52940 * fcl-db: cosmetic
git-svn-id: trunk@26248 -
2013-12-17 15:05:59 +00:00
reiniero
e2d37b5561 * fcl-db: examples: dbftool: insert field data with ' useful for testing filters etc
git-svn-id: trunk@26247 -
2013-12-17 09:19:41 +00:00
reiniero
50a349eb1c * fcl-db: examples: slight fixes dbftool
git-svn-id: trunk@26246 -
2013-12-17 09:14:44 +00:00
nickysn
be5f49b3e5 * tx86addnode.second_cmpfloat: on i8086 only load the high byte of the FPU
status word after fstsw (and before sahf), because 8-bit memory transfers are
  faster on the i8088, due to the 8-bit data bus

git-svn-id: trunk@26245 -
2013-12-16 23:52:28 +00:00
nickysn
ada9ccf6a6 * tx86addnode.second_cmpfloat: do not emit a fwait after fstsw as my own testing
on a true i8087 showed that the fwait isn't necessary

git-svn-id: trunk@26244 -
2013-12-16 23:17:44 +00:00
nickysn
f23c521c50 - disabled the i8086 math.arctan2 asm code, because it doesn't work on the 8087/80287
git-svn-id: trunk@26243 -
2013-12-16 23:05:16 +00:00
nickysn
2a0a8cfc00 * fixed CGA 320x200 hline bug when CurrentColor=1
git-svn-id: trunk@26242 -
2013-12-16 22:35:32 +00:00
sergei
b82b6da493 + Win32 SEH: to avoid memory leaks, it is necessary to free exception object for non-FPC exceptions on re-raise (it will be re-created by next exception handler).
git-svn-id: trunk@26241 -
2013-12-16 14:47:26 +00:00
reiniero
ee152cde6a * fcl-db TMemDataSet show Filter property is unimplemented; mantis issue #22051
git-svn-id: trunk@26240 -
2013-12-16 13:26:47 +00:00
sergei
695f271b8c + Win32 SEH: actually install the exception handler around main procedure (write to fs:(0) was missing).
git-svn-id: trunk@26239 -
2013-12-16 13:25:44 +00:00
sergei
74f9d719f1 * i386-win32 setjmp and longjmp: if SEH support is enabled, save/restore head of exception registration chain. Without this, a longjmp out of a function with exception frame(s) will leave these exception frames below ESP, which will fail integrity checks in OS and cause process termination if an exception occurs later on (or they may be overwritten by subsequent operations on stack and, again, cause undesired results).
* Additionally, use a branchless sequence to fix up result of longjmp.

git-svn-id: trunk@26238 -
2013-12-16 10:12:36 +00:00
nickysn
779b92459e * fixed ldexp() on 16/8-bit CPUs. Among other things, this fixes sin() and cos()
on the i8086.

git-svn-id: trunk@26237 -
2013-12-15 23:08:23 +00:00
reiniero
a3dab9b686 * fcl-db: cosmetic
git-svn-id: trunk@26236 -
2013-12-15 12:22:03 +00:00
reiniero
586bca0c7d * fcl-db TMemDataset.CopyFromDataset: return to original record position. Fixes issue #25426
git-svn-id: trunk@26235 -
2013-12-15 04:07:55 +00:00
reiniero
fe8a6f7399 * fcl-db tests: TMemDataset.CopyFromDataset: test record position has not moved for bug #25426
git-svn-id: trunk@26234 -
2013-12-15 04:06:55 +00:00
reiniero
9f5d46a008 * fcl-db memds: CopyFromDataset from first record regardless of current position. Fixes issue #25426
git-svn-id: trunk@26233 -
2013-12-15 03:47:55 +00:00
reiniero
ec5d09b16d * fcl-db tests: memds.CopyFromDataset test when record is not the first record
git-svn-id: trunk@26232 -
2013-12-15 03:28:37 +00:00
florian
2a992bf53c * patch by Sandro Cumerlato to install auxiliary ide files properly
git-svn-id: trunk@26231 -
2013-12-14 21:21:05 +00:00
marco
10ff8bf74e * cleaned out some ver2_2_0 defines.
git-svn-id: trunk@26230 -
2013-12-14 09:18:38 +00:00
sergei
6ea9ce1077 * Force managed types to be always returned in parameters, independent of target (primitive types were already handled that way; the patch affects small records with fields of managed types).
* Generating code to finalize result on exception at callee side is no longer necessary.

git-svn-id: trunk@26228 -
2013-12-13 19:54:46 +00:00
nickysn
c88be4550d * optimization in the 8087/80287 version of fpc_arctan_real(): when calculating
arctan([-]1/d), use fxch to swap the two arguments, instead of using fdivr,
  since fpatan can do the division for free

git-svn-id: trunk@26227 -
2013-12-13 01:24:01 +00:00
nickysn
a7b4953795 + proper (i.e. not broken) implementation of arctan() for the 8087 and 80287
git-svn-id: trunk@26226 -
2013-12-12 23:46:51 +00:00
sergei
179586f589 + SEH support for Win32. Enable by cycling with OPT=-dTEST_WIN32_SEH.
Although basic things work (no regressions in test suite, also with TEST_OPT=-O2), there are some secondary issues/TODOs:
- Exception frame around PASCALMAIN is not properly removed in DLLs
- No stack traces yet
- Stack overallocated in finalizer procedures, their entry/exit code needs cleanup
- Signals unit is probably completely broken.

git-svn-id: trunk@26225 -
2013-12-12 12:43:46 +00:00
marco
b2e85d2c56 * pthread_attr_destroy fixes for the rest of *nix.
git-svn-id: trunk@26224 -
2013-12-12 11:38:39 +00:00
marco
018be5c22c * add pthread_attr_destroy, due to Vincent's follow up to mantis #25416
git-svn-id: trunk@26223 -
2013-12-12 10:13:41 +00:00
sergei
1ee9373fa6 * Changed function create_pd into method of ttryfinallynode, so it can be reused for Win32 SEH and, in the future, for DWARF-based exception handling on other targets.
* Additional two minor changes: reset po_delphi_nested_cc on result, so it is independent of current {$modeswitch nestedprocvar} state, and removed call to alloc_proc_symbol (which belongs to pass 2).

git-svn-id: trunk@26222 -
2013-12-12 08:38:06 +00:00
lacak
9b4735032b fcl-db: mysql: remove obsolete mysql4conn unit replaced by mysql40conn and mysql41conn
git-svn-id: trunk@26221 -
2013-12-12 06:41:58 +00:00
marco
996e802606 * fix memleak pthread_attr, Mantis #25416 by Henry Vermaak.
git-svn-id: trunk@26220 -
2013-12-11 21:47:02 +00:00
marco
7fc33865be * build mysql 5.6, after Reinier said it wasn't built.
git-svn-id: trunk@26219 -
2013-12-11 21:23:15 +00:00
pierre
a0747f4d5d Also update TESTCONFIG and TESTRUNHISTORY tables
git-svn-id: trunk@26218 -
2013-12-11 12:33:45 +00:00
pierre
218adfe6c3 * Allow compilation for windows OS.
* soHost -> coHost to be consistent with other TConfigOpt values.
  * ConfigOpts rewritten to have corresponding coXXX constants in comments
  + Add support for long options
  * Go past first >>>> line in longlog file to avoid warning

git-svn-id: trunk@26217 -
2013-12-11 12:27:17 +00:00
pierre
360f53b742 Add -ll option to use longlog file
git-svn-id: trunk@26216 -
2013-12-11 12:21:10 +00:00
sergei
ffba5aee60 * MIPS: emit PIC-friendly instruction sequences instead of "J" when fixing up branches outside of 128K range. Resolves #25399.
git-svn-id: trunk@26215 -
2013-12-11 10:56:07 +00:00
nickysn
a68b9fd01f * use byte sized instead of word sized memory operations on the fpu control
word in fpc_frac_real, fpc_int_real and fpc_trunc_real, because the byte sized
  ones are faster on the i8088, due to the 8-bit bus

git-svn-id: trunk@26214 -
2013-12-10 21:16:35 +00:00