Commit Graph

2289 Commits

Author SHA1 Message Date
florian
81b2cf5d65 * slightly modified patch by J. Gareth Moreton: Optimization for 'mod' on i386/x86-64, resolves #32945
git-svn-id: trunk@37922 -
2018-01-06 14:58:28 +00:00
Jonas Maebe
320a699967 * fixed storing the symbols of the global macro symbol table in the ppu in
macpas mode after r32153
   o adjusted test so it checks this

git-svn-id: trunk@37912 -
2018-01-04 20:51:39 +00:00
svenbarth
916ff0b92c + extend Concat() with support for dynamic arrays
+ added test

git-svn-id: trunk@37723 -
2017-12-12 19:54:08 +00:00
nickysn
b571f48735 * fixed the return type of FarAddr(), so that it is assignment compatible to
typed far pointers as well

git-svn-id: trunk@37629 -
2017-11-27 19:42:36 +00:00
nickysn
78e0f6c68b + added an i8086-specific FarAddr() function, similar to Addr(), but always
returns a far pointer, regardless of the current memory model

git-svn-id: trunk@37628 -
2017-11-27 16:41:48 +00:00
nickysn
51489f9186 + added test for the StrUpper() and StrLower() functions in the strings unit
git-svn-id: trunk@37617 -
2017-11-24 15:59:20 +00:00
nickysn
c464f7fa56 * fixed the SEG inline asm directive when used with 32-bit registers on the i8086 target
git-svn-id: trunk@37613 -
2017-11-22 15:04:30 +00:00
florian
0f637434a3 * disable test on avr
git-svn-id: trunk@37609 -
2017-11-19 18:05:22 +00:00
florian
3352311124 * disable test on avr as it works only with table driven init/final code
git-svn-id: trunk@37605 -
2017-11-19 18:05:16 +00:00
nickysn
ae92973196 + added support for the retw, retnw, retfw, retd, retnd, retfd, retq, retnq and
retfq x86 instructions. These are variants of the ret instruction with the
  return offset size set explicitly, e.g. retfw is a 16-bit far ret (i.e. pops
  a 16-bit offset and a 16-bit segment), retfd is a 32-bit far ret (pops a
  32-bit offset, followed by a 16-bit segment), etc.

git-svn-id: trunk@37571 -
2017-11-10 16:53:29 +00:00
nickysn
3cbe377f40 + added 2 tests for absolute var access to a 2-dimensional array from within inline asm
git-svn-id: trunk@37562 -
2017-11-06 16:47:07 +00:00
nickysn
20f905db6c + added i8086-only tag to test tasmabs3.pp
git-svn-id: trunk@37561 -
2017-11-06 16:43:13 +00:00
nickysn
24d447716e * fixed support for access from inline asm to absolute vars, pointing to an
array element (previously, it would always point to the start of the array)

git-svn-id: trunk@37558 -
2017-11-06 16:06:34 +00:00
nickysn
d570c09b9d + added test, which tests public labels as well as 'external far' variables on i8086
git-svn-id: trunk@37533 -
2017-10-30 18:08:39 +00:00
nickysn
be3ff9128a + added an i8086 test for the public directive
git-svn-id: trunk@37531 -
2017-10-30 17:02:48 +00:00
nickysn
29558a74cd + support exporting labels from asm blocks in intel syntax asm blocks via the
'public' directive

git-svn-id: trunk@37530 -
2017-10-30 16:44:13 +00:00
nickysn
d318ab086a * when handling absolute vars from within intel inline assembly, take the
absolute var size into account (not the type of the var it points to or no
  size at all, if it points to a fixed address)

git-svn-id: trunk@37525 -
2017-10-26 15:58:48 +00:00
nickysn
8a0d8f025b * fixed another i8086 inline asm 32-bit constant bug (e.g. in 'or eax, 80000001h')
git-svn-id: trunk@37521 -
2017-10-25 19:38:37 +00:00
nickysn
07eab50afe + added a test for 32-bit inline asm const operand on i8086, using at&t syntax as well
git-svn-id: trunk@37520 -
2017-10-25 18:09:11 +00:00
nickysn
325e66287c * fix for inline asm of instructions with 32-bit constant operands on i8086
git-svn-id: trunk@37519 -
2017-10-25 18:03:22 +00:00
nickysn
e58bad8eef + check for the 'pop cs' instruction in the x86 inline assembler and print a
warning (on the i8086 target) or an error (on i386 and x86_64) when this
  instruction is used (because it only works on 8086 and 8088 CPUs)

git-svn-id: trunk@37514 -
2017-10-24 15:07:20 +00:00
nickysn
e8bbc4eef9 + support the xlat x86 instruction syntax with a memory operand. This allows
specifying the address size (e.g. xlat byte ptr [bx] or xlat byte ptr [ebx])

git-svn-id: trunk@37478 -
2017-10-17 16:40:06 +00:00
nickysn
4a8aec26bf * fixed test tasm12c.pp (uses asmmode intel, not att)
git-svn-id: trunk@37457 -
2017-10-14 11:32:54 +00:00
nickysn
dd9b5eb2aa + added the 'Cannot override ES' message in the at&t assembler reader as well
git-svn-id: trunk@37456 -
2017-10-14 00:48:46 +00:00
nickysn
27978de111 + extended tests with segment overrides in at&t asm mode
git-svn-id: trunk@37455 -
2017-10-13 15:43:47 +00:00
nickysn
1ee36b5b9b + added error message in the intel assembler reader, when an attempt is made to
override the ES segment in an x86 string instruction (because it cannot be
  overriden)

git-svn-id: trunk@37454 -
2017-10-13 14:56:38 +00:00
nickysn
0fb79946a5 + added support for the parameterized versions of the x86 string instructions
(movs, cmps, scas, lods, stos, ins, outs) in the inline asm of the i8086, i386
  and x86_64 targets. Both intel and at&t syntax is supported.
* NEC V20/V30 instruction 'ins' (available only on the i8086 target, because it
  is incompatible with 386+ instructions) renamed 'nec_ins', to avoid conflict
  with the 186+ 'ins' instruction.

git-svn-id: trunk@37446 -
2017-10-12 00:07:02 +00:00
nickysn
8ba4de3885 + test lea with non-native address sizes (16-bit on i386, 32-bit on x86_64)
git-svn-id: trunk@37410 -
2017-10-06 15:46:03 +00:00
svenbarth
90bd408de4 * fix for Mantis #32355: adjust the meaning of the typehelpers modeswitch for Delphi modes in that it enables the "type helper" syntax as it is in the non-Delphi modes; extending primitive types with record helpers is now always enabled in Delphi modes
+ added test

git-svn-id: trunk@37225 -
2017-09-15 21:09:21 +00:00
florian
01b950f39b + new test
git-svn-id: trunk@37170 -
2017-09-10 18:07:15 +00:00
svenbarth
5c97248f85 + also write the set's size to the RTTI as that simplifies handling in Invoke()
git-svn-id: trunk@37090 -
2017-08-31 19:23:12 +00:00
svenbarth
ec7a17d1e3 * extend test for interface helper by tests for "inherited"
git-svn-id: trunk@37061 -
2017-08-25 19:37:44 +00:00
svenbarth
6acba684d4 * class helpers: fix calling virtual methods of the extended type using inherited
git-svn-id: trunk@37060 -
2017-08-25 19:36:56 +00:00
svenbarth
239d0704ca + add support for type helpers to also extend interface types
git-svn-id: trunk@37023 -
2017-08-21 20:49:20 +00:00
svenbarth
50f3479f64 + add test for the DynArray* functions (currently only DynArraySize() and DynArrayIndex() are tested)
git-svn-id: trunk@36943 -
2017-08-20 15:16:16 +00:00
svenbarth
b478ae031a - remove %NORUN flag (remnant of copy pasting the test)
git-svn-id: trunk@36940 -
2017-08-18 15:32:28 +00:00
svenbarth
324e63b5d3 * a bit of language consolidation: "type helper" can now be used for records and classes as well
git-svn-id: trunk@36938 -
2017-08-18 15:29:19 +00:00
svenbarth
d8ce141e2c * fix program name
git-svn-id: trunk@36935 -
2017-08-18 14:13:59 +00:00
svenbarth
677c35c083 * better fix for detecting Comp's type
git-svn-id: trunk@36879 -
2017-08-12 09:00:06 +00:00
svenbarth
ff927eb11a * fix test due to WideString = UnicodeString and Comp = Extended on some platforms
git-svn-id: trunk@36878 -
2017-08-12 08:56:10 +00:00
svenbarth
0b02dab684 + new Delphi-compatible intrinsic GetTypeKind() which returns the TTypeKind of a type as a constant value (and thus can be optimized away in If- and Case-statements)
+ added test

git-svn-id: trunk@36875 -
2017-08-11 22:12:53 +00:00
florian
567dfef9a7 + object files for sparc64-linux to test linking with gcc
git-svn-id: trunk@36655 -
2017-07-06 18:02:20 +00:00
Károly Balogh
4001435454 fixed typo in previous commit
git-svn-id: trunk@36614 -
2017-06-29 01:21:35 +00:00
Károly Balogh
a12111e1bd m68k: define safecall_is_cdecl on m68k too in tcalvar6 and tcalst6
git-svn-id: trunk@36613 -
2017-06-29 00:33:55 +00:00
Károly Balogh
50332a97bc textthr test to be more verbose on error conditions
git-svn-id: trunk@36584 -
2017-06-23 06:03:26 +00:00
Károly Balogh
8a6c995b75 troundm: fixed 32bit rmNearest tests and wrong result values
git-svn-id: trunk@36522 -
2017-06-18 18:49:32 +00:00
marcus
d4d7778e86 + Linux/m68k test object files
git-svn-id: trunk@36502 -
2017-06-14 20:33:26 +00:00
florian
f25c9c0956 * hopefully proper fix for 8 and 16 bit CPUs
git-svn-id: trunk@36473 -
2017-06-09 21:05:52 +00:00
florian
0fe5541459 --- Reverse-merging r36464 through r36463 into 'trnd1.pp':
U    trnd1.pp
--- Recording mergeinfo for reverse merge of r36464 through r36463 into 'trnd1.pp':
 G   trnd1.pp
--- Eliding mergeinfo from 'trnd1.pp':
 U   trnd1.pp

git-svn-id: trunk@36472 -
2017-06-09 20:59:46 +00:00
pierre
605e6defc7 Fix compilation due to syntax error in previous commit
git-svn-id: trunk@36464 -
2017-06-09 12:17:04 +00:00
pierre
8c370a4e6f Avoid Data element too large error for I8086 CPU
git-svn-id: trunk@36463 -
2017-06-09 06:11:54 +00:00
michael
f406d7cbef * Fix bug #31947: upgrade natve unicode implementation to version 9 and CLDR 30 (Patch from Inoussa)
git-svn-id: trunk@36407 -
2017-06-03 16:10:39 +00:00
pierre
eec40b3ed0 Fix test for go32v2, by adding explicit loading of cpall unit
git-svn-id: trunk@36353 -
2017-05-28 05:28:20 +00:00
svenbarth
72c595eefe + implement support for Insert() for dynamic arrays; the parameter that is inserted can be a dynamic or static array of the same type, an array constructor or a single element of the arrays type; all that is determined based on the second type
+ added test

git-svn-id: trunk@36307 -
2017-05-23 19:11:49 +00:00
Jonas Maebe
744facb7fc * properly support accepting register parameters of assembler routines in
the intel assembler reader: no longer parse them as register tokens,
    but as local operands that are later converted into registers. This
    ensures in particular that the type of the operand is set, which is
    necessary in case this operand later subscripted (as in tasm10a)

git-svn-id: trunk@36288 -
2017-05-21 20:17:15 +00:00
svenbarth
d073e07244 + add a test to ensure that array constructors correctly handle managed types (though there might be a temp floating around for longer than one might expect)
git-svn-id: trunk@36243 -
2017-05-18 20:04:29 +00:00
svenbarth
5971e1327e * fix for Mantis #31756: have array constructors prefer open array parameters instead of dynamic array parameters for backwards compatibility
+ added test

git-svn-id: trunk@36175 -
2017-05-10 21:01:23 +00:00
svenbarth
c552b2957a * implement support for 4 Byte UTF-8 codepoints that result in a surrogate pair for UTF-16
git-svn-id: trunk@36116 -
2017-05-05 14:03:57 +00:00
svenbarth
52ddce608f + add test for enumerating a set without ranges
git-svn-id: trunk@36105 -
2017-05-04 22:00:29 +00:00
svenbarth
c349151504 + add test for array constructors
git-svn-id: trunk@36104 -
2017-05-04 21:59:49 +00:00
nickysn
5393daa994 + added compile time const evaluation for Bsf/Bsr(const) as well
git-svn-id: trunk@35941 -
2017-04-24 20:35:08 +00:00
nickysn
32395bbcbb + added compile time const evaluation optimization for PopCnt(const)
git-svn-id: trunk@35937 -
2017-04-24 16:11:43 +00:00
nickysn
256dc546ac + implemented the in_neg_assign_x and in_not_assign_x inline nodes, which will
be used (TBD in a future commit) for optimizing x:=-x and x:=not x on CPUs
  that support performing these operations directly in memory (such as x86)

git-svn-id: trunk@35749 -
2017-04-07 16:02:40 +00:00
nickysn
f19ebe2acf * fixed compiler internal error in the in_[and/or/xor]_assign_x_y inline nodes
when their second parameter is a large 64-bit unsigned constant

git-svn-id: trunk@35684 -
2017-03-29 14:55:07 +00:00
sergei
8ae0864c9a * x86 Intel asm reader: handle special variables "self" and "result" similar to regular ones in terms of subscripting. This makes fix from r34911 apply to these special variables. Resolves #31542.
git-svn-id: trunk@35669 -
2017-03-27 19:58:55 +00:00
nickysn
fc59649a98 + added inline nodes for handling and/or/xor in place (i.e. x:=x op y, where
op=and/or/xor). They generate more optimal code on certain architectures
  (including x86). The new inline nodes aren't generated by the compiler yet,
  but will be used in the future, at certain optimization levels, whenever the
  pattern x:=x op y is detected by the compiler.

git-svn-id: trunk@35666 -
2017-03-26 23:16:53 +00:00
florian
e8f7c9dfdd + test for large case statements
git-svn-id: trunk@35646 -
2017-03-23 17:57:31 +00:00
sergei
2357ca1fe6 * Fixed size suffix generated for CVTSI2SS, CVTSI2SD, VCVTSI2SS, VCVTSI2SD instructions. Mantis #31550.
* tasm2.pp already detected this bug if run with -al option. Added a copy of tasm2.pp and configured it with -al, so it is run daily on all suitable machines.

git-svn-id: trunk@35626 -
2017-03-19 10:29:28 +00:00
florian
5dd6232c0e * fix test for case sensitive file system, resolves #31452
git-svn-id: trunk@35543 -
2017-03-08 20:18:25 +00:00
michael
9787c44c78 * Additional tests from Karl-Michael Schindler
git-svn-id: trunk@35521 -
2017-03-04 17:06:27 +00:00
michael
cc81abdd83 * Patch from Michal Gawrycki to implement streaming interface properties (IComponent) Bug ID
git-svn-id: trunk@35474 -
2017-02-22 21:14:35 +00:00
maciej-izak
533c89e128 * New test for management operators to detect regressions like regression fixed in r35461 (many times initialized global variables)
git-svn-id: trunk@35463 -
2017-02-21 14:20:15 +00:00
florian
a80fcb74d8 * make test working for architectures with no float and ansistring support
git-svn-id: trunk@35460 -
2017-02-19 22:29:52 +00:00
maciej-izak
92c0e57c59 * Test suite for management operators. We have management operators on trunk! Enjoy ^^
git-svn-id: trunk@35452 -
2017-02-19 14:34:09 +00:00
Jonas Maebe
265c8e7bbc + support for specifying ms_abi_default, ms_abi_cdelc, sysv_abi_default, and
sysv_abi_cdecl calling conventions on x86-64 to force using the SYSV/
    Microsoft ABI on platforms that don't use it by default (mainly to ease
    porting pure assembler routines)

git-svn-id: trunk@35425 -
2017-02-11 19:57:12 +00:00
svenbarth
58abeb4a34 * also test IIDStr of raw interfaces
git-svn-id: trunk@35414 -
2017-02-10 16:06:47 +00:00
svenbarth
9ead39404b + print headers for the tested interfaces
git-svn-id: trunk@35413 -
2017-02-10 16:06:18 +00:00
svenbarth
6418f22ae0 * enable raw interface testing
git-svn-id: trunk@35412 -
2017-02-10 16:05:35 +00:00
svenbarth
c1390b3442 * fix for Mantis #31249: applied (adjusted) patch provided by Maciej Izak
Commit message:
[PATCH] More consistent RTTI (also better performance) for classic
 objects (reference to initrtti from fullrtti).

git-svn-id: trunk@35376 -
2017-01-31 18:21:53 +00:00
svenbarth
c2d68e35b5 * also assume register calling convention for m68k
git-svn-id: trunk@35352 -
2017-01-28 14:55:41 +00:00
svenbarth
26135d605f + implement interface RTTI inspired by the changes from Steve Hildebrandt, yet not exactly the same. Like his implementation this one isn't Delphi compatible either.
+ added test

git-svn-id: trunk@35341 -
2017-01-27 17:00:15 +00:00
svenbarth
25842d70c8 * adjust test so it also checks the full ParamFlags instead of only the reduced one
git-svn-id: trunk@35263 -
2017-01-08 12:42:17 +00:00
florian
1bea9e36eb + entropy test for random
git-svn-id: trunk@35260 -
2017-01-08 10:26:12 +00:00
florian
29a2c433f7 * -Sr option for iso mode: in case no command line parameter is passed, the file name for program parameters is derived from their variable name
git-svn-id: trunk@35257 -
2017-01-07 14:50:58 +00:00
svenbarth
150441627a + add test for Boolean RTTI
git-svn-id: trunk@35187 -
2016-12-23 16:05:57 +00:00
svenbarth
73ed1a9bf1 * fix for Mantis #31140: applied patch by Maciej Izak; this way it's clear what purpose ManagedFldCount has in FPC compared to Delphi
Commit message of patch:

+ New field TotalFieldCount for TTypeData
* Mark ManagedFldCount as deprecated
* Adjusted test trtti12.pp

git-svn-id: trunk@35180 -
2016-12-23 15:32:44 +00:00
svenbarth
8e765ef807 * extend test for 64-bit subranges
git-svn-id: trunk@35179 -
2016-12-23 15:11:38 +00:00
svenbarth
2acf542737 * extend TParamFlag by pfConstRef which is set for constref parameters
* extend test trtti9.pp accordingly

git-svn-id: trunk@35175 -
2016-12-20 21:37:07 +00:00
svenbarth
a9d14fe30b * extend TOrdType by entries for 64-bit values
* have tkInt64 and tkQWord entries also contain the OrdType field (basically the compiler can now use the same function to generate them only with different type kinds)

+ added test

git-svn-id: trunk@35135 -
2016-12-16 14:22:04 +00:00
svenbarth
460f309035 * fix for Mantis #31123, applied patch by Maciej Izak
* adjusted test trtti10.pp due to renamed RecInitTable field

Original commit message:

Public interface for init table for records in TypInfo:

* Rename RecInitTable to RecInitInfo (because it is special kind of PTypeInfo for init table of record). Has more sense in practical usage.
+ New structure TRecInitData (and related PRecInitData) to handle data for (init) type info for records (aka init table)
+ New structure TInitManagedField and pointer type PInitManagedField (for init table)
+ Special helper property RecInitData to get PRecInitData for tkRecord

+ test attached

git-svn-id: trunk@35134 -
2016-12-16 13:43:12 +00:00
svenbarth
121a857af8 * fix for Mantis #31118: applied patch by Maciej Izak to fix usage of wrong variable
+ added test

git-svn-id: trunk@35133 -
2016-12-15 13:47:26 +00:00
svenbarth
12dba952f0 * integration of Part 2 patch of Mantis #30687 with a few adjustments:
- indentation in ncgrtti.pas
  - fewer ifdefs in rtti.inc
  - InitTable/Terminator field as first field to avoid padding on targets that require proper alignment and have SizeOf(Pointer) > 4

Original message by Maciej Izak:

Breaking change for rtti layout for record rtti. Init table
is always accessible from regular rtti. Rtti table contains indirect
reference to init table, additionally init table contains nil-terminator (for
rtl purposes - the only way to determine kind of info : init or rtti). Pros:

* will be possible to create more Delphi compatible code for RTTI, finally end-user can access to *real* managed fields of records (some work on TypInfo.pp is still required but is not necessary).
* important step forward for management operators (anyway this commit is not directly related to management operators)
* much more optimal memory allocation/initialization/finalization for records created/destroyed by InitializeArray/FinalizeArray, for example:

type
  TBar = record
    f1,f2,f3,f4,f5,f6,f7,f8,f9: byte;
    s: string;
  end;

previously:

  GetMem(PB, SizeOf(TBar));
  InitializeArray(PB, TypeInfo(TBar), 1); // FPC_INITIALIZE was executed 10 times

now:

  GetMem(PB, SizeOf(TBar));
  InitializeArray(PB, TypeInfo(TBar), 1); // FPC_INITIALIZE is executed just once

+ test attached

git-svn-id: trunk@35125 -
2016-12-13 23:03:11 +00:00
svenbarth
70817baf98 * since we already allow inline specializations in mode ObjFPC due to generic functions it's only consequential to also allow specializations after pointers (they are already allowed in mode Delphi).
+ added tests
* tgeneric87.pp and tgeneric88.pp are no longer considered as tests that should fail

git-svn-id: trunk@35078 -
2016-12-06 21:37:22 +00:00
florian
bfb6d4d1b7 * enable test to work also with small targets taking only a shortint as longjmp argument
git-svn-id: trunk@34972 -
2016-11-26 18:42:15 +00:00
florian
f66ee3628c * CPU bitness dependent counter sizes for faster testing on slow CPUs
git-svn-id: trunk@34959 -
2016-11-24 20:59:53 +00:00
sergei
133fcb5ab2 * Fixed VMOVQ instruction encoding, now assembles correctly also in 32-bit code.
+ Test

git-svn-id: trunk@34949 -
2016-11-21 13:59:44 +00:00
florian
0dbcd5daa9 * do not run test, if no stack checking is available
git-svn-id: trunk@34932 -
2016-11-20 16:02:37 +00:00
florian
13de8c6808 * -Or => -Ooregvar
git-svn-id: trunk@34931 -
2016-11-20 15:45:01 +00:00
Tomas Hajny
ff02b2dfb5 + added test based on bug #24504
git-svn-id: trunk@34850 -
2016-11-08 22:24:22 +00:00
florian
a27b07b342 + more restrictions on pred/succ to dec/inc optimization
o check if the argument can be used as a call by reference parameter
  o check if the argument has no side-effects
+ tests

git-svn-id: trunk@34816 -
2016-11-06 16:36:02 +00:00
florian
96858dd64d + additional tests which ensure that constant propagation is off
as the compiler optimizes the original tests too much with constant propagation
  to keep them useful

git-svn-id: trunk@34796 -
2016-11-05 23:05:57 +00:00
florian
9c81e90e08 + extension to iso mode: reset/rewrite can take a file name as a second parameter
git-svn-id: trunk@34726 -
2016-10-16 07:55:08 +00:00
Jonas Maebe
265923a2ee * several fixes for TMultiReadExclusiveWriteSynchronizer, based on patch by
Derek (mantis #28830)
   o ability for a thread to acquire a readlock when it already holds a
     write lock, or vice versa
   o detect when thread1 releases a lock while it hadn't acquired one
   o correct result of beginwrite (return true only when another thread
     held/acquired a write lock before the current thread got it)
   o extra compared to Derek's patch: replaced some additional
     (mostly pre-existing) interlocked*() hacks with proper memory
     barriers, made formatting consistent, fixed compilation on platforms
     where tthreadid is not an integer type, improved tthreadid hashing
     function for 64 bit platforms, fixed some comments

git-svn-id: trunk@34678 -
2016-10-08 20:45:45 +00:00
Jonas Maebe
e5a1231931 * updated FSF address (mantis #30198, patch by Paul Gevers)
git-svn-id: trunk@34598 -
2016-10-02 12:56:59 +00:00
svenbarth
246de84ef3 * ensure that a finalization section is parsed before the generation of specializations as otherwise specializations in such sections would result in unresolved forward declarations
git-svn-id: trunk@34582 -
2016-09-30 15:41:35 +00:00
Jonas Maebe
775f86d216 * made cthreads the first unit, as the initialisation code of sysutils now
apparently already triggers threading-related code

git-svn-id: trunk@34516 -
2016-09-11 18:17:41 +00:00
svenbarth
6b93f09567 * fix test
git-svn-id: trunk@34458 -
2016-09-08 17:43:04 +00:00
svenbarth
26a2ddd3d6 + extend Delete() intrinsics with Delphi compatible support for dynamic arrays. Also fixes Mantis #30306
git-svn-id: trunk@34455 -
2016-09-08 17:15:10 +00:00
Jonas Maebe
2d051f89f7 * don't increase refcounts for variants assigned to (ti_)const nodes, fixes
memory leak after r34288 and should have been done as part of r34287
    (mantis #30546)

git-svn-id: trunk@34440 -
2016-09-06 21:28:34 +00:00
svenbarth
8b853571c6 * don't generate a warning if a "generic" token follows while parsing procedure directives (let's hope we'll never have to add a "generic" directive :/ )
+ added test

git-svn-id: trunk@34343 -
2016-08-19 14:07:36 +00:00
marco
690f784c4d * enable 40+ tests for Haiku as per mantis #30470
git-svn-id: trunk@34312 -
2016-08-14 14:09:24 +00:00
pierre
d957595842 Fix for msdos, local variable SaveExit must be a CodePointer
git-svn-id: trunk@34267 -
2016-08-10 16:16:17 +00:00
pierre
4b17961dd4 * Skip some tests for msdos
git-svn-id: trunk@34266 -
2016-08-10 16:10:25 +00:00
yury
f08d136290 * Fixed test for non-Windows targets.
git-svn-id: trunk@34236 -
2016-07-30 16:37:47 +00:00
yury
980c4741ac * Fixed conversion from PWideChar to ansistring.
+ test. 

git-svn-id: trunk@34219 -
2016-07-29 09:43:05 +00:00
pierre
e9a1ed9446 Add fpwidestring and unicodeducet units for go32v2 tests related to unicode support
git-svn-id: trunk@34168 -
2016-07-22 06:26:17 +00:00
pierre
d4945f4fd0 Avoid range check error for Win64 by correcting type of parameters for GetModuleFileNameA WinAPI function
git-svn-id: trunk@34148 -
2016-07-19 11:35:21 +00:00
pierre
d1a610a2fc Avoid range check error on win64 target in comparison of THandle to -1
git-svn-id: trunk@34147 -
2016-07-19 09:48:34 +00:00
pierre
ffe2940b01 Fix test for compact and medium i8086 memory model
git-svn-id: trunk@34073 -
2016-07-05 22:32:19 +00:00
pierre
bc839068de Fix test for compact and medium i8086 memory model
git-svn-id: trunk@34072 -
2016-07-05 22:30:12 +00:00
pierre
360f2734eb Improve targ1a and targ1b to really check content of args passed to called executable
git-svn-id: trunk@34067 -
2016-07-04 21:03:40 +00:00
pierre
1cbc526501 Reduce NumIterations for I8086 cpu to avoid timeout
git-svn-id: trunk@34052 -
2016-07-03 07:45:45 +00:00
pierre
16477c598d Fix huge memory model failure by adding nostackframe modifier needed to avoid DS reloading at proc entry
git-svn-id: trunk@34049 -
2016-07-02 15:12:18 +00:00
pierre
ef6a8009cf Add {$goto on} for FPC to avoid compile time error
git-svn-id: trunk@34048 -
2016-07-02 15:10:51 +00:00
pierre
2ca06538d6 Limit alignment requirement for I8086 CPU to 2 even if pointer is 4 byte long
git-svn-id: trunk@34047 -
2016-07-02 14:58:49 +00:00
pierre
d2113f5ead Use SizeInt type for DoMem variable argument, as it might be different from PtrInt, for instance for some msdos memory models
git-svn-id: trunk@34021 -
2016-06-28 15:59:09 +00:00
pierre
dfeadf89e9 Modify test to take into account the specific prologue for Huge model
git-svn-id: trunk@34016 -
2016-06-24 15:13:37 +00:00
pierre
f079701302 Also disable range check error that can happen on 64-bit processors
git-svn-id: trunk@34011 -
2016-06-21 08:02:19 +00:00
pierre
df7e562d94 Add explicit $R- or $Q- to avoid different results if -Criot option is used
git-svn-id: trunk@34010 -
2016-06-20 15:55:10 +00:00
pierre
27119cad3c Disable range checks explicitly as THandle is unsigned at least for win32 OS
git-svn-id: trunk@34009 -
2016-06-20 15:26:50 +00:00
Jonas Maebe
580cf73e64 * align the variables passed to InterlockedCompareExchange128() to a
multiple of 16 bytes

git-svn-id: trunk@33962 -
2016-06-12 09:21:08 +00:00
Jonas Maebe
5af40f22e8 * handle enums with a packenum setting that is larger than necessary to store
all of their values, when kept in a bitpacked array, properly via
    pass_typecheck rather than hacking location.size in pass_generate_code:
   o the old fix was incomplete (it didn't handle non-constant indices)
   o the old fix didn't work for llvm (since it uses defs rather than
     location.size)

git-svn-id: trunk@33943 -
2016-06-09 22:00:14 +00:00
svenbarth
f27ce0b159 Rework the way the method bodies for specializations are generated: instead of walking the global and local symboltable all pending specializations are kept in a list of the current module which is (for now) walked at the end of a unit/program to generate the method bodies as before.
fmodule.pas, tmodule:
  + new list pendingspecializations which keeps track of all pending specializations of the current module
psub.pas:
  * move generate_specialization_procs and related routines to pgenutil
  + new procedure read_proc_body to read a routine's body, cause generate_specialization_procs needs it (unlike the already existing overload in the implementation section, this one can only handle bodies of non-nested routines) 
pgenutil.pas:
  * generate_specialization_phase2: add the newly specialized generic to the current module's pending specializations
  * generate_specialization_procs: reworked so that it uses the new pendingspecializations field instead of walking the global and local symboltable of the current unit
pmodules.pas:
  + add pgenutil to uses due to the moved generate_specialization_procs

+ added test

git-svn-id: trunk@33826 -
2016-05-26 18:56:16 +00:00
pierre
345361beef Revert commit 33771 and directly replace cpu8086 by cpui8086 which is always defined by ppc8086 compiler
git-svn-id: trunk@33773 -
2016-05-24 06:52:17 +00:00
pierre
ba509152b8 Also define CPUSMALL macro if CPUI8086 is defined
git-svn-id: trunk@33771 -
2016-05-23 21:07:11 +00:00
pierre
6646a0d29f Correct tseg.pp test for i8086 CPPU for which seg/cseg/dseg/sseg should NOT return zero values
git-svn-id: trunk@33770 -
2016-05-23 20:58:37 +00:00
pierre
74b3481918 Use small number for Blocks constant for i8086 CPU also
git-svn-id: trunk@33769 -
2016-05-23 20:51:07 +00:00
nickysn
bffe9480f4 + added the winapi functions, structures and constants for raw keyboard and mouse input
git-svn-id: trunk@33746 -
2016-05-22 01:59:27 +00:00
Jonas Maebe
f0753d85ad * fix the Upgrade to Unicode version 7 and CLDR 27 from r32814
(mantis #29659, fixes tuca* tests)

git-svn-id: trunk@33708 -
2016-05-19 15:44:22 +00:00
michael
8e75ac64f1 * Patch from Graeme GeldenHuys to implement UnicodeString versions of MatchStr() and IndexStr() (bug ID 30113)
git-svn-id: trunk@33700 -
2016-05-16 16:40:27 +00:00
yury
511f5b5ded * trwsync test: Increased timeout to 60 seconds. Trying to fix random failures due to the timeout on busy machines.
git-svn-id: trunk@33487 -
2016-04-12 08:38:18 +00:00
yury
a37cd66a87 * trwsync test: Increased timeout to 30 seconds. Should prevent failures on busy machines.
git-svn-id: trunk@33313 -
2016-03-22 10:16:25 +00:00
yury
3a5412a931 * Disabled tests which force the -Cg- option for Android since they can not be run on Android 5+ where PIE is required.
git-svn-id: trunk@33303 -
2016-03-20 21:52:05 +00:00
yury
d43e5dcab8 * tests: Fixed string comparison.
git-svn-id: trunk@33302 -
2016-03-20 21:25:18 +00:00
nickysn
759a4f8258 * don't try to build lnfodwrf on i8086-msdos, because it causes internal error
200309041 and thus breaks building i8086-msdos snapshots entirely. Added test
  that reproduces the bug in a small program, so it can be fixed eventually.

git-svn-id: trunk@33276 -
2016-03-18 19:56:37 +00:00
Jonas Maebe
2b210335a1 * fixed pointer arithmetic errors in WideStrAlloc/StrBufSize/StrDispose
(patch by Iks, mantis #29710)

git-svn-id: trunk@33271 -
2016-03-18 13:12:11 +00:00
Jonas Maebe
697aed738c * replaced test directory names with ones that doesn't contain decomposable
characters, so the test's success doesn't depend on getdir returning a
    string using the same composition as the used name (fixes test on
    OS X 10.11)

git-svn-id: trunk@33270 -
2016-03-18 12:43:47 +00:00
Jonas Maebe
5919ca84bb * fixed string code page after setstring(rawbytestring,..) (mantis #29833)
git-svn-id: trunk@33268 -
2016-03-18 12:43:42 +00:00
florian
45807056c5 * factored out SymbolCandidateForWarningOrHint
* do not issue a hint if a normal parameter is passed to another procedure by var
+ test

git-svn-id: trunk@33248 -
2016-03-13 19:14:26 +00:00
florian
234990b73c + fma test program extended to support arm
git-svn-id: trunk@33185 -
2016-03-06 13:33:22 +00:00
Jonas Maebe
87f46dcafd * updated pos() for Java with an offset parameter (equivalent of r31464 etc)
(mantis #29626)

git-svn-id: trunk@33160 -
2016-03-05 15:32:25 +00:00
Jonas Maebe
a100309350 * made utf8tostring() Delphi-compatible (mantis #29585):
o removed utf8string overload
   o always ignore any code page information from the input, and interpret the
     contents of the input directly as utf8-encoded bytes
 * made utf8tostring() compatible with the JVM backend (mantis #29497)

git-svn-id: trunk@33159 -
2016-03-05 15:32:22 +00:00
svenbarth
8775897621 * fix copy & paste error (didn't influence the test as str3 isn't changed, but at least it's consistent that way...)
git-svn-id: trunk@33090 -
2016-02-12 16:09:32 +00:00
svenbarth
8287773b16 Reverted revision 33036. This feature is too controverse to be left in.
git-svn-id: trunk@33048 -
2016-02-04 19:26:51 +00:00
svenbarth
ed94ca4b24 Add support for IfThen() instrinsic that works like the if-statement in that it evaluates only the expression that is indeed executed.
The result type of the intrinsic is determined by the Then-expression to provide a bit of control. There might however be some situations in which this fails, for this exceptions need to be added (e.g. a constant string needs to be converted to a normal string).

compinnr.inc:
  + add new constant in_ifthen_x_y_z for the IfThen() intrinsic
psystem.pas: 
  + create_intern_symbols: add symbol for IfThen() intrinsic
pexpr.pas:
  * statement_syssym: parse parameters of IfThen() intrinsic and return corresponding inline node
ninl.pas, tinlinenode:
  + new method handle_ifthen() which converts the inline node to an if-node which assigns the expressions to a temp node that is returned
  * pass_typecheck: handle in_ifthen_x_y_z using handle_ifthen()
  * pass_1: in_ifthen_x_y_z does not need a first pass as it's already converted after the typecheck pass

+ added tests

git-svn-id: trunk@33036 -
2016-01-31 14:29:12 +00:00
pierre
3300f51ed6 * Adjust test for win64
git-svn-id: trunk@32957 -
2016-01-16 01:15:40 +00:00
pierre
238040afdd * Fix compilation for JVM cpu
git-svn-id: trunk@32956 -
2016-01-16 01:15:12 +00:00
Jonas Maebe
cc197a5593 * extended test
git-svn-id: trunk@32900 -
2016-01-10 14:01:32 +00:00
pierre
de7a79f497 Use SizeInt type for GlobalStartMem and StartMem variables to avoid compilation error for msdos compact memory model
git-svn-id: trunk@32874 -
2016-01-07 17:33:36 +00:00
pierre
80a7b909e4 Add $goto on for FPC compilation to avoid compile time error
git-svn-id: trunk@32873 -
2016-01-07 17:12:13 +00:00
florian
b7786d0849 * fix test parameter
git-svn-id: trunk@32793 -
2015-12-29 21:12:28 +00:00
florian
a03d992cc0 * doing fastmath is not useful when testing currency calculation accuracy (test fails with fastmath enabled on some targets)
git-svn-id: trunk@32790 -
2015-12-29 15:22:55 +00:00
michael
464e40bfd9 * Applies patch from Laco (bug ID 29113)
git-svn-id: trunk@32723 -
2015-12-26 11:27:13 +00:00
Jonas Maebe
c4b347c271 * support anonymous procvar definitions for jvm outside parameter lists (in a
parameter list they represent nested procvars, which aren't supported yet)

git-svn-id: trunk@32454 -
2015-11-22 10:52:20 +00:00
svenbarth
1d72397c19 Add tests for generic functions/procedures/methods
git-svn-id: trunk@32440 -
2015-11-21 16:53:11 +00:00
michael
13cfc4ac8f * Added test for NormalizedBCD
git-svn-id: trunk@32358 -
2015-11-18 14:39:29 +00:00
nickysn
a19c506b46 + added a very simple test for i8086-msdos for linking an external TASM
assembler .obj module. Note that TASM modules aren't fully supported yet,
  because our OMF internal linker doesn't support all features of the OMF object
  format. This test works, because it's really simple. As more OMF features are
  supported, this test will be extended.

git-svn-id: trunk@32353 -
2015-11-17 17:08:25 +00:00
michael
dfedc081e0 * Test for scandatetime (bug ID 28952)
git-svn-id: trunk@32347 -
2015-11-16 19:51:14 +00:00
florian
70b8789262 o basic extended pascal support:
+ automatically loaded helper unit
  * Makefiles adapted
  * mode switch
  * mode switches reorganized
+ TimeStamp support

git-svn-id: trunk@32330 -
2015-11-15 15:13:36 +00:00
nickysn
1e7a0838d7 + added test for the 'SEG @CODE' and 'SEG @DATA' i8086 inline assembler directives
git-svn-id: trunk@32284 -
2015-11-10 21:21:17 +00:00
nickysn
8c81e93a96 * replaced setintvec(x,@proc) in i8086 tests with the memory model independent version setintvec(x,ptr(seg(proc),ofs(proc)))
git-svn-id: trunk@32249 -
2015-11-05 14:18:55 +00:00
nickysn
c25585daee * fixed addr(procedure), mantis #28775
git-svn-id: trunk@32204 -
2015-10-30 15:17:48 +00:00
nickysn
500743c65d + extended test with many more reference syntaxes, accepted by TP7
git-svn-id: trunk@32190 -
2015-10-29 15:48:18 +00:00
nickysn
1eaa77d2f9 + added test for i8086 inline asm access to procedure data
git-svn-id: trunk@32186 -
2015-10-29 14:47:26 +00:00
nickysn
ce7672b750 + added test for local label data access from i8086 inline asm
git-svn-id: trunk@32178 -
2015-10-28 17:00:35 +00:00
nickysn
83d90c7888 + extended test with call/jmp [d]word ptr const, which produces an indirect call or jump under BP7
git-svn-id: trunk@32177 -
2015-10-28 15:22:33 +00:00
nickysn
a7a71f8b9f + extended test with many more variants, supported by BP7 for specifying an indirect call/jmp
git-svn-id: trunk@32176 -
2015-10-28 14:57:35 +00:00
nickysn
1fc1739c1d + added calls to local labels in a far procedure to the test as well
git-svn-id: trunk@32175 -
2015-10-28 14:33:32 +00:00
nickysn
85f4b8aa5e + added calls to labels to the tests
git-svn-id: trunk@32174 -
2015-10-28 13:59:35 +00:00
nickysn
fe3711bf6a + added interrupt procedures to the tests
git-svn-id: trunk@32173 -
2015-10-28 13:49:48 +00:00
nickysn
13441261f2 + extended tests with some additional ways to produce call relative near/absolute far in BP7's inline asm
git-svn-id: trunk@32172 -
2015-10-28 13:32:18 +00:00
nickysn
30718a2601 + added i8086 inline asm near relative and far absolute call tests (TP7
compatible, but not yet working under FPC, unfortunately)

git-svn-id: trunk@32164 -
2015-10-27 14:39:02 +00:00
nickysn
6b89ea1af2 + added an i8086 inline assembler test for the near and far ret instructions
git-svn-id: trunk@32158 -
2015-10-26 17:06:17 +00:00
yury
05ecee1895 * tinterlockedmt test: Ensure all threads have started.
git-svn-id: trunk@32156 -
2015-10-26 10:14:47 +00:00
yury
1127689dba * tinterlockedmt test: Reduced the thread count.
git-svn-id: trunk@32148 -
2015-10-25 17:35:36 +00:00
nickysn
1491d9655c + fixed the emitting of non-nil far and huge pointer constptrs in typed
constants on i8086

git-svn-id: trunk@32141 -
2015-10-24 20:25:49 +00:00
yury
4ae1d23909 * tinterlockedmt test: Increased timeout.
git-svn-id: trunk@32111 -
2015-10-21 09:02:16 +00:00
nickysn
520f7226aa + added test for i8086 inline asm far and near indirect jmps as well
git-svn-id: trunk@32110 -
2015-10-21 01:26:15 +00:00
nickysn
2fbcdaf7d5 * fix typo
git-svn-id: trunk@32109 -
2015-10-21 01:22:23 +00:00
nickysn
bdf719c4df * updated comment to inform that 'call far reg' is not a valid x86 instruction
at all, and not just that we don't expect it

git-svn-id: trunk@32108 -
2015-10-21 01:19:23 +00:00
nickysn
c5aa64bc2c + added an i8086 inline asm test for the indirect near and far call instructions
git-svn-id: trunk@32107 -
2015-10-21 01:07:00 +00:00
yury
9bece502a0 * tinterlockedmt test: Reworked test for InterlockedCompareExchange to be more robust.
git-svn-id: trunk@32101 -
2015-10-20 12:43:52 +00:00
yury
325a79b81b * tinterlockedmt test: Another fix to improve threads synchronization. Should fix slow execution on some systems.
git-svn-id: trunk@32095 -
2015-10-19 11:34:52 +00:00
pierre
89f5b65bbf New aarch64-linux gcc compiled objects generated on GCC Compile Farm gcc115 machine
git-svn-id: trunk@32094 -
2015-10-19 10:40:35 +00:00
sergei
72f60de3c4 * Added two test cases from Mantis #28584. The issue itself has been fixed with r31475 and r31582.
git-svn-id: trunk@32092 -
2015-10-18 14:48:36 +00:00
yury
3344188f3e * tinterlockedmt: Minor improvement.
git-svn-id: trunk@32091 -
2015-10-18 12:41:35 +00:00
yury
3fcbb7d2d4 * tinterlockedmt: Fix race conditions in the InterLockedCompareExchange test.
git-svn-id: trunk@32089 -
2015-10-18 11:07:29 +00:00
yury
44777f3797 * Use ThreadSwitch.
git-svn-id: trunk@32076 -
2015-10-17 16:03:18 +00:00
yury
e3d06cdba7 + Stress test for Interlocked* functions using multiple threads.
git-svn-id: trunk@32073 -
2015-10-17 14:48:04 +00:00
yury
a4f63a07d2 * Skip this test for android.
git-svn-id: trunk@32007 -
2015-10-10 21:57:08 +00:00
Jonas Maebe
e25c5b809e * use cextended instead of clongdouble, so that the tests keeps compiling
for platforms where we don't support the "long double" type

git-svn-id: trunk@31883 -
2015-09-29 07:44:07 +00:00
yury
bbb1cae57f * Use "clongdouble" instead of "extended" in libc printf tests.
git-svn-id: trunk@31864 -
2015-09-27 21:14:04 +00:00
Jonas Maebe
84b47dc92c * fixed test on systems not using UTF-8 as defaultsystemcodepage. This test
was correct before the ansistrings with codepage support had been
    implemented, and by accident kept working afterwards on platforms that
    don't use UTF-8 as defaultsystemcodepage, but after r31831 it started
    failing. This commit fixes it again, in combination r31847 (by ensuring
    that the string data passed to ansistart/endtext is encoded in
    defaultsystemcodepage).

git-svn-id: trunk@31848 -
2015-09-27 14:46:44 +00:00
svenbarth
17a0ac7fc0 pdecsub.pas:
* extend parse_proc_head() with support for /parsing/ generic functions (at least in mode Delphi, mode ObjFPC depends on the new isgeneric parameter to be set)
  * adjust parsing of interface mappings with a generic interface (note: in mode ObjFPC this now requires a "specialize" directly before the generic interface's name, which is more in line with other uses of "specialize")
pexpr.pas, factor:
  * don't call postfixoperators() if hadspecialize is set

tests/test/tgeneric79.pp:
  * adjust test to changed syntax

git-svn-id: trunk@31769 -
2015-09-18 16:24:07 +00:00
yury
6e638e31d7 * Use cp1251 on Android.
git-svn-id: trunk@31725 -
2015-09-16 17:49:38 +00:00
yury
d106fc9823 * Use cp1251 on Android.
git-svn-id: trunk@31723 -
2015-09-16 17:35:22 +00:00
michael
a687cc1469 * Add tests for offset argument to pos
git-svn-id: trunk@31465 -
2015-08-31 13:06:14 +00:00
Jonas Maebe
c27807ee63 * resolve formal/anonymous external classes before comparing parameters to
overloaded routines

git-svn-id: trunk@31458 -
2015-08-30 14:33:01 +00:00
Jonas Maebe
945fd4fcf5 * wait till the end of typecheckpass before we load a call context's self
parameter instead of immediately doing it in the constructor of the call
  node, and then only create it if we actually need it.

  It was previously created in the call node constructor because it needs to be
  done before pass_1 (which is where it is actually used) due to pass_1 possibly
  being performed in the context of inlining (and then a wrong self parameter
  may be found, or none at all), and it was done unconditionally because at that
  point we don't know yet whether or not a self parameter will be necessary (as
  we haven't resolved the overloads/procdef yet).

  The problem with this is that if we use the parentfpstruct way of handling
  accesses to outer scope locals/parameters, we need to know all locals/
  parameters that will be accessed from nested routines after typecheckpass,
  otherwise we get crashes. The problem was that if a call to an RTL routine was
  generated by the compiler in a routine nested inside a method during pass_1,
  and this nested routine itself did not access self of the method (so self was
  not added to its parentfpstruct during the typecheckpass), then the
  unconditional reference to self when creating the call caused a compiler
  crash (introduced in r30908)

git-svn-id: trunk@31197 -
2015-07-07 16:34:14 +00:00
Jonas Maebe
8e406cc7bd * fixed bug in test exposed by r31038
git-svn-id: trunk@31044 -
2015-06-13 22:12:45 +00:00
Jonas Maebe
26044b604f * don't import org.freepascal.rtl.* as this also includes our System
class, which conflicts with java.lang.System in recent jdk javac's
    (and we don't access any of the RTL classes explicitly in the
    test program)

git-svn-id: trunk@30952 -
2015-05-31 16:50:53 +00:00
Károly Balogh
99421ba032 tfexpand: fixed some AMIGA vs. HASAMIGA defines, fixed DriveSep definition for Amiga systems
git-svn-id: trunk@30774 -
2015-05-03 11:35:07 +00:00
florian
fbd6d2a0f9 + check for FPUNONE
git-svn-id: trunk@30750 -
2015-05-01 14:46:37 +00:00
Tomas Hajny
3ded26a774 * correction of tests for Amiga (volumes, exclusion of some '.'/'..' related tests)
git-svn-id: trunk@30654 -
2015-04-18 18:48:42 +00:00
michael
46a0eced9e * Adapted test to test for 27831
git-svn-id: trunk@30641 -
2015-04-18 07:16:02 +00:00
Jonas Maebe
faf3efe139 + Linux/ppc64le test object files
git-svn-id: trunk@30228 -
2015-03-14 18:37:01 +00:00
Jonas Maebe
5b3c511467 * don't crash when "return exitvalue" is used in a procedure
git-svn-id: trunk@30177 -
2015-03-13 08:35:26 +00:00
Jonas Maebe
2dcd42d4f1 * fixed detection of an objcprotocols descending from a forward-defined
objcprotocol

git-svn-id: trunk@30169 -
2015-03-12 19:37:43 +00:00
Jonas Maebe
00642288b8 * extended bsf/bsr tests with values in which more than one bit is set
git-svn-id: trunk@30151 -
2015-03-09 16:48:26 +00:00
Jonas Maebe
ff020a3be4 + "Utf8CodePointLen(pansichar,MaxLookAhead,IncludeCombiningDiacriticalMarks):
sizeint"  function that returns:
   <0: invalid sequence detected after processing "-result" bytes
   0:  incomplete (may still be valid if MaxLookAhead is increased)
   >0: sequence of result bytes forms a codepoint (+ combining diacritical
       marks if that parameter was true)

git-svn-id: trunk@30047 -
2015-03-01 17:12:17 +00:00
Tomas Hajny
b2475353f4 * test programs previously having extension .pas renamed to .pp so that they are found during testsuite runs
git-svn-id: trunk@30024 -
2015-02-27 13:03:13 +00:00
Jonas Maebe
b5b7e0f338 * ensure that 64->32 bit truncations cannot be optimized away by the
register allocator on AArch64 + test (did not get caught by existing
    tests)

git-svn-id: trunk@29965 -
2015-02-23 22:55:54 +00:00
Jonas Maebe
c6daaa28d0 * enable all Objective-C tests for Darwin/AArch64
git-svn-id: trunk@29945 -
2015-02-23 22:54:24 +00:00
Jonas Maebe
41fba0c4f7 * switched to using the stack pointer as base register for the temp allocator
instead of the frame pointer register:
      1) we exactly know the offsets of the temps from the stack pointer
         after pass 1 (based on the require parameter stack size for called
         routines), while we don't know it for the frame pointer (it depends
         on the number of saved registers)
      2) temp offsets from the stack pointer are positive while those from
         the frame pointer are negative, and we can directly encode much
         bigger positive offsets in the instructions
   o move the stack pointer register to a virtual register in
     loadparentfpn, because many instructions cannot directly operate
     on/with the stack pointer
   o add the necessary register interference edges for the stack pointer
     register

git-svn-id: trunk@29938 -
2015-02-23 22:54:03 +00:00
Jonas Maebe
62fb05b7c4 + Darwin/AArch64 test object files
git-svn-id: trunk@29924 -
2015-02-23 22:53:11 +00:00
Jonas Maebe
f9647b661f + Darwin/AArch64 test object files
git-svn-id: trunk@29918 -
2015-02-23 22:52:52 +00:00
Jonas Maebe
3f5e95791b * use iosxwstr instead of cwstring on Darwin (for iOS 7+ testing)
git-svn-id: trunk@29829 -
2015-02-23 22:48:15 +00:00
svenbarth
5a344ee263 Rework the way how "specialize" is handled. Instead of initializing the specialization of a full type declaration (including unit name and parent types) it is now considered part of the specialized type itself. This means that for example the following code:
type
  TTestLongInt = specialize SomeOtherUnit.TTest<LongInt>;

will now have to read as

type
  TTestLongInt = SomeOtherUnit.specialize TTest<LongInt>;

While this is not backwards compatible this situation should arise seldomly enough and the benefits especially in context with generic functions/procedures/methods outway the drawbacks.

pbase.pas:
  * try_consume_unitsym: add a allow_specialize parameter that allows to parse "specialize" in front of a non-unit symbol; whether it was a specialization or not is reported using a new is_specialize parameter
  + add a new overload try_consume_unitsym_no_specialize that calls try_consume_unit sym with allow_specialize=false and a dummy is_specialize parameter
  * switch calls to try_consume_unitsym to try_consume_unitsym_no_specialize
pstatmnt.pas, try_statement:
  * switch call to try_consume_unitsym to try_consume_unitsym_no_specialize
  * adjust call to parse_nested_types
ptype.pas:
  + extend id_type with the possibility to disallow unit symbols (needed if a specialize was already parsed) and to report whether a specialize was parsed
  + extend parse_nested_types with the possibility to tell it whether specializations are allowed
  * have parse_nested_types specialize generic defs if one is encountered and local type defs are allowed
  * id_type: only allow "unitsym.specialize sym" or "specialize sym", but not "specialize unitsym.sym"
  * single_type: correctly handle specializations with "specialize" keyword
  * read_named_type.expr_type: there is no longer a need to check for "specialize" keyword
pexpr.pas:
  + new function handle_specialize_inline_specialization which tries to specialize a type symbol
  * handle_factor_typenode: handle specializations after a point that follows a record or object (why isn't this part of postfixoperators anyway? O.o)
  * postfixoperators: handle "specialize" after records and objectdefs
  * factor_read_id: handle "specialize" in front of an identifier (and after unit symbols)

+ added tests
* adjusted test webtbs/tw16090.pp

git-svn-id: trunk@29768 -
2015-02-20 16:23:40 +00:00
Jonas Maebe
071282b286 * add methods of objcprotocols to the list of visible "helper" methods when
loading them from ppu (like was already done when they were initially
    compiler), so they can be called via the "id" type even if no classes are
    in scope that implement them

git-svn-id: trunk@29686 -
2015-02-13 15:43:34 +00:00
Tomas Hajny
cd166e6ff6 * modified according to outcomes of discussion with Jonas
git-svn-id: trunk@29677 -
2015-02-12 23:16:13 +00:00
Tomas Hajny
bd719052fa * test updated according to results of discussion with Jonas to work properly also on platforms not using UTF-8 as their default system codepage (and be safe to ignore characters possibly unsupported with current system codepage)
git-svn-id: trunk@29676 -
2015-02-12 23:02:20 +00:00
Tomas Hajny
08a3c45aa3 * test fixed because the original version was wrong (as confirmed by Jonas)
git-svn-id: trunk@29675 -
2015-02-12 17:48:00 +00:00
Tomas Hajny
da21fe94fa * this test can never work correctly on operating systems not providing Unicode support at filesystem API level unless the current codepage happens to support all the characters used within the test (which is unlikely at least)
git-svn-id: trunk@29674 -
2015-02-12 00:55:18 +00:00
Tomas Hajny
8c20ff7f91 * fix for AllowOneTrailingSeparator and AllowMultipleTrailingSeparators checks and tests using these variables according to the passed parameters
git-svn-id: trunk@29671 -
2015-02-11 21:22:01 +00:00
pierre
82f751d51a Handle one trailing separator separately from multiple
git-svn-id: trunk@29670 -
2015-02-11 10:58:04 +00:00
Tomas Hajny
2cf9d18b14 * invalid DosError display improved
git-svn-id: trunk@29665 -
2015-02-10 16:43:15 +00:00
Tomas Hajny
3caf47d756 * display the wrongly obtained invalid DosError value too
git-svn-id: trunk@29664 -
2015-02-10 16:40:06 +00:00
pierre
488024ea5c Fix for failures on FileNameCaseSensitive systems
git-svn-id: trunk@29609 -
2015-02-02 21:49:36 +00:00
Jonas Maebe
5d4837329b * changed {$modeswitch blocks} to {$modeswitch cblocks} to avoid confusion
with the Pascal meaning of the term "block"

git-svn-id: trunk@29594 -
2015-02-01 15:50:06 +00:00
Tomas Hajny
caa749f6a0 * UTF-8 may not be the system codepage on OS/2 - skipped
git-svn-id: trunk@29566 -
2015-01-27 16:47:40 +00:00
Tomas Hajny
693a239842 * information about GCC version used for compiling the OS/2 object files added
git-svn-id: trunk@29565 -
2015-01-27 16:24:24 +00:00
pierre
84bb209ce8 Add some missing C compiler information found inside C objects
git-svn-id: trunk@29564 -
2015-01-27 13:48:44 +00:00
Tomas Hajny
5a03b52801 * compiled object files for OS/2
git-svn-id: trunk@29563 -
2015-01-27 09:20:55 +00:00
Tomas Hajny
d3ee7d4999 * there is no wchar.h included in EMX GCC port (but it is fortunately not needed for our testsuite)
git-svn-id: trunk@29562 -
2015-01-27 09:17:05 +00:00
pierre
ddee662665 Add i386 specific check that fpu stack is completely empty in CheckStack function
git-svn-id: trunk@29554 -
2015-01-26 13:13:55 +00:00
pierre
9af030ba9e Add missing x86_64-solaris gcc compiled objects
git-svn-id: trunk@29536 -
2015-01-23 14:23:47 +00:00
pierre
16262bb10e Add missing i386-solaris gcc compiled objects
git-svn-id: trunk@29535 -
2015-01-23 14:18:18 +00:00
Tomas Hajny
150ead4546 * skipping wrAbandoned test unsupported on OS/2 similarly to MS Windows
git-svn-id: trunk@29528 -
2015-01-22 23:52:22 +00:00
Tomas Hajny
33856b9f7b * fix typo in message and deallocate all previously allocated memory
git-svn-id: trunk@29527 -
2015-01-22 23:49:04 +00:00
Tomas Hajny
054ada1191 * skip this test for os2 and emx targets because it tries to link in a resource file in MS Windows format (rather than the OS/2 format) which is not supported
git-svn-id: trunk@29523 -
2015-01-22 21:24:21 +00:00