Commit Graph

147 Commits

Author SHA1 Message Date
florian
3ef2ab1019 * cleaning up tcgsize: it makes no sense to declare every combination and type
the different vector types must be either handled in the high level cg or
    by using the shuffle parameter

git-svn-id: trunk@43860 -
(cherry picked from commit b7c6e01b03)
2022-02-13 12:00:45 +01:00
svenbarth
c60ce2af07 --- Merging r43264 into '.':
U    compiler/dbgdwarf.pas
--- Recording mergeinfo for merge of r43264 into '.':
 U   .
--- Merging r45050 into '.':
U    compiler/defutil.pas
U    compiler/nmat.pas
--- Recording mergeinfo for merge of r45050 into '.':
 G   .
--- Merging r45051 into '.':
U    compiler/scanner.pas
--- Recording mergeinfo for merge of r45051 into '.':
 G   .
--- Merging r45052 into '.':
G    compiler/scanner.pas
--- Recording mergeinfo for merge of r45052 into '.':
 G   .
--- Merging r45053 into '.':
G    compiler/scanner.pas
A    tests/tbs/tb0670.pp
--- Recording mergeinfo for merge of r45053 into '.':
 G   .
--- Merging r47601 into '.':
G    compiler/scanner.pas
--- Recording mergeinfo for merge of r47601 into '.':
 G   .
--- Merging r47602 into '.':
U    compiler/scandir.pas
U    tests/tbs/tb0596.pp
--- Recording mergeinfo for merge of r47602 into '.':
 G   .

git-svn-id: branches/fixes_3_2@47804 -
2020-12-17 22:08:25 +00:00
svenbarth
e6ad8a0dfa Merged revision(s) 44172, 44188, 45457 - 45458, 45645, 46218, 46953 from trunk:
r46953
* fix for Mantis #37806: allow undefineddefs for Include() and Exclude() + added tests
---------------------
r46218
* fix for Mantis #37187: inside generics the constant code in pexpr does not handle all cases and thus current_procinfo needs to be checked as well + added test
---------------------
r45645
* correctly set the generic related defoptions for an outlined procdef
---------------------
r45458
  * make more use of is_typeparam
---------------------
r45457
  * constrained type parameters are not undefined defs, resolves #37107
---------------------
r44188
* keep track of the fileposinfo for generic constraints
---------------------
r44172
* only resolve a dummy symbol if it is a type symbol (thus truly a dummy symbol) + added tests
---------------------

git-svn-id: branches/fixes_3_2@47802 -
2020-12-17 21:31:16 +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
florian
8c5606b41d + support mmx shifting
git-svn-id: trunk@38367 -
2018-02-27 21:40:12 +00:00
florian
31f78ea2b6 + implementation of the vectorcall calling convention by J. Gareth Moreton
+ tests

git-svn-id: trunk@38206 -
2018-02-11 17:50:37 +00:00
michael
f6a08a2c74 * Patch from Ondrej Pokorny to allow correct nodefault/stored for strings
git-svn-id: trunk@37954 -
2018-01-13 10:22:16 +00:00
Jonas Maebe
4014f900cb * fixed get_iso_range_type() for non-integer orddefs (belongs with r37934)
git-svn-id: trunk@37938 -
2018-01-09 19:03:36 +00:00
Jonas Maebe
a2217cedd5 * evaluate the lower and upper bounds of for-loops in ISO mode using the
ISO-defined range type, instead of using the type of the iteration
    variable (mantis #24318)

git-svn-id: trunk@37934 -
2018-01-07 18:51:53 +00:00
svenbarth
7e692fac2b + new utility function get_typekind() to retrieve the TTypeKind value of a def
git-svn-id: trunk@36874 -
2017-08-11 22:02:22 +00:00
svenbarth
0c42b6f44a * fix for Mantis #32118: also provide a range for undefined defs
+ added test

git-svn-id: trunk@36723 -
2017-07-10 19:47:21 +00:00
nickysn
876c0c5fd5 + added helper function are_equal_ints()
git-svn-id: trunk@35761 -
2017-04-10 13:22:50 +00:00
Károly Balogh
5426c11611 marked a few uses of TConstExprInt as const during parameter passing, to avoid a few unnecessary record copying
git-svn-id: trunk@35509 -
2017-03-03 17:29:59 +00:00
nickysn
657685a8b6 * use sizesinttype instead of ptrsinttype for the index and high parameter of
open arrays/dynarrays/string-like char arrays, etc.

git-svn-id: trunk@34665 -
2016-10-08 13:56:24 +00:00
Jonas Maebe
33b44443b8 + get_unsigned_inttype(def) to get an unsigned integer type of the same
size as the provided def (must be an orddef or enumdef)

git-svn-id: trunk@34033 -
2016-06-30 15:33:43 +00:00
Jonas Maebe
75a6ba4113 - removed symcpu dependencies
git-svn-id: trunk@31047 -
2015-06-13 22:47:59 +00:00
Jonas Maebe
146e3bcb9e * synchronised with trunk till r29513
git-svn-id: branches/blocks@29516 -
2015-01-21 23:28:34 +00:00
Jonas Maebe
e97f31541e - reverted partial commit of merge
git-svn-id: branches/blocks@29515 -
2015-01-21 23:24:37 +00:00
Jonas Maebe
a76bbf363d * synchronised with trunk r29513
git-svn-id: branches/blocks@29514 -
2015-01-21 23:18:29 +00:00
nickysn
4ea551a0f7 * is_farpointer and is_hugepointer moved from defutil to symcpu
git-svn-id: trunk@28328 -
2014-08-06 20:32:41 +00:00
nickysn
33dac14554 * defutil.get_int_type_for_pointer_arithmetic replaced with a virtual method
tpointerdef.pointer_arithmetic_int_type

git-svn-id: trunk@28258 -
2014-07-24 14:18:57 +00:00
Jonas Maebe
c730e16031 * changed the syntax for block procvars from "xxx is block" to
"reference to ...; cdecl;". The "reference to ..." syntax is what Delphi
    uses for anonymous function references. The "cdecl;" indicates that this
    is for the C-variant of such references, which is what blocks are

git-svn-id: branches/blocks@28233 -
2014-07-18 09:15:29 +00:00
nickysn
d86a8ebc99 * defutil.get_int_result_type_from_pointer_subtraction moved to a virtual
method tpointerdef.pointer_subtraction_result_type

git-svn-id: trunk@28219 -
2014-07-14 23:30:29 +00:00
nickysn
99c555cea8 + implemented huge pointer subtraction
* the result of far pointer subtraction changed to word (for TP7 compatibility)

git-svn-id: trunk@28218 -
2014-07-13 23:40:43 +00:00
nickysn
89db1e4118 + add proper int type conversions for huge pointer arithmetic in pass_typecheck
of the add node

git-svn-id: trunk@28094 -
2014-06-27 23:37:08 +00:00
Jonas Maebe
24f4adf657 * set the rangedef of open arrays to ptrsinttype (instead of s32inttype),
so that it's the same as the def returned by the low/high nodes
    (mantis #25703)

git-svn-id: trunk@27970 -
2014-06-15 15:26:47 +00:00
Jonas Maebe
338c064beb * moved x86-specific tpointerdef functionality to architecture-specific
descendants

git-svn-id: trunk@27397 -
2014-03-30 21:04:36 +00:00
sergei
1744988962 * Modified behavior of CExtended type in overload selection: it is made more compatible to Extended than to Double and Single. Also an Extended parameter selects a CExtended overload (if available) instead of Double.
+ Test.

git-svn-id: trunk@27366 -
2014-03-30 07:31:58 +00:00
nickysn
f6b18e9b8d * i8086 far data memory model fixes in defutil.def_cgsize
git-svn-id: trunk@27247 -
2014-03-23 22:14:09 +00:00
nickysn
894d400a7b + added is_farpointer(tdef) and is_hugepointer(tdef) helper functions to defutil
git-svn-id: trunk@24865 -
2013-06-10 20:50:05 +00:00
nickysn
bfd65ea550 * use tprocvardef(def).size (which takes into account far code/data) to determine cgsize for procvars in def_cgsize
git-svn-id: trunk@24844 -
2013-06-09 17:51:56 +00:00
sergei
4e873d0561 + Determine early (before pass 2) whether managed parameters/locals/temps will cause the procedure to reference RTTI labels and, therefore, need GOT.
+ trttinode also sets pi_needs_got flag.

git-svn-id: trunk@24767 -
2013-06-02 13:09:47 +00:00
Jonas Maebe
7d9f98e516 + def_cgmmsize() that returns a vector tcgsize for arraydefs (as generated
for certain parameter locations in the x86-64 parameter manager)
  * full support for vector types in the high level code generator by
    translating arraydefs passed to a_*mm*() methods into vector tcgsizes

git-svn-id: trunk@24762 -
2013-06-02 10:24:08 +00:00
Jonas Maebe
53ba7fbb8b * support formaldef in def_cgsize (-> OS_ADDR)
git-svn-id: trunk@24760 -
2013-06-02 10:23:54 +00:00
Jonas Maebe
2dd75e707e * renamed thlcgobj.tcgsize2orddef to defutil.cgsize_orddef
git-svn-id: trunk@24743 -
2013-06-01 18:28:15 +00:00
nickysn
42b2228dc7 + far pointer support in defutil.def_cgsize
git-svn-id: trunk@24552 -
2013-05-22 12:30:34 +00:00
nickysn
2486009d37 + support u64bit as well in defutil.range_to_basetype
git-svn-id: branches/i8086@24173 -
2013-04-07 10:57:27 +00:00
nickysn
d88855566a + added defutil.is_nativesint and is_nativeuint
git-svn-id: branches/i8086@24167 -
2013-04-06 23:03:12 +00:00
nickysn
70d02e6942 + added defutil.is_nativeint and is_nativeord
git-svn-id: branches/i8086@24166 -
2013-04-06 22:58:04 +00:00
nickysn
7bce3c5208 * reverse the order of checks for determining the native int type (e.g. 8086 in large memory model would have 32-bit addresses, but a 16-bit native int)
git-svn-id: branches/i8086@24165 -
2013-04-06 22:44:07 +00:00
nickysn
848eeceded * use min and max in defutil.get_common_intdef
git-svn-id: branches/i8086@24120 -
2013-04-01 20:25:42 +00:00
nickysn
a8d72cc11a * bug fix in defutil.get_common_intdef
git-svn-id: branches/i8086@24115 -
2013-04-01 19:25:11 +00:00
nickysn
9c435a0bcb + added is_8/16bit and is_oversizedint/is_oversizedord helper functions in defutil.pas
git-svn-id: branches/i8086@24091 -
2013-03-31 16:25:22 +00:00
nickysn
a68dfed450 * defutil.is_smallset updated for 8/16-bit CPUs
git-svn-id: branches/i8086@23894 -
2013-03-17 15:31:57 +00:00
nickysn
a274e62724 + added defutil.is_32bit helper function, similar to is_64bit
git-svn-id: branches/i8086@23869 -
2013-03-16 17:54:52 +00:00
nickysn
f048e3fd3b + support 16-bit pointers (i8086 near pointers) in defutil.def_cgsize
git-svn-id: branches/i8086@23816 -
2013-03-13 17:19:21 +00:00
florian
761fcca4ec + is_dynamicstring
+ implement low/high for dynamic strings, resolves #15244 and #22936
+ basic support for $zerobasedstrings directive

git-svn-id: trunk@22933 -
2012-11-04 21:48:53 +00:00
florian
ca5fabda6d * cleanup some unused units from uses clauses
git-svn-id: trunk@22433 -
2012-09-21 18:53:46 +00:00