Commit Graph

85 Commits

Author SHA1 Message Date
Jonas Maebe
bd4f2057e5 --- Merging r43186 into '.':
U    compiler/ngtcon.pas
A    tests/webtbs/tw36156.pp
--- Recording mergeinfo for merge of r43186 into '.':
 U   .
--- Merging r43594 into '.':
U    compiler/ncnv.pas
A    tests/test/units/cocoaall/tw36362.pp
--- Recording mergeinfo for merge of r43594 into '.':
 G   .
--- Merging r44788 into '.':
U    packages/fpmkunit/src/fpmkunit.pp
--- Recording mergeinfo for merge of r44788 into '.':
 G   .
--- Merging r45380 into '.':
G    packages/fpmkunit/src/fpmkunit.pp
--- Recording mergeinfo for merge of r45380 into '.':
 G   .
--- Merging r45673 into '.':
U    compiler/pinline.pas
A    tests/webtbs/tw37228.pp
--- Recording mergeinfo for merge of r45673 into '.':
 G   .

git-svn-id: branches/fixes_3_2@45770 -
2020-07-11 14:40:18 +00:00
Jonas Maebe
858bf743ef --- Merging r43347 into '.':
C    compiler/nmat.pas
--- Recording mergeinfo for merge of r43347 into '.':
 G   .
--- Merging r43436 into '.':
U    compiler/defutil.pas
U    compiler/nadd.pas
U    compiler/ncnv.pas
U    compiler/ncon.pas
U    compiler/ngtcon.pas
U    compiler/ninl.pas
G    compiler/nmat.pas
U    compiler/nutils.pas
U    compiler/pstatmnt.pas
--- Recording mergeinfo for merge of r43436 into '.':
 G   .
--- Merging r43438 into '.':
A    tests/test/tinlrange1.pp
A    tests/test/tinlrange2.pp
A    tests/test/tinlrange3.pp
--- Recording mergeinfo for merge of r43438 into '.':
 G   .
--- Merging r43451 into '.':
U    tests/test/tinlrange1.pp
--- Recording mergeinfo for merge of r43451 into '.':
 G   .
--- Merging r43497 into '.':
C    compiler/nmat.pas
A    tests/test/tinlrange4.pp
--- Recording mergeinfo for merge of r43497 into '.':
 G   .

git-svn-id: branches/fixes_3_2@43498 -
2019-11-16 15:18:43 +00:00
florian
b6e7ebdd3c -- Zusammenführen von r42272 in ».«:
U    compiler/defutil.pas
A    tests/webtbf/tw35671.pp
-- Aufzeichnung der Informationen für Zusammenführung von r42272 in ».«:
 U   .
-- Zusammenführen von r42274 in ».«:
U    compiler/cgbase.pas
-- Aufzeichnung der Informationen für Zusammenführung von r42274 in ».«:
 G   .
-- Zusammenführen von r42275 in ».«:
U    compiler/defcmp.pas
C    compiler/defutil.pas
U    compiler/ncnv.pas
U    compiler/ncon.pas
U    compiler/ngtcon.pas
U    compiler/ninl.pas
U    compiler/pstatmnt.pas
A    tests/webtbf/tw35753.pp
-- Aufzeichnung der Informationen für Zusammenführung von r42275 in ».«:
 G   .

git-svn-id: branches/fixes_3_2@43367 -
2019-11-02 18:07:58 +00:00
Jonas Maebe
3ac703506c * rest of the previous accidental partial commit
git-svn-id: branches/fixes_3_2@41250 -
2019-02-07 19:56:21 +00:00
pierre
92cd9502ef Merge of revisions 40277
40307
40309
40314
40319
40322
40324
40326
40377
40378 from trunk to fixes_3_2
------------------------------------------------------------------------
r40277 | pierre | 2018-11-08 20:18:30 +0000 (Thu, 08 Nov 2018) | 1 line

 Implement mark_write override for tinilinenode
------------------------------------------------------------------------
--- Merging r40277 into '.':
U    compiler/ninl.pas
--- Recording mergeinfo for merge of r40277 into '.':
 U   .
------------------------------------------------------------------------
r40307 | pierre | 2018-11-13 15:10:21 +0000 (Tue, 13 Nov 2018) | 6 lines

  + Introduce PPC_SUFFIXES, new make variable that lists all ppc suffixes
    for all different CPUs supported.
  * Use PPC_SUFFIXES in execlean and CPU_clean targets.
  * Also delete CPU/bin subbirectory.


------------------------------------------------------------------------
--- Merging r40307 into '.':
U    compiler/Makefile
U    compiler/Makefile.fpc
--- Recording mergeinfo for merge of r40307 into '.':
 G   .
------------------------------------------------------------------------
r40309 | pierre | 2018-11-13 15:51:32 +0000 (Tue, 13 Nov 2018) | 1 line

 Try to avoid expectloc not set after first pass error for call node
------------------------------------------------------------------------
--- Merging r40309 into '.':
U    compiler/ncal.pas
--- Recording mergeinfo for merge of r40309 into '.':
 G   .
------------------------------------------------------------------------
r40314 | pierre | 2018-11-14 13:13:19 +0000 (Wed, 14 Nov 2018) | 4 lines

  * Change first parameter type of function is_continuous_maks to aword type.
    Add typecasts where needed to allow for successful compilation of arm-linux target
    with -CriotR options when building the compiler.

------------------------------------------------------------------------
--- Merging r40314 into '.':
U    compiler/arm/cpubase.pas
U    compiler/arm/cgcpu.pas
--- Recording mergeinfo for merge of r40314 into '.':
 G   .
------------------------------------------------------------------------
r40319 | pierre | 2018-11-15 16:58:40 +0000 (Thu, 15 Nov 2018) | 1 line

 Disable range check in m68k:tiscv32 and riscv64 cgcpu units
------------------------------------------------------------------------
--- Merging r40319 into '.':
   C compiler/riscv64
U    compiler/m68k/cgcpu.pas
   C compiler/riscv32
--- Recording mergeinfo for merge of r40319 into '.':
 G   .
Summary of conflicts:
  Tree conflicts: 2
------------------------------------------------------------------------
r40322 | pierre | 2018-11-15 22:01:25 +0000 (Thu, 15 Nov 2018) | 1 line

 Also disable range checking in arm/aoptcpu unit
------------------------------------------------------------------------
--- Merging r40322 into '.':
U    compiler/arm/aoptcpu.pas
--- Recording mergeinfo for merge of r40322 into '.':
 G   .
------------------------------------------------------------------------
r40324 | pierre | 2018-11-16 10:27:42 +0000 (Fri, 16 Nov 2018) | 4 lines

  * Disable range check for m68k/aoptcpu unit
  * Add missing change of var parameter p to next instruction
    in TryToOptimizeMove method after instruction removal.

------------------------------------------------------------------------
--- Merging r40324 into '.':
U    compiler/m68k/aoptcpu.pas
--- Recording mergeinfo for merge of r40324 into '.':
 G   .
------------------------------------------------------------------------
r40326 | pierre | 2018-11-16 13:28:26 +0000 (Fri, 16 Nov 2018) | 1 line

 Change local variables offsetdec and extraoffset type to ASizeInt
------------------------------------------------------------------------
--- Merging r40326 into '.':
U    compiler/ncgmem.pas
--- Recording mergeinfo for merge of r40326 into '.':
 G   .
------------------------------------------------------------------------
r40377 | pierre | 2018-11-27 10:19:36 +0000 (Tue, 27 Nov 2018) | 1 line

 Fix bug report 34605 and add corresponding test
------------------------------------------------------------------------
--- Merging r40377 into '.':
A    tests/webtbs/tw34605.pp
U    compiler/nutils.pas
--- Recording mergeinfo for merge of r40377 into '.':
 G   .
------------------------------------------------------------------------
r40378 | pierre | 2018-11-27 10:21:37 +0000 (Tue, 27 Nov 2018) | 1 line

 Avoid range errors or overflows on for AVR cpu, when computing address offsets
------------------------------------------------------------------------
--- Merging r40378 into '.':
U    compiler/ncgset.pas
U    compiler/ngtcon.pas
--- Recording mergeinfo for merge of r40378 into '.':
 G   .

git-svn-id: branches/fixes_3_2@40716 -
2018-12-31 15:48:08 +00:00
pierre
6205e530aa Merge commits 39912, 39914, 40001, 40115, 40132 and 40163
------------------------------------------------------------------------
r39912 | pierre | 2018-10-11 22:38:39 +0200 (Thu, 11 Oct 2018) | 1 line

 Fix ppuload for string type for i8086, use getasizeint for all string defs but short string
------------------------------------------------------------------------
------------------------------------------------------------------------
r39914 | pierre | 2018-10-12 08:05:50 +0200 (Fri, 12 Oct 2018) | 1 line

 Adapt ppudump to fix introduced in revision 39912
------------------------------------------------------------------------
------------------------------------------------------------------------
r40001 | pierre | 2018-10-21 00:19:08 +0200 (Sun, 21 Oct 2018) | 1 line

 Add explicit typecast to avoid range check error
------------------------------------------------------------------------
------------------------------------------------------------------------
r40115 | pierre | 2018-10-31 23:53:11 +0100 (Wed, 31 Oct 2018) | 1 line

 Avoid range check error in ReadPosInfo
------------------------------------------------------------------------
------------------------------------------------------------------------
r40132 | pierre | 2018-11-01 08:09:47 +0100 (Thu, 01 Nov 2018) | 1 line

 Only call moved if len>0, as otherwise astring local variable is nil, which leads to a range check error for astring[1]
------------------------------------------------------------------------
------------------------------------------------------------------------
r40163 | pierre | 2018-11-01 22:58:54 +0100 (Thu, 01 Nov 2018) | 8 lines

  More -CriotR fixes:
  * entfile.pas: Change PPU header falgs filed from longint to dword.
  * ngtcon.pas: Change local variable startoffset type to aword.
  * omfbase.pas: Avoid calling move with a nil string s indexed as s[1],
    to avoid a range check error.
  * owomflib.pas: Disable range check explicitly in hash computation.
  * utils/ppuutils/ppudump.pp: Adapt to flags type change in entfile.pas

------------------------------------------------------------------------

git-svn-id: branches/fixes_3_2@40519 -
2018-12-10 21:18:24 +00:00
svenbarth
b7cc225149 * revert r39043 and r39045 which disallow static array constants inside dynamic constants for Delphi modes
git-svn-id: trunk@39078 -
2018-05-21 08:13:17 +00:00
svenbarth
dcdb151add * prohibit static array constants inside dynamic array constants for Delphi modes
+ added test

git-svn-id: trunk@39045 -
2018-05-20 11:50:27 +00:00
svenbarth
a29a6abc55 + add support for Delphi's dynamic array constant syntax ("[...]") in Delphi modes
git-svn-id: trunk@39042 -
2018-05-20 11:50:19 +00:00
svenbarth
08dd4e5445 + add support for dynamic array constants
+ added test

git-svn-id: trunk@39041 -
2018-05-20 11:50:16 +00:00
florian
0caccdc238 * fix range check error
git-svn-id: trunk@36945 -
2017-08-20 15:21:48 +00:00
nickysn
efc5e339d0 * use an enum instead of integer constants to represent inline numbers
* compinnr.inc include file converted to a unit
* inline number field size stored in ppu increased from byte to longint
* inlines in the parse tree (when written with the -vp option) now printed with
  their enum name, instead of number

git-svn-id: trunk@36174 -
2017-05-10 14:41:43 +00:00
florian
b1dff29cbf * removed unused units
git-svn-id: trunk@36165 -
2017-05-09 19:53:14 +00:00
yury
5405a4727a * Removed unused vars.
git-svn-id: trunk@35535 -
2017-03-07 08:56:07 +00:00
Jonas Maebe
7af2663ed1 * fixed writing the VMT field of TP-style objects for typed constants if it
comes after the last defined field (previously, we emitted a bunch of
    superfluous zero-bytes after that field due to bad accounting regarding
    the last emitted field)
   o fixes webtbs/tw1365.pp for LLVM, and removes junk bytes for all targets

git-svn-id: trunk@35019 -
2016-11-29 21:54:27 +00:00
Jonas Maebe
9727f289b1 + tcalo_apply_constalign option to specify that the alignment should be
modified by applying user alignment settings (so it can be only done for
    user-defined data, not not for internally generated data)
   o set this option for user-defined data

git-svn-id: trunk@34633 -
2016-10-06 06:25:05 +00:00
Jonas Maebe
de60bfab9c * make the string data of pchar constants read-only (mantis #30666)
git-svn-id: trunk@34594 -
2016-10-02 12:56:40 +00:00
Jonas Maebe
ad0299e0cd * cleanup of r34444
git-svn-id: trunk@34482 -
2016-09-10 16:16:48 +00:00
Jonas Maebe
997a958f72 * fixed r34439 for big endian
git-svn-id: trunk@34444 -
2016-09-07 16:09:10 +00:00
Jonas Maebe
473cec9d85 * converted tnodeutils.InsertRuntimeInits() to the high level typed const
builder

git-svn-id: trunk@34443 -
2016-09-07 16:09:06 +00:00
Jonas Maebe
26f6d2f39d * emit smallsets as a single byte/word/cardinal, since that is how they
are handled in the code generator (and ncgcon) as well

git-svn-id: trunk@34439 -
2016-09-06 21:28:30 +00:00
Jonas Maebe
1cb8c0d00c * specify the def of assembler level symbols defined via
tasmdata.DefineAsmSymbol() and all routines that call it
   o will be used to automatically generate AB_INDIRECT sybols when
     necessary

git-svn-id: trunk@34164 -
2016-07-20 20:52:59 +00:00
Jonas Maebe
68cbbe677a * fixed type information for C-block typed constants (fixes
tests/test/tblock1.pp for llvm)

git-svn-id: trunk@34152 -
2016-07-19 14:30:33 +00:00
Jonas Maebe
0311528502 * always write bitpacked typed constant arrays as a multiple of bytes rather
than of their loadsize, because otherwise if they are e.g. part of a record
    they would occupy more space than allowed
   o adapted llvm code to deal with the fact that bitpacked arrays are now
     always arrays of bytes rather than arrays of integers with the same size
     as their loadsize -- this also fixes several type inconsistencies
     detected by llvm

git-svn-id: trunk@34125 -
2016-07-14 15:23:07 +00:00
Jonas Maebe
c71bc54785 * when emitting the procedure address part of a complex procvar, type
that address as an "address-only" procvar instead of supposedly
    emitting a complex procvar itself as the address part of that same
    complex procvar type (part of fixing test/tmaclocalprocparam4e.pp
    for llvm)

git-svn-id: trunk@34117 -
2016-07-14 15:18:01 +00:00
Jonas Maebe
8e2607d96d * data for bitpacked arrays is part of an aggregate
git-svn-id: trunk@34032 -
2016-06-30 15:33:40 +00:00
Jonas Maebe
b8ed0fac5d * give an error when trying to get the address of an element of a dynamic
string in a typed constant, like Delphi (instead of generating a bogus
    address)

git-svn-id: trunk@33958 -
2016-06-12 09:20:57 +00:00
Jonas Maebe
092a0af0ec * removed special-purpose code for constant chars while parsing typed string
constants: it did not properly handle ansistring code pages, and was just a
    hack to speed things up a bit (mantis #29153)

git-svn-id: trunk@32636 -
2015-12-11 15:33:28 +00:00
Jonas Maebe
8f57609ef2 * fixed types for classrefdef typed constants
git-svn-id: trunk@32471 -
2015-11-22 11:49:36 +00:00
Jeppe Johansen
0046af39eb Fixed #29025.
Some architecture bit-nesses were missing.

git-svn-id: trunk@32442 -
2015-11-21 17:05:00 +00:00
Jonas Maebe
8d8851afd6 * set minimum alignment for pchar to 1 instead of 0 (llvm doesn't
support alignment 0)

git-svn-id: trunk@32405 -
2015-11-21 12:36:42 +00:00
svenbarth
0ff87336aa Convert the Boolean parameters accept_equal, typeonly and hadspecialize of comp_expr(), sub_expr() and factor() to a set parameter and adjust all calls.
pexpr.pas:
  + new enum texprflag and corresponding set texprflags
  * comp_expr: replace accept_equal and typeonly with texprflags parameter
  * factor: replace typeonly and hadspecialize with texprflags parameter
  * sub_expr: replace accept_equal and typeonly with texprflags parameter
  * adjust calls to comp_expr(), factor() and sub_expr()
other units:
  * adjust calls to comp_expr(), factor() and sub_expr() 

git-svn-id: trunk@32269 -
2015-11-07 21:45:03 +00:00
nickysn
072139cdb7 * fixed ofs(procedure) as well
git-svn-id: trunk@32205 -
2015-10-30 19:30:33 +00:00
Jonas Maebe
e93660c170 - removed ttai_lowleveltypedconstbuilder.queue_addrn(), as we are always
implicitly taking the address of a complex expression in a typed constant
    (you cannot put the contents of another memory location in a typed
    constant)

git-svn-id: trunk@31252 -
2015-07-30 16:58:07 +00:00
Jonas Maebe
f40ea04540 * changed getarraydef() into a tarraydef.getreusable() class method
git-svn-id: trunk@31147 -
2015-06-23 21:23:18 +00:00
Jonas Maebe
9ceddf9b16 * fix tasmlisttypedconstbuilder memory leaks
git-svn-id: trunk@30851 -
2015-05-14 14:42:25 +00:00
Jonas Maebe
93fcdb9a5a * fixed initialisation of procvar typed const with a pointerconstn:
we start a typeconversion queue before, so we have to emit to that
    queue as well (to get all the type conversions)

git-svn-id: trunk@30850 -
2015-05-14 14:42:22 +00:00
Jonas Maebe
d71f6e9840 - removed extraneous maybe_begin_aggregate() when a procvar is initialised
with a pointerconstn, and moved the maybe_end_aggregate() for all procvar
    initialisation cases to a common location

git-svn-id: trunk@30849 -
2015-05-14 14:42:19 +00:00
Jonas Maebe
3be51e1455 * fixed endless recursion in tabstractrecorddef.contains_float_field() in
case a record contains an internal typed constant of its own type
    (which happened becuase such a typed constant is also fieldvarsym, solved
     by checking for sp_static) (mantis #27880)
  * fixed several other similar cases in the compiler where we are only
    interested in instance fields, but processed all fieldvarsyms

git-svn-id: trunk@30614 -
2015-04-16 21:25:22 +00:00
Jonas Maebe
419a97cce8 * changed emit_ansistring_const() and emit_unicodestring_const() into
instance methods that make use of the internal data builder
    functionality so they automatically place all string data in the
    same section if possible

git-svn-id: branches/hlcgllvm@30342 -
2015-03-27 21:25:53 +00:00
Jonas Maebe
6ed273eec5 * support specifying the name of an internal data section
git-svn-id: branches/hlcgllvm@30341 -
2015-03-27 21:25:50 +00:00
Jonas Maebe
a76aba4a20 * converted a number of string data generators to the internal data builder
functionality

git-svn-id: branches/hlcgllvm@30340 -
2015-03-27 21:25:47 +00:00
Jonas Maebe
5e1bb8e408 + tcalo_make_dead_strippable to indicate that a typed constant data block
should be dead-strippable; may imply the creation of a separate section
    (on platforms that dead-strip data based on sections), but does not
    require it
  * replaced all existing tcalo_new_section uses with
    tcalo_make_dead_strippable, as that is their meaning/purpose

git-svn-id: branches/hlcgllvm@30335 -
2015-03-27 21:25:30 +00:00
Jonas Maebe
e924dbed90 * moved the specification of the options for a ttai_typedconstbuilder from
get_final_asmlist() to the constructor, in preparation of supporting the
    creation of internal builders for local data that will ignore some of the
    irrelevant flags (at creation time)

git-svn-id: branches/hlcgllvm@30334 -
2015-03-27 21:25:27 +00:00
Jonas Maebe
765044aede * fixed a number of (mostly false) warnings regarding uninitialised
variables with -Oodfa

git-svn-id: branches/hlcgllvm@30244 -
2015-03-15 21:10:50 +00:00
Jonas Maebe
b931f78b4b * insert a type conversion from ordinal to pointer for pointerconstn
git-svn-id: branches/hlcgllvm@30129 -
2015-03-07 21:44:01 +00:00
Jonas Maebe
9c42437326 * moved tasmlisttypedconstbuilder.tc_emit_string_offset() to
ttai_typedconstbuilder.emit_string_offset() so it can also be used outside
    the context of parsing a Pascal-level typed constant

git-svn-id: branches/hlcgllvm@30111 -
2015-03-06 19:45:04 +00:00
Jonas Maebe
67b8aceaee * synchronized with privatetrunk till r30095
git-svn-id: branches/hlcgllvm@30101 -
2015-03-05 20:32:15 +00:00
florian
461821d1a5 * read array initializations in generic subroutines without fixed limits, resolves #25602
git-svn-id: trunk@29598 -
2015-02-01 17:09:00 +00:00
Károly Balogh
37cf157d7d initialize pd to fix a warning with O3+
git-svn-id: trunk@29518 -
2015-01-22 12:07:50 +00:00