Commit Graph

6070 Commits

Author SHA1 Message Date
Jonas Maebe
118398a543 * test for mantis #32906 (already fixed in revision 37886)
git-svn-id: trunk@37892 -
2018-01-02 18:15:30 +00:00
Jonas Maebe
c0b0fa9c0b * change the type of the -gt uninitialised result of ansistring functions to
rawbytestring so the compiler does not try to convert it to the declared
    string type of the function result, as this may not be available
    (mantis #32510)

git-svn-id: trunk@37889 -
2018-01-01 18:04:13 +00:00
Jonas Maebe
672afcdca2 * check for conflicts between procedure directives specified in the
implementation and "virtual" (if it's a virtual method), as "virtual"
    does not get repeated in the implementation and hence no conflicts get
    checked by default (mantis #32605)

git-svn-id: trunk@37887 -
2018-01-01 16:54:04 +00:00
Jonas Maebe
1b66995754 * factored out check to determine whether a variable can be subscripted in
inline assembly, and fixed check after r35959 (mantis #32318)
   o can also subscript parameters passed by value on the stack
   o can also subscript local variables, the parameters passed by reference
     that are subsequently copied into a local

git-svn-id: trunk@37886 -
2018-01-01 14:29:21 +00:00
Jonas Maebe
dcac6b9c6f * disallow passing a dynarray(niln/pointerconstn) as an open array
(mantis #31273)

git-svn-id: trunk@37885 -
2017-12-31 15:18:40 +00:00
florian
0f51cf8546 * avr: correctly write references to nil, resolves #32821
git-svn-id: trunk@37838 -
2017-12-28 10:32:16 +00:00
florian
5e26142e54 * selected features are now stored in the system unit
git-svn-id: trunk@37772 -
2017-12-20 21:29:10 +00:00
svenbarth
afa6d1bdb0 * extend test a little bit to ensure that nested Concat() calls for strings work correctly
git-svn-id: trunk@37724 -
2017-12-12 19:54:38 +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
pierre
d18627f0af * Update all fpcsrc Makefile's using latest fpcmake version 2017-09-21 rev 37286
git-svn-id: trunk@37462 -
2017-10-16 00:27:27 +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
pierre
c8722d4237 Fix tw32115 test for msdos target by using longint type explicitly for CalcSmth function parameter
git-svn-id: trunk@37445 -
2017-10-11 06:25:31 +00:00
svenbarth
fcc1ce7a08 * fix for Mantis #30344: applied patch by Mario Ray Mahardhika to add new command line option -Sj[-|+] to control writeable typed constants (with a small adjustment to the help text)
+ added test

git-svn-id: trunk@37437 -
2017-10-09 19:19:23 +00:00
svenbarth
f6a867ef04 * move handling of Concat to tinlinenode so that it can be easily extended for dynamic arrays
+ added test

git-svn-id: trunk@37429 -
2017-10-08 10:39:34 +00:00
florian
3d3298f64d * write absolute references correctly on avr, resolves #32040
git-svn-id: trunk@37419 -
2017-10-07 21:09:20 +00:00
florian
4cf2a2672a changes to fix #32043
* changed most of the variables in the assembler readers used to store constants from aint to tcgint 
  as aint has only the size of the accumular while some CPUs (AVR) allow larger constants in instructions
+ allow access to absolute symbols with address type in inline assembler
* allow absolute addresses in avr inline assembler
+ tests

git-svn-id: trunk@37411 -
2017-10-06 21:07:19 +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
florian
cc44328109 * correctly calc case label distance after r36362, resolves #32115 and #32311
git-svn-id: trunk@37390 -
2017-10-03 20:36:09 +00:00
florian
c0feaf1f1e + allow absolute to absolute symbols, resolves issue #32474
git-svn-id: trunk@37379 -
2017-10-01 19:54:44 +00:00
svenbarth
9619576515 + add support for $SetPE{OS,SubSys,User}Version directives; Delphi compatible; Note: $SetPEUserVersion takes precedence to $Version
+ added test

git-svn-id: trunk@37364 -
2017-09-30 13:55:29 +00:00
svenbarth
81a0f88d8c + add Delphi compatible TThread.ForceQueue() which enqueues the method also for the main thread (at least if the RTL is in multi threading mode, otherwise it's still executed right away - whether this is Delphi compatible needs to be tested as I only have a 10.1 currently which does not yet support TThread.ForceQueue())
+ added test

git-svn-id: trunk@37359 -
2017-09-29 21:19:45 +00:00
svenbarth
c5b33f51f9 * fix for Mantis #32412: correctly handle an incorrect parameter count for Delete() and Insert() intrinsics
+ added tests

git-svn-id: trunk@37342 -
2017-09-27 21:15:00 +00:00
svenbarth
a1c910d892 * fix for Mantis #32108: ensure that types are registered once there is no more specialization is going on
git-svn-id: trunk@37341 -
2017-09-27 20:47:16 +00:00
florian
1c69ae6a15 handle correctly "reg+const" operands in avr assembler, fixes issue #32016
git-svn-id: trunk@37328 -
2017-09-26 20:14:41 +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
pierre
311a6f7844 Unsert BUILDFULLNATIVE if CROSSCOMPILED is set
git-svn-id: trunk@37218 -
2017-09-15 20:22:56 +00:00
florian
01b950f39b + new test
git-svn-id: trunk@37170 -
2017-09-10 18:07:15 +00:00