Commit Graph

102 Commits

Author SHA1 Message Date
Jonas Maebe
cc5aeb09de * fixed handling the result value of functions where the result type is
forced to something else by the compiler (internal rtl functions etc),
    necessary for the objc branch
  * fixed adding all used function result registers to the list of
    registers that may need to be saved before a function call

git-svn-id: trunk@13695 -
2009-09-12 12:21:34 +00:00
florian
f34acc8505 * fixes compilation on i386 after r13410
git-svn-id: trunk@13414 -
2009-07-19 17:39:09 +00:00
florian
e27937106f - removed obsolete USECMOV define
git-svn-id: trunk@11645 -
2008-08-24 12:46:42 +00:00
yury
0bcaf8845f * Fixed 'mixed signed/unsigned' warnings.
* Suppressed 2 unreachable code warnings.
* Now x86 compiler compiles without warnings and notes! It will be great to keep such state in future...

git-svn-id: trunk@11455 -
2008-07-23 13:16:46 +00:00
Jonas Maebe
53d11b9a06 * fixed para locations at the calleeside for nostackframe assembler
routines

git-svn-id: trunk@11023 -
2008-05-21 15:11:37 +00:00
peter
f7737bebda * fix parameter allocation for left to right calling conventions
git-svn-id: trunk@10597 -
2008-04-02 08:05:31 +00:00
peter
8f239d04b6 * cleanup and simplify the set type handling
git-svn-id: trunk@10432 -
2008-03-02 17:48:27 +00:00
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
yury
ed86757898 * Pass const record parameters by reference for all calling conventions on i386-wince. It is needed to be Windows unit Delphi compatible, since WinAPI functions are cdecl on wince.
git-svn-id: trunk@10296 -
2008-02-11 15:12:41 +00:00
peter
05e44101e8 * make call by value stdcall for records and arrays delphi compatible
git-svn-id: trunk@9280 -
2007-11-18 12:53:55 +00:00
yury
3b7e458f02 * Properly set location of float return value if it is passed as var parameter (it is always happens for safecall functions). It fixes bugs #8523 and #8977.
+ test.

git-svn-id: trunk@7728 -
2007-06-18 23:23:46 +00:00
florian
e923c6072d * handle stack parameters like delphi when using register calling conventions, resolves #8199
git-svn-id: trunk@6201 -
2007-01-26 17:38: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
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
e1faef3ec9 * pass variants by addr when using fastcall conventions
git-svn-id: trunk@4996 -
2006-10-21 18:03:01 +00:00
Jonas Maebe
0541a887b8 * pass record parameters on the stack for mwpascal calling convention
(instead of by reference)

git-svn-id: trunk@4866 -
2006-10-12 08:55:11 +00:00
Jonas Maebe
93fba718b9 * proper fix for problem I tried to solve in r3655
git-svn-id: trunk@3661 -
2006-05-24 19:44:16 +00:00
Jonas Maebe
d1e262d18c * fix use of unitialised value if a procedure only has an
array of const parameter

git-svn-id: trunk@3655 -
2006-05-24 14:56:11 +00:00
Jonas Maebe
cc7cea1a5d * always extend parameters < sizeof(aint) to sizeof(aint) for darwin/x86
git-svn-id: trunk@3628 -
2006-05-22 10:42:55 +00:00
florian
a5dfe315ec * made safecall working, handling not consistent yet though
git-svn-id: trunk@3418 -
2006-05-04 22:15:31 +00:00
Jonas Maebe
34f1c427eb * pass shortstrings (and longstrings) by reference to C routines (this is
what Apple's universal interfaces expect)

git-svn-id: trunk@3343 -
2006-04-27 13:02:36 +00:00
Jonas Maebe
f93ea93cea * fixed returning of records < 8 bytes but not a power of 2 from
functions under Darwin/x86
  * implemented "mwpascal" calling conventions for darwin/x86
    (pass const records by reference, destroyed registers are
     [eax,ecx,edx])

git-svn-id: trunk@3196 -
2006-04-12 12:19:08 +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
5155de6d61 * fixed webtbs/tw2514 for darwin/i386 (and a similar bug for win32):
you get an internalerror if you try to keep a 0-byte record in
    a register (because the paramgr then tries to allocate a register
    of size OS_NO)

git-svn-id: trunk@2929 -
2006-03-15 21:48:32 +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
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
Jonas Maebe
f3384bab09 + some initial darwin/x86 stuff:
* align stack to 16 bytes
    * extended takes 16 bytes
    * <= 8 byte records are passed in registers

git-svn-id: trunk@1224 -
2005-09-29 11:31:26 +00:00
florian
9be5247db5 * dyn. arrays are always passed by value, fixes 4240
git-svn-id: trunk@800 -
2005-08-05 21:52:58 +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
07442c5693 * fixed passing of variant parameters for windows api
* widestrings need to be allocated by a special OS call on windows

git-svn-id: trunk@458 -
2005-06-20 19:56:36 +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
dd0664156d * fix passing of 64bit values when using -Or 2005-02-15 19:16:04 +00:00
peter
482d781af3 win32 stdcall fixes needed for tw3650 2005-02-14 19:42:02 +00:00
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
peter
18ebd28692 * push_addr_param must be defined per target 2005-02-03 20:04:49 +00:00
peter
46dbff9c93 * revert last commit 2005-01-30 11:03:22 +00:00
peter
cd01e600b9 * update x86_64 with new cpupara 2005-01-29 11:36:52 +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
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
peter
8cf8c54609 * fixed varargs
* replaced dynarray with tlist
2004-11-22 22:01:19 +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
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
c95a859f0a * generic tlocation
* move tlocation to cgutils
2004-10-31 21:45:02 +00:00
peter
33a834821f * paraloc branch merged 2004-09-21 17:25:12 +00:00
Jonas Maebe
1dd5fc2b47 * changed first_sse_imreg to first_mm_imreg 2004-07-09 23:30:13 +00:00
peter
b6ed8c482b * varargs calculation fixed, it's now the same as the other
targets
2004-07-09 23:09:02 +00:00