florian 
							
						 
					 
					
						
						
						
						
							
						
						
							f972398a8c 
							
						 
					 
					
						
						
							
							+ main program never returns  
						
						... 
						
						
						
						git-svn-id: trunk@30656 - 
						
					 
					
						2015-04-19 08:10:06 +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 
							
						 
					 
					
						
						
						
						
							
						
						
							932b68310e 
							
						 
					 
					
						
						
							
							* do not warn about internally generated parameters,  resolves   #25914  
						
						... 
						
						
						
						git-svn-id: trunk@29636 - 
						
					 
					
						2015-02-06 20:44:24 +00:00 
						 
				 
			
				
					
						
							
							
								sergei 
							
						 
					 
					
						
						
						
						
							
						
						
							adeb8c93e9 
							
						 
					 
					
						
						
							
							* Set pi_do_call flag explicitly when procedure has a parameter or local var that require finalization. Normally it is set by implicit try..finally node, but this node is absent when compiling in {$implicitexceptions off} mode. This may cause internal errors in pass 2 if pi_do_call has not been set by other means.  
						
						... 
						
						
						
						Fixes IE when compiling Lazarus for MIPS target.
+ Test.
git-svn-id: trunk@29590 - 
						
					 
					
						2015-01-31 13:33:36 +00:00 
						 
				 
			
				
					
						
							
							
								Jonas Maebe 
							
						 
					 
					
						
						
						
						
							
						
						
							eb419b58c5 
							
						 
					 
					
						
						
							
							- disable inlining of routines that contain a call to a C-style varargs  
						
						... 
						
						
						
						function, as we don't save/restore the synthetic paravarsyms that
    are created for this
git-svn-id: trunk@29584 - 
						
					 
					
						2015-01-30 19:31:22 +00:00 
						 
				 
			
				
					
						
							
							
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							69ac7dd7ef 
							
						 
					 
					
						
						
							
							* limit initialization to register variables which really need to be initialized  
						
						... 
						
						
						
						git-svn-id: trunk@29569 - 
						
					 
					
						2015-01-27 21:51:29 +00:00 
						 
				 
			
				
					
						
							
							
								svenbarth 
							
						 
					 
					
						
						
						
						
							
						
						
							af43e5e3e9 
							
						 
					 
					
						
						
							
							Fix for Mantis  #24872 .  
						
						... 
						
						
						
						psub.pas, tcgprocinfo.parse_body:
  * also check record symtables besides object symtables to determine whether the staticsymtable is accessed from a globally declared generic
  * use a translateable message if the static symtable is accessed if it should not
msg/errore.msg:
  + add new error message for when the static symtable is accessed from a global generic
msgidx.inc & msgtixt.inc:
  * regenerated
+ added test
git-svn-id: trunk@29427 - 
						
					 
					
						2015-01-06 20:46:12 +00:00 
						 
				 
			
				
					
						
							
							
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							f1eb00a450 
							
						 
					 
					
						
						
							
							* do not issue a hint about uninitialized var-parameters,  resolves   #25916  
						
						... 
						
						
						
						git-svn-id: trunk@29289 - 
						
					 
					
						2014-12-14 17:54:37 +00:00 
						 
				 
			
				
					
						
							
							
								sergei 
							
						 
					 
					
						
						
						
						
							
						
						
							0b4d54fcb9 
							
						 
					 
					
						
						
							
							- Delete all position markers from assembler code before optimization. Markers of this kind are not used by optimizer and are expected to be ignored, but ignoring them requires numerous checks in all target-specific optimizers and currently isn't done correctly. In turn, failure to ignore markers prevents optimization of procedure prologues and epilogues.  
						
						... 
						
						
						
						git-svn-id: trunk@28647 - 
						
					 
					
						2014-09-12 23:15:23 +00:00 
						 
				 
			
				
					
						
							
							
								Jonas Maebe 
							
						 
					 
					
						
						
						
						
							
						
						
							bacd303208 
							
						 
					 
					
						
						
							
							* synchronized with trunk up to r27758  
						
						... 
						
						
						
						git-svn-id: branches/hlcgllvm@27779 - 
						
					 
					
						2014-05-12 16:12:34 +00:00 
						 
				 
			
				
					
						
							
							
								Jonas Maebe 
							
						 
					 
					
						
						
						
						
							
						
						
							362ff5ad01 
							
						 
					 
					
						
						
							
							* only check for _PROPERTY as a regular token, so that  
						
						... 
						
						
						
						{$modeswitch properties-} also affects global properties
    (mantis #25861 )
git-svn-id: trunk@27758 - 
						
					 
					
						2014-05-10 16:03:02 +00:00 
						 
				 
			
				
					
						
							
							
								sergei 
							
						 
					 
					
						
						
						
						
							
						
						
							96dd464bf2 
							
						 
					 
					
						
						
							
							* Moved fixup_jmps to target-specific classes for powerpc,powerpc64 and MIPS, cleaned out remaining $ifdef's. A slight functionality change is that fixup_jmps is now called before adding the procedure end symbol, not after, but that should not matter.  
						
						... 
						
						
						
						git-svn-id: trunk@27450 - 
						
					 
					
						2014-04-02 14:17:23 +00:00 
						 
				 
			
				
					
						
							
							
								sergei 
							
						 
					 
					
						
						
						
						
							
						
						
							eeb15fc445 
							
						 
					 
					
						
						
							
							* Added virtual method tprocinfo.postprocess_code and moved target-specific processing from base class into target-specific descendant classes (ARM and AVR, other targets still to do).  
						
						... 
						
						
						
						git-svn-id: trunk@27449 - 
						
					 
					
						2014-04-02 13:14:06 +00:00 
						 
				 
			
				
					
						
							
							
								Jonas Maebe 
							
						 
					 
					
						
						
						
						
							
						
						
							d020a32b9a 
							
						 
					 
					
						
						
							
							- removed no longer used tprocdef.fpu_used field for i386/i8086 (the one  
						
						... 
						
						
						
						place where it was used, we now handle the consequence directly)
git-svn-id: trunk@27435 - 
						
					 
					
						2014-04-01 21:41:18 +00:00 
						 
				 
			
				
					
						
							
							
								Jonas Maebe 
							
						 
					 
					
						
						
						
						
							
						
						
							b57c95043f 
							
						 
					 
					
						
						
							
							+ support overriding tdef/tsym methods with target-specific functionality:  
						
						... 
						
						
						
						o made all (non-abstract) tdef and tsym constructors virtual
   o added c*def/c*sym classref types for every (non-abstract) t*def/t*sym
     class
   o added cpusym unit for every architecture that derives a tcpu*def/tcpu*sym
     class from the base classes, and initialises the c*def/c*sym classes with
     them. This is done so that the llvm target will be able to derive from
     the tcpu*def/sym classes without umpteen ifdefs, and it also means that
     the WPO can devirtualise everything because the c* variables are only
     initialised with one class type
   o replaced all t*def/t*sym constructor calls with c*def/c*sym constructor
     calls
git-svn-id: trunk@27361 - 
						
					 
					
						2014-03-29 22:31:55 +00:00 
						 
				 
			
				
					
						
							
							
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							686a2d2f3f 
							
						 
					 
					
						
						
							
							+ Support omitting the frame pointer on arm even in procedures with incoming parameters  
						
						... 
						
						
						
						on the stack, this can be enabled by -OoFORCENOSTACKFRAME. This reduces the required
  entry/exit code and makes an extra register available to the compiler. However, since this is
  based on an estimation of the required stack size, it might have two drawbacks:
  either the stack frame is estimated to big, the program requires a bigger stack than needed
  or it is estimated too small, then the compiler throws an internalerror during compilation. These
  issues can be overcome as soon as the compiler supports recompiling subroutines if needed.
git-svn-id: trunk@27239 - 
						
					 
					
						2014-03-23 14:38:53 +00:00 
						 
				 
			
				
					
						
							
							
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							04464b8622 
							
						 
					 
					
						
						
							
							* do not create an fpc_zeromem node if size=0  
						
						... 
						
						
						
						git-svn-id: trunk@27224 - 
						
					 
					
						2014-03-21 16:34:35 +00:00 
						 
				 
			
				
					
						
							
							
								Jonas Maebe 
							
						 
					 
					
						
						
						
						
							
						
						
							f936a48afa 
							
						 
					 
					
						
						
							
							* don't change the forward/interface definition of regular forward/interface  
						
						... 
						
						
						
						functions whose implementation is declared "external". This results in less
    efficient code (all calls will go through a stub), but it prevents interface
    crc changes (-> no recompilations in case of circular dependencies) and it
    also keeps the interface stable (if the external implementation is changed
    afterwards to another external routine or to a local implementation, the
    mangled name of the routine does not change) (mantis #24121 )
git-svn-id: trunk@27213 - 
						
					 
					
						2014-03-20 21:03:07 +00:00 
						 
				 
			
				
					
						
							
							
								Jonas Maebe 
							
						 
					 
					
						
						
						
						
							
						
						
							1ac4021178 
							
						 
					 
					
						
						
							
							* moved po_has_inlininginfo from procoptions to procimploptions so that  
						
						... 
						
						
						
						the availability of the body of a function declared as "inline" no
    longer changes the CRC and hence no longer triggers recompilations
    (mantis #24121 )
git-svn-id: trunk@27192 - 
						
					 
					
						2014-03-19 21:53:10 +00:00 
						 
				 
			
				
					
						
							
							
								Jonas Maebe 
							
						 
					 
					
						
						
						
						
							
						
						
							e9268a0a14 
							
						 
					 
					
						
						
							
							* synchronised with trunk up till r26975  
						
						... 
						
						
						
						git-svn-id: branches/hlcgllvm@26976 - 
						
					 
					
						2014-03-06 21:36:58 +00:00 
						 
				 
			
				
					
						
							
							
								sergei 
							
						 
					 
					
						
						
						
						
							
						
						
							52af9a2c89 
							
						 
					 
					
						
						
							
							* Changed passing of hidden parameters to constructors of class-style objects: VMT is always passed in the first ('self') parameter, and the second one ('vmt', although this name is now misleading) contains flag specifying the constructor behavior and meaning of 'self'. Together with r26656 this removes methodpointer sharing between two parameter node trees, it becomes possible not to put methodpointer into temp, but use node tree below 'self' parameter to do virtual calls. This also matches behavior of Delphi.  
						
						... 
						
						
						
						git-svn-id: trunk@26683 - 
						
					 
					
						2014-02-06 12:26:47 +00:00 
						 
				 
			
				
					
						
							
							
								sergei 
							
						 
					 
					
						
						
						
						
							
						
						
							a1dfaa54dd 
							
						 
					 
					
						
						
							
							* Fixed exception handling in constructors of TP-style objects to correctly handle cases of statically allocated objects (must call destructor but do not free memory) and objects without destructor (must free memory if it was allocated dynamically).  
						
						... 
						
						
						
						+ Test extended.
git-svn-id: trunk@26676 - 
						
					 
					
						2014-02-05 18:19:13 +00:00 
						 
				 
			
				
					
						
							
							
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							b1f54b2853 
							
						 
					 
					
						
						
							
							* indentation fixed  
						
						... 
						
						
						
						git-svn-id: trunk@26627 - 
						
					 
					
						2014-01-30 17:34:31 +00:00 
						 
				 
			
				
					
						
							
							
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							fc7dc9e54c 
							
						 
					 
					
						
						
							
							* do cse after the init/final code has been inserted, this might enable new cse opportunities  
						
						... 
						
						
						
						git-svn-id: trunk@26623 - 
						
					 
					
						2014-01-30 17:19:01 +00:00 
						 
				 
			
				
					
						
							
							
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							6e63272ab7 
							
						 
					 
					
						
						
							
							* added missing parenthesis  
						
						... 
						
						
						
						git-svn-id: trunk@26438 - 
						
					 
					
						2014-01-12 20:17:54 +00:00 
						 
				 
			
				
					
						
							
							
								nickysn 
							
						 
					 
					
						
						
						
						
							
						
						
							338d72f564 
							
						 
					 
					
						
						
							
							* extracted the code from psub.translate_registers for generating the name of  
						
						... 
						
						
						
						the registers from a tlocation to a new function called location_reg2string
+ added support for 16-bit and 8-bit ALUs in location_reg2string
git-svn-id: trunk@26275 - 
						
					 
					
						2013-12-23 22:58:32 +00:00 
						 
				 
			
				
					
						
							
							
								sergei 
							
						 
					 
					
						
						
						
						
							
						
						
							6ea9ce1077 
							
						 
					 
					
						
						
							
							* Force managed types to be always returned in parameters, independent of target (primitive types were already handled that way; the patch affects small records with fields of managed types).  
						
						... 
						
						
						
						* Generating code to finalize result on exception at callee side is no longer necessary.
git-svn-id: trunk@26228 - 
						
					 
					
						2013-12-13 19:54:46 +00:00 
						 
				 
			
				
					
						
							
							
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							99eadb91b3 
							
						 
					 
					
						
						
							
							* run CheckAndWarn to get proper locations for warnings about uninitialized variables  
						
						... 
						
						
						
						* several fixes to liveness analysis
* get rid of old version defines
+ tests
git-svn-id: trunk@26159 - 
						
					 
					
						2013-12-01 17:01:51 +00:00 
						 
				 
			
				
					
						
							
							
								Jonas Maebe 
							
						 
					 
					
						
						
						
						
							
						
						
							044e133067 
							
						 
					 
					
						
						
							
							* override hlcgcpu.create_codegen with hlcgllvm.create_codegen when building  
						
						... 
						
						
						
						an llvm-targeting compiler
git-svn-id: branches/hlcgllvm@26056 - 
						
					 
					
						2013-11-11 11:16:32 +00:00 
						 
				 
			
				
					
						
							
							
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							8be7cfa05f 
							
						 
					 
					
						
						
							
							* check the scope of a variable when checking dfa based uninitialized variables,  
						
						... 
						
						
						
						dfa is procedure local only so consider only variables of the current scope
git-svn-id: trunk@26016 - 
						
					 
					
						2013-11-10 20:20:38 +00:00 
						 
				 
			
				
					
						
							
							
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							57586b69c7 
							
						 
					 
					
						
						
							
							* implicit try...finally frames are added after dfa so we don't have to take care if the subroutine needs/uses those or not  
						
						... 
						
						
						
						git-svn-id: trunk@26015 - 
						
					 
					
						2013-11-10 20:20:36 +00:00 
						 
				 
			
				
					
						
							
							
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							3cb747f4a7 
							
						 
					 
					
						
						
							
							* mark the node which is the entry of the user code with a flag  
						
						... 
						
						
						
						* check for uninitialized variables at the node which is marked as the start of the user code
git-svn-id: trunk@26014 - 
						
					 
					
						2013-11-10 20:20:27 +00:00 
						 
				 
			
				
					
						
							
							
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							cca520abd9 
							
						 
					 
					
						
						
							
							+ warn for uninitialized out parameters when dfa is enabled  
						
						... 
						
						
						
						git-svn-id: trunk@25977 - 
						
					 
					
						2013-11-06 21:11:03 +00:00 
						 
				 
			
				
					
						
							
							
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							1a4584f4c6 
							
						 
					 
					
						
						
							
							+ dead store elimination, based on a patch by Jeppe Johansen  
						
						... 
						
						
						
						git-svn-id: trunk@25962 - 
						
					 
					
						2013-11-06 21:10:26 +00:00 
						 
				 
			
				
					
						
							
							
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							e8787c4b48 
							
						 
					 
					
						
						
							
							+ constant propagation, based on a patch by Jeppe Johansen  
						
						... 
						
						
						
						git-svn-id: trunk@25958 - 
						
					 
					
						2013-11-06 21:10:15 +00:00 
						 
				 
			
				
					
						
							
							
								svenbarth 
							
						 
					 
					
						
						
						
						
							
						
						
							68a3827539 
							
						 
					 
					
						
						
							
							Fix for Mantis  #21051 . Correctly handle specializations that occur during the specialization of methods.  
						
						... 
						
						
						
						cclasses.pas:
  + TFPHashList & TFPHashObjectList: add WhileEachCall methods that walk the list like ForEachCall does, but uses a while-loop instead of a for-loop
psub.pas, generate_specialization_procs:
  * use WhileEachCall instead of ForEachCall as new defs can be added during the specialization that need to be specialized as well
+ added test
git-svn-id: trunk@25577 - 
						
					 
					
						2013-09-26 08:15:58 +00:00 
						 
				 
			
				
					
						
							
							
								sergei 
							
						 
					 
					
						
						
						
						
							
						
						
							7fbcf64608 
							
						 
					 
					
						
						
							
							* Disabled r25488 for ARM targets since it causes crashes there, Mantis  #25050 .  
						
						... 
						
						
						
						git-svn-id: trunk@25520 - 
						
					 
					
						2013-09-18 18:55:24 +00:00 
						 
				 
			
				
					
						
							
							
								sergei 
							
						 
					 
					
						
						
						
						
							
						
						
							1bd43f0ea1 
							
						 
					 
					
						
						
							
							* Outgoing parameters on stack do not need to inhibit stack frame optimization on targets with fixed stack, because there they do not modify stack pointer in the middle of routine.  
						
						... 
						
						
						
						git-svn-id: trunk@25488 - 
						
					 
					
						2013-09-15 12:19:11 +00:00 
						 
				 
			
				
					
						
							
							
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							d4968e054b 
							
						 
					 
					
						
						
							
							+ arm: tsettings.instructionset  
						
						... 
						
						
						
						* the selected instruction set is now independent from the cpu type: e.g. armv7-a can perfectly execute thumb(2) code
git-svn-id: trunk@25370 - 
						
					 
					
						2013-08-25 21:56:12 +00:00 
						 
				 
			
				
					
						
							
							
								sergei 
							
						 
					 
					
						
						
						
						
							
						
						
							ac2006898f 
							
						 
					 
					
						
						
							
							* Mark procedures with shortstring value parameters as non-leaf, because such parameters generate a call (to fpc_shortstr_assign).  
						
						... 
						
						
						
						git-svn-id: trunk@25082 - 
						
					 
					
						2013-07-11 08:21:45 +00:00 
						 
				 
			
				
					
						
							
							
								svenbarth 
							
						 
					 
					
						
						
						
						
							
						
						
							fc79d47b09 
							
						 
					 
					
						
						
							
							Fix for Mantis  #24651 . Allow pointer comparison for internal expressions (in this case check for valid VMT).  
						
						... 
						
						
						
						nadd.pas, taddnode:
  + add new constructor "create_internal" which adds "nf_internal" to the node's "flags"
  * pass_typecheck_internal: allow pointer comparisons other than "=" and "<>" for nodes which have "nf_internal" set
psub.pas, generate_bodyentry_block:
  * create the addnode using "create_internal" instead of "create" to allow the pointer comparison
+ added test 
git-svn-id: trunk@25069 - 
						
					 
					
						2013-07-09 08:04:11 +00:00 
						 
				 
			
				
					
						
							
							
								sergei 
							
						 
					 
					
						
						
						
						
							
						
						
							1419a12865 
							
						 
					 
					
						
						
							
							- Removed MIPS-specific code which has been copied to TMIPSProcinfo.set_first_temp_offset in r23885.  
						
						... 
						
						
						
						git-svn-id: trunk@24963 - 
						
					 
					
						2013-06-24 12:02:17 +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 
							
						 
					 
					
						
						
						
						
							
						
						
							a1bc04bbb3 
							
						 
					 
					
						
						
							
							* don't omit stack frame generation when generating gprof information, as  
						
						... 
						
						
						
						mcount expects the frame pointer to be valid
git-svn-id: trunk@24642 - 
						
					 
					
						2013-05-30 13:43:51 +00:00 
						 
				 
			
				
					
						
							
							
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							c087d97b96 
							
						 
					 
					
						
						
							
							* typo fixed  
						
						... 
						
						
						
						git-svn-id: trunk@24431 - 
						
					 
					
						2013-05-04 19:37:34 +00:00 
						 
				 
			
				
					
						
							
							
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							0e41df598e 
							
						 
					 
					
						
						
							
							* merge i8086 branch by Nikolay Nikolov  
						
						... 
						
						
						
						git-svn-id: trunk@24324 - 
						
					 
					
						2013-04-25 20:23:51 +00:00 
						 
				 
			
				
					
						
							
							
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							52070e26e1 
							
						 
					 
					
						
						
							
							* arm thumb uses always the stack pointer as frame pointer  
						
						... 
						
						
						
						git-svn-id: trunk@24192 - 
						
					 
					
						2013-04-07 21:00:58 +00:00 
						 
				 
			
				
					
						
							
							
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							b231c049c9 
							
						 
					 
					
						
						
							
							* arm thumb knows only positively growing stacks  
						
						... 
						
						
						
						git-svn-id: trunk@24000 - 
						
					 
					
						2013-03-25 17:56:13 +00:00 
						 
				 
			
				
					
						
							
							
								nickysn 
							
						 
					 
					
						
						
						
						
							
						
						
							30d661734c 
							
						 
					 
					
						
						
							
							+ enable tprocdef.fpu_used for i8086 also  
						
						... 
						
						
						
						git-svn-id: branches/i8086@23835 - 
						
					 
					
						2013-03-14 16:33:37 +00:00 
						 
				 
			
				
					
						
							
							
								florian 
							
						 
					 
					
						
						
						
						
							
						
						
							8c24a85462 
							
						 
					 
					
						
						
							
							* turn off stack frame stripping for i8086 for now, it cannot do sp relative addressing  
						
						... 
						
						
						
						git-svn-id: branches/i8086@23783 - 
						
					 
					
						2013-03-10 18:53:49 +00:00