Commit Graph

253 Commits

Author SHA1 Message Date
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
469672cb56 * fixed another crash with the new function result handling for sysv x86-64 abi
git-svn-id: trunk@10312 -
2008-02-12 21:26:46 +00:00
florian
1a2a4af773 * hopefully the final fix for x86-64 sysv calling conventions
git-svn-id: trunk@10304 -
2008-02-11 19:46:40 +00:00
florian
e4997eaa45 * fixes safecall on non-win64 x86-64, should solve random rte 229
git-svn-id: trunk@10295 -
2008-02-11 13:47:41 +00:00
florian
4592402529 * fixed sysv x86-64 function results for records and arrays with sizes 9..16 bytes
git-svn-id: trunk@10285 -
2008-02-10 22:28:07 +00:00
peter
79ca4b28a8 * fix non-x86 compile after r8558
git-svn-id: trunk@8559 -
2007-09-18 22:16:28 +00:00
peter
e0cf015159 * refactor function result handling
* rename methodpointerinit/done to callinitblock/callcleanupblock
  * moved checks in callnode to separate functions
  * funcretnode is now always a simple node instead of a block of
    statements
  * funcret and methodpointer are generated/optimized only in pass_1 so
    a conversion from calln to loadn is much easier
  * function result assignments are much more often optimized to use the
    assignment destination location instead of using a temp

git-svn-id: trunk@8558 -
2007-09-18 22:12:07 +00:00
Jonas Maebe
82e01b4ad9 + support for refcounted records returned by functions in 2 registers
(mantis #8685)

git-svn-id: trunk@7251 -
2007-05-03 15:05:44 +00:00
florian
00076c1076 * pass this to C++ methods always by reference
git-svn-id: trunk@7154 -
2007-04-22 19:49:56 +00:00
Jonas Maebe
e815b923d5 * a_loadfpu_* gets two size parameters: fromsize and tosize
* fixed downsizing the precision of floating point values
  * floating point constants are now treated using only the minimal
    precision required (e.g. 2.0 is now a single, 1.1 extended etc)
    (Delphi compatible)

git-svn-id: trunk@5927 -
2007-01-12 18:33:51 +00:00
florian
6118c3e477 * fixed assembling of movd with 64 bit registers
* fixed passing of floats to c varargs

git-svn-id: trunk@5477 -
2006-11-25 20:32:32 +00:00
florian
ab919747a6 * several m68k fixes
* push_value_para partially cleaned up

git-svn-id: trunk@5435 -
2006-11-20 22:13:49 +00:00
florian
95518d7ecf * pushparavalue shouldn't care about emulation settings
git-svn-id: trunk@5260 -
2006-11-05 21:55:12 +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
florian
67ba76f090 * several arm fixes
git-svn-id: trunk@4742 -
2006-09-27 21:05:05 +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
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
35126247bc * disabled a_call_ref for non-x86 (generates better code for ppc,
and means I don't have to cook up an a_call_ref for SPARC)

git-svn-id: trunk@4337 -
2006-08-03 15:46:48 +00:00
Jonas Maebe
2fd0ddf2f5 * fixed web bug #7100 (finalize instead of only decrref temps for
refcounted function results)

git-svn-id: trunk@4243 -
2006-07-17 15:29:30 +00:00
Jonas Maebe
d75b19e484 * removed/conditionalised several unused variables
git-svn-id: trunk@4194 -
2006-07-14 19:44:54 +00:00
peter
da8b734b56 * fix previous commit
git-svn-id: trunk@3936 -
2006-06-25 11:15:40 +00:00
peter
722c91e8f3 * disable vtentry code until a clean implementation is done
git-svn-id: trunk@3934 -
2006-06-25 10:13:59 +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
da02375f57 + safecall support for x86_64
git-svn-id: trunk@3425 -
2006-05-06 07:58:08 +00:00
florian
acc016c9ec * finished safecall support
git-svn-id: trunk@3417 -
2006-05-04 20:40:31 +00:00
florian
9bd2ee5477 * optimized code generation for virtual method calls
git-svn-id: trunk@3388 -
2006-04-30 19:07:16 +00:00
peter
fe4ab79cd9 * remove check for out/var parameters with LOC_CREFERENCE, we generate valid
code. The checking if the code is allowed is already done by valid_for_assign()

git-svn-id: trunk@3262 -
2006-04-18 06:27:01 +00:00
peter
be88cd47b2 Merged revisions 3090-3113 via svnmerge from
svn+ssh://peter@www.freepascal.org/FPC/svn/fpc/branches/linker/compiler

r3090 | peter | 2006-03-30 15:10:15 +0100 (Thu, 30 Mar 2006) | 2 lines

  * infrastructure for .vtable directives

r3094 | peter | 2006-03-31 10:01:48 +0100 (Fri, 31 Mar 2006) | 2 lines

  * vtable directive fixes

r3113 | peter | 2006-04-01 22:49:57 +0100 (Sat, 01 Apr 2006) | 2 lines

  * Smart VTable linking using Symbols

git-svn-id: trunk@3115 -
2006-04-02 00:11:17 +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
fad5d59bd9 * turned {$ifdef cputargethasfixedstack} into "if use_fixed_stack"
* fixed i386 parameter passing of function calls nested in parameters
    of functions which also need the stack to pass poarameters

git-svn-id: trunk@2847 -
2006-03-10 23:44:04 +00:00
Jonas Maebe
7c9cfe5e06 * fixed tests/test/cg/tformfnc.pp
git-svn-id: trunk@2844 -
2006-03-10 21:18:21 +00:00
tom_at_work
93bb997d8f * ppc64/linux: enhanced varargs support (passes tprintf test now)
* ppc64/linux: some small tweak for small memory locations copy code

git-svn-id: trunk@1778 -
2005-11-17 21:35:01 +00:00
florian
cd96d43ac3 * reverted lazy binding patch: lazy binding requires anyways PIC
git-svn-id: trunk@1758 -
2005-11-15 19:21:42 +00:00
florian
72d7597edc + implementation of lazy binding for linux
git-svn-id: trunk@1750 -
2005-11-14 22:28:12 +00:00
Jonas Maebe
89094457c5 * pass varargs float parameters only in integer registers instead of only
in fpu registers for aix abi. Proper fix is to pass them in both, but
    at least gcc under Mac OS X only seems to use the contents in the integer
    registers currently.

git-svn-id: trunk@1576 -
2005-10-23 14:23:16 +00:00
peter
a720145fd1 * remove obsolete pass2inline code
git-svn-id: trunk@1198 -
2005-09-25 20:02:17 +00:00
peter
2f0fdd1847 * cleaner fix for tb0496 (r1185)
git-svn-id: trunk@1196 -
2005-09-25 19:23:37 +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
florian
adb193497d + softfloat support for wince
* more units are build for wince

git-svn-id: trunk@959 -
2005-08-28 12:40:43 +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
1eed46514f * passing of dyn. arrays of tvarrec to array of const fixed, fixes bug #4219
git-svn-id: trunk@816 -
2005-08-07 14:43:45 +00:00
florian
32b96e75f3 * more fixes for float parameter handling on arm
git-svn-id: trunk@728 -
2005-07-22 20:14:03 +00:00
florian
c15f720867 * fixed passing of floats for cdecl procedures/functions
git-svn-id: trunk@726 -
2005-07-21 20:12:28 +00:00
florian
dac1050c11 + mmx support revived, fixes bug #4106
git-svn-id: trunk@555 -
2005-07-02 11:53:51 +00:00
florian
355aaa69c8 + before calling a helper procedure, all register classes are now saved, this patch is subject to being merged back
git-svn-id: trunk@201 -
2005-06-05 08:12:33 +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
5db9200128 decr refcnt for out paras 2005-04-25 09:41:28 +00:00