Commit Graph

101 Commits

Author SHA1 Message Date
Jonas Maebe
6c536dab3e * added several missing make_simple_ref() calls
* removed addr_pic again for darwin, as you have to explicitly code
    the relative address using a relsym instead of using an assembler
    directive like @GOT there

git-svn-id: trunk@9353 -
2007-11-29 22:06:14 +00:00
peter
9f0ca44c94 * new tf_smartlink_library flag
* use create_smartlink[_sections|_library] to check what to 
    do for smartlinking

git-svn-id: trunk@8715 -
2007-10-01 16:55:08 +00:00
Jonas Maebe
3a60a28283 * don't try to add current_procinfo.got to used_in_proc if it's a
virtual register
  * always add EBX to used_in_proc in case pi_needs_got, because it's
    currently always used due to the geteipasebx call
  * don't explicitly free the PIC register in the exitcode because
    then the assembler optimizer assumes the load restoring it (ebx)
    can be safely removed

git-svn-id: trunk@8683 -
2007-09-29 20:24:51 +00:00
Jonas Maebe
3266f4e483 + Compiler support for pic on darwin/i386. The i386 rtl still needs
to be made pic-safe (mainly accesses to the global default8087cw)
  * At the same time also made the non-pic code abi-compliant (access
    external data via indirect symbol pointers etc)

    Darwin/i386 also puts the got into a virtual register (like
    Darwin/ppc), a.o. because the register allocator fails to colour
    a routine in aasmcpu.pas if we take away ebx from it.

git-svn-id: trunk@8657 -
2007-09-26 21:42:27 +00:00
Jonas Maebe
9750e49d5a * fixed x86 compilation after r8651
git-svn-id: trunk@8652 -
2007-09-26 17:25:38 +00:00
Jonas Maebe
335bc9fd46 + PIC support for darwin/ppc32 (-Cg works now, no regressions in test
suite compiled with -Cg compared to without -Cg)
  + support for using a virtual register as PIC/got base register
  * moved got loading code from ncgutil to cgobj/cgcpu (can't test whether
    it didn't break anything under linux/i386, because "make cycle OPT=-Cg"
    was already broken due to the *prt*.as -> si_*.pp changes)

git-svn-id: trunk@8651 -
2007-09-26 16:41:32 +00:00
yury
93e72c2079 * Fixed bug introduced by r7667. Do not release pushed return value be callee for cdecl on win32. It fixes error3 of bug #9098.
git-svn-id: trunk@7734 -
2007-06-19 21:06:44 +00:00
florian
f87e96dfb0 * properly release open array value parameters on x86-64 or if they contain automated types, resolves #8664
git-svn-id: trunk@7100 -
2007-04-13 19:20:56 +00:00
Jonas Maebe
ee2a4bc8f2 * fixed range errors
git-svn-id: trunk@6185 -
2007-01-25 15:19:00 +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
Jonas Maebe
a3a74c3fbe * fixed interface wrappers for darwin in case they end up in
a shared library

git-svn-id: trunk@3980 -
2006-06-27 14:32:14 +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
Jonas Maebe
9125d0c189 * also align esp for all procedures/functions declared "assembler",
since they may do a call. If you don't want that to happen, use
    the nostackframe directive (i386-darwin only)

git-svn-id: trunk@2896 -
2006-03-12 21:20:29 +00:00
Jonas Maebe
435aee2398 * fixed g_copyvaluepara_openarray/g_releasevaluepara_openarray for
use_fixed_stack (use generic code)

git-svn-id: trunk@2895 -
2006-03-12 21:04:59 +00:00
Jonas Maebe
09a3bbfc07 * fixed previous commit
git-svn-id: trunk@2877 -
2006-03-11 22:53:41 +00:00
Jonas Maebe
7b5ee7342a * fixed wrong generation of teardown of stackframe on i386-darwin
in case no stackframe was generated (in case no pi_do_call in
    current_procinfo.flags)

git-svn-id: trunk@2876 -
2006-03-11 22:38:28 +00:00
Jonas Maebe
e7112c6636 * ignore po_interrupt for i386-darwin since it messes up stack alignment
git-svn-id: trunk@2857 -
2006-03-11 14:30:02 +00:00
Jonas Maebe
41eba7dffe * properly calculate the value to add to esp at the end of a function
without framepointer
  * use generic save/restore exception reason code for use_fixed_stack

git-svn-id: trunk@2846 -
2006-03-10 22:34:11 +00:00
Jonas Maebe
9de2847865 + support for passing parameters via pre-allocated stack space on i386
(override/adjust cgutils.use_fixed_stack to change conditions where
     this is done, currently only activated for darwin-i386)
  * make sure the stack is always aligned to 16 bytes on darwin-i386

git-svn-id: trunk@2840 -
2006-03-10 19:59:44 +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
61e3b70cfa * cleaned up segmented thread variables
git-svn-id: trunk@2135 -
2006-01-03 12:49:29 +00:00
florian
fb4557d71e * first implementation of pic for i386
git-svn-id: trunk@2107 -
2006-01-01 20:14:48 +00:00
peter
affb69dd7f * fixed const and reg parameter passing with alignment of 2 (go32v2/os2)
git-svn-id: trunk@1307 -
2005-10-06 07:29:41 +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
daniel
22e89e1a42 * Proof of concept: Support threadvars using segment registers.
git-svn-id: trunk@740 -
2005-07-24 21:06:23 +00:00
daniel
9989bb0d3c * Add operator size to "ret immidiate" instruction
git-svn-id: trunk@607 -
2005-07-10 09:34:51 +00:00
peter
c1b2e1aac5 * check function/procedure type when adding a proc definition
git-svn-id: trunk@546 -
2005-06-30 14:56:05 +00:00
florian
21ae782854 * fixed more xmm stuff
+ some win64 stuff added

git-svn-id: trunk@330 -
2005-06-09 20:50:17 +00:00
florian
ebcb69478f * fixed a lot of stuff for fpu/mm register variables
git-svn-id: trunk@199 -
2005-06-04 21:23:15 +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
florian
22d9294ab3 + overflow checking for the arm 2005-02-13 18:55:19 +00:00
peter
8f2a768124 * fix win32 small array parameters 2005-02-03 17:10:21 +00:00
peter
e820bc93f2 * interface wrapper generation moved to cgobj
* generate interface wrappers after the module is parsed
2005-01-24 22:08:32 +00:00
peter
b9ca478f50 * multiple location support for i386 a_param_ref
* remove a_param_copy_ref for i386
2005-01-18 22:19:20 +00:00
peter
89b1b583c9 * ttempcreatenode.create_reg merged into .create with parameter
whether a register is allowed
  * funcret_paraloc renamed to funcretloc
2004-11-21 17:54:59 +00:00
florian
18f7aa97dd * changed funcret location back to tlocation 2004-11-21 17:17:03 +00:00
peter
c95a859f0a * generic tlocation
* move tlocation to cgutils
2004-10-31 21:45:02 +00:00
peter
705868e816 * remove saveregister calling convention 2004-10-24 20:01:08 +00:00
peter
adb6f59eef * small regvar fixes
* loadref parameter removed from concatcopy,incrrefcount,etc
2004-10-24 11:44:28 +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
60c73cc0e5 * -Or fixes for open array 2004-10-13 21:12:51 +00:00
peter
8b3e00244f * length parameter for copyvaluearray changed to tlocation 2004-10-11 15:46:45 +00:00
peter
f5471aef6e * more spilling rewrites 2004-10-05 20:41:01 +00:00
peter
65c3ba277c * ungetregister is now only used for cpuregisters, renamed to
ungetcpuregister
  * renamed (get|unget)explicitregister(s) to ..cpuregister
  * removed location-release/reference_release
2004-09-25 14:23:54 +00:00
peter
33a834821f * paraloc branch merged 2004-09-21 17:25:12 +00:00