Commit Graph

287 Commits

Author SHA1 Message Date
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
florian
9e66674ff9 + first part of qwordbool implementation
git-svn-id: trunk@4462 -
2006-08-19 23:16:17 +00:00
Jonas Maebe
d4a818c8ae * support for subsets which are not a multiple of 8 bits
git-svn-id: trunk@4442 -
2006-08-19 11:11:37 +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
e32e5e1f9f * fixed interface wrappers for darwin in case they end up in
a shared library

git-svn-id: trunk@3976 -
2006-06-27 13:42:00 +00:00
Jonas Maebe
3a3651a050 + ppc implementations of subsetreg routines
git-svn-id: trunk@3758 -
2006-05-31 19:01:08 +00:00
Jonas Maebe
a387be19a0 + a_call_ref for ppc32 and ppc64
git-svn-id: trunk@3392 -
2006-04-30 20:50:37 +00:00
Jonas Maebe
0d77459b9d * added missing masking of upper 24/16 bits on ppc after performing
add/sub/shl/mul on 8 or 16 bit "registers" + test (tcinvint5)
  * optimized register-register loading of < 32 bit values (removes
    30KB of superfluous extsb/extsh/rlwinm's from compiler+rtl)

git-svn-id: trunk@3207 -
2006-04-14 13:01:10 +00:00
Jonas Maebe
c41da1172c * removed wrong comment along with commented-out code
git-svn-id: trunk@3165 -
2006-04-07 21:57:30 +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
e919e1f2fd * fixed compilation
git-svn-id: trunk@2914 -
2006-03-14 08:38:13 +00:00
peter
b6e35a200e * rewrite of optimizer options
git-svn-id: trunk@2901 -
2006-03-13 09:05:50 +00:00
Jonas Maebe
4ed39b0c16 * don't explicitly us NR_F0 in concatcopy but ask a register from
the register allocator (since NR_F0 can also be used by the ra)

git-svn-id: trunk@2855 -
2006-03-11 14:13:47 +00:00
Jonas Maebe
7cdf9bbaac * moved the indirect symbol stuff from nppcld to cgobj and ncgld, since
darwin/x86 needs the same code
  - removed now empty nppcld unit

git-svn-id: trunk@2821 -
2006-03-09 18:27:11 +00:00
Jonas Maebe
8a10afc29d * align symbol stubs on 16 bytes instead of 4
* removed some useless/wrong ".data" section directives in the symbol stubs

git-svn-id: trunk@2816 -
2006-03-09 10:36:57 +00:00
Jonas Maebe
ab5f5ca15e * fixed ppc compilation
git-svn-id: trunk@2778 -
2006-03-05 22:06:44 +00:00
Jonas Maebe
71407ba8cb * don't concatcopy if source = dest
git-svn-id: trunk@2691 -
2006-02-26 14:53:20 +00:00
Jonas Maebe
1273e0d7ed * generate signed comparisons for immediate equality comparisons if
possible, because those can be optimized better by the peephole
    optimizer

git-svn-id: trunk@2235 -
2006-01-08 19:54:58 +00:00
Jonas Maebe
5e9db609e3 * fixed bug fixref whereby a register of a reference was overwritten
git-svn-id: trunk@2212 -
2006-01-07 21:52:17 +00:00
Jonas Maebe
c423e23bb4 * only use r12 as frame pointer in the entry code for ppc if necessary
git-svn-id: trunk@2086 -
2005-12-31 10:54:09 +00:00
Jonas Maebe
6c30925e04 * fixed offsets used by stmw/lmw
git-svn-id: trunk@2084 -
2005-12-30 23:50:37 +00:00
Jonas Maebe
c3f27eee06 * optimized generation of and generated entry and exit code:
* no stack frame generated anymore if it's not necessary
    * only the necessary stack space is now reserved, instead of
      room for all non-volatile registers
    * less usage of helper registers

git-svn-id: trunk@2082 -
2005-12-30 17:20:07 +00:00
Jonas Maebe
66ebbbc5c2 * always generate code which can be used to build dynamically loadable
libraries with

git-svn-id: trunk@2013 -
2005-12-20 19:58:27 +00:00
Jonas Maebe
16f9c89854 - reverted previous commit, committed the wrong file
git-svn-id: trunk@2001 -
2005-12-20 10:13:04 +00:00
Jonas Maebe
a16fa618de * fixed passing record parameters of size >= 3 and whose size is not
divisible by 4 on Darwin (have to be passed on the stack instead of in
    registers), fixes tcalext3

git-svn-id: trunk@2000 -
2005-12-20 10:11:50 +00:00
Jonas Maebe
cc44a19af5 * use stmw/lmw when saving/restoring a lot of registers, to reduce generated
code size and thus instruction cache pressure.

git-svn-id: trunk@1785 -
2005-11-19 17:31:35 +00:00
peter
82faa95118 * lineinfo fixed for binary writer
* add tai_directive to replace old tai_direct calls
    in powerpc

git-svn-id: trunk@1139 -
2005-09-19 11:47:30 +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
Jonas Maebe
9d877e055b * no longer create new asmsymbols in a_jmp(). Very strange that the jmp
peephole optimization worked for ppc...

git-svn-id: trunk@1079 -
2005-09-14 19:22:22 +00:00
Jonas Maebe
b779d6d28f * fixed fixref() (by Thomas Schatzl)
git-svn-id: trunk@904 -
2005-08-18 11:09:57 +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
Jonas Maebe
f948a34c78 - disabled wrong GOT setup code which destroys r31 without saving it (should
have been done a long time ago already)

git-svn-id: trunk@733 -
2005-07-24 08:26:12 +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
bf51ab03af + support for Mach-O in lineinfo.pp (by Jan Ruzicka)
* always store the return address in the stack frame on ppc if debuginfo
    or lineinfo is turned on (otherwise the parent of a leaf function is
    missing in backtraces)

git-svn-id: trunk@724 -
2005-07-21 13:09:45 +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
Jonas Maebe
7356f83713 * fixed calling of external procedures if the first time they are used in a
compilation unit is in an expression which merely takes their address

git-svn-id: trunk@439 -
2005-06-18 09:06:07 +00:00
Jonas Maebe
aea6563bba * no longer change r12 when fpu regs have to saved, corrupted copying of
stack parameters coming after that

git-svn-id: trunk@130 -
2005-05-27 22:09:49 +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
Jonas Maebe
a5c94ddccd * removed some unused variables 2005-03-25 21:55:43 +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
e820bc93f2 * interface wrapper generation moved to cgobj
* generate interface wrappers after the module is parsed
2005-01-24 22:08:32 +00:00
Jonas Maebe
74cc20070d * r2 can be used by the register allocator under Darwin
* merged the initialisations of the fpu register allocator for AIX and
    SYSV
2005-01-13 22:02:40 +00:00
Jonas Maebe
9c22d594b0 + support for passing records in registers under darwin
* tcgpara now also has an intsize field, which contains the size in
    bytes of the whole parameter
2005-01-10 21:50:05 +00:00
Károly Balogh
18be2ff0fd * sysv abi also uses F0-F13 as volatile registers 2005-01-05 19:01:53 +00:00
Jonas Maebe
4c3b9ce6c3 * fixed a_jmp_name() for darwin 2004-12-24 11:51:55 +00:00
Jonas Maebe
fcf16c4983 * fixed synchronising 64bit regvars on 32bit systems at the start and
end of procedures
  * hack for ppc for loading of paras from their callee location to local
    temps
2004-12-11 12:42:28 +00:00
Jonas Maebe
49a8939b22 * modifications to work with the generic code to copy LOC_REFERENCE
parameters to local temps (fixes tests/test/cg/tmanypara)
2004-12-04 21:47:46 +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
0c7e53bb81 * fixed compile of powerpc,sparc,arm 2004-11-11 19:31:33 +00:00
peter
c95a859f0a * generic tlocation
* move tlocation to cgutils
2004-10-31 21:45:02 +00:00
Jonas Maebe
c0b4a9026c + empty g_save_standard_registers/g_restore_standard_registers overrides
(their work was/is done by g_proc_entry/g_proc_exit, and the generic
     version saves the registers in the wrong place)
2004-10-26 18:21:29 +00:00
peter
705868e816 * remove saveregister calling convention 2004-10-24 20:01:08 +00:00
peter
2ee2004032 * fixed compilation with removed loadref 2004-10-24 11:53:45 +00:00
Jonas Maebe
513b687ce7 + support for nostackframe directive 2004-10-20 07:32:42 +00:00
Jonas Maebe
99c6740d7d * include pi_do_call if we generate a call instead of internalerroring
(workaround)
2004-10-11 07:13:14 +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
Jonas Maebe
8e0fd21568 * fixed op_const_reg_reg for (OP_ADD,0,reg1,reg2) 2004-07-17 14:48:20 +00:00
Jonas Maebe
fab51678da * fixed passing of fpu paras on the stack
* fixed number of fpu parameters passed in registers
  * skip corresponding integer registers when using an fpu register for a
    parameter under the AIX abi
2004-07-09 21:45:24 +00:00
Jonas Maebe
d30ced66a1 * fixed several errors due to aword -> aint change 2004-07-01 18:00:00 +00:00
florian
8a9758c5e2 * logs truncated 2004-06-20 08:55:28 +00:00
peter
54cb433625 * powerpc compiles again 2004-06-17 16:55:46 +00:00
Jonas Maebe
42f59a3ca9 * parameters passed on the stack now also work as register variables 2004-06-02 17:18:10 +00:00
Jonas Maebe
174cea8023 * changed calling of external procedures to be the same as under gcc
(don't worry about all the generated stubs, they're optimized away
     by the linker)
    -> side effect: no need anymore to use special declarations for
       external C functions under Darwin compared to other platforms
       (it's still necessary for variables though)
2004-05-31 18:08:41 +00:00
olle
6be3ad0f87 * macos: fixed large offsets in references 2004-04-04 17:50:36 +00:00
florian
8cdd1af070 * fixed ppc compilation 2004-03-06 21:37:45 +00:00
florian
5b32162bde * got entry code fixed 2004-03-02 17:48:32 +00:00
florian
61f15e4ec4 * make cycle fixed
+ pic support for darwin
  + support of importing vars from shared libs on darwin implemented
2004-03-02 17:32:12 +00:00
olle
4fecc1a56f * big transformation of Tai_[const_]Symbol.Create[data]name* 2004-03-02 00:36:32 +00:00
florian
fabb9c33ac * top_symbol killed
+ refaddr to treference added
  + refsymbol to treference added
  * top_local stuff moved to an extra record to save memory
  + aint introduced
  * tppufile.get/putint64/aint implemented
2004-02-27 10:21:04 +00:00
florian
302d2d1442 * compilation fixed 2004-02-09 22:45:49 +00:00
olle
d173a77b9f * macos: a_load_store fixed to only allocat temp reg if needed, side effect is compiler work for macos again. 2004-02-09 20:44:40 +00:00
Jonas Maebe
9495f77117 - removed taicpu.is_reg_move because it's not used anymore
+ support tracking fpu register moves by rgobj for the ppc
2004-02-08 20:15:42 +00:00
Jonas Maebe
a23c7932cf * fixed previous commit 2004-02-08 14:50:13 +00:00
Jonas Maebe
169c8f5a3b * changed an explicit mr to a_load_reg_reg so it's registered with the
register allocator as move
2004-02-07 15:01:05 +00:00
peter
8c5b0f7d82 * first try to get cpupara working for x86_64 2004-02-04 22:01:13 +00:00
Jonas Maebe
5a98f00e7f - removed mov "reg, reg" optimizations, as they are removed by the
register allocator and may be necessary to indicate a register may not
    be reused before some point
2004-02-03 19:49:24 +00:00
Jonas Maebe
c006ab8326 - removed double construction of fpu register allocator 2004-01-25 16:36:34 +00:00
peter
47f08937e4 * use localalign info for alignment for locals and temps
* sparc fpu flags branching added
  * moved powerpc copy_valye_openarray to generic
2004-01-12 22:11:38 +00:00
Jonas Maebe
92f038ebec * fixed saving/restoring of volatile fpu registers under sysv
+ better provisions for abi differences regarding fpu registers that have
    to be saved
2003-12-29 14:17:50 +00:00
Jonas Maebe
83323b4955 * fixed tb0350 (support loading address of reference containing the
address 0)
2003-12-29 11:13:53 +00:00
Jonas Maebe
8953ed5494 * fixed tnotnode for < 32 bit quantities 2003-12-28 23:49:30 +00:00
florian
218beb5b32 * handling of open array value parameters fixed 2003-12-28 19:22:27 +00:00
peter
1c7e6fc380 * sparc updates
* use registertype in spill_register
2003-12-26 14:02:30 +00:00
florian
7bd24b32c3 + register allocators are set to nil now after they are freed 2003-12-18 01:03:52 +00:00
florian
2aeea741ed * fixed ppc compilation 2003-12-16 21:49:47 +00:00
Jonas Maebe
03d03d7ce4 * fixed compilation and simplified fixref, so it never has to reallocate
already freed registers anymore
2003-12-15 21:37:09 +00:00
peter
bce5a1e252 * rg[tregistertype] added in tcg 2003-12-12 17:16:17 +00:00
Károly Balogh
c5afdadecb * fixed compilation with -dppc603 2003-12-10 00:09:57 +00:00
Jonas Maebe
8c11916462 * forgot call to cg.g_overflowcheck() in nppcadd
* fixed overflow flag definition
  * fixed cg.g_overflowcheck() for signed numbers (jump over call to
    FPC_OVERFLOW if *no* overflow instead of if overflow :)
2003-12-09 20:39:43 +00:00
florian
e63ae3ffee * a_load_ref_ref isn't allowed to be used in g_stackframe_entry 2003-12-07 21:59:21 +00:00
Jonas Maebe
30cf6be249 * another fix to a_load_ref_reg()
+ implemented uses_registers() method
2003-12-06 22:13:53 +00:00
Jonas Maebe
8cb716ca56 * fixed load_ref_reg for source > dest size 2003-12-05 22:53:28 +00:00
Jonas Maebe
255589e12e * fixed some int<->boolean type conversion issues 2003-12-04 20:37:02 +00:00
Jonas Maebe
4ac4d2cadb * fixded fixref() regarding the reallocation of already freed registers
used in references
2003-11-30 11:32:12 +00:00
Jonas Maebe
08a966d88a * fixed fpu regallocator initialisation 2003-11-30 10:16:05 +00:00