Commit Graph

41792 Commits

Author SHA1 Message Date
sergei
e6a9bfdc1d * SPARC, g_concatcopy and g_concatcopy_unaligned: removed strange (probably long outdated) comments and unnecessary operations.
* g_concatcopy: avoid taking address of references if possible.

git-svn-id: trunk@26281 -
2013-12-25 10:45:25 +00:00
sergei
c3c682fe3f * Changed test so it provides different exit codes depending on the failed assertion.
git-svn-id: trunk@26280 -
2013-12-25 10:33:16 +00:00
sergei
03fb83cc01 * SPARC: fixed PIC interface wrappers for non-virtual methods. The fix uses branching with 8 MB distance limit, but in particular case of interface wrappers this limit applies to code size of a single unit, not to entire program, and is therefore hard enough to reach.
git-svn-id: trunk@26279 -
2013-12-25 08:13:10 +00:00
nickysn
420f30bacd * fixed the handling of OS_PAIR/OS_SPAIR-sized parameters in ncgutil.gen_load_cgpara_loc. This fixes 32-bit regvar'd parameters on i8086.
git-svn-id: trunk@26278 -
2013-12-24 23:07:44 +00:00
yury
eea69a2947 * ppudump: Fixed json and xml output of inline types in array declaration.
git-svn-id: trunk@26277 -
2013-12-24 12:32:55 +00:00
nickysn
af49e50a3c * do not cause an internal error when location_reg2string is called on a
location where the registers have been translated (i.e. not imaginary), but
  GetNextReg is necessary to get some of the registers (only on 16/8-bit CPUs).
  The missing registers are indicated as '??'. This avoids a crash when
  compiling a system unit on i8086 with regvars enabled and withous -sr, while
  still giving the full list of registers when compiling with -sr.

git-svn-id: trunk@26276 -
2013-12-24 00:01:28 +00:00
nickysn
338d72f564 * extracted the code from psub.translate_registers for generating the name of
the registers from a tlocation to a new function called location_reg2string
+ added support for 16-bit and 8-bit ALUs in location_reg2string

git-svn-id: trunk@26275 -
2013-12-23 22:58:32 +00:00
yury
996ee048be * ppudump: Properly handle type definitions inside a class definition for json and xml output.
git-svn-id: trunk@26273 -
2013-12-23 14:45:03 +00:00
nickysn
99770d367f * 16-bit and 8-bit ALU fixes in tcgtempdeletenode.pass_generate_code
git-svn-id: trunk@26272 -
2013-12-23 14:09:28 +00:00
nickysn
39c54bf077 * handle ait_varloc in the nasm writer. This allows compiling the system unit
for i8086 with regvars and -sr for debugging purposes.

git-svn-id: trunk@26271 -
2013-12-23 13:27:22 +00:00
yury
bc14407ffe * ppudump: Deref index -1 is valid for absolute symbols. Handle this.
git-svn-id: trunk@26270 -
2013-12-23 12:26:28 +00:00
yury
90b8e051cb * Fixed crash during dll loading on android-i386 (Stupid error because I am not comfortable with at&t i386 assembler syntax). Issue #25435.
git-svn-id: trunk@26269 -
2013-12-23 12:02:50 +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
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