Jonas Maebe
8de8d4c29b
* don't call FPC_CHECKPOINTER for references built from a LOC_CONSTANT
...
(mantis #13522 )
git-svn-id: trunk@13031 -
2009-04-24 13:08:39 +00:00
Jonas Maebe
7d459cf12a
* the compiler now explicitly keeps track of the minimally guaranteed
...
alignment for each memory reference (mantis #12137 , and
test/packages/fcl-registry/tregistry1.pp on sparc). This also
enables better code generation for packed records in many cases.
o several changes were made to the compiler to minimise the chances
of accidentally forgetting to set the alignment of memory references
in the future:
- reference_reset*() now has an extra alignment parameter
- location_reset() can now only be used for non LOC_(C)REFERENCE,
use location_reset_ref() for those (split the tloc enum so the
compiler can catch errors using range checking)
git-svn-id: trunk@12719 -
2009-02-08 13:00:24 +00:00
Jonas Maebe
a23630260b
+ "weakexternal" support for imported procedures and variables.
...
the syntax is exactly the same as for "external", except for
the keyword. It is currently only active for Darwin targets.
It should also work at least for Linux targets, but only with
the GNU assembler (which is why it is not activated there)
+ test for this functionality
git-svn-id: trunk@12009 -
2008-11-01 18:38:32 +00:00
florian
db196d76c2
+ strength reduction for array accesses inside for loops
...
* export get_mul_size so we can use it for strength reduction
* ensure loop counter is marked as being written
* typos fixed
git-svn-id: trunk@11825 -
2008-09-26 18:23:31 +00:00
Jonas Maebe
4971e432de
* reduced register pressure when indexing arrays with regvars (regvar
...
no longer needs to be copied to a temporary register if it isn't
modified)
git-svn-id: trunk@11777 -
2008-09-14 16:11:22 +00:00
florian
b178b08ba7
Merged revisions 11665-11738 via svnmerge from
...
http://svn.freepascal.org/svn/fpc/branches/unicodestring
........
r11665 | florian | 2008-08-30 13:30:17 +0200 (Sat, 30 Aug 2008) | 1 line
* continued to work on unicodestring type support
........
r11666 | florian | 2008-08-30 19:02:26 +0200 (Sat, 30 Aug 2008) | 2 lines
* expectloc for wide/ansi/unicode strings is LOC_CONSTANT or LOC_REGISTER now
........
r11667 | florian | 2008-08-30 20:42:37 +0200 (Sat, 30 Aug 2008) | 1 line
* more unicodestring stuff fixed, test results on win32 are already good
........
r11670 | florian | 2008-08-30 23:21:48 +0200 (Sat, 30 Aug 2008) | 2 lines
* first fixes for unix bootstrapping
........
r11683 | ivost | 2008-09-01 12:46:39 +0200 (Mon, 01 Sep 2008) | 2 lines
* fixed 64bit bug in iconvenc.pas
........
r11689 | florian | 2008-09-01 23:12:34 +0200 (Mon, 01 Sep 2008) | 1 line
* fixed several errors when building on unix
........
r11694 | florian | 2008-09-03 20:32:43 +0200 (Wed, 03 Sep 2008) | 1 line
* fixed unix compilation
........
r11695 | florian | 2008-09-03 21:01:04 +0200 (Wed, 03 Sep 2008) | 1 line
* bootstrapping fix
........
r11696 | florian | 2008-09-03 21:07:18 +0200 (Wed, 03 Sep 2008) | 1 line
* more bootstrapping fixed
........
r11698 | florian | 2008-09-03 22:47:54 +0200 (Wed, 03 Sep 2008) | 1 line
+ two missing compiler procs exported
........
r11701 | florian | 2008-09-04 16:42:34 +0200 (Thu, 04 Sep 2008) | 2 lines
+ lazarus project for the linux rtl
........
r11702 | florian | 2008-09-04 16:43:27 +0200 (Thu, 04 Sep 2008) | 2 lines
+ set unicode string procedures
........
r11707 | florian | 2008-09-04 23:23:02 +0200 (Thu, 04 Sep 2008) | 2 lines
* fixed several type casting stuff
........
r11712 | florian | 2008-09-05 22:46:03 +0200 (Fri, 05 Sep 2008) | 1 line
* fixed unicodestring compilation on windows after recent unix changes
........
r11713 | florian | 2008-09-05 23:35:12 +0200 (Fri, 05 Sep 2008) | 1 line
+ UnicodeString support for Variants
........
r11715 | florian | 2008-09-06 20:59:54 +0200 (Sat, 06 Sep 2008) | 1 line
* patch by Martin Schreiber for UnicodeString streaming
........
r11716 | florian | 2008-09-06 22:22:55 +0200 (Sat, 06 Sep 2008) | 2 lines
* fixed test
........
r11717 | florian | 2008-09-07 10:25:51 +0200 (Sun, 07 Sep 2008) | 1 line
* fixed typo when converting tunicodestring to punicodechar
........
r11718 | florian | 2008-09-07 11:29:52 +0200 (Sun, 07 Sep 2008) | 3 lines
* fixed writing of UnicodeString properties
* moved some helper routines to unicode headers
........
r11734 | florian | 2008-09-09 22:38:55 +0200 (Tue, 09 Sep 2008) | 1 line
* fixed bootstrapping
........
r11735 | florian | 2008-09-10 11:25:28 +0200 (Wed, 10 Sep 2008) | 2 lines
* first fixes for persisten unicodestrings
........
r11736 | florian | 2008-09-10 14:31:00 +0200 (Wed, 10 Sep 2008) | 3 lines
Initialized merge tracking via "svnmerge" with revisions "1-11663" from
http://svn.freepascal.org/svn/fpc/trunk
........
r11737 | florian | 2008-09-10 21:06:57 +0200 (Wed, 10 Sep 2008) | 3 lines
* fixed unicodestring <-> variant handling
* fixed unicodestring property reading
........
git-svn-id: trunk@11739 -
2008-09-10 20:14:31 +00:00
Jonas Maebe
a60a957420
* fixed setting bitpacked record fields straddling their natural boundaries
...
to 0 or field_type(-1) (bug noted by Russell Davies on fpc-devel + his
test programs)
* fixed bit offset calculations for nested bitpacked record regvars
git-svn-id: trunk@11242 -
2008-06-18 16:31:39 +00:00
tom_at_work
4aced9802c
* fix tw8191 for all architectures: skip code generation for range checking also when the range checking has to be done dynamically for pointers accessed as arrays which were typecasted from an array
...
git-svn-id: trunk@11037 -
2008-05-22 12:52:26 +00:00
Jonas Maebe
242b335531
* fixed widestring range checking on win64 (mantis #10450 , fix also
...
depends on r10505)
git-svn-id: trunk@10506 -
2008-03-18 23:09:12 +00:00
Jonas Maebe
f36e5411af
* split cpu64bit compiler define into
...
a) cpu64bitaddr, which means that we are generating a compiler which
will generate code for targets with a 64 bit address space/abi
b) cpu64bitalu, which means that we are generating a compiler which
will generate code for a cpu with support for 64 bit integer
operations (possibly running in a 32 bit address space, depending
on the cpu64bitaddr define)
All cpus which had cpu64bit set now have both the above defines set,
and none of the 32 bit cpus have cpu64bitalu set (and none will
compile with it currently)
+ pint and puint types, similar to aint/aword (not pword because that
that conflicts with pword=^word)
* several changes from aint/aword to pint/pword
* some changes of tcgsize2size[OS_INT] to sizeof(pint)
git-svn-id: trunk@10320 -
2008-02-13 20:44:00 +00:00
florian
ae79ef2cb5
* don't range pointers converted to arrays, resolves #8191
...
git-svn-id: trunk@8900 -
2007-10-21 19:05:06 +00:00
peter
6b8aed593f
* remove registers{int/mmx/fpu} from firstpass
...
* small cleanups of unused variables in firstpass
* node_resources_fpu() created to get an approximation of the
required fpu registers
* for the moment use node_complexity in the CG until the
node_resource_int() is created
git-svn-id: trunk@8655 -
2007-09-26 21:12:01 +00:00
Jonas Maebe
b02fd37fbe
* removed some unused variables
...
git-svn-id: trunk@8399 -
2007-09-08 08:45:12 +00:00
Jonas Maebe
b99c1e9fed
* fixed calculation of offset of constant indexing of bitpacked arrays of
...
non-ordinal types (mantis #9174 )
git-svn-id: trunk@7847 -
2007-06-29 15:34:11 +00:00
daniel
9adb202a92
* Rework the constexprint to allow operations from low(int64) to high(qword).
...
+ Some initial work on a formaldef which also carries the typinfo of a parameter.
git-svn-id: trunk@7639 -
2007-06-13 07:41:18 +00:00
Jonas Maebe
de75b34dba
* fixed another IE with indexing bitpacked arrays of composite types,
...
this time with constant rather than variable indices
git-svn-id: trunk@7599 -
2007-06-08 13:53:01 +00:00
Jonas Maebe
65e35ac401
* fixed internal error with bitpacked arrays of composite types whose
...
size is not a power of two
git-svn-id: trunk@7596 -
2007-06-08 09:11:08 +00:00
Jonas Maebe
4ce4742bc8
* mark invisible high parameters of open arrays/arrays of const
...
of parent procedures which are implicitly accessed from within
nested procedures for range checking purposes as non-regable in
the resulttype pass of the nested procedure (as opposed to in its
pass1/pass2, because by then the regvar assignment of the parent
procedure is already finished) (mantis #8975 )
* related fix regarding checking whether the high parameter actually
exists (must check calling convention of the procedure to which the
high parameter belongs, which is not the same as checking that of
the current procedure in case of nested procedures)
git-svn-id: trunk@7512 -
2007-05-29 13:42:49 +00:00
florian
eb8b2fb138
* be more carefull with unaligned load optimization
...
git-svn-id: trunk@6356 -
2007-02-07 17:43:56 +00:00
florian
84726ed76c
* copy unique return value to address register on m68k
...
git-svn-id: trunk@5554 -
2006-12-07 20:10:00 +00:00
Jonas Maebe
e04e668640
* give internalerror if trying to take the address of something else
...
than a LOC_REFERENCE or LOC_CREFERENCE
git-svn-id: trunk@5408 -
2006-11-16 20:23:55 +00:00
peter
658c46b903
* remove tdictionary and tindexarray
...
* symtables based on TFPHashObjectList and TFPObjectList
* rename torddef.typ to torddef.ordtype
* rename tfloatdef.typ to tfloatdef.floattype
* rename tdef.deftype to tdef.typ
* remove obsolete browser code, browcol is kept so the ide
can still be compiled
git-svn-id: trunk@5192 -
2006-11-03 00:30:30 +00:00
florian
85d63d9fa9
* settings refactored
...
git-svn-id: trunk@5094 -
2006-10-30 18:02:58 +00:00
peter
3078a1927f
* remove ttype
...
* rename old ttype variables *type to *def
* rename resulttypepass to pass_typecheck
* rename pass_2 to pass_generate_code
git-svn-id: trunk@5077 -
2006-10-29 22:19:39 +00:00
daniel
068c0f7952
* Cleaner implementation of pointer index to open array, codegen changes
...
no longer necessary and therefore reverted.
git-svn-id: trunk@5037 -
2006-10-27 20:57:51 +00:00
daniel
2450f5a778
+ First working concept of open_array_procedure(Pbyte_var[0..9]);
...
git-svn-id: trunk@5028 -
2006-10-26 20:30:16 +00:00
Jonas Maebe
25059eb03d
* only potentially change size of vecn results in case of packed arrays
...
git-svn-id: trunk@4681 -
2006-09-22 09:24:42 +00:00
Jonas Maebe
6be389e954
* fixed bug in r4674
...
git-svn-id: trunk@4678 -
2006-09-21 20:34:18 +00:00
Jonas Maebe
cc6a91a9bc
* fixed packed arrays of enums in case of packenum 2/4
...
git-svn-id: trunk@4674 -
2006-09-21 14:46:32 +00:00
Jonas Maebe
6997121c18
* also perform "SSA" for certain loads (currently derefn, righthand side of
...
assignmentn and callparan), reduces number of long lived conflicts.
Mainly helpful on register-starved cpus such as i386.
git-svn-id: trunk@4606 -
2006-09-10 16:21:50 +00:00
Jonas Maebe
1f42ee201b
+ support for bitpacked records, except for:
...
* rtti
* typed constants
git-svn-id: trunk@4489 -
2006-08-23 15:44:13 +00:00
Jonas Maebe
1ab3d81541
* also use LOC_CSUBSETREF
...
* set expectloc properly for packed arrays
git-svn-id: trunk@4480 -
2006-08-20 19:28:10 +00:00
florian
8102053adc
* fixed compilation on 64 bit CPUs
...
git-svn-id: trunk@4464 -
2006-08-20 09:25:37 +00:00
Jonas Maebe
eccbc78e04
+ support for bitpacked arrays:
...
+ use {$bitpacking on/+} to change the meaning of "packed"
into "bitpacked" for arrays. This is the default for MacPas.
You can also define individual arrays as "bitpacked", but
this is not encouraged since this keyword is not known by
other compilers and therefore makes your code unportable.
+ pack(unpackedarray,index,packedarray) to pack
length(packedarray) elements starting at
unpackedarray[index] into packedarray.
+ unpack(packedarray,unpackedarray,index) to unpack
packedarray into unpackedarray, with the first
element being stored at unpackedarray[index]
* todo:
* "open packed arrays" and rtti for packed arrays are not
yet supported
* gdb does not properly support bitpacked arrays
git-svn-id: trunk@4449 -
2006-08-19 12:54:12 +00:00
Jonas Maebe
c25aba7592
* cleaned up subsetreg support (put everything in a record)
...
* prepared support for elements with arbitrary bit length (as opposed
to a multiple of 8)
git-svn-id: trunk@4324 -
2006-08-01 20:39:53 +00:00
Jonas Maebe
df973fa1de
* fixed issue #6977 (add regvars occupied by the invisible high parameter
...
of "open array" and "array of const" parameters to the used regvars
for their array accesses if range checking is turned on)
git-svn-id: trunk@3914 -
2006-06-21 18:24:01 +00:00
Jonas Maebe
84d1fc929f
* properly set regvarability of parameters and local variables of inlined
...
functions
* fixed setting of expectloc for fields of regvar'ed records
git-svn-id: trunk@3607 -
2006-05-20 23:37:55 +00:00
Jonas Maebe
e344ee3cd7
+ support for register variables which contain records
...
git-svn-id: trunk@3580 -
2006-05-19 15:49:07 +00:00
florian
5e4ff16934
* access packed records with unaligned data accesses
...
git-svn-id: trunk@3365 -
2006-04-29 17:44:27 +00:00
peter
0ec2921bbe
* split newasmsymbol to refasmsymbol and defineasmsymbol
...
git-svn-id: trunk@3057 -
2006-03-27 11:45:18 +00:00
Jonas Maebe
2e41b63710
* support subscripting record function results on ABI's that return
...
(some) records in registers (+ internalerror if unsupported
record location). Fixes "make all" in top dir on darwin/x86.
git-svn-id: trunk@2973 -
2006-03-19 20:01:11 +00:00
peter
b7fe6797bf
Merged revisions 2921-2922,2925 via svnmerge from
...
http://svn.freepascal.org/svn/fpc/branches/linker/compiler
........
r2921 | peter | 2006-03-15 08:35:00 +0100 (Wed, 15 Mar 2006) | 2 lines
* pass ObjectWriter to ObjectOuput
........
r2922 | peter | 2006-03-15 12:40:30 +0100 (Wed, 15 Mar 2006) | 2 lines
* refactor asmdata
........
r2925 | peter | 2006-03-15 16:09:39 +0100 (Wed, 15 Mar 2006) | 3 lines
* add cfi to asmdata
* move asmlist, asmcfi, asmdata to own unit
........
git-svn-id: trunk@2932 -
2006-03-16 08:52:22 +00:00
peter
b6e35a200e
* rewrite of optimizer options
...
git-svn-id: trunk@2901 -
2006-03-13 09:05:50 +00:00
Jonas Maebe
e668ef560a
* fixed bug in r2738
...
git-svn-id: trunk@2743 -
2006-03-04 21:37:19 +00:00
Jonas Maebe
b063d47aa1
* fixed web bug #4872
...
git-svn-id: trunk@2738 -
2006-03-04 20:04:35 +00:00
Jonas Maebe
1b8baa3bce
* set resultloc for interfacecom in subscriptn
...
git-svn-id: trunk@2537 -
2006-02-12 15:38:56 +00:00
Jonas Maebe
9f8753c6c0
* fixed web bug #4669 (usage of location.loc instead of expectloc)
...
git-svn-id: trunk@2236 -
2006-01-08 21:11:04 +00:00
Jonas Maebe
ea89d8a881
* don't move addresses in a LOC_CREGISTER to another register for
...
derefnodes
git-svn-id: trunk@2190 -
2006-01-05 20:46:20 +00:00
peter
95879fe8a7
* basic support for generic classes
...
git-svn-id: trunk@2020 -
2005-12-21 10:11:15 +00:00
peter
89297d2c39
* move all stabs ($ifdef gdb) code to dbgstabs
...
git-svn-id: trunk@1255 -
2005-10-02 11:17:05 +00:00