peter
e17b424e28
* refactor procsym procdef list
...
git-svn-id: trunk@5210 -
2006-11-03 18:44:46 +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
Jonas Maebe
5acc8b44a8
* activated internal get_frame for x86
...
* turn off stackframe optimizations on x86 if get_frame is called
in the current routine, or if the address of a nested function
is taken in the current routine
+ test for the above
* this fixes the IDE when compiled with stackframe optimizations
on x86
git-svn-id: trunk@5146 -
2006-11-01 12:48:53 +00:00
florian
a3a650ee73
* fixed more line numering output
...
* proper error message for generic methods not found
* fix small bug in replaying
git-svn-id: trunk@5121 -
2006-10-31 13:17:36 +00:00
florian
bce905b106
* give correct error locations for errors when specializing templates
...
* removed more germanisms
* better dumping of tokenbuf in ppudump
git-svn-id: trunk@5101 -
2006-10-30 23:28:06 +00:00
florian
ef7bd58c54
* germanism removed (aktfilepos -> current_filepos)
...
git-svn-id: trunk@5099 -
2006-10-30 22:37:31 +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
florian
02d0ac4c3e
+ only procedures doing recursive calls are checked for tail recursivity
...
+ parameters are tested if they are usable with tail recursion removal
git-svn-id: trunk@4853 -
2006-10-10 20:29:48 +00:00
florian
82b7b785f7
+ TAILREC optimizer switch
...
git-svn-id: trunk@4849 -
2006-10-10 18:41:28 +00:00
peter
bf1c390027
* refactor import library generation
...
* support variable imports in internal linker
git-svn-id: trunk@4544 -
2006-09-03 19:22:31 +00:00
Jonas Maebe
7bb3a1fe22
* fixed register allocation of gen_load_para_value() and backwards
...
extension of regalloc info in general
git-svn-id: trunk@4293 -
2006-07-25 13:54:48 +00:00
peter
50ee3a96ad
* fix importprocname for cdecl
...
git-svn-id: trunk@3636 -
2006-05-23 07:59:36 +00:00
peter
70e7546d87
* us cs_opt_stackframe
...
git-svn-id: trunk@3326 -
2006-04-23 20:53:45 +00:00
peter
ce58e15393
* fix coff section names to fix resourcestrings with
...
the external linker
* create import libraries for dll imports, this uses
the new objdata framework to generate the binary
object files directly without needing an assembler pass
* store import_dll and import_name in ppu
* external linker uses import libraries
* internal linker uses import info from symtables,
no dlls are needed anymore
git-svn-id: trunk@3255 -
2006-04-17 20:48:22 +00:00
peter
5376d2d570
Merged revisions 3072-3073 via svnmerge from
...
http://svn.freepascal.org/svn/fpc/branches/linker/compiler
........
r3072 | peter | 2006-03-29 13:34:42 +0200 (Wed, 29 Mar 2006) | 4 lines
* std_regname generate pair of registers for float doubles
* don't call translate_register for regvars if -sr is passed
* use std_regname in regalloc message
........
r3073 | peter | 2006-03-29 16:00:37 +0200 (Wed, 29 Mar 2006) | 2 lines
* CMP instructions only read operands
........
git-svn-id: trunk@3079 -
2006-03-30 06:36:42 +00:00
peter
0ec2921bbe
* split newasmsymbol to refasmsymbol and defineasmsymbol
...
git-svn-id: trunk@3057 -
2006-03-27 11:45:18 +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
peter
232555904e
* symtablestack cleanup and rewrite
...
git-svn-id: trunk@2448 -
2006-02-05 22:24:18 +00:00
florian
d28d7e3c12
* moved insertation of pc relative data for arm target
...
git-svn-id: trunk@2438 -
2006-02-05 10:32:19 +00:00
florian
94038b0d83
+ translate register variable locations, enables register variable debug info, with SSA it requires to be extended maintaining location list
...
git-svn-id: trunk@2409 -
2006-02-02 21:27:23 +00:00
peter
c297cb1569
* generate also external stubs for win32 without import section
...
git-svn-id: trunk@2303 -
2006-01-15 22:05:52 +00:00
peter
66f8276445
* refactor booleans in systeminfo structure, they are now flags
...
* support for case aware filesystems (Windows), they do now only
one lookup if a file exists
* add -WI option to generate import section for DLL imports or
let the linker handle it. Default is still import section until
the Makefiles are fixed, then the generation can be left to the
linker
git-svn-id: trunk@2274 -
2006-01-13 15:13:26 +00:00
florian
9670e0eb78
* leave stackframe on x86-64 as well away if possible
...
git-svn-id: trunk@2187 -
2006-01-05 18:08:33 +00:00
Jonas Maebe
b769a968e3
* make sure live_start and live_end are correctly updated while
...
generating the initialisation and entry code
git-svn-id: trunk@2185 -
2006-01-05 17:46:16 +00:00
florian
1024b80867
+ sub routines with children with asm blocks need a real stack frame, fixes new failure of tw0848
...
git-svn-id: trunk@2177 -
2006-01-05 10:10:58 +00:00
florian
a71d2b432c
* synchronize reg. variables before loading the function result
...
git-svn-id: trunk@2163 -
2006-01-04 20:30:41 +00:00
florian
f7d2c47f73
+ no stackframe is generated for i386 if possible
...
git-svn-id: trunk@2162 -
2006-01-04 19:19:06 +00:00
florian
30d5ff9f03
* fixed access to already freed memory location
...
git-svn-id: trunk@2118 -
2006-01-02 17:11:55 +00:00
florian
fb4557d71e
* first implementation of pic for i386
...
git-svn-id: trunk@2107 -
2006-01-01 20:14:48 +00:00
Jonas Maebe
55218d452b
* don't change the binding of real external symbols in the patch
...
of r2058, fixes the binary writer
git-svn-id: trunk@2060 -
2005-12-27 09:41:52 +00:00
Jonas Maebe
de8dbbd2c4
* final fixes for Mac OS X shared library creation: procedures declared
...
as forward are no longer treated as external symbols
* changed alloc_proc_symbol() to directly call newasmsymbol as opposed
to creating a dummy tai_symbol()
git-svn-id: trunk@2058 -
2005-12-26 18:18:05 +00:00
Jonas Maebe
dbf94f4713
* properly fixed allocating procedure symbols, now also works for nested
...
procedures
git-svn-id: trunk@2029 -
2005-12-22 20:43:29 +00:00
peter
95879fe8a7
* basic support for generic classes
...
git-svn-id: trunk@2020 -
2005-12-21 10:11:15 +00:00
Jonas Maebe
b954ea006e
* generate the procsymbol before generating the code for the procedure,
...
so that refences to this symbol are not treated as external
git-svn-id: trunk@2009 -
2005-12-20 17:52:08 +00:00
florian
ca921976f6
* when creating pic code, every procedure must be declared being global
...
git-svn-id: trunk@1733 -
2005-11-13 18:08:49 +00:00
florian
e1b34a9e7b
* cleaning up sets for exports behaviour
...
+ allow exports from units
git-svn-id: trunk@1535 -
2005-10-19 19:06:45 +00:00
Jonas Maebe
810ec85e34
- disable inlining for procedures with a formal const parameter, fixes
...
webtbs/tw4427
git-svn-id: trunk@1390 -
2005-10-15 20:48:35 +00:00
peter
51b8a4a132
* move stabs generation to a single procedure call from pmodules
...
git-svn-id: trunk@1358 -
2005-10-12 10:35:46 +00:00
tom_at_work
bfb2c916dc
* fixed problem with too large offsets in conditional jumps (see also rev 1161 for the PowerPC code)
...
* updated sysnr.inc for PowerPC64 from 2.6.11 kernel sources
* fixed SigactionRec sa_flags field sizes, which improves signal handling for PowerPC64 platform
git-svn-id: trunk@1352 -
2005-10-10 23:45:57 +00:00
tom_at_work
b2e1cf2610
* powerpc64 port now (manually) cycles, most test programs in tests/test are fine too
...
* fixed bug in ncal.pas which in some circumstances treated the hidden length parameter for open arrays as 32 bit integer
git-svn-id: trunk@1303 -
2005-10-05 21:55:25 +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
Jonas Maebe
8b8d3de3bf
* finally fix for fixing up conditional jumps that are too long
...
git-svn-id: trunk@1161 -
2005-09-23 10:02:53 +00:00
peter
a3ab2053c9
* support multiple asmlabel types, renamed getlabel to
...
getjumplabel and added type para to getlabel for specific types
* moved lineinfo generation from assemble and aggas to dbgstabs
git-svn-id: trunk@1120 -
2005-09-18 21:16:10 +00:00
peter
ca66b9f7c1
* force writing of new section before generating the jumptable
...
git-svn-id: trunk@1085 -
2005-09-15 14:08:02 +00:00
peter
c3727c29b2
* rename al_code to al_procedures, al_bss/al_data to al_globals
...
* more work for section smartlinking
git-svn-id: trunk@1083 -
2005-09-15 06:51:12 +00:00
peter
05a628447f
* put typedconsts in own asmlist to prevent mixing
...
array and string data
* added al_rodata
* renamed tasmlist enum names to include al_ prefix
git-svn-id: trunk@899 -
2005-08-17 08:42:52 +00:00
florian
a3e330526d
* exporting of symbols from linux programs, i.e. exports clause in
...
programs allowed
git-svn-id: trunk@855 -
2005-08-13 20:34:28 +00:00
daniel
d05f58b604
* Group asmlists into array to be able to add
...
some of them more comfortably.
* x86_64 compilation was broken, fixed.
* Sparc compilation was broken, fixed.
git-svn-id: trunk@731 -
2005-07-23 13:44:32 +00:00
Jonas Maebe
8bc4e0a32f
* inline and compilerproc are now procoptions instead of proccall types
...
(so both can be combined with each other, as well as with other calling
conventions)
* defined COMPPROCINLINEFIXED so SYSTEMINLINE is again activated
git-svn-id: trunk@658 -
2005-07-18 15:27:14 +00:00
florian
83c6b3aca2
* from Yury Sidorov:
...
+ Added new target WinCE for i386 (to be able compile and run programs in WinCE emulator)
git-svn-id: trunk@596 -
2005-07-09 09:31:57 +00:00
florian
c2fe9e3814
+ compiler part of WinCE patches from Yuri Sidorov
...
git-svn-id: trunk@573 -
2005-07-03 15:52:54 +00:00
fpc
790a4fe2d3
* log and id tags removed
...
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
fpc
50778076c3
initial import
...
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00
peter
e417e34496
* truncate log
2005-02-14 17:13:06 +00:00
peter
720815e13b
* fix aftercosntruction calls, vmt=1 is used to indicate that
...
afterconstruction needs to be called
* only accept resourcestring when objpas is loaded
2005-01-04 16:36:31 +00:00
peter
296e81146e
* insert stack_check helper call before doing register allocation
...
so the used registers can't be reused when parameters are loaded
into register variables
2005-01-03 22:27:56 +00:00
peter
2a20174317
* set flag if a procedure references a symbol in staticsymtable
2004-12-27 16:35:48 +00:00
Jonas Maebe
99cffcc375
- disable inlining for any procedure that contains assembler. Could
...
be enabled again if the procedure has neither local variables nor
parameters.
2004-12-27 14:41:09 +00:00
peter
29db12ecfa
* disable inlining across units when the inline procedure references
...
a variable or procedure in the static symtable
2004-12-15 21:08:15 +00:00
peter
9e49f8eef9
* fixed crash with -vp
2004-12-15 17:01:28 +00:00
peter
00c14e1083
* external is again allowed in implementation
2004-12-15 16:00:16 +00:00
peter
2b6456fe16
* procvar handling for tp procvar mode fixed
...
* proc to procvar moved from addrnode to typeconvnode
* inlininginfo is now allocated only for inline routines that
can be inlined, introduced a new flag po_has_inlining_info
2004-12-05 12:28:10 +00:00
peter
959bdccc49
* disable pass2inline
2004-12-02 19:26:14 +00:00
peter
06cfe01791
* os2 fixes for import
...
* asmsymtype support for intel reader
2004-11-29 18:50:15 +00:00
florian
18f7aa97dd
* changed funcret location back to tlocation
2004-11-21 17:17:03 +00:00
michael
180966c0aa
* Split po_public into po_public and po_global (Peter)
2004-11-19 08:17:01 +00:00
peter
14d25d278b
mangledname setting moved to place after the complete proc declaration is read
...
import generation moved to place where body is also parsed (still gives problems with win32)
2004-11-17 22:21:35 +00:00
peter
87d2861f89
* fixes for win32 mangledname
2004-11-16 20:32:40 +00:00
peter
e740a66636
* tparaitem removed, use tparavarsym instead
...
* parameter order is now calculated from paranr value in tparavarsym
2004-11-15 23:35:30 +00:00
peter
6458bd0ce1
* tvarsym splitted
2004-11-08 22:09:58 +00:00
peter
2e161c5e9e
* nf_internal flag for internal inserted typeconvs. This will
...
supress the generation of warning/hints
2004-11-02 12:55:16 +00:00
peter
bc59556a41
* $fpctarget expands to <cpu>-<os>
...
* allow * in middle of the path to support ../*/units/$fpctarget
2004-10-31 18:54:24 +00:00
florian
e04b172854
* fixed generic optimizer
...
* enabled generic optimizer for sparc
2004-10-30 15:21:37 +00:00
peter
705868e816
* remove saveregister calling convention
2004-10-24 20:01:08 +00:00
mazen
581b52422c
- remove $IFDEF DELPHI and related code
...
- remove $IFDEF FPCPROCVAR and related code
2004-10-15 09:14:16 +00:00
peter
b0c25b50a0
* symtable allocation rewritten
...
* loading of parameters to local temps/regs cleanup
* regvar support for parameters
* regvar support for staticsymtable (main body)
2004-10-10 20:22:53 +00:00
peter
8fb3536f6e
* simple regvar support, not yet finished
2004-09-26 17:45:29 +00:00
peter
33a834821f
* paraloc branch merged
2004-09-21 17:25:12 +00:00
peter
3b59efea14
* keep localst in memory, it is also needed for finalizing
...
typedconst
2004-09-13 20:34:28 +00:00
armin
354004d803
* target netwlibc added (libc is preferred for newer netware versions)
2004-09-04 21:18:47 +00:00
florian
6368652be2
* fixed several sparc alignment issues
...
+ Jonas' inline node patch; non functional yet
2004-08-14 14:50:42 +00:00
Jonas Maebe
fcbc2f1313
- disable node-based inlining of routines with special array parameters
...
for now (de indexes of open arrays have to be changed, because on the
caller-side these routines are not necessarily 0-based)
2004-07-16 21:11:31 +00:00
Jonas Maebe
c7fbf7b11b
+ (incomplete) node_complexity function to assess the complexity of a
...
tree
+ support for inlining value and const parameters at the node level
(all procedures without local variables and without formal parameters
can now be inlined at the node level)
2004-07-15 19:55:39 +00:00
Jonas Maebe
1563d986c5
* inline procedures at the node tree level, but only under some very
...
limited circumstances for now (only procedures, and only if they have
no or only vs_out/vs_var parameters).
* fixed ppudump for inline procedures
* fixed ppudump for ppc
2004-07-12 09:14:04 +00:00
peter
7373a649f1
* put every proc in a new object file
2004-07-10 20:24:34 +00:00
peter
a939095dbe
* revert has_localst patch
...
* replace aktstaticsymtable/aktglobalsymtable with current_module
2004-07-09 22:17:31 +00:00
peter
60b53cb1c1
* fix storing of localst in ppu
2004-07-06 19:52:04 +00:00
florian
8a9758c5e2
* logs truncated
2004-06-20 08:55:28 +00:00
florian
588e2c38bf
* dwarf branch merged
2004-06-16 20:07:06 +00:00
peter
1bcda5c022
* first load para's to temps before calling entry code (profile
2004-05-28 21:14:13 +00:00
peter
365d6252cc
* also check local typed const
2004-05-24 17:31:12 +00:00
peter
b86f2c6a25
* methodpointer is loaded into a temp when it was a calln
2004-05-23 18:28:40 +00:00
peter
72365ec95b
* implicit_finally flag must be set in pass1
...
* add check whether the implicit frame is generated when expected
2004-05-23 15:06:20 +00:00
florian
b5bf8cefad
+ <pointer> - <pointer> result is divided by the pointer element size now
...
this is delphi compatible as well as resulting in the expected result for p1+(p2-p1)
2004-05-20 21:54:33 +00:00
Jonas Maebe
844faab90a
* fixed web bug #3104 : if stack checking is on, procedures pi_do_call
...
must be set
2004-05-19 22:25:56 +00:00
peter
d4dcaeafaf
* fix checking for forwards in static symtable
2004-05-16 13:29:21 +00:00
peter
2824f0b208
* fix tree printing
2004-04-11 12:37:30 +00:00
florian
06a33abebd
* fixed arg. area calculation
2004-02-19 17:07:42 +00:00
Jonas Maebe
3056a64bf0
* fixed regvars support. Needs -doldregvars to activate. Only tested with
...
ppc, other processors should however only require maxregvars and
maxfpuregvars constants in cpubase.pas. Remember to take scratch-
registers into account when defining that value.
2004-02-08 18:08:59 +00:00
peter
8c5b0f7d82
* first try to get cpupara working for x86_64
2004-02-04 22:01:13 +00:00
peter
ecfbbeffc3
* renamed xNNbittype to xNNinttype
...
* renamed registers32 to registersint
* replace some s32bit,u32bit with torddef([su]inttype).def.typ
2004-02-03 22:32:53 +00:00
florian
af3d31eceb
* fixed handling of max. distance of pc relative symbols
2004-01-21 19:01:03 +00:00
florian
b52cee6639
* fixed ppc inlining stuff
...
* fixed wrong unit writing
+ added some sse stuff
2003-12-21 19:42:42 +00:00
daniel
d84b7d0743
* Some work to restore the MMX capabilities
2003-12-19 22:08:44 +00:00
florian
87b24ee42c
* forgot a commit
2003-12-16 22:36:19 +00:00
florian
2258e941af
+ inlined procedures inherit procinfo flags
2003-12-16 21:29:24 +00:00
peter
1367e342db
* reg allocations for imaginary register are now inserted just
...
before reg allocation
* tregister changed to enum to allow compile time check
* fixed several tregister-tsuperregister errors
2003-12-15 21:25:48 +00:00
peter
5090185909
* global property support for fpc modes
2003-12-10 16:37:01 +00:00
peter
64b0a0eadf
* delayed paraloc allocation, a_param_*() gets extra parameter
...
if it needs to allocate temp or real paralocation
* optimized/simplified int-real loading
2003-12-03 23:13:19 +00:00
florian
28ed277547
* resourcestring is allowed in the interface
2003-11-27 09:08:01 +00:00
peter
51384ca53c
* register calling is left-right
...
* parameter ordering
* left-right calling inserts result parameter last
2003-11-23 17:05:15 +00:00
Jonas Maebe
aad37ce53c
* fixed optimiser so it compiles again
...
* fixed several bugs which were in there already for a long time, but
which only popped up now :) -O2/-O3 will now optimise less than in
the past (and correctly so), but -O2u/-O3u will optimise a bit more
* some more small improvements for -O3 are still possible
2003-11-22 00:40:19 +00:00
peter
f663d2488f
* cross unit inlining fixed
2003-11-10 22:02:52 +00:00
florian
bbf7300a0c
* Florian's culmutative nr. 1; contains:
...
- invalid calling conventions for a certain cpu are rejected
- arm softfloat calling conventions
- -Sp for cpu dependend code generation
- several arm fixes
- remaining code for value open array paras on heap
2003-11-07 15:58:32 +00:00
peter
684a771aca
* fix crash with fail in constructor
2003-10-31 15:52:18 +00:00
peter
9e66b09843
* call firstpass before allocation and codegeneration is started
...
* move leftover code from pass_2.generatecode() to psub
2003-10-30 16:22:40 +00:00
peter
b327c20b12
* cleanup of the entry and exit code insertion
2003-10-24 17:40:23 +00:00
peter
276688dbb4
* fixed memleak for initfinalcode
...
* exit from generatecode when there are already errors
2003-10-21 15:14:33 +00:00
peter
1becfc28b4
* disable inlining when nested procedures are found
2003-10-20 19:28:51 +00:00
florian
05fcae577a
* some ppc stuff fixed
...
* memory leak fixed
2003-10-19 01:34:30 +00:00
peter
d0de3b3ea8
* 64k registers supported
...
* fixed some memory leaks
2003-10-17 14:38:32 +00:00
peter
fb81b7ebbb
* old trgobj moved to x86/rgcpu and renamed to trgx86fpu
...
* tregisteralloctor renamed to trgobj
* removed rgobj from a lot of units
* moved location_* and reference_* to cgobj
* first things for mmx register allocation
2003-10-10 17:48:13 +00:00
daniel
b2343f4b16
* Register allocator splitted, ans abstract now
2003-10-09 21:31:37 +00:00
peter
56ebcd1249
* self is not a token anymore. It is handled special when found
...
in a code block and when parsing an method
2003-10-09 15:20:56 +00:00
peter
e27d6f67da
* inline supported again, LOC_REFERENCEs are used to pass the
...
parameters
* inlineparasymtable,inlinelocalsymtable removed
* exitlabel inserting fixed
2003-10-07 15:17:07 +00:00
florian
6684d2c520
+ added basic olevariant support
2003-10-06 22:23:41 +00:00
peter
6edadf3df5
* more proc directive for procvar fixes
2003-10-03 14:45:09 +00:00
peter
aed5b53816
* handle_calling_convention removed from parse_proc_directive to
...
separate call
2003-10-02 21:20:32 +00:00
peter
70fe77ca7c
* procinfo unit contains tprocinfo
...
* cginfo renamed to cgbase
* moved cgmessage to verbose
* fixed ppc and sparc compiles
2003-10-01 20:34:48 +00:00
peter
540691bf02
* optimized releasing of registers
2003-09-29 20:58:55 +00:00
peter
99bb20747e
* parent framepointer changed to hidden parameter
...
* tloadparentfpnode added
2003-09-28 17:55:03 +00:00
peter
f6868f8d48
* fix reported file position for not matched forwards
2003-09-27 13:29:43 +00:00
peter
56c14885bb
* remove allocate_intterupt_parameter, allocation is platform
...
dependent and needs to be done in create_paraloc_info
2003-09-25 21:25:13 +00:00
peter
bf66a6e4ab
* fix filepositions
...
* insert spill temp allocations at the start of the proc
2003-09-25 16:19:32 +00:00
peter
8af51ea6d3
* locals and paras are allocated in the code generation
...
* tvarsym.localloc contains the location of para/local when
generating code for the current procedure
2003-09-23 17:56:05 +00:00
peter
f8bb9785e0
* remove obsolete code already in comments
2003-09-14 19:18:10 +00:00
peter
8dd0a4027a
* support mulitple overloads in implementation, this is delphi
...
compatible
* procsym only stores the overloads available in the interface
2003-09-14 12:58:00 +00:00
daniel
90e1ca64f3
* Fixed fast spilling functionality by re-adding the code that initializes
...
precoloured nodes to degree 255. I would like to play hangman on the one
who removed that code.
2003-09-12 19:07:42 +00:00
daniel
079751b894
* Failed attempt to restore broken fastspill functionality
2003-09-10 19:14:31 +00:00
daniel
49e539ac8d
* Adding register allocation order
2003-09-09 20:59:27 +00:00
peter
05a15df3c2
* use register with least interferences in spillregister
2003-09-09 15:55:44 +00:00
peter
b9d09a4e5c
* preparations for different default calling conventions
...
* various RA fixes
2003-09-07 22:09:34 +00:00
peter
059908d399
* abort with IE when spilling requires > 20 loops
2003-09-04 14:46:12 +00:00
peter
6a8d5eb25d
* NEWRA branch merged
2003-09-03 15:55:00 +00:00
florian
220e05dd5e
* fixed arm concatcopy
...
+ arm support in the common compiler sources added
* moved some generic cg code around
+ tfputype added
* ...
2003-09-03 11:18:36 +00:00
peter
d113495cf1
* fixed stackalloc to not allocate localst.datasize twice
...
* order of stackalloc code fixed for implicit init/final
2003-08-20 17:48:49 +00:00
peter
2a5f30418e
* define NOOPT until optimizer is fixed
2003-08-20 15:50:35 +00:00
daniel
ebb1f3a361
* New register coding now mandatory, some more convert_registers calls
...
removed.
2003-08-20 09:07:00 +00:00
daniel
82b0cf41a6
* Made internal assembler use new register coding
2003-08-20 07:48:03 +00:00
Jonas Maebe
4f8c390198
* fixed regvars so they work with newra (at least for ppc)
...
* fixed some volatile register bugs
+ -dnotranslation option for -dnewra, which causes the registers not to
be translated from virtual to normal registers. Requires support in
the assembler writer as well, which is only implemented in aggas/
agppcgas currently
2003-08-17 16:59:20 +00:00
Jonas Maebe
177d57f22c
* split en_exit_code into a part that may allocate a register and a part
...
that doesn't, so the former can be done before the register colouring
has been performed
2003-07-23 11:04:15 +00:00
peter
32d076480b
* framepointer fixes for sparc
...
* parent framepointer code more generic
2003-07-06 17:58:22 +00:00
daniel
268bfcf784
* Fixed register allocator. *Lots* of fixes.
2003-07-06 15:31:20 +00:00
Jonas Maebe
cc7f340ac8
* set pi_do_call if range/overflow checking is on
2003-07-05 20:15:24 +00:00
Jonas Maebe
404d344d92
* lots of newra fixes (need getfuncretparaloc implementation for i386)!
...
* renamed all_intregisters to volatile_intregisters and made it
processor dependent
2003-06-17 16:34:44 +00:00
Jonas Maebe
d29c96896f
* fixed newra cycle for x86
...
* added constants for indicating source and destination operands of the
"move reg,reg" instruction to aasmcpu (and use those in rgobj)
2003-06-14 14:53:50 +00:00
peter
0dceec9a64
* current_procdef removed, use current_procinfo.procdef instead
2003-06-13 21:19:30 +00:00
peter
a0b9306652
* newra compiles for sparc
2003-06-12 16:43:07 +00:00
peter
77d641fa2a
* init/final of procedure data splitted from genentrycode
...
* use asmnode getposition to insert final at the correct position
als for the implicit try...finally
2003-06-09 12:23:29 +00:00
Jonas Maebe
e142cebe6e
* pi_do_call must always be set for the main program, since it always
...
ends with a call to FPC_DO_EXIT
2003-06-07 19:37:43 +00:00
Jonas Maebe
edb2179730
+ added freeintparaloc
...
* ppc get/freeintparaloc now check whether the parameter regs are
properly allocated/deallocated (and get an extra list para)
* ppc a_call_* now internalerrors if pi_do_call is not yet set
* fixed lot of missing pi_do_call's
2003-06-07 18:57:04 +00:00
daniel
41e0bc4cec
* Register allocator finished
2003-06-03 13:01:59 +00:00
Jonas Maebe
5a4c00bedd
* added pi_do_call if a procedure has a value shortstring parameter
...
(it's copied to the local stackframe with a helper)
2003-05-31 20:23:39 +00:00
peter
414bd5fa22
* more sparc cleanup
...
* accumulator removed, splitted in function_return_reg (called) and
function_result_reg (caller)
2003-05-30 23:57:08 +00:00
Jonas Maebe
ead9de924c
* added missing initialization of rg.usedint{in,by}proc
...
* ppc now also saves/restores used fpu registers
* ncgcal doesn't add used registers to usedby/inproc anymore, except for
i386
2003-05-28 23:58:18 +00:00
peter
047a066711
* procinlinenode removed
...
* aktexit2label removed, fast exit removed
+ tcallnode.inlined_pass_2 added
2003-05-26 21:17:17 +00:00
peter
64eb7ee2ec
* do not generate code when there was an error
2003-05-25 08:59:47 +00:00
Jonas Maebe
ce0885b092
* generate code for parent procedure before that of nested procedures as
...
well (I only need pass_1 to be done for the ppc, but pass_1 and pass_2
are grouped and it doesn't hurt that pass_2 is done as well)
2003-05-23 18:49:55 +00:00
peter
345228fd29
* defer codegeneration for nested procedures
2003-05-22 21:31:35 +00:00
Jonas Maebe
d816c6a8c6
* powerpc nested procedure fixes, should work completely now if all
...
local variables of the parent procedure are declared before the
nested procedures are declared
2003-05-16 20:00:39 +00:00
peter
abca40f041
* regvar fixes
2003-05-16 14:33:31 +00:00
peter
1a7f159fad
* only call destructor in except block when there is a destructor
...
available
2003-05-13 21:26:38 +00:00
peter
05c05f2555
* failn removed
...
* inherited result code check moven to pexpr
2003-05-13 19:14:41 +00:00
peter
a467b84faa
* fixed various crashes
2003-05-13 15:18:49 +00:00
peter
26d78ff5c9
* moved implicit exception frame from ncgutil to psub
...
* constructor/destructor helpers moved from cobj/ncgutil to psub
2003-05-11 21:37:03 +00:00
peter
1a2eedd767
* self moved to hidden parameter
...
* removed hdisposen,hnewn,selfn
2003-05-09 17:47:02 +00:00
peter
60978ba89c
* aktprocdef renamed to current_procdef
...
* procinfo renamed to current_procinfo
* procinfo will now be stored in current_module so it can be
cleaned up properly
* gen_main_procsym changed to create_main_proc and release_main_proc
to also generate a tprocinfo structure
* fixed unit implicit initfinal
2003-04-27 11:21:32 +00:00
peter
7f14891d66
* aktprocdef cleanup, aktprocdef is now always nil when parsing
...
a new procdef declaration
* aktprocsym removed
* lexlevel removed, use symtable.symtablelevel instead
* implicit init/final code uses the normal genentry/genexit
* funcret state checking updated for new funcret handling
2003-04-27 07:29:50 +00:00
peter
9b236892b7
* set return_offset moved to after_header
2003-04-26 00:31:42 +00:00
peter
f4b818fc1d
* removed funcretn,funcretsym, function result is now in varsym
...
and aliases for result and function name are added using absolutesym
* vs_hidden parameter for funcret passed in parameter
* vs_hidden fixes
* writenode changed to printnode and released from extdebug
* -vp option added to generate a tree.log with the nodetree
* nicer printnode for statements, callnode
2003-04-25 20:59:33 +00:00
florian
47a3437dba
* comp is now written with its bit pattern to the ppu instead as an extended
2003-04-24 13:03:01 +00:00
florian
0284016ee9
* fixed several issues with powerpc
...
+ applied a patch from Jonas for nested function calls (PowerPC only)
* ...
2003-04-23 12:35:34 +00:00
peter
9ed2ce8c12
* removed some notes/hints
2003-04-22 14:33:38 +00:00
peter
e248c0ece4
* fixed C style array of const
...
* fixed C array passing
* fixed left to right with high parameters
2003-04-22 13:47:08 +00:00
daniel
25059e21b6
+ Implemented the actual register allocator
...
+ Scratch registers unavailable when new register allocator used
+ maybe_save/maybe_restore unavailable when new register allocator used
2003-04-22 10:09:34 +00:00
daniel
a32926e2fc
* Some work on interference graph construction
2003-04-17 07:50:24 +00:00
Jonas Maebe
56132c1a9c
* assembler procedures now again get a stackframe if they have local
...
variables. No space is reserved for a function result however.
Also, the register parameters aren't automatically saved on the stack
anymore in assembler procedures.
2003-04-16 09:26:55 +00:00
Jonas Maebe
ec71805aa8
* several ppc/generic result offset related fixes. The "normal" result
...
offset seems now to be calculated correctly and a lot of duplicate
calculations have been removed. Nested functions accessing the parent's
function result don't work at all though :(
2003-04-05 21:09:31 +00:00
peter
45e5cada69
* give error when exports is not supported
2003-04-02 16:11:34 +00:00
Jonas Maebe
24e2741659
* more powerpc and generic fixes related to the new register allocator
2003-03-12 22:43:38 +00:00
daniel
e8f649f5c2
+ $define newra will enable new register allocator
...
+ getregisterint will return imaginary registers with $newra
+ -sr switch added, will skip register allocation so you can see
the direct output of the code generator before register allocation
2003-03-08 08:59:07 +00:00
daniel
86bcea6ef5
* Code generator converted to new register notation
...
- Horribily outdated todo.txt removed
2003-02-19 22:00:14 +00:00
peter
2721d341f0
* merged some verbosity options.
...
* V_LineInfo is a verbosity flag to include line info
2003-01-09 21:52:37 +00:00
daniel
7b2fd10fb4
* Converted some code in cgx86.pas to new register numbering
2003-01-09 20:40:59 +00:00
daniel
6e507ba483
* Added register conversion
2003-01-09 15:49:56 +00:00
daniel
55a161bbbf
* Tregister changed into a record
2003-01-08 18:43:56 +00:00
peter
c0c6ad57f3
* check also interfacedef when checking for matching forwarddef
2003-01-03 20:35:08 +00:00
michael
fbd28675c9
+ Patch from peter to support initial values for local variables
2003-01-02 11:14:02 +00:00
peter
215ccaafe2
* fixed parsing of declarations before asm statement
2002-12-29 18:59:34 +00:00
peter
8d6f26bf4f
* parse declarations before check _ASM token
2002-12-29 18:25:18 +00:00
peter
bbf8bddbb4
* unit loading changed to first register units and load them
...
afterwards. This is needed to support uses xxx in yyy correctly
* unit dependency check fixed
2002-12-29 14:57:50 +00:00
peter
9147303907
* duplicate procsym-unitsym fix
2002-12-25 01:26:56 +00:00
peter
bbd18afe11
* don't include uf_init for library. The code is already called and
...
does not need to be in the initfinal table
2002-12-15 13:37:15 +00:00
carl
081a4aab35
* 3% memory optimization
...
* changed some types
+ added type checking with different size for call node and for
parameters
2002-12-07 14:27:07 +00:00
carl
6a52e7a9e5
- removed the invalid if <> checking (Delphi is strange on this)
...
+ implemented abstract warning on instance creation of class with
abstract methods.
* some error message cleanups
2002-11-25 18:43:31 +00:00
peter
f3fc72095f
* splitted defbase in defutil,symutil,defcmp
...
* merged isconvertable and is_equal into compare_defs(_ext)
* made operator search faster by walking the list only once
2002-11-25 17:43:16 +00:00
carl
60d17dbc01
* some small speed optimizations
...
+ added several new warnings/hints
2002-11-23 22:50:04 +00:00
peter
a496dbe1ff
* pass proccalloption to ret_in_xxx and push_xxx functions
2002-11-18 17:31:54 +00:00
carl
64655be168
* memory optimization (3-4%) : cleanup of tai fields,
...
cleanup of tdef and tsym fields.
* make it work for m68k
2002-11-17 16:31:55 +00:00
peter
bfd72ad5d5
* merged changes from 1.0.7 up to 04-11
...
- -V option for generating bug report tracing
- more tracing for option parsing
- errors for cdecl and high()
- win32 import stabs
- win32 records<=8 are returned in eax:edx (turned off by default)
- heaptrc update
- more info for temp management in .s file with EXTDEBUG
2002-11-15 01:58:45 +00:00
carl
6d8024afc4
* noopt for non-i386 targets
2002-11-09 15:32:30 +00:00
florian
0d94086e03
* call to procinfo.after_header added
2002-09-10 20:31:48 +00:00
peter
dcd9e0107c
* old logs removed and tabs fixed
2002-09-07 15:25:00 +00:00
daniel
b0364566d1
* Make Tprocdef.defs protected
2002-09-03 16:26:26 +00:00
peter
a28f75ed03
* sym.insert_in_data removed
...
* symtable.insertvardata/insertconstdata added
* removed insert_in_data call from symtable.insert, it needs to be
called separatly. This allows to deref the address calculation
* procedures now calculate the parast addresses after the procedure
directives are parsed. This fixes the cdecl parast problem
* push_addr_param has an extra argument that specifies if cdecl is used
or not
2002-08-25 19:25:18 +00:00
florian
e313bab4ff
* first part of procinfo rewrite
2002-08-17 09:23:33 +00:00
carl
745efb2c47
* issameref() to test if two references are the same (then emit no opcodes)
...
+ ret_in_reg to replace ret_in_acc
(fix some register allocation bugs at the same time)
+ save_std_register now has an extra parameter which is the
usedinproc registers
2002-08-16 14:24:57 +00:00
peter
425bb45ddc
* renamed current_library to objectlibrary
2002-08-11 14:32:25 +00:00
peter
ac71268ce6
* saving of asmsymbols in ppu supported
...
* asmsymbollist global is removed and moved into a new class
tasmlibrarydata that will hold the info of a .a file which
corresponds with a single module. Added librarydata to tmodule
to keep the library info stored for the module. In the future the
objectfiles will also be stored to the tasmlibrarydata class
* all getlabel/newasmsymbol and friends are moved to the new class
2002-08-11 13:24:10 +00:00
carl
afd252b0b5
* fixed stackframe parameter (should only contain local size),
...
set to zero currently
2002-08-09 19:14:28 +00:00
florian
b136cecacd
* first part of ppc calling conventions fix
2002-08-06 20:55:20 +00:00
florian
eb2ca8d10f
* rewrote the system handling
2002-07-26 21:15:37 +00:00
florian
59abf2555b
* types.pas renamed to defbase.pas because D6 contains a types
...
unit so this would conflicts if D6 programms are compiled
+ Willamette/SSE2 instructions to assembler added
2002-07-20 11:57:52 +00:00
daniel
399036f1c2
* State tracker work
...
* The whilen and repeatn are now completely unified into whilerepeatn. This
allows the state tracker to change while nodes automatically into
repeat nodes.
* Resulttypepass improvements to the notn. 'not not a' is optimized away and
'not(a>b)' is optimized into 'a<=b'.
* Resulttypepass improvements to the whilerepeatn. 'while not a' is optimized
by removing the notn and later switchting the true and falselabels. The
same is done with 'repeat until not a'.
2002-07-19 11:41:34 +00:00
florian
c3f4220f3b
* readded removed changes
2002-07-15 18:03:14 +00:00
daniel
eeae0e4c00
+ Added the beginning of a state tracker. This will track the values of
...
variables through procedures and optimize things away.
2002-07-14 18:00:43 +00:00
florian
336808f6c3
* start of the new generic parameter handling
2002-07-11 14:41:27 +00:00
florian
07783d2a0d
* powerpc target fixed, very simple units can be compiled
...
* some basic stuff for better callparanode handling, far from being finished
2002-07-07 09:52:32 +00:00
florian
479a745096
* first x86-64 patches
2002-07-04 20:43:00 +00:00
peter
4285e99853
* internal linker
...
* reorganized aasm layer
2002-07-01 18:46:20 +00:00
peter
06ebac4e27
* readded missing revisions
2002-05-18 13:34:04 +00:00
carl
21b3a10f02
+ defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
...
+ try to fix temp allocation (still in ifdef)
+ generic constructor calls
+ start of tassembler / tmodulebase class cleanup
2002-05-16 19:46:34 +00:00
peter
2992e1819c
* removed old logs and updated copyright year
2002-05-14 19:34:38 +00:00
peter
4dcd96747e
* moved entry and exitcode to ncgutil and cgobj
...
* foreach gets extra argument for passing local data to the
iterator function
* -CR checks also class typecasts at runtime by changing them
into as
* fixed compiler to cycle with the -CR option
* fixed stabs with elf writer, finally the global variables can
be watched
* removed a lot of routines from cga unit and replaced them by
calls to cgobj
* u32bit-s32bit updates for and,or,xor nodes. When one element is
u32bit then the other is typecasted also to u32bit without giving
a rangecheck warning/error.
* fixed pascal calling method with reversing also the high tree in
the parast, detected by tcalcst3 test
2002-05-12 16:53:04 +00:00
carl
87aa88e9b7
+ generic FPC_CHECKPOINTER
...
+ first parameter offset in stack now portable
* rename some constants
+ move some cpu stuff to other units
- remove unused constents
* fix stacksize for some targets
* fix generic size problems which depend now on EXTEND_SIZE constant
2002-04-20 21:32:23 +00:00
peter
70ff711f73
* mangledname rewrite, tprocdef.mangledname is now created dynamicly
...
in most cases and not written to the ppu
* add mangeledname_prefix() routine to generate the prefix of
manglednames depending on the current procedure, object and module
* removed static procprefix since the mangledname is now build only
on demand from tprocdef.mangledname
2002-04-19 15:46:01 +00:00
carl
5befcda7e5
+ target_info.size_of_pointer -> pointer_Size
2002-04-15 18:57:22 +00:00
carl
0ee2ac7451
+ added wdosx support (patch from Pavel)
2002-04-04 18:30:22 +00:00
Jonas Maebe
7fb55bf4e4
+ a_loadfpu_* and a_loadmm_* methods in tcg
...
* register allocation is now handled by a class and is mostly processor
independent (+rgobj.pas and i386/rgcpu.pas)
* temp allocation is now handled by a class (+tgobj.pas, -i386\tgcpu.pas)
* some small improvements and fixes to the optimizer
* some register allocation fixes
* some fpuvaroffset fixes in the unary minus node
* push/popusedregisters is now called rg.save/restoreusedregisters and
(for i386) uses temps instead of push/pop's when using -Op3 (that code is
also better optimizable)
* fixed and optimized register saving/restoring for new/dispose nodes
* LOC_FPU locations now also require their "register" field to be set to
R_ST, not R_ST0 (the latter is used for LOC_CFPUREGISTER locations only)
- list field removed of the tnode class because it's not used currently
and can cause hard-to-find bugs
2002-03-31 20:26:33 +00:00
peter
a6d63f0adc
* commited the wrong file :(
2002-01-19 15:37:24 +00:00
peter
04248ee5b5
* also check at the end of the implementation for incomplete classes
2002-01-19 15:20:09 +00:00
peter
d6fb9766ee
* check for unresolved forward classes in the interface
2002-01-19 15:12:34 +00:00
peter
d2e1952377
* procsym definition rewrite
2001-11-02 22:58:00 +00:00
peter
e37dbf904d
* calling convention rewrite
2001-10-25 21:22:32 +00:00
peter
09cd7f1642
* overloaded functions don't need to be global in kylix
2001-10-22 21:20:46 +00:00
Jonas Maebe
2c87e58a77
* allow self parameter for normal procedures again (because Kylix allows
...
it too) ("merged")
2001-10-01 13:38:44 +00:00
Jonas Maebe
6a15178f0f
* fixed web bug #1593
...
* writing of procvar headers is more complete (mention var/const/out for
paras, add "of object" if applicable)
+ error if declaring explicit self para as var/const
* fixed mangled name of procedures which contain an explicit self para
* parsing para's should be slightly faster because mangled name of
procedure is only updated once instead of after parsing each para
(all merged from fixes)
2001-09-10 10:26:26 +00:00
florian
9746f4c2d6
* some cg reorganisation
...
* some PPC updates
2001-08-26 13:35:06 +00:00